/* =====================================================================
   Dabu Digital Studio - static site design system
   Structure and component system adapted from the RV / Eldrich + Iya
   builds, rendered in the Dabu identity: Fraunces + Inter, forest green +
   cream + ember (warm) with sage (cool) as the secondary accent.
   Headings stay elegant serif (not uppercase). No build step.
   ===================================================================== */

/* ---- Design tokens ---- */
:root {
  /* ink + surfaces */
  --ink:        #0a2419;   /* forest-950: primary text + dark bands */
  --ink-soft:   #103326;   /* forest-900 */
  --night:      #0a2419;   /* dark section background (marquee, footer, CTA) */
  --night-2:    #103326;
  --paper:      #fffdf8;
  --cream:      #f6f1e6;   /* brand background */
  --smoke:      #efe8d8;   /* warm light section background */
  --smoke-2:    #e6dcc7;   /* slightly deeper warm neutral */

  /* accents */
  --accent:     #c05e35;   /* ember: primary (buttons, links, highlight) */
  --accent-dk:  #a44a26;   /* deeper ember: hover */
  --accent-rgb: 192, 94, 53;
  --rose:       #6f9a82;   /* sage: secondary accent (numerals, separators) */
  --rose-tint:  #e3ece4;   /* sage-soft tint */

  /* text + lines */
  --gray:       #4a5f53;   /* muted forest-green body text */
  --line:       rgba(10, 36, 25, 0.14);
  --line-soft:  rgba(10, 36, 25, 0.08);

  /* layout */
  --maxw:   1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 16px;
  --radius-sm: 10px;

  --shadow:    0 18px 50px rgba(10, 36, 25, 0.12);
  --shadow-sm: 0 8px 24px rgba(10, 36, 25, 0.08);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

/* ---- Type ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.08; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.2; }
p { color: var(--ink); }

/* skip link */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--accent); color: var(--cream); padding: 0.6rem 1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }

/* ---- Layout primitives ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(60px, 9vw, 120px); }
.section.smoke { background: var(--smoke); }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--gray); line-height: 1.65; max-width: 60ch; }
.center { text-align: center; }

/* ---- Eyebrow ---- */
.eyebrow { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); display: inline-block; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 14px 26px; border-radius: 100px; border: 2px solid transparent; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--cream); box-shadow: 0 8px 20px -10px rgba(var(--accent-rgb), 0.5); }
.btn-primary:hover { background: var(--accent-dk); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost.on-dark { border-color: rgba(246, 241, 230, 0.35); color: var(--cream); }
.btn-ghost.on-dark:hover { border-color: var(--cream); }

/* ---- Header / nav ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 230, 0.82); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-size: 0.95rem; }
.brand .plus { color: var(--rose); font-style: italic; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { position: relative; font-size: 0.82rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink); padding: 0.2rem 0; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent); transition: width 0.25s ease; }
.nav-links a:not(.btn):hover::after, .nav-links a.active:not(.btn)::after { width: 100%; }
.nav-links a.active:not(.btn) { color: var(--accent); }
.nav-links .btn { padding: 9px 18px; font-size: 0.68rem; letter-spacing: 0.1em; border-width: 1px; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--cream); }
.nav-links .btn::after { display: none; }
.nav-links a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; }

/* ---- Hero (light editorial) ---- */
.hero { position: relative; overflow: hidden; background: radial-gradient(52% 58% at 86% 0%, rgba(var(--accent-rgb), 0.10), transparent 60%), var(--cream); color: var(--ink); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(10, 36, 25, 0.05) 1px, transparent 1px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 78%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000, transparent 78%); opacity: 0.6; pointer-events: none; }
.hero-inner { position: relative; padding-block: clamp(64px, 12vw, 132px); }
.hero h1 { color: var(--ink); max-width: 16ch; }
.hero h1 .hl { color: var(--accent); font-style: italic; }
.hero-lead { margin-top: 1.5rem; max-width: 54ch; color: var(--gray); font-size: clamp(1.05rem, 2vw, 1.2rem); }
.hero-cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-stats { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 2.6rem; }
.hero-stats .stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--ink); font-weight: 600; }
.hero-stats .stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gray); }

/* ---- Marquee (right to left, per Karl's request) ---- */
.marquee { overflow: hidden; background: var(--night); border-block: 1px solid var(--line); padding-block: 14px; }
.marquee-track { display: flex; gap: 0; width: max-content; animation: marquee-rtl 36s linear infinite; }
.marquee-track .m-item { display: inline-flex; align-items: center; white-space: nowrap; }
.marquee-track .m-item > span { padding-inline: 1.6rem; font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: rgba(246, 241, 230, 0.9); }
.marquee-track .m-item .sep { color: var(--rose); font-style: normal; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---- Cards ---- */
.card-lift { transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; }
.card-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--rose-tint); color: var(--accent); font-size: 1.2rem; margin-bottom: 1rem; }
.feature:hover .ic { background: var(--accent); color: var(--cream); }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature p { color: var(--gray); font-size: 0.96rem; }

/* ---- Work / portfolio card ---- */
.work-thumb { display: block; }
.thumb-frame { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; background: var(--night-2); box-shadow: var(--shadow-sm); }
.thumb-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.work-thumb:hover .thumb-frame img { transform: scale(1.04); }
.thumb-frame .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: rgba(10, 36, 25, 0.42); border: 1px solid rgba(246, 241, 230, 0.9); color: var(--cream); font-size: 0.85rem; backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; }
.work-thumb:hover .thumb-frame .play { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
.work-meta { margin-top: 14px; }
.work-meta h3 { font-size: 1.1rem; line-height: 1.28; font-weight: 600; }
.work-meta h3 a:hover { color: var(--accent); }
.work-meta p { color: var(--gray); font-size: 0.9rem; line-height: 1.55; margin-top: 8px; }
.work-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.work-tags > div { display: flex; align-items: baseline; gap: 6px; }
.work-tags dt { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gray); }
.work-tags dd { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; }
.work-tags .lead-karl { color: var(--accent); }
.work-tags .lead-kyle { color: var(--rose); }
.work-tags .watch { margin-left: auto; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink); }
.work-tags .watch:hover { color: var(--accent); }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.group-head .name { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); }
.group-head .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gray); }

/* ---- Price table ---- */
.price-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.price-table thead th { background: var(--ink); color: var(--cream); font-family: var(--font-body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody tr:nth-child(even) { background: var(--smoke); }
.price-table .amt { font-family: var(--font-display); color: var(--accent); font-weight: 600; }

/* ---- CTA band ---- */
.cta-band { position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%), var(--night); color: var(--cream); text-align: center; }
.cta-band .wrap { padding-block: clamp(56px, 9vw, 104px); }
.cta-band h2 { color: var(--cream); }
.cta-band p { color: rgba(246, 241, 230, 0.8); margin: 1rem auto 2rem; max-width: 48ch; }

/* ---- Forms ---- */
.field { display: block; margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gray); margin-bottom: 0.4rem; }
.input, .textarea, .select { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.95rem; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); }
.textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.site-footer { background: var(--night); color: rgba(246, 241, 230, 0.75); }
.site-footer .wrap { padding-block: 56px 28px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.footer-top h4 { color: var(--cream); font-family: var(--font-body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 1rem; }
.site-footer .brand { color: var(--cream); }
.footer-desc { color: rgba(246, 241, 230, 0.65); font-size: 0.92rem; margin-top: 0.8rem; max-width: 36ch; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.92rem; color: rgba(246, 241, 230, 0.75); }
.footer-links a:hover { color: var(--cream); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(246, 241, 230, 0.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.8rem; color: rgba(246, 241, 230, 0.6); }
.footer-credit a { color: var(--rose); }
.footer-credit a:hover { color: var(--cream); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0.4rem; background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem var(--gutter) 1.4rem; transform: translateY(-120%); transition: transform 0.3s ease; box-shadow: var(--shadow-sm); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 0.6rem 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Terms and Conditions (the /terms page). Compact variants also live inline in
   invoice.html so the shared terms render the same inside an invoice. */
.terms-page { max-width: 780px; }
.terms-intro { color: var(--gray); margin: 0.6rem 0 1.4rem; line-height: 1.65; }
.terms-accept { background: rgba(192, 94, 53, 0.08); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin-bottom: 1.6rem; line-height: 1.6; }
.terms-sec { margin-top: 1.6rem; }
.terms-sec h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.5rem; }
.terms-sec ul { margin: 0; padding-left: 1.2rem; }
.terms-sec li { margin-bottom: 0.5rem; line-height: 1.55; }
.terms-sec p { line-height: 1.6; margin: 0; }
.terms-updated { color: var(--gray); font-size: 0.85rem; margin-top: 2rem; }
