/* ==========================================================================
   Ataraxia — official website
   Warm ivory, a little coral, editorial serif + quiet system sans.
   ========================================================================== */

@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant.woff2') format('woff2-variations'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-italic.woff2') format('woff2-variations'); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  /* colour */
  --ivory: #F5F3ED;
  --ivory-2: #EFECE4;
  --ink: #292724;
  --ink-2: #77716A;
  --line: #E4DED6;
  --coral: #E8704C;
  --coral-ink: #C9552F;
  --charcoal: #1F1D1B;
  /* type */
  --serif: 'Cormorant', 'Iowan Old Style', 'Baskerville', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, Arial, sans-serif;
  /* layout */
  --pad: clamp(20px, 5vw, 72px);
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { background: var(--ivory); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--ivory); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--coral) 24%, transparent); }
.skip { position: absolute; left: 12px; top: -48px; padding: 8px 14px; background: var(--ink); color: var(--ivory); border-radius: 8px; z-index: 100; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Type scale ------------------------------------------------------ */
.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.eyebrow .num { color: var(--coral); }
.h2 { font: 400 clamp(2.4rem, 5.2vw, 4.4rem)/1.04 var(--serif); letter-spacing: -0.015em; margin-top: 18px; }
.h3 { font: 500 clamp(1.45rem, 2.2vw, 1.9rem)/1.15 var(--serif); letter-spacing: -0.005em; margin: 8px 0 10px; }
em { font-style: italic; }
.h2 em, .h3 em, .hero__title em, .philosophy__title em { font-weight: 400; }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 34em; margin-top: 18px; }
.note { font-size: 13px; line-height: 1.6; color: var(--ink-2); max-width: 46em; margin-top: 16px; }
.list { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.list li { position: relative; padding-left: 22px; line-height: 1.5; }
.list li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); opacity: 0.85; }
.list--small { gap: 8px; margin-top: 18px; font-size: 15px; }
.badge { padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--coral) 45%, transparent); color: var(--coral-ink); letter-spacing: 0.08em; font-size: 10.5px; }

/* ---------- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font: 500 15px/1 var(--sans); text-decoration: none; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.btn--primary { background: var(--coral); color: #fff; }
.btn--primary:hover { background: var(--coral-ink); }
.btn--quiet { color: var(--ink); padding: 0 8px; }
.btn--quiet span { transition: transform 0.4s var(--ease); }
.btn--quiet:hover span { transform: translateX(4px); }

/* ---------- Navigation -------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; padding: 0 var(--pad); background: color-mix(in srgb, var(--ivory) 82%, transparent); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px); border-bottom: 1px solid transparent; transition: border-color 0.4s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 22px/1 var(--serif); letter-spacing: 0.01em; }
.nav__brand img { border-radius: 7px; }
.nav__links { display: flex; gap: 30px; font-size: 14px; }
.nav__links a, .nav__home { text-decoration: none; color: var(--ink-2); transition: color 0.25s; position: relative; padding: 6px 0; }
.nav__links a:hover, .nav__home:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--coral); }
.nav__home { font-size: 13px; }

/* ---------- Hero -------------------------------------------------------------- */
.hero { display: grid; justify-items: center; text-align: center; padding: clamp(48px, 9vh, 110px) var(--pad) 40px; }
.hero__mark img { width: 120px; height: 120px; border-radius: 26px; }
.hero__eyebrow { margin-top: 26px; }
.hero__title { font: 400 clamp(3rem, 8.2vw, 7.4rem)/0.98 var(--serif); letter-spacing: -0.025em; max-width: 12ch; margin-top: 18px; text-wrap: balance; }
.hero__title em { color: var(--ink); }
.hero__sub { margin-top: 26px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 30em; text-wrap: balance; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; margin-top: 34px; }
.hero__shot { width: min(var(--max), 100%); margin-top: clamp(48px, 8vh, 96px); }
.hero__shot img { width: 100%; }
figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-2); text-align: center; }

/* ---------- Reveal ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Sections ------------------------------------------------------------ */
.section { padding: clamp(90px, 14vh, 170px) var(--pad); max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.section__head { max-width: 760px; }
.section__head--center { margin: 0 auto; text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.split--rev .split__copy { order: 2; }

/* ---------- 01 Spatial: sticky stage with a camera panning across the canvas ---- */
.spatial { position: relative; height: 320vh; border-top: 1px solid var(--line); }
.spatial__sticky { position: sticky; top: 64px; height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 4vw, 64px); align-items: center; padding: 0 var(--pad); max-width: 1500px; margin: 0 auto; }
.steps { list-style: none; margin-top: 34px; display: grid; gap: 4px; counter-reset: s; }
.steps li { position: relative; padding: 12px 0 12px 22px; color: var(--ink-2); font-size: 15px; line-height: 1.5; opacity: 0.45; transition: opacity 0.5s var(--ease); border-left: 1px solid var(--line); }
.steps li span { display: block; font: 500 1.3rem/1.2 var(--serif); color: var(--ink); margin-bottom: 2px; }
.steps li.is-on { opacity: 1; border-left-color: var(--coral); }
.spatial__stage { position: relative; }
.spatial__window { position: relative; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 18px; background: var(--ivory-2); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.spatial__img { position: absolute; top: 50%; left: 0; height: 132%; width: auto; max-width: none; transform: translate3d(var(--x, 0px), -50%, 0); will-change: transform; }
.spatial__track { margin: 22px auto 0; width: 40%; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.spatial__track i { display: block; height: 100%; background: var(--coral); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- 02 Light Tunnel comparison ------------------------------------------- */
.compare { margin-top: clamp(48px, 7vh, 80px); }
.compare__frame { position: relative; border-radius: 18px; overflow: hidden; }
.compare__img { width: 100%; }
.compare__hard { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); background: var(--ivory); }
/* Illustration: the soft margins are cut away to a crisp rectangle with a hairline frame. */
.compare__hard img { clip-path: inset(3.6% 1.2% 3.4% 1.4% round 10px); }
.compare__hard::after { content: ''; position: absolute; inset: 3.6% 1.2% 3.4% 1.4%; border-radius: 10px; box-shadow: 0 0 0 1px rgba(41, 39, 36, 0.28), 0 18px 34px -16px rgba(0, 0, 0, 0.35); pointer-events: none; }
.compare__tag { position: absolute; top: 16px; padding: 6px 12px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--ivory) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--ink-2); }
.compare__tag--l { left: 16px; }
.compare__tag--r { right: 16px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 1px; background: rgba(41, 39, 36, 0.35); pointer-events: none; }
.compare__handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: color-mix(in srgb, #fff 70%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.compare__range:focus-visible ~ .compare__handle::after { outline: 2px solid var(--coral); outline-offset: 3px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); }

/* ---------- 02 Immersive Browsing: the capture at full width, then two real close-ups -- */
.immersive { padding: clamp(90px, 14vh, 170px) 0; overflow-x: clip; border-top: 1px solid var(--line); }
.immersive .section__head { padding: 0 var(--pad); max-width: 900px; }
.immersive__eyebrow { justify-content: center; }
.immersive__title { text-wrap: balance; }
.immersive__lede { margin-inline: auto; text-wrap: pretty; }
/* The capture carries its own transparent window shadow: no frame, no box around it. */
.immersive__shot { width: min(1440px, 94vw); margin: clamp(28px, 5vh, 56px) auto 0; opacity: var(--o, 1); transform: scale(var(--s, 1)); transform-origin: 50% 60%; }
.immersive__shot img { width: 100%; }
.immersive__shot figcaption { margin-top: -6px; }
.edges { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); gap: clamp(28px, 4.5vw, 72px); align-items: end; max-width: 1120px; margin: clamp(56px, 9vh, 110px) auto 0; padding: 0 var(--pad); }
.edges img { width: 100%; border-radius: 16px; }
.edges figcaption { text-align: left; font-size: 15px; line-height: 1.6; margin-top: 20px; max-width: 36em; min-height: 6.4em; }
.edges strong { display: block; font: 500 1.45rem/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }

/* Immersive Mode: the window itself turns to glass over the desktop. */
.mode { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.5fr); gap: clamp(36px, 5vw, 80px); align-items: center; max-width: 1360px; margin: clamp(110px, 16vh, 190px) auto 0; padding: 0 var(--pad); }
.mode__title { margin-top: 14px; }
.mode__shot img { width: 100%; border-radius: clamp(14px, 1.6vw, 22px); box-shadow: 0 50px 90px -50px rgba(20, 40, 60, 0.55); }
.mode__shot figcaption { margin-top: 16px; }

/* ---------- 03 Resize demo (conceptual, drawn in CSS) ----------------------------- */
.demo__canvas { --w: 58%; position: relative; aspect-ratio: 4 / 3; border-radius: 18px; background: var(--ivory-2); overflow: hidden; display: flex; gap: 16px; padding: 7% 0 7% 6%; }
.demo__card { position: relative; flex: none; height: 100%; border-radius: 12px; background: #fff; box-shadow: 0 20px 40px -24px rgba(60, 45, 30, 0.35); padding: 6%; display: grid; align-content: start; gap: 9px; transition: width 0.1s linear; }
.demo__card--a { width: var(--w); }
.demo__card--b { width: 52%; opacity: 0.75; }
.demo__card i { display: block; height: 9px; border-radius: 5px; background: var(--line); }
.demo__card i:nth-child(1) { width: 46%; height: 13px; background: #E9E4DC; }
.demo__card i:nth-child(2) { width: 86%; }
.demo__card i:nth-child(3) { width: 70%; }
.demo__card b { display: block; margin-top: 10px; height: 38%; border-radius: 8px; background: linear-gradient(135deg, #F2E4DC, #EADFD6); }
/* The handle lives inside the resizing card, centred in the 16 px gap, so it always
   stays on the card's right edge. */
.demo__handle { position: absolute; top: 50%; right: -12px; width: 8px; height: 56px; margin-top: -28px; border-radius: 8px; background: color-mix(in srgb, #fff 65%, transparent); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 1; }

/* ---------- 04 Profiles ---------------------------------------------------------- */
.profiles__visual img { width: 100%; border-radius: 18px; }
.profiles__rail { padding: 18px 14px; border-radius: 40px; background: color-mix(in srgb, #fff 55%, transparent); box-shadow: 0 24px 50px -28px rgba(60, 45, 30, 0.35); }
.profiles__rail img { width: 74px; height: auto; }
.profiles__axes { position: absolute; inset: 0; pointer-events: none; }
.axis { position: absolute; font: 600 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.axis--v { left: 26px; top: 50%; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); }
.axis--v::before, .axis--h::before { content: ''; position: absolute; background: var(--coral); opacity: 0.6; }
.axis--v::before { width: 1px; height: 64px; left: 50%; bottom: calc(100% + 10px); }
.axis--h { bottom: 24px; left: 50%; transform: translateX(-50%); }
.axis--h::before { height: 1px; width: 64px; right: calc(100% + 10px); top: 50%; }


/* ---------- Details bento -------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-top: clamp(48px, 7vh, 80px); }
.tile { padding: 30px; border-radius: 22px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.tile .h3 { color: var(--ink); }
.tile__kicker { font: 600 11px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral-ink); }
.tile__media { margin: -30px -30px 26px; border-radius: 22px 22px 0 0; overflow: hidden; background: var(--ivory); }
.tile__media--pad { padding: 34px 28px; display: grid; place-items: center; min-height: 170px; }
.tile--omni { grid-column: span 7; }
.tile--load { grid-column: span 5; }
.tile--start { grid-column: span 7; }
.tile--session { grid-column: span 5; background: var(--ivory-2); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.tile--session .h3 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }

/* ---------- iPhone: two full screens either side of a closer look at search -------- */
.iphone { padding: clamp(90px, 14vh, 170px) var(--pad); background: var(--ivory-2); }
.iphone__eyebrow { justify-content: center; }
.iphone__lede { margin-inline: auto; text-wrap: balance; }
.phones { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 0 clamp(28px, 4.5vw, 72px); align-items: end; max-width: 1120px; margin: clamp(48px, 8vh, 88px) auto 0; }
.phone { color: var(--ink-2); font-size: 15px; line-height: 1.6; display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; align-items: start; }
.phone__shot { align-self: end; margin-bottom: 28px; overflow: hidden; border-radius: clamp(26px, 3vw, 42px); box-shadow: 0 0 0 1px var(--line), 0 36px 70px -36px rgba(70, 55, 40, 0.4); }
.phone--search .phone__shot { border-radius: 26px; align-self: center; }
.phone .h3 { color: var(--ink); }

/* ---------- Philosophy (the one dark, editorial moment) ------------------------- */
.philosophy { background: var(--charcoal); color: var(--ivory); padding: clamp(110px, 18vh, 200px) var(--pad); display: grid; justify-items: center; text-align: center; }
.eyebrow--light { color: color-mix(in srgb, var(--ivory) 55%, transparent); letter-spacing: 0.2em; }
.philosophy__title { font: 400 clamp(3rem, 7.4vw, 6.4rem)/1 var(--serif); letter-spacing: -0.02em; margin-top: 22px; }
.philosophy__title em { color: var(--coral); }
.philosophy__body { margin-top: 48px; display: grid; gap: 22px; max-width: 30em; font: 400 clamp(1.3rem, 2.1vw, 1.75rem)/1.45 var(--serif); color: color-mix(in srgb, var(--ivory) 86%, transparent); }

/* ---------- Closing --------------------------------------------------------------- */
.closing { display: grid; justify-items: center; text-align: center; padding: clamp(90px, 14vh, 160px) var(--pad) clamp(70px, 10vh, 110px); }
.closing__lockup { width: min(300px, 64vw); margin-bottom: clamp(24px, 5vh, 48px); }
.closing__title { max-width: 14ch; text-wrap: balance; }
.avail { margin-top: clamp(70px, 10vh, 110px); width: min(760px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 22px; text-align: left; background: color-mix(in srgb, #fff 45%, transparent); }
.avail p { color: var(--ink-2); }
.status { margin-top: 20px; display: grid; gap: 14px; font-size: 15px; }
.status dt { font: 600 11px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral-ink); }
.status dd { color: var(--ink); line-height: 1.6; }

/* ---------- Footer ---------------------------------------------------------------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding: 26px var(--pad) calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.foot__brand { display: flex; align-items: center; gap: 8px; font: 500 18px/1 var(--serif); color: var(--ink); }
.foot__brand img { border-radius: 5px; }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { color: var(--ink); }

/* ---------- Tablet & phone ---------------------------------------------------------- */
@media (max-width: 1020px) {
  .mode { grid-template-columns: 1fr; }
  .spatial { height: auto; }
  .spatial__sticky { position: static; height: auto; grid-template-columns: 1fr; padding-block: clamp(80px, 12vh, 130px); }
  .spatial__window { background: none; border-radius: 0; aspect-ratio: auto; -webkit-mask-image: none; mask-image: none; }
  .spatial__img { position: static; height: auto; width: 100%; transform: none; }
  .spatial__track { display: none; }
  .steps li { opacity: 1; }
  .split { grid-template-columns: 1fr; }
  .split--rev .split__copy { order: 0; }
  .tile--omni, .tile--load, .tile--start, .tile--session { grid-column: span 12; }
}
@media (max-width: 760px) {
  .immersive__shot { width: 108vw; margin-left: -4vw; }
  .edges { grid-template-columns: 1fr; gap: 48px; }
  .edges figcaption { min-height: 0; }
  .edges__bottom img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 62% 50%; }
  .edges__side img { aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 100% 50%; }
  .phones { grid-template-columns: 1fr; gap: 64px; }
  .phone { display: block; }
  .phone__shot { width: min(74vw, 300px); margin-inline: auto; }
  .phone--search .phone__shot { width: 100%; max-width: 420px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .hero__mark img { width: 92px; height: 92px; border-radius: 20px; }
  .compare__tag { top: 10px; font-size: 10.5px; padding: 4px 9px; }
  .compare__tag--l { left: 10px; }
  .compare__tag--r { right: 10px; }
  .tile { padding: 22px; }
  .tile__media { margin: -22px -22px 20px; }
  .tile__media--pad { padding: 22px 14px; min-height: 120px; }
  .avail { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .spatial { height: auto; }
  .spatial__sticky { position: static; height: auto; padding-block: 100px; }
  .spatial__img { transform: translate3d(-20%, -50%, 0); }
  .steps li { opacity: 1; }
}
