/* Cubbi — legal pages.
   Aesthetic: warm cozy "cream paper". Soft pastel glow, faint grain,
   rounded Nunito throughout — matching the app's SF Rounded type, with
   hierarchy from weight + size. Sage + butter accents. Calm and
   trustworthy, but unmistakably Cubbi — never cold legal boilerplate. */

:root {
  --cream:       #f6efe1;
  --cream-deep:  #e9ddc6;
  --surface:     #fffdf7;
  --ink:         #4b4435;
  --ink-soft:    #6f6552;
  --ink-strong:  #3a3327;
  --muted:       #9c9078;
  --sage:        #7d8c69;
  --sage-deep:   #5d6d49;
  --sage-tint:   #edf0e3;
  --butter:      #f0d6a0;
  --blush:       #ecc2b4;
  --line:        #e8dcc3;
  --radius-lg:   30px;
  --radius-md:   18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.72;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(62% 40% at 15% 6%, rgba(240, 214, 160, 0.55), transparent 70%),
    radial-gradient(58% 42% at 90% 96%, rgba(236, 194, 180, 0.46), transparent 72%),
    radial-gradient(46% 36% at 96% 16%, rgba(125, 140, 105, 0.16), transparent 70%),
    var(--cream);
  background-attachment: fixed;
}

/* Faint film grain — warmth and a touch of "paper". */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 48px 22px 84px;
}

/* ---- Masthead ---- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.wordmark {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 21px;
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: none;
  letter-spacing: 0.005em;
}

.leaf-chip {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--sage-tint);
  border-radius: 10px;
  box-shadow: 0 2px 6px -2px rgba(94, 84, 60, 0.22);
}
.leaf-chip svg { display: block; }

/* ---- Document card ---- */

.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 46px 46px 40px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 54px -24px rgba(94, 84, 60, 0.30),
    0 5px 16px -8px rgba(94, 84, 60, 0.16);
  animation: rise 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) 0.09s both;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 7px 14px 7px 10px;
  background: var(--sage-tint);
  color: var(--sage-deep);
  border-radius: 999px;
  border-bottom: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.home-pill:hover {
  background: #e4e8d5;
  transform: translateX(-2px);
}

.doc-title {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 34px;
  line-height: 1.14;
  letter-spacing: -0.014em;
  color: var(--ink-strong);
}

.doc-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 5px 13px;
  background: var(--sage-tint);
  color: var(--sage-deep);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.doc-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sage);
}

.intro {
  margin-top: 22px;
  font-size: 17.5px;
  color: var(--ink-soft);
}

/* ---- Body content ---- */

h2 {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 21px;
  color: var(--sage-deep);
  margin-top: 38px;
  margin-bottom: 6px;
}
h2::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--butter);
  margin-bottom: 13px;
}

p { margin-top: 12px; }
strong { color: var(--ink-strong); font-weight: 700; }

ul {
  margin-top: 12px;
  padding-left: 2px;
  list-style: none;
}
li {
  position: relative;
  padding-left: 26px;
  margin: 8px 0;
}
li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.66em;
  width: 7px;
  height: 7px;
  background: var(--sage);
  border-radius: 2px;
  transform: rotate(45deg);
}

a {
  color: var(--sage-deep);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(125, 140, 105, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}
a:hover {
  color: var(--ink-strong);
  border-bottom-color: var(--sage);
}

/* ---- Contact panel ---- */

.contact {
  margin-top: 16px;
  padding: 17px 19px;
  background: linear-gradient(135deg, rgba(240, 214, 160, 0.32), rgba(236, 194, 180, 0.24));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 16.5px;
  color: var(--ink-soft);
}
.contact a { font-weight: 800; }

/* ---- Footer ---- */

.doc-foot {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px dashed var(--cream-deep);
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---- Index / lobby ---- */

.lobby {
  text-align: center;
  animation: rise 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) 0.09s both;
}
.lobby-mark {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 50px;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  line-height: 1;
}
.lobby-sub {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.doc-links {
  display: grid;
  gap: 14px;
  margin-top: 32px;
  text-align: left;
}
.doc-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 19px 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 32px -20px rgba(94, 84, 60, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.doc-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -18px rgba(94, 84, 60, 0.34);
  color: inherit;
}
.doc-link-icon {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sage-tint);
}
.doc-link-icon.blush { background: linear-gradient(135deg, rgba(236, 194, 180, 0.5), rgba(240, 214, 160, 0.4)); }
.doc-link-text strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-strong);
}
.doc-link-text span {
  font-size: 13.5px;
  color: var(--muted);
}
.doc-link-arrow {
  margin-left: auto;
  color: var(--sage);
  transition: transform 0.2s ease;
}
.doc-link:hover .doc-link-arrow { transform: translateX(3px); }

.lobby-foot {
  margin-top: 34px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---- Motion ---- */

@keyframes rise {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Small screens ---- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .page { padding: 34px 16px 64px; }
  .doc-card { padding: 32px 25px 30px; border-radius: 24px; }
  .doc-title { font-size: 28px; }
  .lobby-mark { font-size: 42px; }
}
