/* ==========================================================================
   Fluent Thread — styles.css
   Design tokens & layout per design handoff (hi-fi, editorial, flat).
   ========================================================================== */

:root {
  /* Brand */
  --blue-100: #a4caee;
  --blue-500: #438de6;
  --blue-700: #2f6cb8;
  --coral-200: #f59f97;
  --coral-400: #f08c7f;
  --coral-600: #e26a5b;
  --coral-700: #c2503f;
  --coral-800: #b04a39;

  /* Surfaces & text */
  --bg-page: #f7e4dc;
  --bg-band: #efc9bc;
  --border: #ecd0c5;
  --ink: #3a3230;
  --text-muted: #74605a;
  --text-muted-band: #6b5148;
  --cream: #fdf8f6;
  --placeholder-fg: #9b7c72;

  /* Placeholder photo bands */
  --ph-a1: #f0d5cb; --ph-a2: #eac9bd;   /* hero band */
  --ph-b1: #f6ddd3; --ph-b2: #f0d0c4;   /* about portrait */

  /* Layout */
  --pad: 88px;                 /* horizontal page padding (desktop) */
  --maxw: 1440px;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--coral-600); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Focus visibility (accessibility) */
:focus-visible { outline: 2px solid var(--coral-600); outline-offset: 3px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--cream); }

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* Text accent utilities (avoid inline styles → strict CSP) */
.accent-coral { color: var(--coral-600); }
.accent-blue { color: var(--blue-500); }

/* ==========================================================================
   Logo (wordmark "Fluent / Thread" with woven thread)
   ========================================================================== */
.logo {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo__line { position: relative; z-index: 1; display: block; }
.logo__thread {
  position: absolute;
  left: 1px;
  top: -0.27em;
  height: calc(100% + 0.54em);
  width: 0.85em;
}
.logo__thread--front { z-index: 2; }
.logo__thread--back { z-index: 0; }
.logo--sm { font-size: 14px; color: var(--text-muted-band); }
.logo--sm:hover { color: var(--text-muted-band); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--border);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav { display: flex; align-items: center; gap: 36px; }
.nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.nav a:hover { color: var(--coral-600); }

.lang {
  display: flex;
  gap: 14px;
  font-size: 14px;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}
.lang a { color: #a08a84; font-weight: 600; }
.lang a:hover { color: var(--coral-600); }
.lang a.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--coral-600);
  padding-bottom: 2px;
}

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
  color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ==========================================================================
   Sections shared
   ========================================================================== */
main { display: block; }
section, .section { scroll-margin-top: 24px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero { padding: 120px var(--pad) 100px; max-width: var(--maxw); margin: 0 auto; }
.hero h1 {
  font-family: var(--serif);
  font-size: 84px;
  line-height: 1.08;
  font-weight: 500;
  margin: 0 0 8px;
  max-width: 1100px;
}
.hero__squiggle { margin: 12px 0 44px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 96px;
  align-items: end;
}
.hero__lead {
  font-size: 21px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.contact-links a:hover { color: var(--coral-600); }
.contact-links .arrow-coral { color: var(--coral-600); }
.contact-links .arrow-blue { color: var(--blue-500); }

/* ---------- Photo bands (placeholders) ---------- */
.photo-band {
  margin: 0 var(--pad);
  height: 380px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, var(--ph-a1), var(--ph-a1) 14px, var(--ph-a2) 14px, var(--ph-a2) 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(var(--maxw) - 2 * var(--pad));
  margin-left: auto; margin-right: auto;
}
.photo-caption { font-family: monospace; font-size: 14px; color: var(--placeholder-fg); text-align: center; padding: 0 16px; }

/* Hero brand panel (stands in for the wide hero photo until one is supplied) */
.brand-band {
  margin: 0 var(--pad);
  height: 380px;
  border-radius: 2px;
  background: linear-gradient(135deg, #efc9bc 0%, #f4d6cb 55%, #f0cabd 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  overflow: hidden;
  max-width: calc(var(--maxw) - 2 * var(--pad));
  margin-left: auto; margin-right: auto;
}
.logo--hero { font-size: 78px; color: var(--ink); line-height: 1.12; text-align: center; }
.logo--hero .logo__thread { left: 2px; }
.brand-band__squiggle { width: 220px; }

/* ---------- Services ---------- */
.services { padding: 110px var(--pad); max-width: var(--maxw); margin: 0 auto; }
.services__grid { display: grid; grid-template-columns: 300px 1fr; gap: 96px; }
.services__title {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  margin: 0;
  position: sticky;
  top: 40px;
}
.services__list { display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.service--1 { padding: 0 0 48px; border-bottom: 1px solid var(--border); }
.service--2 { padding: 48px 0 0; }
.service h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0; }
.service p { color: var(--text-muted); font-size: 16.5px; line-height: 1.75; margin: 0; }
.service .eyebrow { margin-bottom: 14px; }
.service--1 .eyebrow { color: var(--coral-700); }
.service--2 .eyebrow { color: var(--blue-700); }

/* ---------- About ---------- */
.about { background: var(--bg-band); }
.about__inner {
  padding: 100px var(--pad);
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 96px;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.about__photo {
  display: block;
  height: 440px;
  width: 100%;
  border-radius: 2px;
  background: var(--ph-b1);
  object-fit: cover;
  object-position: 50% 25%;
}
.about .eyebrow { color: var(--coral-800); margin-bottom: 20px; }
.about h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  margin: 0 0 24px;
  line-height: 1.25;
  max-width: 640px;
}
.about p { color: var(--text-muted-band); font-size: 17.5px; line-height: 1.75; margin: 0; max-width: 620px; }

/* ---------- Testimonials ---------- */
.testimonials { padding: 100px var(--pad); max-width: var(--maxw); margin: 0 auto; }
.testimonials[hidden] { display: none; }
.testimonials h2 { font-family: var(--serif); font-size: 38px; font-weight: 500; margin: 0 0 56px; }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.quote {
  padding: 8px 48px 8px 32px;
  display: flex; flex-direction: column; gap: 22px;
}
.quote--coral { border-left: 2px solid var(--coral-600); }
.quote--blue { border-left: 2px solid var(--blue-500); }
.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}
.quote cite { font-style: normal; font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }

/* ---------- Contact + footer ---------- */
.contact {
  border-top: 1px solid var(--border);
  padding: 110px var(--pad) 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.contact h2 {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 500;
  margin: 0 0 40px;
  max-width: 900px;
  line-height: 1.15;
}
.contact__links { display: flex; gap: 56px; font-size: 20px; font-weight: 700; margin-bottom: 96px; flex-wrap: wrap; }
.contact__links a { white-space: nowrap; color: var(--ink); border-bottom: 2.5px solid var(--coral-600); padding-bottom: 8px; }
.contact__links a:hover { color: var(--coral-600); }

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--placeholder-fg);
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 20px; align-items: center; }
.site-footer a { color: var(--text-muted); font-weight: 600; }
.site-footer a:hover { color: var(--coral-600); }
.footer-legal { color: var(--placeholder-fg); }

/* ==========================================================================
   Legal pages (privacy)
   ========================================================================== */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px var(--pad) 100px;
}
.legal h1 { font-family: var(--serif); font-size: 48px; font-weight: 500; margin: 0 0 8px; }
.legal .updated { color: var(--text-muted); font-size: 15px; margin: 0 0 48px; }
.legal h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 48px 0 14px; }
.legal h3 { font-family: var(--sans); font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text-muted); font-size: 16.5px; line-height: 1.75; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--ink); }
.legal a { color: var(--blue-500); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--coral-600); }
.back-home { display: inline-block; margin-top: 48px; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--coral-600); padding-bottom: 4px; }
.back-home:hover { color: var(--coral-600); }

/* ==========================================================================
   Reveal-on-scroll animation (progressive; off if reduced motion)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --pad: 48px; }
  .hero { padding: 88px var(--pad) 72px; }
  .hero h1 { font-size: 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .contact-links { max-width: 480px; }

  .services__grid { grid-template-columns: 1fr; gap: 36px; }
  .services__title { position: static; }

  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__photo { height: 340px; max-width: 460px; }

  .brand-band { height: 320px; }
  .logo--hero { font-size: 60px; }

  .contact h2 { font-size: 48px; }
}

@media (max-width: 640px) {
  :root { --pad: 24px; }

  /* Collapse nav into toggle */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--pad) 20px;
    display: none;
    z-index: 40;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; width: 100%; }
  .lang { border-left: none; padding-left: 0; margin-top: 8px; }
  .site-header { position: relative; }

  .hero { padding: 56px var(--pad) 56px; }
  .hero h1 { font-size: 42px; }
  .hero__squiggle { width: 200px; margin: 8px 0 32px; }
  .hero__lead { font-size: 18px; }

  .photo-band { height: 240px; }
  .brand-band { height: 240px; gap: 16px; }
  .logo--hero { font-size: 40px; }
  .brand-band__squiggle { width: 150px; }

  .service { grid-template-columns: 1fr; gap: 16px; }
  .service--1 { padding-bottom: 36px; }
  .service--2 { padding-top: 36px; }

  .about__photo { height: 280px; }
  .about h2 { font-size: 30px; }

  .quotes { grid-template-columns: 1fr; gap: 40px; }
  .quote { padding: 8px 0 8px 24px; }

  .contact { padding: 72px var(--pad) 32px; }
  .contact h2 { font-size: 38px; }
  .contact__links { flex-direction: column; gap: 20px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; }

  .legal { padding: 56px var(--pad) 72px; }
  .legal h1 { font-size: 34px; }
}
