/*
  Anchor Digital
  One column of water runs the full height of the page, from sunlit shallows
  at the top to deep water at the bottom. Everything on the page floats on it.
  The one warm color is the sun: it marks links, focus and the anchor line.
*/

:root {
  --foam: #F4FBFC;
  --mist: #D5EAF1;
  --rule: rgba(244, 251, 252, .26);
  --navy: #0B2A44;
  --sun: #FFD76A;

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --pad-x: clamp(26px, calc(4vw + 12px), 68px);
  --max: 1320px;
  --ease-out: cubic-bezier(.16, .84, .24, 1);
}

@media (max-width: 720px) {
  :root { --pad-x: 20px; }
}
@media (min-width: 1800px) {
  :root { --max: 1480px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  background: #11879F;
}

body {
  margin: 0;
  overflow-x: clip;
  /* Stands in for the live water until it starts, and without WebGL. */
  background: linear-gradient(180deg, #17A5BD 0, #0C7DA3 90vh, #0A5E8A 190vh, #0A3D65 60%, #0B2540 85%, #0B1C2E 100%);
  color: var(--foam);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a, button { touch-action: manipulation; }

/* In-page links stop just below the fixed header. */
section[id] { scroll-margin-top: 72px; }

.phone-only { display: none; }

::selection { background: var(--sun); color: var(--navy); }

:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; z-index: 100; top: 18px; left: 18px;
  padding: 12px 16px; background: var(--foam); color: var(--navy);
  font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

.wrap { width: min(var(--max), 100% - 2 * var(--pad-x)); margin-inline: auto; }

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- The water ---------- */

.water {
  position: fixed; z-index: 0; top: 0; left: 0;
  display: block;
  width: 100%;
  height: 100vh; height: 100lvh;
  pointer-events: none;
}
.js .water { opacity: 0; transition: opacity 1.4s ease; }
.is-ready .water { opacity: 1; }
.no-webgl .water { display: none; }

main, .site-footer { position: relative; z-index: 1; }

/* The anchor line pays out as you go down, and sets the anchor at the bottom. */
.rope {
  /* --rest is how far above the bottom of the screen the anchor stops: on the
     seabed, once water.js has measured where that is. */
  --reach: calc(72px + var(--progress, 0) * (100% - 72px - var(--rest, 26px)));
  position: fixed; z-index: 60; top: 0;
  right: clamp(4px, 1vw, 16px);
  width: 20px;
  height: 100vh; height: 100dvh;
  pointer-events: none;
  color: var(--foam);
}
.rope-line {
  position: absolute; left: 50%; top: 0;
  width: 1px; height: var(--reach);
  background: currentColor;
  opacity: .6;
}
.rope-anchor {
  position: absolute; left: 0; top: var(--reach);
  display: block; width: 20px; height: 20px;
  color: var(--sun);
  transform-origin: 50% 10%;
}
/* At the bottom of the page the anchor reaches the seabed, tips over and holds. */
.rope.is-set .rope-anchor { animation: set-anchor .9s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes set-anchor {
  0% { transform: none; }
  30% { transform: translateY(3px); }
  60% { transform: translateY(2px) rotate(22deg) scale(1.3); }
  80% { transform: translateY(2px) rotate(12deg) scale(1.3); }
  100% { transform: translateY(2px) rotate(16deg) scale(1.3); }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed; z-index: 70;
  top: 0; left: 0; right: 0;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: max(var(--pad-x), calc((100% - var(--max)) / 2));
  color: var(--foam);
  transition: transform .6s var(--ease-out), background-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(8, 44, 70, .78);
  box-shadow: 0 1px 0 var(--rule);
}
/* The header takes on the color of the water at this depth (set by water.js). */
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .site-header.is-scrolled {
    background: color-mix(in srgb, color-mix(in srgb, var(--depth, #0A3D65) 52%, #06263C) 86%, transparent);
  }
}
.site-header.is-hidden { transform: translateY(calc(-100% - 2px)); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 650 18px/1 var(--sans);
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand-glyph { width: 26px; height: 26px; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font: 500 15px/1 var(--sans); }
.site-nav a { text-decoration: none; }
@media (hover: hover) {
  .site-nav a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: .4em; }
}
.nav-cta {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  .nav-cta:hover { background: var(--foam); border-color: var(--foam); color: var(--navy); }
}

/* ---------- Hero: the surface ---------- */

.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.hero-copy {
  position: absolute; z-index: 3;
  left: max(var(--pad-x), calc((100% - var(--max)) / 2));
  bottom: clamp(40px, 8vh, 96px);
  width: min(66vw, 1000px);
}

/* The letters are drawn by the water; this heading stands in for them without
   WebGL, and stays in the page for screen readers and selection. */
.hero-title {
  margin-bottom: clamp(18px, 2.2vw, 30px);
  font: 800 clamp(72px, 12vw, 260px)/.86 var(--sans);
  letter-spacing: -.04em;
}
.hero-title .line { display: block; }
.hero-title .line > span { display: inline-block; }
.js .hero-title { opacity: 0; transition: opacity 1.2s ease; }
.is-ready .hero-title { opacity: 1; }
.water-title .hero-title { color: transparent; }

.hero-sub {
  max-width: 42ch;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.5;
  text-shadow: 0 1px 14px rgba(5, 62, 92, .6), 0 0 2px rgba(5, 62, 92, .4);
}
.hero-sub a {
  font-weight: 600;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: .24em;
}
@media (hover: hover) {
  .hero-sub a:hover { color: var(--sun); }
}
/* The line under the headline shows with the page instead of fading in after the intro.
   It is the largest text the browser can see in the hero (the headline is drawn by the water),
   so speed tests count the page as loaded when it appears: a fade-in pushed that to 5 seconds on a slow phone. */

/* Moorings: one per product. Everything around them moves; they don't. */
.marks { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

.mark {
  --size: 46px;
  position: absolute;
  left: var(--x); top: var(--y);
  display: flex; align-items: center; gap: 12px;
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  text-decoration: none;
  pointer-events: auto;
}
.mark-glyph {
  display: grid; place-items: center;
  flex: none;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background: var(--foam);
  color: var(--navy);
  box-shadow: 0 14px 22px -8px rgba(4, 46, 72, .6), 0 3px 6px rgba(4, 46, 72, .22);
  transition: background-color .2s ease;
}
.mark-glyph svg { width: 62%; height: 62%; }
.mark-text {
  text-shadow: 0 1px 12px rgba(5, 62, 92, .65), 0 0 2px rgba(5, 62, 92, .4);
}
.mark-name { font: italic 500 clamp(22px, 1.9vw, 30px)/1.05 var(--serif); }
.mark:focus-visible .mark-name {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
}
@media (hover: hover) {
  .mark:hover .mark-glyph { background: var(--sun); }
  .mark:hover .mark-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
}

.js .mark { opacity: 0; }
.is-ready .mark { animation: drop-anchor 1s cubic-bezier(.3, .7, .3, 1) both; animation-delay: calc(1.05s + var(--i) * .3s); }

@keyframes drop-anchor {
  0% { opacity: 0; transform: translateY(-48px); }
  55% { opacity: 1; transform: translateY(4px); }
  78% { transform: translateY(-2px); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Why Anchor: closes the About us section ---------- */

.note-grid {
  display: grid;
  grid-template-columns: minmax(130px, 3fr) 9fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(96px, 12vw, 180px);
}
.note-figure { padding-top: .5em; }
.note-figure svg { display: block; width: clamp(64px, 8vw, 116px); height: clamp(64px, 8vw, 116px); }
.note-figure figcaption { margin-top: 14px; font: italic 400 18px/1.3 var(--serif); }

.note-verse { margin: 0; }
.note-verse p {
  max-width: 22ch;
  font: 350 clamp(32px, 4.3vw, 66px)/1.12 var(--serif);
  letter-spacing: -.012em;
}
.note-verse footer { margin-top: 20px; font-size: 15px; color: var(--mist); }
.note-verse cite { font: italic 400 19px/1 var(--serif); color: var(--sun); }

[data-reveal-words] .w { transition: opacity .5s ease; }
.js [data-reveal-words] .w { opacity: .24; }
.js [data-reveal-words] .w.is-on { opacity: 1; }

.note-founder {
  max-width: 58ch;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.note-founder p { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; }
.note-founder p + p { margin-top: 1em; }
.note-founder .note-sign { margin-top: 14px; font: italic 400 19px/1.3 var(--serif); color: var(--mist); }

/* ---------- Section heads ---------- */

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(40px, 6vw, 88px);
}
.section-title {
  font: 780 clamp(46px, 7.4vw, 120px)/.9 var(--sans);
  letter-spacing: -.032em;
}
.section-lede { max-width: 34ch; font-size: clamp(17px, 1.3vw, 19px); color: var(--mist); }

/* ---------- Products ---------- */

.products { padding: clamp(96px, 12vw, 180px) 0 clamp(64px, 8vw, 120px); }

.inset { scroll-margin-top: 96px; }
.inset + .inset { margin-top: clamp(96px, 13vw, 200px); }

.inset-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 12px clamp(14px, 2vw, 24px);
  padding-bottom: clamp(14px, 1.8vw, 22px);
  border-bottom: 1px solid var(--rule);
}
.inset-icon { display: block; width: clamp(46px, 4.4vw, 60px); height: clamp(46px, 4.4vw, 60px); }
.inset-name {
  font: 760 clamp(34px, 4.4vw, 68px)/.95 var(--sans);
  letter-spacing: -.028em;
}
.inset-kind { margin-top: 6px; font: italic 400 clamp(16px, 1.3vw, 19px)/1.25 var(--serif); color: var(--mist); }
.inset-url {
  font: 500 15px/1 var(--sans);
  text-decoration-color: var(--sun);
  text-underline-offset: .35em;
}
@media (hover: hover) {
  .inset-url:hover { color: var(--sun); }
}

.inset-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.inset-flip .inset-main { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.inset-main-cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.inset-copy {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 22px;
  padding: clamp(28px, 3.4vw, 52px) 0 0 clamp(22px, 3vw, 44px);
}
.inset-flip .inset-copy { padding-left: 0; padding-right: clamp(22px, 3vw, 44px); }
.inset-main-cols > .inset-copy:first-child { padding-left: 0; }
.inset-copy > p { max-width: 52ch; text-wrap: pretty; }
.inset-copy .inset-tagline { font: italic 400 clamp(26px, 2.4vw, 36px)/1.12 var(--serif); letter-spacing: -.005em; text-wrap: balance; }

.steps { width: 100%; margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--rule); }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 34px 1fr; column-gap: 12px;
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  padding-top: 13px;
  font: italic 400 24px/1 var(--serif);
  color: var(--sun);
}
.step { position: relative; display: grid; gap: 2px; padding: 12px 0 13px; text-align: left; }
.step b { font-weight: 650; }
.step span { font-size: 15.5px; line-height: 1.45; color: var(--mist); }

/* Prayed4You's steps double as the controls for its phone screens. */
button.step { width: 100%; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.steps-live .step b { color: var(--mist); transition: color .25s ease; }
.steps-live .step.is-active b { color: var(--foam); }
@media (hover: hover) {
  .steps-live .step:hover b { color: var(--foam); }
}
.steps-live .step::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--sun);
  transform: scaleX(0); transform-origin: left center;
}
.steps-live .step.is-active::after { transform: scaleX(1); }
.steps-live .step.is-active.is-ticking::after { animation: tick var(--slide-ms, 4800ms) linear both; }
@keyframes tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.tasks { width: 100%; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.tasks li { display: grid; gap: 2px; padding: 12px 0 13px; border-bottom: 1px solid var(--rule); }
.tasks b { font-weight: 650; }
.tasks span { font-size: 15.5px; line-height: 1.45; color: var(--mist); }

.inset-copy .inset-status { display: flex; align-items: baseline; gap: 10px; font-size: 15.5px; color: var(--mist); }
.light { flex: none; width: 10px; height: 16px; color: var(--sun); transform: translateY(2px) rotate(28deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 14px 24px;
  font: 600 16px/1.2 var(--sans);
  color: var(--navy); background: var(--foam);
  border-radius: 999px;
  text-decoration: none;
  transition: background-color .25s ease;
}
@media (hover: hover) {
  .btn:hover { background: var(--sun); }
}

/* ---------- Product previews ----------
   Real screens from each product: the Charis demo video, Prayed4You's own
   walkthrough screens, and HydroSnap running on demo data. */

.preview {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  min-width: 0;
  padding: clamp(40px, 4.4vw, 64px) clamp(16px, 3vw, 48px) clamp(20px, 2.4vw, 32px);
}
.inset-flip .preview { order: 2; }

.preview-hydrosnap { padding: clamp(24px, 3vw, 40px) 0 0; }

.preview-caption { font: italic 400 15px/1.35 var(--serif); color: var(--mist); text-align: center; }

/* Phone */
.device {
  position: relative;
  width: max(220px, min(100%, 300px, calc((100vh - 150px) * .474)));
  margin: 0;
  padding: 9px;
  border-radius: 46px;
  background: #0E1E31;
  box-shadow:
    0 60px 80px -40px rgba(2, 18, 34, .78),
    0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 0 0 1.5px rgba(255, 255, 255, .1);
}
.device-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 592 / 1248;
  border-radius: 37px;
  background: #F7F4EE;
  isolation: isolate;
}
.device-screen > img, .device-screen > video {
  position: absolute; inset: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.device-shot .device-screen > img { opacity: 0; transition: opacity .7s ease; }
.device-shot .device-screen > img.is-active { opacity: 1; }

/* Browser window */
.browser {
  width: 100%; max-width: min(1120px, calc((100vh - 170px) * 1.52));
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0B1220;
  box-shadow: 0 60px 90px -40px rgba(2, 18, 34, .85), 0 0 0 1px rgba(255, 255, 255, .14);
}
.browser-bar {
  position: relative;
  display: flex; align-items: center;
  height: 36px; padding: 0 14px;
  background: #121E31;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.browser-dots { display: flex; gap: 7px; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2B3B54; }
.browser-url {
  position: absolute; left: 50%; transform: translateX(-50%);
  padding: 5px 16px;
  border-radius: 6px;
  background: #0B1424;
  color: #8FA3BC;
  font: 500 12.5px/1 var(--sans);
}
.browser-view { position: relative; aspect-ratio: 1920 / 1216; background: #0B1220; }
.browser-view picture { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.browser-view picture.is-active { opacity: 1; }
.browser-view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Screens change with a sideways swipe; vertical scrolling still belongs to the page. */
.device-shot, .browser { touch-action: pan-y; }

/* The screens float: water.js lifts and tips them with the waves. */
.device, .browser { will-change: transform; }

.preview-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.preview-tabs.preview-tabs-phone { display: none; } /* wider screens use the steps beside the phone */
.tab {
  position: relative;
  padding: 9px 14px 12px;
  border: 0; background: none;
  color: var(--mist);
  font: 500 15px/1.2 var(--sans);
  cursor: pointer;
  transition: color .2s ease;
}
.tab.is-active { color: var(--foam); }
@media (hover: hover) {
  .tab:hover { color: var(--foam); }
}
.tab::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
  background: var(--sun);
  transform: scaleX(0); transform-origin: left center;
}
.tab.is-active::after { transform: scaleX(1); }
.tab.is-active.is-ticking::after { animation: tick var(--slide-ms, 4800ms) linear both; }

/* Pause, play and sound */
.preview-controls { position: absolute; z-index: 2; top: 14px; right: 14px; display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(244, 251, 252, .42);
  border-radius: 50%;
  background: rgba(8, 44, 70, .55);
  color: var(--foam);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  .icon-btn:hover { border-color: var(--foam); background: rgba(8, 44, 70, .9); }
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .when-paused, .icon-btn .when-sound { display: none; }
.icon-btn.is-paused .when-playing, .icon-btn.is-unmuted .when-muted { display: none; }
.icon-btn.is-paused .when-paused, .icon-btn.is-unmuted .when-sound { display: block; }

/* ---------- The deep: studio and footer ---------- */

.studio { padding: clamp(96px, 12vw, 180px) 0 clamp(72px, 9vw, 140px); }
.studio-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px clamp(32px, 6vw, 112px);
  align-items: end;
}
.studio .section-title { max-width: 10ch; }
.studio-about p { max-width: 46ch; margin-top: 28px; font-size: clamp(17px, 1.3vw, 20px); color: var(--mist); }
.studio-contact { padding-top: 22px; border-top: 1px solid var(--rule); }
.studio-contact h3 {
  margin-bottom: 10px;
  font: 700 clamp(24px, 2.4vw, 34px)/1.1 var(--sans);
}
.studio-contact p { margin-bottom: 18px; color: var(--mist); }
.contact-email {
  font: 650 clamp(22px, 2.9vw, 44px)/1.15 var(--sans);
  letter-spacing: -.015em;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .contact-email:hover { color: var(--sun); }
}

@media (max-width: 860px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
}

.site-footer { padding: clamp(28px, 4vw, 48px) 0 28px; }
.wordmark {
  width: max-content;
  font: 820 120px/.8 var(--sans);
  letter-spacing: -.045em;
  white-space: nowrap;
  color: rgba(244, 251, 252, .15);
  user-select: none;
}
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px;
  margin-top: clamp(20px, 3vw, 36px);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--mist);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-row .footer-verse { font: italic 400 16px/1.2 var(--serif); color: var(--sun); }
.footer-row a { text-decoration: none; }
@media (hover: hover) {
  .footer-row a:hover { color: var(--foam); text-decoration: underline; }
}

/* ---------- Wide screens ---------- */

@media (min-width: 1800px) {
  .device { width: max(220px, min(100%, 340px, calc((100vh - 150px) * .474))); }
  .browser { max-width: min(1300px, calc((100vh - 170px) * 1.52)); }
}

/* ---------- Tablets ---------- */

@media (max-width: 1024px) {
  .hero-copy { width: min(84vw, 1000px); }
  .hero-title { font-size: clamp(72px, 14vw, 150px); }
  .mark { left: min(var(--x), calc(100% - 240px)); }
  .inset-main, .inset-flip .inset-main, .inset-main-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Touch screens larger than a phone ---------- */

@media (pointer: coarse) and (min-width: 721px) {
  .brand, .site-nav a, .inset-url, .footer-row a, .contact-email { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-cta { height: 44px; }
  .mark { min-height: 44px; }
  .tab { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}

/* ---------- Phones held sideways ---------- */

@media (max-height: 500px) and (min-width: 721px) {
  .site-header { height: 56px; }
  .hero { min-height: 430px; }
  .hero-copy { bottom: 28px; }
  .hero-title { margin-bottom: 10px; font-size: clamp(56px, 20vh, 96px); }
  .hero-sub { max-width: 46ch; font-size: 16px; }
  .device { width: 210px; }
}

/* ---------- Phones ----------
   One full-width scene per product: its name, the real screens, a line of
   copy and one button. */

@media (max-width: 720px) {
  .desk-only { display: none; }
  .phone-only { display: inline; }

  /* Header */
  .site-header { height: 60px; }
  .brand { min-height: 44px; font-size: 17px; }
  .brand-glyph { width: 24px; height: 24px; }
  .nav-wide { display: none; }
  .nav-cta { height: 44px; }

  /* Hero: the moorings above the name. */
  .hero {
    display: flex; flex-direction: column;
    height: auto;
    min-height: min(100vh, 760px);
    min-height: min(100svh, 760px);
    padding: 76px var(--pad-x) 36px;
  }
  .marks { position: relative; inset: auto; flex: 1; min-height: 196px; margin-bottom: 16px; }
  .mark {
    --size: 44px;
    left: var(--mx); top: calc(6% + var(--i) * 31%);
    min-height: 44px;
    margin: 0;
  }
  .mark-name { font-size: 25px; }
  .hero-copy { position: relative; left: auto; bottom: auto; width: 100%; }
  .hero-title { margin-bottom: 14px; font-size: clamp(64px, 25vw, 176px); }
  .hero-sub { max-width: none; font-size: 18px; }

  /* Why Anchor */
  .note-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 56px; }
  .note-figure { display: flex; align-items: center; gap: 12px; padding-top: 0; }
  .note-figure svg { flex: none; width: 36px; height: 36px; }
  .note-figure figcaption { margin-top: 0; }
  .note-verse p { max-width: none; font-size: clamp(32px, 9.4vw, 46px); }
  .note-verse footer { margin-top: 12px; }
  .note-founder { margin-top: 28px; padding-top: 20px; }

  /* Section heads */
  .section-head { display: block; margin-bottom: 8px; }
  .section-title { font-size: clamp(46px, 14vw, 72px); }
  .section-lede { max-width: none; margin-top: 8px; }

  /* Product scenes */
  .products { padding-top: 56px; padding-bottom: 0; }
  .inset { position: relative; margin-inline: calc(var(--pad-x) * -1); scroll-margin-top: 0; }
  .inset + .inset { margin-top: 24px; }
  .inset-head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 32px calc(var(--pad-x) + var(--controls, 52px)) 22px var(--pad-x);
    border: 0;
  }
  .inset-icon { width: 46px; height: 46px; }
  .inset-name { font-size: clamp(30px, 8.8vw, 42px); }
  .inset-kind { margin-top: 3px; font-size: 16px; }
  .inset-url { display: none; }
  .inset-main, .inset-flip .inset-main, .inset-main-cols { display: block; }
  #charis { --controls: 104px; }

  .preview, .inset-flip .preview, .preview-hydrosnap {
    position: static;
    gap: 10px;
    padding: 0 var(--pad-x);
  }
  .preview-caption { display: none; }
  .preview-controls { top: 33px; right: var(--pad-x); }
  .icon-btn { width: 44px; height: 44px; }

  .device, .browser {
    width: min(72vw, 300px);
    max-width: none;
    padding: 9px;
    border-radius: 46px;
    background: #0E1E31;
    box-shadow:
      0 50px 70px -34px rgba(2, 18, 34, .8),
      0 0 0 1px rgba(255, 255, 255, .16),
      inset 0 0 0 1.5px rgba(255, 255, 255, .1);
  }
  .browser-bar { display: none; }
  .browser-view { aspect-ratio: 390 / 844; overflow: hidden; border-radius: 37px; }

  .preview-tabs, .preview-tabs.preview-tabs-phone { display: flex; flex-wrap: nowrap; justify-content: center; order: 2; gap: 0; width: 100%; }
  .tab { min-height: 44px; padding: 12px 11px 14px; font-size: 15px; white-space: nowrap; }
  .tab::after { left: 11px; right: 11px; bottom: 7px; }

  .inset-copy, .inset-flip .inset-copy, .inset-main-cols > .inset-copy:first-child { align-items: stretch; gap: 14px; padding: 18px var(--pad-x) 40px; }
  .inset-copy > p { max-width: none; }
  .inset-copy .inset-tagline { font-size: clamp(27px, 7.6vw, 34px); }
  .steps, .inset-main-cols > .inset-copy + .inset-copy { display: none; }
  .btn { width: 100%; min-height: 54px; padding-inline: 14px; text-align: center; }

  /* Studio and footer */
  .studio { padding: 56px 0 48px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .studio .section-title { max-width: none; }
  .studio-about p { margin-top: 18px; }
  .contact-email { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(22px, 6.4vw, 28px); }
  .site-footer { padding-top: 24px; padding-bottom: 20px; }
  .footer-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; }
  .footer-nav { grid-column: 1 / -1; order: -1; justify-content: space-between; }
  .footer-row a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-row .footer-verse { grid-column: 1 / -1; order: 1; }

  /* A thinner anchor line, tucked to the edge. */
  .rope { right: 2px; width: 14px; --reach: calc(60px + var(--progress, 0) * (100% - 60px - var(--rest, 18px))); }
  .rope-anchor { width: 14px; height: 14px; }
}

/* Extra-narrow phones */
@media (max-width: 350px) {
  .inset-icon { width: 40px; height: 40px; }
  .tab { padding-inline: 8px; font-size: 14px; }
  .tab::after { left: 8px; right: 8px; }
}

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

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