/* Cryudine — light, airy, ethereal. Tokens per brief §6.1. */

@font-face{font-family:'Fraunces';font-style:normal;font-weight:300;font-display:swap;src:url('/fonts/fraunces-latin-300-normal.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/inter-latin-400-normal.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/inter-latin-500-normal.woff2') format('woff2');}


:root {
  --cloud: #FBFAF7;
  --mist: #EDF1F5;
  --ink: #222A36;
  --slate: #5C6774;
  --dawn: #A9C6DC;
  --sky: #9DBEDD;       /* accent gradient start — dawn blue */
  --rose: #E8C3CF;      /* accent gradient end — dawn rose */
  --rose-deep: #AD7288; /* hover underlines and small accents */
  --accent-grad: linear-gradient(135deg, var(--sky) 0%, var(--rose) 100%);
  --hairline: #E4E8ED;

  --font-display: 'Fraunces', 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --maxw: 1100px;
  --radius: 16px;
  --shadow-soft: 0 24px 60px -32px rgba(34, 42, 54, 0.18);
  --shadow-lift: 0 30px 70px -30px rgba(34, 42, 54, 0.24);

  --light-color: rgba(233, 205, 152, 0.9); /* dawn gold; JS eases toward noon white */
  --light-y: 16%;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17.5px;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }

h3 {
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--dawn); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--rose-deep); }

::selection { background: var(--dawn); color: var(--ink); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1.2em;
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -160%);
  top: 10px;
  z-index: 200;
  background: var(--ink);
  color: var(--cloud);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(157, 190, 221, 0.45);
  border-radius: 4px;
}

/* ---------- Signature: the light follows you ---------- */

.scroll-light {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  background: radial-gradient(58% 46% at 50% var(--light-y), var(--light-color) 0%, rgba(255, 255, 255, 0) 72%);
}

/* ---------- Ambient orbs — slow drifting dawn tints ---------- */

.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 89;
  mix-blend-mode: soft-light;
  opacity: 0.55;
  will-change: transform;
}
.orb-1 {
  width: 46vw; height: 46vw; left: -12vw; top: 10vh;
  background: radial-gradient(circle at 35% 35%, rgba(157, 190, 221, 0.9), rgba(157, 190, 221, 0) 70%);
  animation: drift-a 52s ease-in-out infinite alternate;
}
.orb-2 {
  width: 38vw; height: 38vw; right: -10vw; top: 44vh;
  background: radial-gradient(circle at 60% 40%, rgba(232, 195, 207, 0.85), rgba(232, 195, 207, 0) 70%);
  animation: drift-b 64s ease-in-out infinite alternate;
}
.orb-3 {
  width: 30vw; height: 30vw; left: 32vw; bottom: -12vh;
  background: radial-gradient(circle at 50% 50%, rgba(196, 214, 232, 0.8), rgba(232, 195, 207, 0) 70%);
  animation: drift-c 76s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(9vw, -6vh, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-7vw, 8vh, 0) scale(0.94); } }
@keyframes drift-c { to { transform: translate3d(6vw, -9vh, 0) scale(1.05); } }

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-nav.scrolled {
  background: rgba(251, 250, 247, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hairline);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  margin-right: auto;
}

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sky), var(--rose));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner { padding: 12px 18px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.btn-primary {
  background: var(--accent-grad);
  background-size: 170% 170%;
  background-position: 0% 50%;
  color: var(--ink);
  border-color: rgba(34, 42, 54, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease, background-position 0.6s ease;
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 0 0 5px rgba(157, 190, 221, 0.28), 0 10px 30px -12px rgba(196, 143, 166, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(251, 250, 247, 0.5);
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-ghost:hover { border-color: var(--dawn); background: rgba(251, 250, 247, 0.85); }

.nav-cta { padding: 11px 20px; font-size: 0.88rem; }

/* ---------- Layout ---------- */

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

.section { padding: clamp(96px, 12vw, 160px) 0; }
.section-mist {
  background: linear-gradient(180deg, rgba(237, 241, 245, 0) 0%, var(--mist) 18%, var(--mist) 82%, rgba(237, 241, 245, 0) 100%);
}
.page-pad .section-first { padding-top: clamp(140px, 18vw, 220px); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--mist) url('/media/poster.jpg') center / cover no-repeat;
}
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* With JS running, the video fades in over the poster once frames flow. */
.js .hero-media video { opacity: 0; transition: opacity 0.9s ease; }
.js .hero-media video.playing { opacity: 1; }
.motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(251, 250, 247, 0.34) 0%, rgba(251, 250, 247, 0.18) 40%, rgba(251, 250, 247, 0.62) 78%, var(--cloud) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 140px 24px 96px;
  width: 100%;
}
.hero-content h1 { max-width: 17ch; }
.hero-subhead {
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 1.8em;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 1.1em; }
.microline { font-size: 0.85rem; color: var(--slate); letter-spacing: 0.02em; }

/* ---------- Cards ---------- */

.glass {
  background: rgba(251, 250, 247, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.card { padding: 30px 28px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(157, 190, 221, 0.35), 0 18px 44px -20px rgba(196, 143, 166, 0.35), var(--shadow-lift);
}
.card p { color: var(--slate); font-size: 0.97rem; margin: 0; }

@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------- Steps (horizontal path) ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 0;
  margin: 44px 0 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dawn) 14%, var(--rose) 50%, var(--dawn) 86%, transparent);
  z-index: -1;
}
/* the container itself never fades — it exists to draw its connector line */
.js .reveal.line-reveal { opacity: 1; transform: none; }
.js .line-reveal::before { transform: scaleX(0); transition: transform 1.1s ease 0.35s; }
.js .line-reveal.in::before { transform: scaleX(1); }
.step { padding: 30px 28px; }
.step-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.9em;
}
.step p:last-child { color: var(--slate); font-size: 0.97rem; }
.steps-close {
  margin-top: 40px;
  text-align: center;
  font-weight: 500;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
}

/* ---------- FAQ ---------- */

.faq-list { margin-top: 8px; }
.faq-item { padding: 26px 0; border-bottom: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-size: 1.08rem; font-weight: 500; margin-bottom: 0.45em; }
.faq-item p { color: var(--slate); margin: 0; }

/* ---------- From the blog ---------- */

.blog-strip .strip-list { list-style: none; padding: 0; margin: 32px 0 0; }
.blog-strip .strip-list li { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.blog-strip .strip-list li:last-child { border-bottom: 0; }
.blog-strip a { font-weight: 500; text-decoration: none; }
.blog-strip a:hover { text-decoration: underline; text-decoration-color: var(--rose-deep); }
.blog-strip .strip-desc { color: var(--slate); font-size: 0.95rem; margin: 4px 0 0; }

/* ---------- Contact form ---------- */

.contact-form { margin-top: 36px; padding: 36px 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--dawn);
  box-shadow: 0 0 0 3px rgba(169, 198, 220, 0.35);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--slate); opacity: 1; }

.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form-error { color: #8A3B2E; font-size: 0.92rem; }
.form-success { font-weight: 500; margin-top: 16px; }
.form-note { display: none; font-weight: 500; margin-top: 16px; }
.form-note:target { display: block; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); padding: 44px 0 52px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.footer-line { font-size: 0.9rem; color: var(--slate); margin-bottom: 6px; }
.footer-line a { text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }
.footer-whimsy { font-size: 0.84rem; color: var(--slate); font-style: italic; margin: 0; }

/* ---------- Blog index ---------- */

.standfirst { font-size: 1.12rem; color: var(--slate); max-width: 56ch; margin-bottom: 2em; }

.post-list { margin-top: 24px; }
.post-item { padding: 30px 0; border-bottom: 1px solid var(--hairline); }
.post-item:last-child { border-bottom: 0; }
.post-item h2 { font-size: 1.7rem; margin-bottom: 0.35em; }
.post-item h2 a { text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; text-decoration-color: var(--rose-deep); text-decoration-thickness: 1.5px; }
.post-item .post-desc { margin: 0 0 8px; color: var(--slate); }
.post-item .post-meta { font-size: 0.84rem; color: var(--slate); margin: 0; }

.pagination { display: flex; gap: 18px; margin-top: 40px; font-weight: 500; }

/* ---------- Article ---------- */

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 26px; font-size: 0.84rem; color: var(--slate); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--hairline); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article-meta { font-size: 0.86rem; color: var(--slate); margin-bottom: 2.2em; }

.key-answer { padding: 28px 30px; margin-bottom: 2.6em; }
.key-answer p { margin: 0; font-size: 1.05rem; }

.article-body { max-width: 68ch; font-size: 18px; line-height: 1.75; }
.article-body h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin: 2em 0 0.6em;
}
.article-body h3 { margin-top: 1.8em; }
.article-body li { margin-bottom: 0.45em; }
.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--dawn);
  color: var(--slate);
}
.article-body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--mist);
  padding: 2px 6px;
  border-radius: 6px;
}
.article-body pre { background: var(--mist); border-radius: 10px; padding: 18px; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
/* Above phone width, stop four-column tables squeezing; .table-wrap scrolls them. */
@media (min-width: 480px) { .table-wrap table { min-width: 30rem; } }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.table-wrap th { font-weight: 500; letter-spacing: 0.02em; }

.article-faq { margin-top: 3em; }
.article-faq h2 { font-family: var(--font-display); font-weight: 300; font-size: 1.7rem; }

.cta-band {
  margin: 3.2em 0;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta-band-text { font-weight: 500; font-size: 1.15rem; margin: 0; max-width: 30ch; }

.related h2 { font-size: 1.35rem; margin-bottom: 0.8em; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.related li:last-child { border-bottom: 0; }
.related a { font-weight: 500; text-decoration: none; }
.related a:hover { text-decoration: underline; text-decoration-color: var(--rose-deep); }

/* ---------- Motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.js .reveal.in { opacity: 1; transform: none; }

/* gentle stagger inside grids and lists */
.js .card-grid .reveal:nth-child(2), .js .faq-list .reveal:nth-child(2), .js .post-list .reveal:nth-child(2) { transition-delay: 0.07s; }
.js .card-grid .reveal:nth-child(3), .js .faq-list .reveal:nth-child(3), .js .post-list .reveal:nth-child(3) { transition-delay: 0.14s; }
.js .card-grid .reveal:nth-child(4), .js .faq-list .reveal:nth-child(4), .js .post-list .reveal:nth-child(4) { transition-delay: 0.21s; }
.js .card-grid .reveal:nth-child(5), .js .faq-list .reveal:nth-child(5), .js .post-list .reveal:nth-child(5) { transition-delay: 0.28s; }
.js .card-grid .reveal:nth-child(n+6), .js .faq-list .reveal:nth-child(n+6), .js .post-list .reveal:nth-child(n+6) { transition-delay: 0.35s; }
.js .steps .reveal:nth-child(2) { transition-delay: 0.12s; }
.js .steps .reveal:nth-child(3) { transition-delay: 0.24s; }

/* interior pages: header cluster rises on load (mirrors the hero) */
.page-pad .section-first .container > *:not(.reveal) {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.6s ease-out forwards;
}
.page-pad .section-first .container > *:nth-child(2):not(.reveal) { animation-delay: 0.07s; }
.page-pad .section-first .container > *:nth-child(3):not(.reveal) { animation-delay: 0.14s; }
.page-pad .section-first .container > *:nth-child(4):not(.reveal) { animation-delay: 0.21s; }
.page-pad .section-first .container > *:nth-child(n+5):not(.reveal) { animation-delay: 0.28s; }

.form-success:not([hidden]) { animation: rise 0.5s ease-out; }

.hero-content > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease-out forwards;
}
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.32s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-light { display: none; }
  .motes { display: none; }
  .skip-link { transition: none; }
  .js .hero-media video { transition: none; }
  .orb { display: none; }
  .js .reveal, .reveal { opacity: 1; transform: none; transition: none; transition-delay: 0s; }
  .js .line-reveal::before { transform: none; transition: none; }
  .nav-links a::after { transition: none; }
  .btn-primary { transition: none; }
  .page-pad .section-first .container > *:not(.reveal) { opacity: 1; transform: none; animation: none; }
  .form-success:not([hidden]) { animation: none; }
  .hero-content > * { opacity: 1; transform: none; animation: none; }
  .card, .btn, .site-nav { transition: none; }
  .card:hover, .btn-primary:hover { transform: none; }
}

[hidden] { display: none !important; }
