:root {
  --bg: #0f1a16;
  --bg-2: #13241e;
  --card: #17302a;
  --ink: #062026;
  --text: #e8f4ef;
  --muted: #c5d6d0;
  --accent: #3ad4f2;
  --wood: #e4b06a;
  --line: rgba(228, 176, 106, 0.34);
  --line-2: rgba(58, 212, 242, 0.4);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --pad: max(20px, env(safe-area-inset-left));
  --header: 4.25rem;
  color-scheme: dark;
}

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

html,
body { overflow-x: clip; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img,
svg,
video { max-width: 100%; height: auto; }

canvas.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); }

a:hover,
a:focus-visible { color: #9be7f6; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: var(--pad);
  top: calc(env(safe-area-inset-top) + 8px);
  z-index: 80;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
}

.skip:focus { transform: none; }

.wrap {
  width: min(1120px, calc(100% - max(40px, env(safe-area-inset-left) + env(safe-area-inset-right))));
  margin-inline: auto;
}

.measure { max-width: 68ch; }

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  overflow-wrap: anywhere;
  margin: 0 0 0.6rem;
}

h1 { font-size: clamp(2.15rem, 5vw, 4.2rem); }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.98;
}

h2 { font-size: clamp(1.8rem, 4vw, 3.15rem); }

h3 { font-size: 1.35rem; }

p { margin: 0 0 0.9rem; }

.muted { color: var(--muted); }

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wood);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 0.75rem;
}

.brand {
  position: relative;
  z-index: 45;
  font-family: var(--serif);
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
  max-width: calc(100% - 56px);
}

.brand:hover,
.brand:focus-visible { color: var(--wood); }

.nav-toggle {
  position: relative;
  z-index: 50;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  top: 21px;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) { transform: translateY(-6px); }
.nav-toggle span:nth-child(3) { transform: translateY(6px); }

.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg); }

.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: calc(env(safe-area-inset-top) + 5.2rem) max(20px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 1.5rem) max(20px, env(safe-area-inset-left));
  background: var(--bg);
  transform: translateY(-100%);
}

.nav-panel.is-open { transform: none; }

.nav-panel a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.85rem;
  border-bottom: 1px solid var(--line);
}

.nav-panel a[aria-current="page"] { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: max(16px, 1em);
  color: var(--ink);
  background: var(--accent);
  transition: transform 0.2s ease;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.btn:hover,
.btn:focus-visible { transform: translateY(-2px); }

.actions { display: grid; gap: 0.7rem; margin: 1rem 0; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0.4rem 0 0;
  list-style: none;
}

.chips li {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
}

section { scroll-margin-top: 5.2rem; }

.block { padding: 3.25rem 0; background: rgba(15, 26, 22, 0.94); }

.block-alt { background: rgba(19, 36, 30, 0.96); }

body[data-calm] main { background: rgba(15, 26, 22, 0.96); }

.hero {
  min-height: calc(100svh - var(--header));
  min-height: calc(100dvh - var(--header));
  padding: 1rem 0 2rem;
  background:
    radial-gradient(ellipse at 18% 10%, rgba(58, 212, 242, 0.16), transparent 42%),
    radial-gradient(ellipse at 88% 90%, rgba(228, 176, 106, 0.1), transparent 36%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "copy copy"
    "ios and";
  gap: 1.25rem 0.7rem;
  align-items: start;
}

.hero-grid > * { min-width: 0; }

.hero-copy {
  grid-area: copy;
  background: rgba(15, 26, 22, 0.94);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: 1.2rem 1.05rem 1.3rem;
}

.device-ios { grid-area: ios; }
.device-and { grid-area: and; }
.device {
  width: min(100%, calc(70dvh * 9 / 19.2));
  margin-inline: auto;
  container-type: inline-size;
}

.device { will-change: transform; animation: bob 8s ease-in-out infinite; }
.device-and { animation-delay: -3.2s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.bezel {
  width: 100%;
  aspect-ratio: 9 / 19.2;
  background: #070d0b;
  border: 3px solid #3a2c22;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
}

.device-ios .bezel { border-radius: 1.7rem; }
.device-and .bezel { border-radius: 1.05rem; }

.island,
.hole,
.home-ind,
.gesture { background: #050807; }

.island {
  width: 36%;
  height: 0.7rem;
  border-radius: 999px;
  margin: 0.28rem auto 0.35rem;
}

.hole {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin: 0.35rem 0 0.35rem 42%;
}

.screen {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #10211c;
  border-radius: 0.85rem;
  padding: 0.55rem 0.55rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text);
  font-size: clamp(0.68rem, 7.5cqi, 0.92rem);
  line-height: 1.35;
}

.appbar { display: flex; justify-content: space-between; color: var(--muted); }
.appbar strong { color: var(--text); font-weight: 600; }

.berth-no {
  font-family: var(--serif);
  font-size: 2.4em;
  line-height: 0.9;
  margin: 0.1rem 0;
}

.screen .open { color: var(--accent); margin: 0; }

.planks { display: grid; gap: 0.28rem; margin-top: 0.2rem; }
.planks i {
  display: block;
  height: 0.38rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--wood), transparent 85%);
  opacity: 0.75;
}

.reply {
  margin-top: auto;
  border: 1px solid var(--line-2);
  border-radius: 0.7rem;
  padding: 0.4rem 0.45rem;
}

.reply b { display: block; color: var(--accent); font-size: 0.85em; }
.reply p { margin: 0.15rem 0 0; }

.home-ind,
.gesture {
  height: 4px;
  border-radius: 4px;
  background: var(--text);
  margin: 0.4rem auto;
}

.home-ind { width: 34%; }
.gesture { width: 20%; height: 3px; opacity: 0.8; }

.device-label {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--wood);
  font-weight: 600;
}

.figure { margin: 0; }
.figure svg { display: block; width: 100%; }
.caption { margin: 0.55rem 0 0; color: var(--muted); }

.sticky-split,
.split { display: grid; gap: 1.35rem; }

.card,
.contact-card,
.chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
}

.card { padding: 1rem 1rem 1.05rem; transition: transform 0.2s ease; }
.card h3 { margin: 0.15rem 0 0.4rem; }
.card p:last-child,
.contact-card p:last-child { margin-bottom: 0; }
.card:hover,
.card:focus-within { transform: translateY(-3px); }

.steps,
.bento {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.num {
  display: block;
  font-family: var(--serif);
  color: var(--wood);
  font-size: 1.35rem;
}

.icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.45rem;
}

.faq-frame {
  width: min(960px, 100%);
  margin: 1rem auto 0;
  display: grid;
  gap: 1rem;
}

.rail { color: var(--wood); display: flex; justify-content: center; }
.rail svg { width: auto; height: 3.4rem; }

details.qa,
.toc-mob {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 26, 22, 0.72);
}

.qa summary,
.toc-mob summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.2rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.qa summary::-webkit-details-marker,
.toc-mob summary::-webkit-details-marker { display: none; }

.qa summary::after,
.toc-mob summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  flex: none;
  transition: transform 0.2s ease;
}

.qa[open] summary::after,
.toc-mob[open] summary::after { transform: rotate(225deg) translateY(-2px); }

.qa p { padding: 0 0.2rem 0.9rem; }

.band {
  background:
    radial-gradient(circle at 72% 45%, rgba(58, 212, 242, 0.2), transparent 32%),
    #10211c;
  border-block: 1px solid var(--line);
}

.quote {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 0.8rem;
  overflow-wrap: anywhere;
}

.mark { width: min(100%, 420px); margin-inline: auto; display: block; }

.chat { padding: 0.9rem; display: grid; gap: 0.65rem; align-content: start; min-height: 18rem; }

.bubble {
  margin: 0;
  max-width: 92%;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: #10241e;
}

.bubble.from-app {
  border-color: var(--line-2);
  justify-self: start;
}

.bubble.from-user { justify-self: end; }

.bubble b { display: block; font-size: 0.92rem; color: var(--wood); margin-bottom: 0.2rem; }
.bubble.from-app b { color: var(--accent); }

.center-block { width: min(880px, 100%); margin-inline: auto; }
.lead-center { text-align: center; }
.lead-center .measure { margin-inline: auto; }

.contact-card {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  align-items: center;
}

.contact-card .mark { width: min(100%, 180px); }

.who {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.3rem;
}

.mail {
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.inline-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.inline-links a { min-height: 44px; display: inline-flex; align-items: center; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 calc(1.6rem + env(safe-area-inset-bottom));
  background: #0c1613;
}

.foot { display: grid; gap: 1.2rem; }
.foot nav { display: grid; }
.foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.foot a:hover,
.foot a:focus-visible { color: var(--accent); }

.page-hero { padding: 2rem 0 1rem; }
.page-hero h1 { font-size: clamp(2.15rem, 5vw, 3.8rem); }

.legal { display: grid; gap: 0.4rem 1.5rem; padding-bottom: 3rem; }
.date {
  margin: 0;
  color: var(--wood);
  font-weight: 600;
}

.toc-desk { display: none; }
.toc-desk a,
.toc-mob a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.toc-desk a:hover,
.toc-desk a:focus-visible,
.toc-mob a:hover,
.toc-mob a:focus-visible { color: var(--accent); }

.prose h2 { margin-top: 1.6rem; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.prose p,
.prose li { max-width: 68ch; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin: 0.35rem 0; }

.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

input,
textarea {
  width: 100%;
  font: inherit;
  font-size: max(16px, 1em);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  min-height: 44px;
}

textarea { min-height: 9rem; resize: vertical; }

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.is-in { opacity: 1; transform: none; }

html.js .bubble {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

html.js .chat.is-in .bubble { opacity: 1; transform: none; }
html.js .chat.is-in .bubble:nth-child(2) { transition-delay: 0.12s; }
html.js .chat.is-in .bubble:nth-child(3) { transition-delay: 0.28s; }
html.js .chat.is-in .bubble:nth-child(4) { transition-delay: 0.44s; }
html.js .chat.is-in .bubble:nth-child(5) { transition-delay: 0.6s; }

html.nav-lock,
html.nav-lock body { overflow: hidden; }

@media (min-width: 640px) {
  .actions { display: flex; flex-wrap: wrap; }
  .btn { width: auto; }
  .steps,
  .bento { grid-template-columns: 1fr 1fr; }
  .b1,
  .b6 { grid-column: span 2; }
  .contact-card { grid-template-columns: 160px 1fr; }
  .foot { grid-template-columns: 1.4fr 1fr auto; align-items: start; }
  .hero-copy { padding: 1.5rem 1.4rem 1.6rem; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-panel {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    background: transparent;
    inset: auto;
  }
  .nav-panel a {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    border: 0;
    min-height: 44px;
    padding: 0 0.7rem;
  }
  .sticky-split {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 2rem;
    align-items: start;
  }
  .stick { position: sticky; top: 5.6rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
  .split-reverse .diagram { order: -1; }
  .faq-frame { grid-template-columns: 7.5rem 1fr; align-items: start; }
  .rail { position: sticky; top: 6rem; }
  .rail svg { width: 100%; height: auto; max-height: 70vh; }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .b1 { grid-column: span 4; }
  .b2 { grid-column: span 2; }
  .b3,
  .b4,
  .b5 { grid-column: span 2; }
  .b6 { grid-column: span 6; }
  .band .split { align-items: center; }
  .toc-mob { display: none; }
  .toc-desk {
    display: block;
    position: sticky;
    top: 5.6rem;
    align-self: start;
  }
  .legal { grid-template-columns: 14rem 1fr; align-items: start; }
  .date,
  .span-all { grid-column: 1 / -1; }
  .page-hero .split { align-items: center; }
}

@media (min-width: 1200px) {
  .block { padding: 4.5rem 0; }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 32rem) minmax(0, 1fr);
    grid-template-areas: "ios copy and";
    align-items: center;
    gap: 1.25rem;
    min-height: calc(100svh - var(--header) - 2rem);
    min-height: calc(100dvh - var(--header) - 2rem);
  }
  .device { width: min(100%, 280px, calc(68dvh * 9 / 19.2)); }
  .steps { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-height: 500px) {
  .hero { min-height: 0; }
  .hero h1 { font-size: 2.4rem; }
  .hero-grid { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  html.js .reveal,
  html.js .bubble {
    opacity: 1 !important;
    transform: none !important;
  }
  .device { will-change: auto; }
}
