/* ============================================================
   KARA WANG STUDIO — shared design system
   Warm terracotta · Young Serif + Newsreader + Hanken + Caveat
   Signature motif: hand-drawn audit annotations + margin notes
   ============================================================ */

:root {
  /* ---- warm paper palette (NOT flat cream) ---- */
  --paper:      #F6EEDF;   /* base */
  --paper-2:    #EEE1CC;   /* deeper warm band */
  --card:       #FCF7EE;   /* raised cards */
  --espresso:   #211913;   /* deep warm near-black sections */
  --espresso-2: #2E241B;

  /* ---- ink ---- */
  --ink:    #2B2017;       /* warm near-black text */
  --ink-2:  #5E5142;       /* muted secondary */
  --ink-3:  #93836F;       /* faint meta */
  --on-dark:    #F3E8D7;   /* text on espresso */
  --on-dark-2:  #B7A892;

  /* ---- accent (terracotta — tweakable) ---- */
  --terra:      #C2552F;
  --terra-deep: #9E3F1E;
  --terra-ink:  #7E3217;   /* terracotta text on light paper */
  --terra-tint: #F0D8C7;   /* soft fill */

  /* ---- lines ---- */
  --line:        rgba(43,32,24,0.13);
  --line-strong: rgba(43,32,24,0.24);
  --line-dark:   rgba(243,232,215,0.16);

  /* ---- type ---- */
  --display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --serif:   'Newsreader', Georgia, serif;
  --sans:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --hand:    'Caveat', 'Segoe Script', cursive;

  /* ---- shadows ---- */
  --shadow-sm: 0 1px 2px rgba(43,32,24,0.05), 0 4px 14px rgba(43,32,24,0.05);
  --shadow-md: 0 2px 6px rgba(43,32,24,0.06), 0 18px 40px -16px rgba(43,32,24,0.18);
  --shadow-lg: 0 4px 12px rgba(43,32,24,0.08), 0 40px 80px -28px rgba(43,32,24,0.30);

  /* ---- layout ---- */
  --wrap: 1180px;
  --gut: 28px;
  --radius: 18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: var(--terra); color: #fff; }

a { color: inherit; }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.display {
  font-family: var(--display);
  font-size: clamp(2.7rem, 7.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.02; letter-spacing: -0.015em; }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.06; }
.h4 { font-size: 1.28rem; line-height: 1.12; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
.lede {
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 400;
}

/* eyebrow / kicker label */
.kicker {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 1.1rem;
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--terra);
  border-radius: 2px;
}
.kicker.no-rule::before { display: none; }
.kicker.no-rule { white-space: nowrap; }

.serif-italic { font-family: var(--serif); font-style: italic; }
em { font-style: italic; }

/* sans utility text */
.sans { font-family: var(--sans); }
.meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--gut); }
section { position: relative; }
.section-pad { padding: clamp(64px, 9vw, 130px) 0; }
.section-pad-sm { padding: clamp(48px, 6vw, 84px) 0; }

.band-2 { background: var(--paper-2); }
.band-dark {
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(194,85,47,0.16), transparent 60%),
    var(--espresso);
  color: var(--on-dark);
}
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: var(--on-dark); }
.band-dark .lede { color: var(--on-dark-2); }
.band-dark .kicker { color: #E9A07C; }
.band-dark .kicker::before { background: var(--terra); }

/* hairline divider with hand-drawn feel */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.92em 1.55em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--terra);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 12px 24px -12px var(--terra);
}
.btn-primary:hover { background: var(--terra-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); background: rgba(43,32,24,0.03); }
.btn-on-dark {
  background: var(--paper);
  color: var(--ink);
}
.btn-on-dark:hover { background: #fff; transform: translateY(-2px); }
.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translate(3px,-3px); }
.btn-lg { font-size: 1.05rem; padding: 1.05em 1.85em; }

/* text link with hand underline */
.tlink {
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  color: var(--terra-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
}
.tlink svg { transition: transform .2s ease; }
.tlink:hover svg { transform: translate(3px,-3px); }

/* ============================================================
   SIGNATURE MOTIF — hand-drawn audit annotations
   ============================================================ */

/* circled word/phrase */
.mark { position: relative; display: inline-block; }
.mark > svg.scribble {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 140%; height: 186%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.mark > svg.scribble path { 
  fill: none; stroke: var(--terra); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.mark > span { position: relative; z-index: 1; }

/* hand-drawn underline that sits under a word */
.uline { position: relative; display: inline-block; }
.uline > svg {
  position: absolute; left: -2%; bottom: -0.32em;
  width: 104%; height: 0.5em; overflow: visible; pointer-events: none;
}
.uline > svg path {
  fill: none; stroke: var(--terra); stroke-width: 2.6;
  stroke-linecap: round;
}

/* handwritten margin note (Caveat) */
.note {
  font-family: var(--hand);
  color: var(--terra-ink);
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 600;
  position: relative;
  display: inline-block;
}
.note-abs {
  position: absolute;
  max-width: 220px;
  z-index: 5;
}
/* the little hand-drawn arrow paired with notes */
.note-arrow { display: block; color: var(--terra); overflow: visible; }
.note-arrow path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* hand-drawn check used in lists */
.hcheck { flex: 0 0 auto; color: var(--terra); overflow: visible; margin-top: 0.18em; }
.hcheck path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* small terracotta star/sparkle accent */
.spark path { fill: var(--terra); }

/* annotations can be globally hidden via body class (tweak) */
body.no-annotations .scribble,
body.no-annotations .uline > svg,
body.no-annotations .note-abs,
body.no-annotations .note-arrow { display: none !important; }
body.no-annotations .uline { text-decoration: none; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gut);
}
.brand { display: inline-flex; align-items: center; gap: 1.4rem; text-decoration: none; color: var(--ink); }
.brand .brand-hand {
  font-family: var(--hand); font-weight: 700;
  font-size: 1.9rem; line-height: 1; color: var(--ink); white-space: nowrap;
}
.brand .brand-sub {
  font-family: var(--sans); font-size: 0.56rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3);
  align-self: center;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  text-decoration: none; color: var(--ink-2); position: relative; padding: 4px 0;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: var(--terra); border-radius: 2px; transition: right .25s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.nav-cta-desktop { font-weight: 500; font-size: 0.92rem; padding: 0.74em 1.35em; }
.nav-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-cta-desktop { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line-strong);
    border-radius: 12px; background: var(--card); cursor: pointer;
  }
  .mobile-menu {
    display: none; flex-direction: column; gap: 0.4rem;
    padding: 8px var(--gut) 20px;
    border-top: 1px solid var(--line); background: var(--paper);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    font-family: var(--sans); font-weight: 600; font-size: 1.15rem;
    text-decoration: none; color: var(--ink); padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu .btn { margin-top: 10px; justify-content: center; }
}

/* ============================================================
   CARDS / SHARED COMPONENTS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.tag {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--terra-ink); background: var(--terra-tint);
  padding: 0.38em 0.8em; border-radius: 999px; display: inline-block;
}
.tag-dark { color: var(--on-dark); background: rgba(243,232,215,0.12); }

/* photo slot styling */
image-slot {
  background: linear-gradient(135deg, var(--paper-2), #E6D6BD);
  border: 1px dashed var(--line-strong);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--espresso);
  color: var(--on-dark);
  padding: clamp(56px, 7vw, 90px) 0 40px;
}
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: var(--on-dark); }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer-brand-hand { font-family: var(--hand); font-weight: 700; font-size: 2.4rem; color: var(--on-dark); line-height: 1; }
.footer-cols { display: flex; gap: clamp(40px, 6vw, 84px); flex-wrap: wrap; }
.footer-col h5 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-dark-2); margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-family: var(--sans); font-size: 0.98rem; }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 70px); padding-top: 26px;
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-family: var(--sans); font-size: 0.84rem; color: var(--on-dark-2);
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0.25rem; text-align: left;
  font-family: var(--display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); color: var(--ink);
}
.faq-icon { flex: 0 0 auto; width: 26px; height: 26px; position: relative; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--terra); border-radius: 2px;
  left: 50%; top: 50%; transition: transform .28s ease, opacity .28s ease;
}
.faq-icon::before { width: 2.4px; height: 22px; transform: translate(-50%,-50%); }
.faq-icon::after  { width: 22px; height: 2.4px; transform: translate(-50%,-50%); }
.faq-item.open .faq-icon::before { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
}
.faq-a-inner {
  padding: 0 0.25rem 1.6rem; max-width: 60ch;
  color: var(--ink-2); font-size: 1.08rem;
}

/* ============================================================
   FORM
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
}
.field input, .field textarea, .field select {
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-strong);
  border-radius: 12px; padding: 0.8em 0.95em; width: 100%; transition: border-color .18s ease, box-shadow .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--terra);
  box-shadow: 0 0 0 4px rgba(194,85,47,0.13);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.grid { display: grid; gap: var(--gut); }
.flex { display: flex; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.terra { color: var(--terra-ink); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }

/* content is always visible — no scroll-fade (faster, SEO-clean, and per brief: no 2019-portfolio animations) */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
