/* aspiring better human™ concept redesign by KhaelWorks */

:root {
  --cream: #f7f3ec;
  --paper: #fffdf9;
  --ink: #1f1a24;
  --ink-soft: #4d4554;
  --line: #e2dacd;
  --plum: #4a2867;
  --plum-deep: #2c1840;
  --terracotta: #b8492a;
  --terracotta-soft: #f0d8cc;
  --focus: #b8492a;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 6px;
  --max: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--plum); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Disclosure banner */
.concept-banner { background: var(--ink); color: #f1ebe3; font-size: .85rem; text-align: center; padding: 8px var(--gutter); }
.concept-banner p { margin: 0; max-width: 900px; margin-inline: auto; }
.concept-banner a { color: #ffd2bf; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(247, 243, 236, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.wordmark { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--plum); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { color: var(--terracotta); }
.wordmark sup { font-size: .5em; color: var(--ink-soft); }
.wordmark-light { color: #fff; }
.wordmark-light span { color: #ffb899; }
.wordmark-light sup { color: #cfc4d8; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--terracotta); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-block; background: var(--plum); color: #fff; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: var(--radius); border: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--plum-deep); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 16px; font-size: .9rem; color: #fff !important; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-arrow { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--terracotta); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--terracotta); margin-bottom: .9em; }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 28px; }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }
.art-wall { fill: var(--paper); stroke: var(--line); }
.art-arch { fill: var(--terracotta-soft); stroke: var(--plum); stroke-width: 2; }
.art-arch-2 { fill: #e6deef; }
.art-frame { fill: var(--plum); }
.art-frame-2 { fill: var(--terracotta); }
.art-sun { fill: var(--terracotta); opacity: .85; }
.art-floor { stroke: var(--ink); stroke-width: 2; }

/* Proof */
.proof { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0 28px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat-num { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 600; color: var(--plum); margin: 0; line-height: 1.1; }
.stat-label { color: var(--ink-soft); margin: 4px 0 0; font-size: .95rem; }
.worked-with { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink); }
.worked-with span { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: #efe8dd; }
.section-dark { background: var(--plum-deep); color: #eee6f3; }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: #ffb899; }
.section-head { max-width: 640px; margin-bottom: 44px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--paper); padding: 30px 28px; }
.service-no { font-family: var(--serif); color: var(--terracotta); font-size: .95rem; display: block; margin-bottom: 14px; }
.service p { color: var(--ink-soft); margin: 0; font-size: .97rem; }

/* Engagements */
.engagements { list-style: none; margin: 0; padding: 0; border-top: 1px solid #d6ccbd; }
.engagements > li { display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid #d6ccbd; }
.eng-years { font-weight: 600; color: var(--terracotta); font-size: .92rem; }
.engagements h3 { margin-bottom: 2px; }
.eng-role { font-weight: 600; color: var(--plum); font-size: .95rem; margin-bottom: 8px; }
.engagements p:last-child { color: var(--ink-soft); margin: 0; max-width: 46em; }
.placeholder-note { margin: 28px 0 0; padding: 16px 20px; border: 1px dashed #b9ad9b; border-radius: var(--radius); color: var(--ink-soft); font-size: .92rem; font-style: italic; }

/* Formats */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.format { border-top: 3px solid var(--plum); padding-top: 20px; }
.format p { color: var(--ink-soft); margin: 0; }
.formats-note { margin: 36px 0 0; color: var(--ink-soft); }

/* About */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; max-width: 960px; }
.about-mark { aspect-ratio: 3 / 4; border-radius: var(--radius); background: linear-gradient(160deg, #6b3d8f, var(--terracotta)); display: grid; place-items: center; }
.about-mark span { font-family: var(--serif); font-size: 3.2rem; color: rgba(255,255,255,.9); }
.about-grid p { color: #ddd2e6; }

/* Inquiry */
.inquire-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.inquire-intro p { color: var(--ink-soft); }
.inquire-steps { list-style: none; padding: 0; margin: 24px 0 0; }
.inquire-steps li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.inquire-steps strong { color: var(--terracotta); margin-right: 6px; }

.inquiry-form { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 32px; box-shadow: 0 10px 30px rgba(44, 24, 64, .06); }
.demo-flag { background: var(--terracotta-soft); color: #6a2512; font-size: .85rem; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 22px; }
.field { margin-bottom: 18px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field label span { color: var(--terracotta); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #cfc4b3; border-radius: var(--radius); padding: 11px 12px;
}
.field textarea { resize: vertical; }
.field.has-error input, .field.has-error select { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .85rem; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 500; min-height: 1.4em; }
.form-status.is-success { color: #1d6b3a; }
.form-status.is-error { color: #b3261e; }
.form-status.is-info { color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--ink); color: #cfc6d6; padding: 44px 0; font-size: .92rem; }
.footer-inner p { margin: 0 0 8px; }
.footer-disclosure { margin-top: 18px !important; padding-top: 18px; border-top: 1px solid #3a3242; color: #b9b0c2; font-size: .88rem; }

/* Tablet */
@media (max-width: 900px) {
  .hero-grid, .inquire-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 300px; }
  .services { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 14px; text-align: center; border: 0; }
  .hero { padding: 48px 0 44px; }
  .hero-art { display: none; }
  .proof-grid, .services, .formats { grid-template-columns: 1fr; }
  .proof-grid { gap: 18px; }
  .section { padding: 64px 0; }
  .engagements > li { grid-template-columns: 1fr; gap: 6px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-mark { max-width: 140px; }
  .field-row { flex-direction: column; gap: 0; }
  .inquiry-form { padding: 22px; }
}

/* ================= Motion (approved patterns) =================
   Rule: plays once, short, never loops, off for reduced-motion users.
   Content stays visible if JavaScript fails (.no-js). */

/* Paper grain (remove the "grain" class on <body> to switch off) */
.grain::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 1. Split headline reveal */
.js .split-reveal .word { display: inline-block; opacity: 0; transform: translateY(.45em); animation: word-in .55s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 45ms + 100ms); }
@keyframes word-in { to { opacity: 1; transform: none; } }

/* 2. SVG line draw (arches draw once, fills fade in after) */
.js .draw-svg .art-arch { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); fill-opacity: 0; animation: draw 1.1s ease-out .35s forwards, fill-in .5s ease-out 1.2s forwards; }
.js .draw-svg .art-frame, .js .draw-svg .art-sun { opacity: 0; animation: fade-in .5s ease-out 1.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }
@keyframes fade-in { to { opacity: 1; } }
.js .draw-svg .art-sun { animation-name: sun-in; }
@keyframes sun-in { to { opacity: .85; } }

/* 4. Engagements timeline spine (grows with scroll via --spine) */
.has-spine { position: relative; padding-left: 28px !important; }
.has-spine::before, .has-spine::after { content: ""; position: absolute; left: 6px; top: 0; width: 2px; }
.has-spine::before { bottom: 0; background: #d6ccbd; }
.has-spine::after { height: var(--spine, 100%); background: var(--terracotta); transition: height .15s linear; }
.has-spine > li { position: relative; }
.has-spine > li::before { content: ""; position: absolute; left: -27px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--cream); border: 2px solid var(--terracotta); z-index: 1; transition: background .3s; }
.has-spine > li.is-reached::before { background: var(--terracotta); }

/* 5. Glass header on scroll */
.site-header { transition: background .3s, box-shadow .3s; }
.site-header.is-scrolled { background: rgba(247, 243, 236, .78); box-shadow: 0 6px 24px rgba(44, 24, 64, .08); }

/* 6. Fade-up reveals */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 720px) { .has-spine > li::before { top: 32px; } }

/* Reduced motion: show everything, animate nothing */
@media (prefers-reduced-motion: reduce) {
  .js .split-reveal .word, .js .reveal, .js .draw-svg * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; stroke-dashoffset: 0 !important; fill-opacity: 1 !important; }
  .js .draw-svg .art-sun { opacity: .85 !important; }
  .has-spine::after { height: 100% !important; transition: none; }
}

/* Perspective (Medium articles) */
.section-sub { color: var(--ink-soft); margin: 0; }
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.article { display: flex; flex-direction: column; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s, box-shadow .2s; }
.article:hover { border-color: var(--plum); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(44,24,64,.08); }
.article h3 { margin: 0; flex: 1; }
.article-tag { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--terracotta); }
.article-link { font-weight: 600; font-size: .9rem; color: var(--plum); }
.article-link::after { content: " ↗"; }

/* Footer social links */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 14px 0 0; }
.social a { color: #f1ebe3; text-decoration: none; font-weight: 500; border-bottom: 1px solid #5a5063; padding-bottom: 2px; }
.social a:hover { border-color: #ffb899; color: #ffb899; }

@media (max-width: 900px) { .articles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .article { transition: none; } .article:hover { transform: none; } }

/* Radial glow behind the hero (static, no animation) */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 900px; height: 900px; right: -180px; top: -260px;
  background:
    radial-gradient(closest-side, rgba(184, 73, 42, .16), rgba(184, 73, 42, .06) 55%, transparent 100%),
    radial-gradient(closest-side at 30% 70%, rgba(74, 40, 103, .07), transparent 100%);
}
@media (max-width: 720px) {
  .hero::before { width: 520px; height: 520px; right: -220px; top: -160px; }
}

/* ===== Refinement pass ===== */

/* Skip link: hidden until focused with the keyboard */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--plum); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Engagements: what each one called for */
.eng-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.eng-badge { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--plum); border-radius: 999px; padding: 3px 10px; }
.eng-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 0; }
.eng-tags li { font-size: .82rem; font-weight: 500; color: var(--plum-deep); background: var(--paper); border: 1px solid #d6ccbd; border-radius: 999px; padding: 4px 12px; }
.engagements .eng-tags li::before { content: none; }
#engagements .section-sub { margin-top: 4px; max-width: 40em; }

/* About: pull quote replaces the monogram placeholder */
.about-quote { margin: 0; padding: 28px 26px; border-radius: var(--radius); background: linear-gradient(160deg, #5b3380, #8a3f2c); color: #fff; align-self: start; }
.about-quote blockquote { margin: 0 0 14px; font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; }
.about-quote figcaption { font-size: .85rem; color: #f3e6ee; }

/* Inquiry: live-version note */
.step-note { color: var(--ink-soft); font-size: .9rem; }

@media (max-width: 720px) {
  .eng-meta { flex-direction: row; align-items: center; }
  .about-quote { max-width: none; }
  .about-quote blockquote { font-size: 1.2rem; }
}

/* Contrast on the tinted engagements background (WCAG AA) */
.section-tint .eyebrow, .section-tint .eng-years { color: #9a3b1d; }

/* Tablet: switch to the menu button before the header gets cramped,
   hide the hero illustration instead of orphaning it below the copy */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: 14px; text-align: center; border: 0; }
  .hero-art { display: none; }
  .hero-copy { max-width: 680px; }
}
/* Mobile: section label and text first, quote after */
@media (max-width: 720px) {
  .about-quote { order: 2; }
}
