/* === DGLS Files — Variant A · Sand & Slate palette === */

:root {
  /* Surfaces */
  --bg: #F3EBDA;          /* sand */
  --bg-2: #ECE2CB;        /* deeper sand */
  --bg-3: #E2D5B8;        /* deepest sand */
  --fg: #1F2933;          /* slate */

  /* Text emphasis on sand bg */
  --dim:   rgba(31, 41, 51, 0.22);
  --mute:  rgba(31, 41, 51, 0.38);
  --mid:   rgba(31, 41, 51, 0.55);
  --soft:  rgba(31, 41, 51, 0.72);
  --faint: rgba(31, 41, 51, 0.12);
  --hair:  rgba(31, 41, 51, 0.18);

  /* Accents */
  --hot:   #C56146;        /* terracotta — moments + dot */
  --gold:  #B08842;        /* aged gold — eyebrows + accents */
  --green: #1A8F4F;        /* fund — green */
  --green-loud: #08B14E;   /* funding — loud green */

  /* Legacy aliases kept for any inline refs */
  --ink: var(--bg);
  --bone: var(--fg);

  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", Didot, "Bodoni 72", "Times New Roman", serif;
  --rail: clamp(1.4rem, 3vw, 3rem);
  --section: clamp(6rem, 12vw, 11rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .3s ease, opacity .3s ease; }
img, svg, video { display: block; max-width: 100%; }
::selection { background: var(--green-loud); color: var(--bg); }

/* === Fund tokens (the loud-green system) === */
.fund { color: var(--green); font-weight: 500; }
.fund-loud { color: var(--green-loud); font-weight: 600; }
.fund-loud-italic { color: var(--green-loud); font-family: var(--display); font-style: italic; font-weight: 400; }

/* === Custom cursor (desktop only) === */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .cursor {
    position: fixed; top: 0; left: 0; width: 14px; height: 14px;
    border: 1px solid var(--fg); border-radius: 50%;
    pointer-events: none; z-index: 100;
    mix-blend-mode: multiply;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s, background .25s;
  }
  .cursor.big { width: 60px; height: 60px; background: var(--fg); }
}
@media (hover: none) or (pointer: coarse) { .cursor { display: none !important; } }

/* === Topbar === */
.topbar {
  position: fixed; inset: 0 0 auto 0;
  padding: 1.8rem var(--rail);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(243, 235, 218, 0));
}
.topbar > * { pointer-events: auto; }
.topbar a { font-size: 0.82rem; color: var(--fg); font-weight: 500; }
.topbar .left { display: flex; align-items: center; gap: 0.55rem; opacity: 0.95; }
.topbar .left svg { width: 16px; height: 16px; }
.topbar .right { display: flex; gap: 2rem; }
.topbar .right a { opacity: 0.62; font-weight: 400; }
.topbar .right a:hover { opacity: 1; }
.topbar .right a.is-active { opacity: 1; text-decoration: line-through; text-decoration-color: var(--mute); text-underline-offset: 4px; }
.topbar .right a.fund-loud { opacity: 1; color: var(--green-loud); font-weight: 600; }

/* === Bottom-left seal === */
.seal {
  position: fixed; left: var(--rail); bottom: 1.6rem; z-index: 20;
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mid);
}
.seal .dot {
  display: inline-block; width: 6px; height: 6px; background: var(--hot);
  border-radius: 50%; margin-right: 0.5rem; vertical-align: middle;
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 60%, 100% { opacity: 1 } 30% { opacity: 0.2 } }

/* === Draggable corner sticker === */
.sticker {
  position: fixed; right: var(--rail); bottom: 1.6rem;
  width: 130px; height: 130px; z-index: 30;
  cursor: grab; user-select: none;
}
.sticker.grabbing { cursor: grabbing; }
.sticker svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.sticker .core {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.sticker .core .seal-mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--fg);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-weight: 700; font-size: 0.95rem; font-family: var(--display);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Hero word stack === */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem var(--rail) 9rem;
  position: relative;
}
@media (min-height: 1800px) { .hero { min-height: 880px; } }
.word-stack { display: flex; flex-direction: column; gap: clamp(0.4rem, 1.3vw, 1.2rem); }
.word {
  font-family: var(--ui);
  font-weight: 800;
  font-size: clamp(2.6rem, 10vw, 10.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 600ms ease;
}
.word.lit { color: var(--fg); }
.word.fund { color: var(--green); font-weight: 800; }
.word.fund-loud { color: var(--green-loud); font-weight: 800; }
.word.indent-1 { padding-left: clamp(1.5rem, 10vw, 12rem); }
.word.indent-2 { padding-left: clamp(3rem, 20vw, 24rem); }
.word.indent-3 { padding-left: clamp(0.8rem, 5vw, 6rem); }

/* === Right-side caption plate === */
.plate {
  position: absolute; top: 50%; right: var(--rail); transform: translateY(-50%);
  max-width: 18rem; text-align: right; color: var(--mid);
  font-size: 0.78rem; line-height: 1.6;
}
.plate strong {
  color: var(--fg); font-weight: 600; display: block;
  margin-bottom: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.7rem;
}
@media (max-width: 960px) {
  .plate {
    position: static; transform: none; text-align: left;
    margin-top: 3rem; max-width: none;
  }
}

/* === Reveal strip === */
.reveal-strip {
  height: 60vh; min-height: 380px;
  background: linear-gradient(180deg, var(--bg), var(--bg-3));
  position: relative; overflow: hidden;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.reveal-strip::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(197, 97, 70, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(8, 177, 78, 0.18), transparent 55%);
}
.reveal-strip .deep-mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--ui); font-weight: 800;
  font-size: clamp(5rem, 20vw, 20rem);
  letter-spacing: -0.05em;
  color: rgba(31, 41, 51, 0.07);
  white-space: nowrap;
}
.reveal-strip .lower {
  position: absolute; left: var(--rail); bottom: 1.6rem; right: var(--rail);
  display: flex; justify-content: space-between;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mid);
}

/* === Marquee === */
.marquee {
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  padding: 1.4rem 0; overflow: hidden; white-space: nowrap;
  background: var(--bg-2);
}
.marquee__track {
  display: inline-flex; gap: 4rem;
  animation: track 42s linear infinite;
  padding-left: 4rem;
  font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mid);
}
.marquee__track span { display: inline-flex; align-items: center; gap: 1.4rem; }
.marquee__track span::after { content: "✦"; color: var(--hot); }
.marquee__track span.fund-loud { color: var(--green-loud); }
.marquee__track span.fund-loud::after { color: var(--green-loud); }
@keyframes track { to { transform: translateX(-50%); } }

/* === Generic section === */
.section { padding: var(--section) var(--rail); position: relative; }
.section + .section { border-top: 1px solid var(--faint); }

.section-head { max-width: 1400px; margin: 0 auto 4rem; display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: baseline; }
.section-head .eyebrow { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--hot); font-weight: 500; }
.section-head .eyebrow.fund-loud { color: var(--green-loud); }
.section-head h2 {
  font-family: var(--ui); font-weight: 800;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.98; letter-spacing: -0.035em;
  text-transform: uppercase; color: var(--fg);
}
.section-head h2 .serif-italic { font-family: var(--display); font-style: italic; font-weight: 300; text-transform: none; letter-spacing: -0.01em; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; gap: 1rem; } }

/* === Two-column body === */
.two-col { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; }
.two-col .lead { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.25; color: var(--fg); }
.two-col .body p { color: var(--soft); font-size: 1rem; line-height: 1.7; margin-bottom: 1.1rem; max-width: 60ch; }
.two-col .body p:last-child { margin-bottom: 0; }
.two-col .body strong { color: var(--fg); font-weight: 600; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }

/* === Chapter rows === */
.chapter-row {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 3rem;
  padding: 3rem 0; border-top: 1px solid var(--faint);
  align-items: start;
}
.chapter-row:first-child { border-top: 1px solid var(--hair); }
.chapter-row .num { font-family: var(--ui); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.3em; color: var(--gold); padding-top: 0.6rem; }
.chapter-row .num.fund-loud { color: var(--green-loud); }
.chapter-row h3 { font-family: var(--ui); font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.02em; text-transform: uppercase; line-height: 1; color: var(--fg); }
.chapter-row p { color: var(--soft); font-size: 0.95rem; line-height: 1.65; max-width: 52ch; }
@media (max-width: 800px) { .chapter-row { grid-template-columns: 1fr; gap: 0.8rem; } }

/* === Tile grid (stats) === */
.tile-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-left: 1px solid var(--hair); border-top: 1px solid var(--hair); }
.tile { padding: 2.5rem 1.8rem; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg); }
.tile.fund-tile { background: var(--bg-2); }
.tile .big { font-family: var(--ui); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; color: var(--fg); }
.tile .big.fund-loud { color: var(--green-loud); }
.tile .lbl { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mid); margin-top: 1rem; }
.tile .lbl.fund-loud { color: var(--green-loud); }
@media (max-width: 960px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tile-grid { grid-template-columns: 1fr; } }

/* === File card === */
.file-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.file-card { border: 1px solid var(--hair); padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: 1.4rem; background: var(--bg); transition: border-color .3s; }
.file-card:hover { border-color: var(--fg); }
.file-card .row { display: flex; justify-content: space-between; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mid); }
.file-card .row .gold { color: var(--gold); }
.file-card .row .fund-loud { color: var(--green-loud); }
.file-card h4 { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 1.8rem; line-height: 1.15; color: var(--fg); }
.file-card .stat { font-family: var(--ui); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -0.04em; color: var(--fg); }
.file-card .stat.fund-loud { color: var(--green-loud); }
.file-card .stat small { font-weight: 400; color: var(--mid); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; display: block; margin-top: 0.4rem; }
.file-card p { color: var(--soft); font-size: 0.88rem; line-height: 1.6; }
@media (max-width: 960px) { .file-grid { grid-template-columns: 1fr; } }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 1rem 1.8rem;
  border: 1px solid var(--fg);
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fg); background: transparent;
  transition: background .3s, color .3s, border-color .3s;
  cursor: pointer; font-family: var(--ui); font-weight: 500;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--fg); }
.btn--fund {
  border-color: var(--green-loud); color: var(--green-loud);
  background: transparent;
}
.btn--fund:hover { background: var(--green-loud); color: var(--bg); }
.btn--fund.btn--solid { background: var(--green-loud); color: var(--bg); border-color: var(--green-loud); }
.btn--fund.btn--solid:hover { background: transparent; color: var(--green-loud); }

/* === Form === */
.form { max-width: 720px; margin: 0 auto; display: grid; gap: 1.4rem; }
.form .field label { display: block; font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mid); margin-bottom: 0.5rem; }
.form .field input, .form .field textarea, .form .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--hair);
  color: var(--fg); font-family: var(--ui); font-size: 1.05rem; padding: 0.7rem 0;
  transition: border-color .3s;
}
.form .field input:focus, .form .field textarea:focus, .form .field select:focus {
  outline: none; border-bottom-color: var(--fg);
}
.form .field textarea { min-height: 120px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form .submit-row { margin-top: 1rem; display: flex; gap: 1rem; align-items: center; }
.form-status { font-size: 0.85rem; color: var(--green); font-family: var(--display); font-style: italic; }

/* === Legal long-form === */
.long-form { max-width: 760px; margin: 0 auto; color: var(--soft); font-size: 1rem; line-height: 1.75; }
.long-form h2 { font-family: var(--ui); font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; font-size: 1.2rem; color: var(--fg); margin: 3rem 0 1rem; }
.long-form p { margin-bottom: 1rem; }
.long-form em { color: var(--mute); }
.long-form a { color: var(--fg); border-bottom: 1px solid var(--gold); }

/* === Footer === */
.foot {
  padding: 5rem var(--rail) 3rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
  border-top: 1px solid var(--hair);
  background: var(--bg-2);
}
.foot h4 { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--hot); margin-bottom: 1rem; font-weight: 600; }
.foot h4.fund-loud { color: var(--green-loud); }
.foot ul { list-style: none; }
.foot li { margin-bottom: 0.6rem; font-size: 0.85rem; color: var(--soft); }
.foot li a:hover { color: var(--fg); }
.foot li a.fund-loud:hover { color: var(--green); }
.foot .brand-block strong { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; display: block; margin-bottom: 0.8rem; color: var(--fg); }
.foot .brand-block p { font-size: 0.82rem; color: var(--soft); max-width: 30ch; line-height: 1.6; }
.legal-bar {
  padding: 1.8rem var(--rail);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid);
  border-top: 1px solid var(--hair);
  background: var(--bg-2);
}
@media (max-width: 900px) {
  .foot { grid-template-columns: 1fr 1fr; padding-top: 4rem; }
  .foot .brand-block { grid-column: 1 / -1; }
}

/* === Hero size variants === */
.hero--compact { min-height: 70vh; padding-top: 9rem; padding-bottom: 5rem; }
@media (min-height: 1800px) { .hero--compact { min-height: 560px; } }

/* === Funding-page accent: the page bleeds green === */
body.theme-fund .seal .dot { background: var(--green-loud); }
body.theme-fund .reveal-strip::before {
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(8, 177, 78, 0.28), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(26, 143, 79, 0.22), transparent 55%);
}
body.theme-fund .topbar .right a[href="/secure-funding.html"] {
  color: var(--green-loud); opacity: 1; text-decoration: line-through; text-decoration-color: var(--green);
}

/* === Utility === */
.gold { color: var(--gold); }
.hot { color: var(--hot); }
.serif-italic { font-family: var(--display); font-style: italic; font-weight: 300; }
.divider { height: 1px; background: var(--hair); margin: 4rem auto; max-width: 1400px; }

/* === Theme toggle (moon / sun) === */
.theme-toggle {
  background: transparent; border: 1px solid var(--hair); border-radius: 999px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--fg);
  transition: border-color .3s, background .3s, color .3s, transform .4s;
  margin-left: 1.4rem;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
[data-theme="night"] .theme-toggle .moon { display: none; }
[data-theme="night"] .theme-toggle .sun { display: block; }

/* === Night mode (dark inverse, same green system) === */
[data-theme="night"] {
  --bg: #11151D;
  --bg-2: #161B25;
  --bg-3: #1E2531;
  --fg: #F3EBDA;

  --dim:   rgba(243, 235, 218, 0.18);
  --mute:  rgba(243, 235, 218, 0.34);
  --mid:   rgba(243, 235, 218, 0.50);
  --soft:  rgba(243, 235, 218, 0.68);
  --faint: rgba(243, 235, 218, 0.10);
  --hair:  rgba(243, 235, 218, 0.16);

  --hot:   #E84A2C;
  --gold:  #C8A24A;
  --green: #1DB763;
  --green-loud: #2CDC74;
}

[data-theme="night"] body { background: var(--bg); color: var(--fg); }
[data-theme="night"] .topbar { background: linear-gradient(180deg, var(--bg) 70%, rgba(17, 21, 29, 0)); }
[data-theme="night"] .cursor { mix-blend-mode: difference; }
[data-theme="night"] .reveal-strip::before {
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(232, 74, 44, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(44, 220, 116, 0.18), transparent 55%);
}
[data-theme="night"] .reveal-strip .deep-mark { color: rgba(243, 235, 218, 0.06); }
[data-theme="night"] body.theme-fund .reveal-strip::before {
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(44, 220, 116, 0.26), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(29, 183, 99, 0.20), transparent 55%);
}

/* Smooth cross-fade when toggling */
html { transition: background-color .35s ease; }
body, .topbar, .foot, .legal-bar, .marquee, .tile, .file-card, .reveal-strip {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* ─── Brand wordmark (DGLS · FILES) ─── */
.wordmark { display: inline-flex; align-items: baseline; gap: 0.32em; line-height: 1; white-space: nowrap; }
.wordmark .wm-d { font-family: var(--display); font-weight: 400; font-size: 1.18rem; letter-spacing: 0.015em; color: var(--gold); }
.wordmark .wm-dot { color: var(--gold); font-size: 0.9rem; line-height: 1; transform: translateY(-0.08em); }
.wordmark .wm-f { font-family: var(--ui); font-weight: 700; font-size: 0.84rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--fg); }
.topbar .left { text-decoration: none; }
.topbar .left:hover .wm-f { color: var(--gold); transition: color .3s; }

.wordmark--lg .wm-d { font-size: 2rem; }
.wordmark--lg .wm-f { font-size: 1.18rem; letter-spacing: 0.34em; }

/* ─── Card+check badge mark ─── */
.badge-mark { display: block; flex: 0 0 auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }

/* ─── Founder note ─── */
.founder-note {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.35; color: var(--fg);
  border-left: 2px solid var(--gold); padding-left: 1.2rem; margin-top: 2.2rem;
}
.founder-sign {
  font-family: var(--ui); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-top: 0.9rem; padding-left: 1.2rem;
}

/* ─── Full brand image banner (homepage top) ─── */
.brand-hero { display: flex; justify-content: center; padding: 2.5rem 1.5rem 0.5rem; }
.brand-hero img {
  width: 100%; max-width: 480px; height: auto; display: block;
  border: 1px solid var(--hair); border-radius: 10px;
  box-shadow: 0 24px 60px -28px rgba(31, 41, 51, 0.45);
}
[data-theme="night"] .brand-hero img { box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7); }
@media (max-width: 640px) { .brand-hero { padding-top: 1.5rem; } }
