/* ============================================================
   EXSURA — design tokens + base + components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* palette */
  --ink:          #1d2433;
  --ink-soft:     #4a5160;
  --ink-muted:    #7c8497;
  --paper:        #FBF6EC;
  --paper-warm:   #F5EBD6;
  --cream:        #F0E2C6;
  --cream-deep:   #E5D2A8;
  --clay:         #C66B3D;
  --clay-deep:    #9F5128;
  --clay-soft:    #E7B894;
  --sage:         #5C7A65;
  --sage-soft:    #B8C9B8;
  --gold:         #D4A544;
  --gold-soft:    #EBD08A;
  --rust:         #8B3A1F;
  --line:         #E0D4B6;
  --line-soft:    #EFE5C9;
  --white:        #ffffff;

  /* type */
  --serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Manrope', system-ui, -apple-system, sans-serif;

  /* shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-2xl: 48px;

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(29,36,51,.06), 0 1px 1px rgba(29,36,51,.04);
  --shadow-md: 0 8px 24px -8px rgba(29,36,51,.18), 0 2px 6px rgba(29,36,51,.06);
  --shadow-lg: 0 28px 60px -20px rgba(29,36,51,.28);

  /* layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--clay); color: var(--paper); }

/* ============================================================
   typography
   ============================================================ */

.serif    { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.italic   { font-style: italic; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}

.h-display { font-size: clamp(48px, 6.8vw, 92px); line-height: 1; letter-spacing: -.02em; }
.h-1       { font-size: clamp(40px, 5vw, 68px); }
.h-2       { font-size: clamp(32px, 3.6vw, 48px); }
.h-3       { font-size: clamp(24px, 2.4vw, 32px); }
.h-eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
}

p   { color: var(--ink-soft); }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; max-width: 56ch; }

.muted { color: var(--ink-muted); }
.fineprint { font-size: 13px; color: var(--ink-muted); }

/* ============================================================
   layout
   ============================================================ */

.wrap   { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-w { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-n { max-width: 880px; margin: 0 auto; padding: 0 var(--gutter); }

.section      { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }

.bg-paper    { background: var(--paper); }
.bg-warm     { background: var(--paper-warm); }
.bg-cream    { background: var(--cream); }
.bg-cream-d  { background: var(--cream-deep); }
.bg-ink      { background: var(--ink); color: var(--paper); }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: var(--paper); }
.bg-ink p    { color: rgba(251,246,236,.78); }
.bg-clay     { background: var(--clay); color: var(--paper); }
.bg-sage     { background: var(--sage); color: var(--paper); }

/* divider */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-dashed {
  height: 1px;
  background-image: linear-gradient(90deg, var(--line) 50%, transparent 50%);
  background-size: 12px 1px;
  background-repeat: repeat-x;
  border: 0;
}

/* ============================================================
   buttons / pills
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--clay); color: var(--paper); }
.btn-primary:hover { background: var(--clay-deep); }

.btn-ink       { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a3349; }

.btn-outline   { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-ghost     { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-warm); border-color: var(--cream-deep); }

.btn-sage      { background: var(--sage); color: var(--paper); }
.btn-sage:hover { background: #4a6452; }

.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 13px; }

.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); }

/* ============================================================
   nav
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,246,236,.85);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand img { height: 32px; width: auto; }
.brand .amp { color: var(--clay); font-style: italic; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-warm); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--cream);
}

.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

@media (max-width: 1024px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-burger { display: block; }
}

.nav-drawer {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--paper);
  padding: 16px var(--gutter) 24px;
}
.nav-drawer.open { display: block; }
.nav-drawer a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-family: var(--serif);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.nav-drawer a:last-child { border-bottom: 0; }

/* ============================================================
   footer
   ============================================================ */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.footer .wrap { display: grid; gap: 48px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand { color: var(--paper); font-size: 36px; }
.footer-brand p { color: rgba(251,246,236,.65); margin-top: 14px; max-width: 32ch; }
.footer h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  color: rgba(251,246,236,.78);
  font-size: 14px;
  transition: color .2s ease;
}
.footer ul a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(251,246,236,.12);
  color: rgba(251,246,236,.5);
  font-size: 12px;
}
.footer-bottom a { color: rgba(251,246,236,.6); margin-right: 16px; }
.footer-bottom a:hover { color: var(--gold); }

@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ============================================================
   cards
   ============================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--cream-deep); }

.card-warm { background: var(--paper-warm); border-color: var(--cream-deep); }
.card-flat { background: var(--white); border: 1px solid var(--line-soft); box-shadow: none; }

/* ============================================================
   organic blob shapes (for photo frames)
   ============================================================ */

.blob {
  position: relative;
  overflow: hidden;
}
.blob-a {
  clip-path: path("M 250 0 C 380 10, 460 90, 488 220 C 520 360, 470 470, 340 498 C 200 528, 70 470, 24 340 C -20 215, 30 90, 130 28 C 170 4, 210 -3, 250 0 Z");
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 520px;
  background: var(--cream);
}
.blob-a > * { width: 100%; height: 100%; object-fit: cover; }

.blob-b {
  /* squashed gem shape */
  -webkit-mask-image: radial-gradient(120% 100% at 30% 30%, #000 60%, transparent 62%);
          mask-image: radial-gradient(120% 100% at 30% 30%, #000 60%, transparent 62%);
  border-radius: 50% 60% 55% 65% / 60% 55% 60% 50%;
  aspect-ratio: 4 / 5;
}

.frame-rounded {
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: var(--cream);
}

/* Illustration frame */
.photo-ph {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-ph svg { width: 100%; height: 100%; display: block; }
.photo-ph .ph-label { display: none; }

/* Generic illustration container */
.art-frame {
  position: relative;
  overflow: hidden;
  background: var(--cream);
}
.art-frame svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   page hero (subpages)
   ============================================================ */

.page-hero {
  padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 6vw, 72px);
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 20px; }

/* ============================================================
   stat counter
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
.stat .num {
  font-family: var(--serif);
  font-size: clamp(56px, 7.5vw, 96px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.03em;
}
.stat .num .suf, .stat .num .pre { color: var(--clay); font-style: italic; }
.stat .label {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 28ch;
  line-height: 1.5;
}
.stat .src { display: block; margin-top: 8px; font-size: 11px; color: var(--ink-muted); }

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   forms
   ============================================================ */

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.input, .textarea, .select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0;
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(198,107,61,.15);
}
.textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* ============================================================
   marquee tag / banner
   ============================================================ */

.announce {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  padding: 10px 0;
  text-align: center;
}
.announce a { color: var(--gold); font-weight: 600; }
.announce a:hover { text-decoration: underline; }

/* ============================================================
   reveal on scroll
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   misc utilities
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 48px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.4vw, 24px); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }

/* ============================================================
   grain texture overlay — atmospheric warmth
   ============================================================ */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .028;
  background-size: 200px 200px;
}

/* ============================================================
   page load fade
   ============================================================ */

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

body {
  animation: pageFade .5s ease both;
}

/* ============================================================
   staggered reveal — grid children auto-delay
   ============================================================ */

.grid-2 > .reveal:nth-child(2),
.grid-3 > .reveal:nth-child(2),
.grid-3 > .reveal:nth-child(3),
.grid-4 > .reveal:nth-child(2),
.grid-4 > .reveal:nth-child(3),
.grid-4 > .reveal:nth-child(4) {
  transition-delay: .08s;
}
.grid-3 > .reveal:nth-child(3),
.grid-4 > .reveal:nth-child(3) {
  transition-delay: .16s;
}
.grid-4 > .reveal:nth-child(4) {
  transition-delay: .24s;
}

/* ============================================================
   link underline style
   ============================================================ */

.text-link {
  color: var(--clay);
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s;
}
.text-link:hover { color: var(--clay-deep); }

/* ============================================================
   focus-visible ring (accessibility)
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- form success state ---------- */
.form-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(32px, 5vw, 56px) 24px;
}
.form-thanks-icon { margin-bottom: 4px; }
.form-success { animation: pageFade .4s ease both; }
