:root {
  --bg: #F8F3EB; --ink: #2B2229; --muted: #6F666C; --green: #1D4640; --green-2: #2A5F57;
  --panel: #E3ECE8; --line-squiggle: #C8DAD3; --tile: #EBE0CF; --line: #E7DED6;
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 4.5vw, 76px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #8DB9AE; outline-offset: 3px; border-radius: 8px; }

/* Full-screen single fold */
.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.nav { display: flex; align-items: center; gap: 32px; padding: clamp(18px, 3vh, 34px) var(--gutter) 0; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { border-radius: 10px; }
.logo span { font: 600 28px/1 var(--serif); letter-spacing: -.4px; }
.logo b { color: var(--green); }
.links { display: flex; gap: clamp(28px, 4.5vw, 72px); margin: 0 auto; }
.links a { text-decoration: none; font-weight: 500; font-size: 16px; }
.links a:hover { color: var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
  padding: 16px 34px; border-radius: 999px; font-size: 17px;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { background: var(--green); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); padding: 11px 26px; font-weight: 500; }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Hero */
.hero { flex: 1; position: relative; display: flex; flex-direction: column; padding: 0 calc(var(--gutter) - 22px) clamp(14px, 2vh, 24px); }
.headline { margin: clamp(14px, 3.4vh, 52px) 22px clamp(14px, 3vh, 34px); position: relative; z-index: 2; }
.h-bold { display: block; font: 800 clamp(48px, min(10vw, 14vh), 156px)/.95 var(--sans); letter-spacing: -.045em; }
.h-italic { display: block; font: italic 400 clamp(48px, min(10vw, 14vh), 156px)/.95 var(--serif); letter-spacing: -.035em; color: var(--green); }

.panel {
  flex: 1; position: relative; overflow: hidden;
  background: var(--panel); border-radius: 32px;
  padding: clamp(28px, 4.5vh, 56px) clamp(22px, 3.6vw, 56px) clamp(24px, 3.6vh, 44px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.squiggle { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.squiggle path { fill: none; stroke: var(--line-squiggle); stroke-width: 34; stroke-linecap: round;
  stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.4s .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.panel-copy { position: relative; max-width: 580px; }
.lede { font-size: clamp(17px, 1.4vw, 22px); line-height: 1.5; margin: 0 0 28px; }
.available { position: relative; display: flex; align-items: center; gap: 22px; }
.available p { margin: 0; font-size: 18px; line-height: 1.3; }
.store {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink); transition: background .2s ease, color .2s ease, transform .15s ease;
}
.store:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* Two devices: Android (bill) behind, iPhone (home) in front */
.devices {
  /* --w = one phone's width, driven by viewport height so both fit inside the fold */
  --w: clamp(170px, min(19vw, calc((100dvh - 250px) / 2.25)), 310px);
  position: absolute; z-index: 3;
  right: calc(var(--gutter) + 2vw); bottom: clamp(22px, 4vh, 54px);
  width: calc(var(--w) * 1.72); height: calc(var(--w) * 2.2);
}
.phone {
  position: absolute; width: var(--w); overflow: hidden; background: #FBF8F3;
  box-shadow: 0 50px 80px -40px rgba(43, 34, 41, .55);
  animation: rise .9s ease-out both;
}
.phone img { width: 100%; height: auto; aspect-ratio: 1 / 2; object-fit: cover; object-position: top;
  margin-top: calc(var(--w) * .11); } /* room for the status bar / camera */
.iphone {
  right: 0; top: 0; z-index: 2; --r: -4deg;
  border: calc(var(--w) * .036) solid #1F1A1E; border-radius: calc(var(--w) * .17);
  outline: 2px solid #3A3238; outline-offset: -1px; transform: rotate(var(--r));
}
.island { position: absolute; z-index: 2; top: calc(var(--w) * .028); left: 50%; translate: -50% 0;
  width: 33%; height: calc(var(--w) * .08); background: #121012; border-radius: 999px; }
.android {
  left: 0; top: 10%; z-index: 1; --r: 6deg; animation-delay: .15s;
  border: calc(var(--w) * .03) solid #2D2E30; border-radius: calc(var(--w) * .1);
  transform: rotate(var(--r)); filter: saturate(.95);
}
.cam { position: absolute; z-index: 2; top: calc(var(--w) * .035); left: 50%; translate: -50% 0;
  width: calc(var(--w) * .052); height: calc(var(--w) * .052); background: #121012; border-radius: 50%; }
@keyframes rise { from { opacity: 0; transform: translateY(34px) rotate(var(--r)); } }

.tile {
  position: absolute; z-index: 4; width: 76px; height: 76px; padding: 14px; background: var(--tile); border-radius: 18px;
  box-shadow: 0 16px 30px -16px rgba(43, 34, 41, .45); animation: bob 6s ease-in-out infinite;
}
.t1 { left: -40px; top: 2%; }
.t2 { right: -38px; top: 50%; animation-delay: -3s; }
@keyframes bob { 50% { translate: 0 -9px; } }

.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 0 var(--gutter) clamp(14px, 2.2vh, 24px); font-size: 14px; color: var(--muted);
}
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--green); text-decoration: underline; }

/* Popup for policies and contact */
dialog {
  width: min(720px, calc(100vw - 32px)); max-height: min(82vh, 820px); padding: 0;
  border: 0; border-radius: 24px; background: var(--bg); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
}
dialog[open] { display: flex; flex-direction: column; animation: pop .22s ease-out; }
dialog::backdrop { background: rgba(43, 34, 41, .45); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px 14px; border-bottom: 1px solid var(--line); }
.doc-head h2 { margin: 0; font: 600 30px/1.1 var(--serif); letter-spacing: -.5px; }
.doc-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tile);
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
.doc-close:hover { background: #E0D3BF; }
.doc-body { overflow-y: auto; padding: 8px 26px 26px; font-size: 16px; line-height: 1.65; }
.doc-body h2 { font: 600 21px/1.25 var(--serif); margin: 22px 0 6px; }
.doc-body .sub { color: var(--muted); margin: 10px 0 14px; }
.doc-body .card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 10px; margin: 14px 0; }
.doc-body .card h2 { margin-top: 12px; }
.doc-body a { color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  .squiggle path { animation: none; stroke-dashoffset: 0; }
  .phone, .tile, dialog[open] { animation: none; }
}

/* Short laptop screens (e.g. 1366x768): tighten so the page stays one fold */
@media (min-width: 901px) and (max-height: 860px) {
  .nav { padding-top: 16px; }
  .panel { gap: 16px; padding-top: 24px; padding-bottom: 22px; }
  .lede { font-size: 16px; margin-bottom: 18px; }
  .btn { padding: 12px 28px; font-size: 16px; }
  .btn-outline { padding: 9px 22px; }
  .store { width: 54px; height: 54px; }
  .available p { font-size: 15px; }
  .foot { padding-top: 8px; padding-bottom: 12px; }
  .tile { width: 64px; height: 64px; padding: 12px; }
}

/* Tablet / phone: stack; the page grows past one screen */
@media (max-width: 900px) {
  .links { display: none; }
  .nav { justify-content: space-between; }
  .hero { padding-left: 14px; padding-right: 14px; }
  .headline { margin: 28px 8px 8px; }
  .devices { --w: min(44vw, 210px); position: relative; right: auto; bottom: auto; margin: 6px auto 34px; order: 2; }
  .panel { order: 3; }
  .foot { padding-top: 14px; }
}
@media (max-width: 520px) {
  .btn-outline { padding: 9px 16px; font-size: 14px; }
  .logo span { font-size: 24px; }
  .tile { width: 56px; height: 56px; padding: 10px; }
  .t1 { left: -14px; } .t2 { right: -14px; }
  .available p { font-size: 16px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .doc-head h2 { font-size: 24px; }
}
