/* Significant Other: card-by-card layout (same format as Understory),
   in the Paper & Forest palette: paper-white page, charcoal, deep forest green. */
:root {
  --paper: #ece9e2;       /* page background */
  --wine: #26312c;        /* charcoal-forest: dark lines and accents */
  --wine-deep: #1f2723;   /* dark cards */
  --ink: #1c1c1a;         /* text on light cards */
  --cream: #f7f5f0;
  --blush: #dcd8cf;
  --blush-soft: #f4f2ed;
  --berry: #3f6b5c;
  --terracotta: #6f6a62;
  --rose: #cbc6bb;
  --apricot: #a9c7b6;
  --gold: #c4d8cc;
  --forest-deep: #2f5446;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.165, .84, .44, 1);
  --card-w: min(496px, calc(100vw - 72px));
  --card-h: clamp(460px, calc(100svh - 300px), 600px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1, h2 { font-size: clamp(30px, 3vw, 38px); line-height: 1.08; }
h3 { font-size: 26px; line-height: 1.12; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; opacity: .85; }
.body { font-size: 14px; line-height: 1.65; margin-top: 16px; }
.body-lg { font-size: 16px; line-height: 1.65; }
.body-lg + .body-lg { margin-top: 14px; }
.num { font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .75; }
.hi { font-style: italic; color: var(--berry); }
.hi-dark { font-style: italic; color: var(--berry); }
.c-ai .hi, .c-method .hi { color: var(--apricot); }

/* Background line art */
.bg-art {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  fill: none; stroke: var(--wine); stroke-width: 1;
  opacity: 0; animation: bg-in 2.4s var(--ease) .3s forwards;
}
.bg-art .dot { fill: var(--wine); stroke: none; }
.bg-orbit { transform-origin: 860px 300px; animation: orbit 90s linear infinite; }

/* Header */
.top {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 20px 24px;
  padding: 20px 32px 0;
}
.wordmark {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9.4vw, 7.6rem);
  line-height: .9;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--ink);
}
.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.2;
  margin-top: 4px;
  padding-left: 8px;
  opacity: .9;
}
.top-cta { padding-top: 22px; }

/* Pill buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 700; font-size: 15px;
  text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.pill-cream { background: var(--wine); color: var(--cream); }
.pill-dark { background: var(--cream); color: var(--forest-deep); height: 40px; font-size: 14px; padding: 0 18px; }

/* The strip of cards */
.strip {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; align-items: flex-start;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 32px 32px 40px;
  scroll-padding: 0 32px;
  scrollbar-width: none;
  outline: none;
}
.strip::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  flex: 0 0 auto;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  scroll-snap-align: start;
}

/* Entrance */
.rise { opacity: 0; animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }

/* Flip cards */
.flip { padding: 0; overflow: visible; perspective: 1800px; }
.flip-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .85s var(--ease); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0;
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
}
.back { transform: rotateY(180deg); justify-content: center; }
.plus {
  position: absolute; right: 20px; bottom: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 22px; line-height: 1;
  background: rgba(255,255,255,.14);
  transition: transform .4s var(--ease), background-color .2s;
}
.plus:hover { transform: rotate(90deg); background: rgba(255,255,255,.24); }
.plus.is-back { transform: rotate(45deg); }
.plus.is-back:hover { transform: rotate(135deg); }

/* 1. Intro */
.c-intro {
  background: #fff;
  border: 1px solid rgba(28,28,26,.07);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
  color: var(--ink);
}
.c-intro .wowhow { font-family: var(--serif); font-size: 24px; line-height: 1.2; margin-top: 20px; }
.card-links { margin-top: auto; display: flex; gap: 18px; font-size: 12px; font-weight: 600; }
.card-links a { text-underline-offset: 4px; }
.card-links a:hover { color: var(--berry); }

/* 2. Partnership */
.c-partner .face { background: var(--blush); color: var(--ink); }
.c-partner .front { padding: 0; }
.c-partner .front h2 { padding: 32px 28px 0 32px; }
.mark {
  background: linear-gradient(var(--apricot), var(--apricot)) 0 88% / 0% 42% no-repeat;
  animation: mark 1s var(--ease) 1.4s forwards;
  padding: 0 2px;
}
.partner-art {
  margin-top: auto;
  width: 100%;
  background: var(--blush-soft);
  padding: 22px 0 14px;
  fill: none;
}
.partner-art .draw {
  stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) forwards;
}
.partner-art .ring-a { stroke: var(--wine); animation-delay: .7s; }
.partner-art .ring-b { stroke: var(--terracotta); animation-delay: 1s; }
.partner-art .lens { fill: var(--apricot); opacity: 0; animation: fade-to 1s var(--ease) 2s forwards; --to: .55; }
.partner-art .spark { fill: var(--wine); opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .8s var(--ease) 2.4s forwards; }
.art-label { font-family: var(--serif); font-style: italic; font-size: 15px; fill: var(--ink); text-anchor: middle; opacity: .75; }
.c-partner .plus, .c-about .plus { background: rgba(31,28,25,.08); }
.c-partner .plus:hover, .c-about .plus:hover { background: rgba(31,28,25,.15); }
.c-partner .pull { font-family: var(--serif); font-size: 26px; margin-top: 24px; }
.c-partner .pull em { color: var(--terracotta); }

/* 3. Services */
.c-services { background: var(--berry); color: #fff; display: flex; flex-direction: column; }
.svc-track { position: relative; flex: 1; margin-top: 24px; }
.svc { display: none; }
.svc.is-active { display: block; animation: swap-in .5s var(--ease); }
.svc h3 { margin: 6px 0 10px; }
.svc p { font-size: 14px; line-height: 1.65; opacity: .92; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li { font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 2px 10px; }
.svc-nav { display: flex; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: 6px; }
.dots button { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.4); transition: width .3s var(--ease), background-color .3s; }
.dots button.is-active { width: 22px; background: #fff; }
.arrows { display: flex; gap: 8px; }
.arrow { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 16px; transition: background-color .2s, transform .3s var(--ease); }
.arrow:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }

/* 4. Photo */
.c-photo { padding: 0; background: var(--blush); }
.c-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.caption {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(31,28,25,.72); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; color: var(--cream);
}
.caption strong { margin-right: 6px; }

/* 5. About */
.c-about .face { background: var(--cream); color: var(--ink); }
.c-about .eyebrow { color: var(--berry); opacity: 1; }
.c-about .role { font-size: 12px; opacity: .7; margin-top: 6px; }

/* 6. AI */
.c-ai .face { background: var(--terracotta); color: #fff; }
.network { width: 100%; margin-top: auto; margin-bottom: 36px; overflow: visible; }
.network .wires path { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 1.5; }
.network .pulse path { stroke: var(--gold); stroke-width: 2; stroke-dasharray: .12 1; animation: pulse 2.8s linear infinite; }
.network .pulse path:nth-child(2) { animation-delay: .5s; }
.network .pulse path:nth-child(3) { animation-delay: 1s; }
.network .pulse path:nth-child(4) { animation-delay: 1.5s; }
.network .pulse path:nth-child(5) { animation-delay: 2s; }
.network .nodes > g > circle:first-child { fill: rgba(255,255,255,.95); }
.network .ic { fill: none; stroke: var(--terracotta); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.network .ic.fill { fill: var(--terracotta); }
.network .hub { fill: var(--gold); animation: glow 2.8s ease-in-out infinite; }
.network .hub-spark { fill: var(--wine-deep); }
.steps { list-style: none; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; }
.steps .num { padding-top: 6px; }
.steps h3 { font-size: 22px; }
.steps p { font-size: 13.5px; opacity: .92; }

/* 7. Illustration */
.c-shapes { padding: 0; background: var(--blush); overflow: hidden; }
.c-shapes svg { width: 100%; height: 100%; display: block; }
.sh { opacity: 0; transform-box: fill-box; transform-origin: center; animation: shape-in 1.1s var(--ease) var(--d, .8s) forwards; }
.sh-half { fill: var(--terracotta); }
.sh-sun { fill: var(--apricot); }
.sh-dots { fill: var(--wine); }
.sh-quarter { fill: var(--berry); transform-origin: left bottom; }
.sh-ring { fill: none; stroke: var(--cream); stroke-width: 3; }
.sh-mound { fill: var(--rose); transform-origin: center bottom; }
.sh-pill { fill: var(--wine); transform-origin: center bottom; }
.c-shapes .sh-sun { animation: shape-in 1.1s var(--ease) var(--d) forwards, float 7s ease-in-out 2s infinite alternate; }
.c-shapes .sh-pill { animation: shape-in 1.1s var(--ease) var(--d) forwards, lean 6s ease-in-out 2.6s infinite alternate; }
@keyframes shape-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes lean { from { transform: rotate(0deg); } to { transform: rotate(4deg); } }

/* 8. Method */
.c-method { background: var(--wine-deep); color: var(--cream); display: flex; flex-direction: column; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 600; }
.tab { opacity: .55; padding: 2px 0; border-bottom: 1.5px solid transparent; transition: opacity .2s, border-color .2s; }
.tab:hover { opacity: .85; }
.tab.is-active { opacity: 1; border-color: var(--apricot); }
.panels { flex: 1; display: flex; }
.panel { display: none; flex-direction: column; justify-content: center; width: 100%; }
.panel.is-active { display: flex; animation: swap-in .5s var(--ease); }
.phase-list { list-style: none; margin-top: 22px; display: grid; gap: 6px; }
.phase-list button { display: flex; align-items: baseline; gap: 10px; font-size: 14px; text-align: left; transition: color .2s; }
.phase-list button:hover { color: var(--apricot); }
.phase-list span:last-child { opacity: .65; }
.next-link { align-self: flex-start; margin-top: 26px; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.next-link:hover { color: var(--apricot); }
.big-num { font-family: var(--serif); font-size: 88px; line-height: 1; color: var(--apricot); opacity: .9; margin-bottom: 10px; }
.phase-sub { font-family: var(--serif); font-style: italic; font-size: 20px; opacity: .8; margin-top: 6px; }

/* 9. Beliefs */
.c-beliefs { background: var(--rose); color: var(--ink); }
.c-beliefs h2 { margin-bottom: 16px; }
.beliefs { list-style: none; }
.beliefs li { font-size: 13px; line-height: 1.55; padding: 10px 0; border-top: 1px solid rgba(31,28,25,.2); }
.beliefs em { font-family: var(--serif); font-size: 17px; font-style: italic; margin-right: 4px; }

/* 10. CTA */
.c-cta { background: var(--forest-deep); color: var(--cream); display: flex; flex-direction: column; }
.c-cta h2 em { color: var(--apricot); }
.cta-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.rings { width: 96px; fill: none; stroke: var(--cream); stroke-width: 3; }
.rings circle:last-child { stroke: var(--apricot); animation: ring-nudge 4s ease-in-out infinite alternate; }

/* Footer */
.bottom {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  padding: 0 32px 20px;
  font-size: 13px; font-weight: 600; color: rgba(28,28,26,.6);
}

/* Keyframes */
@keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes swap-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bg-in { to { opacity: .12; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-to { to { opacity: var(--to, 1); } }
@keyframes pop { from { opacity: 0; transform: scale(.2) rotate(-45deg); } to { opacity: 1; transform: none; } }
@keyframes mark { to { background-size: 100% 42%; } }
@keyframes pulse { from { stroke-dashoffset: 1.12; } to { stroke-dashoffset: -.12; } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(169,199,182,0)); } 50% { filter: drop-shadow(0 0 10px rgba(169,199,182,.8)); } }
@keyframes sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(14px); } }
@keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(45deg) scale(.85); } }
@keyframes ring-nudge { from { transform: translateX(0); } to { transform: translateX(-4px); } }

/* Phones: snap one card at a time */
@media (max-width: 767px) {
  .top { padding: 20px 24px 0; }
  .top-cta { padding-top: 0; }
  .strip { gap: 16px; padding: 24px 24px 32px; scroll-snap-type: x mandatory; scroll-padding: 0 24px; }
  .card, .face { padding: 26px; }
  .c-partner .front h2 { padding: 26px 22px 0 26px; }
  .bottom { padding: 0 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
