/* ReeStack website — dark, Apple-style glass (after Moment Pro Camera's site). */

:root {
  --bg: #0b0c0c;
  --surface: #141615;
  --surface-2: #1b1e1d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f4f2;
  --muted: #8d9591;
  --faint: #5b625f;

  --accent: #59d6a0;        /* mint, from the app icon */
  --accent-soft: #c7ffe3;
  --accent-deep: #12503f;
  --accent-ink: #062b20;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --topbar-h: 76px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --radius: 14px;

  --glass: rgba(30, 33, 32, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.08);

  color-scheme: dark;
}

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

html { scroll-padding-top: calc(var(--topbar-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.hud-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Top bar ---------- */

/* Floating glass pill, centred, like a macOS segmented control. */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; justify-content: center; align-items: center;
  padding: env(safe-area-inset-top) var(--gutter) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.nav,
.nav__menu {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4);
}

.nav {
  display: flex; align-items: center; gap: 6px;
  padding: 5px;
  border-radius: 999px;
}

.nav__brand {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s;
}
.nav__brand:hover { background: rgba(255, 255, 255, 0.12); }
.nav__brand img { display: block; }

.segmented {
  position: relative;
  display: flex;
}
.segmented__item {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  height: 38px; padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.segmented__item:hover { color: var(--text); }
.segmented__item[aria-current="page"] { color: var(--text); }
.segmented__item:focus-visible { outline-offset: -2px; }

/* The selected segment's raised glass lozenge. */
.segmented__thumb {
  position: absolute; left: 0; top: 0;
  height: 38px; width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.09));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.3);
}
.segmented.is-ready .segmented__thumb {
  transition: transform 0.42s cubic-bezier(0.3, 1.25, 0.4, 1), width 0.42s cubic-bezier(0.3, 1.25, 0.4, 1);
}

.nav__menu-button {
  display: none;
  align-items: center; gap: 8px;
  height: 38px; padding: 0 14px 0 16px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: 500 15px/1 var(--font);
  cursor: pointer;
}
.nav__menu-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__menu-button svg { transition: transform 0.2s; }

.nav__menu {
  position: absolute; top: calc(var(--topbar-h) - 6px); left: 50%;
  transform: translateX(-50%);
  width: min(260px, calc(100vw - 32px));
  display: grid;
  padding: 6px;
  border-radius: 20px;
  animation: menu-in 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav__menu[hidden] { display: none; }
.nav__menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--text); font-size: 16px; text-decoration: none;
}
.nav__menu a:hover { background: rgba(255, 255, 255, 0.08); }
.nav__menu a[aria-current="page"]::after {
  content: ""; width: 12px; height: 7px; margin-top: -4px;
  border: solid var(--accent); border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
@keyframes menu-in {
  from { opacity: 0; transform: translate(-50%, -6px) scale(0.97); }
}

/* ---------- Pages ---------- */

main { padding-top: var(--topbar-h); min-height: 100vh; }

.page { padding: 0 var(--gutter); }
.page[hidden] { display: none; }

.page.is-entering { animation: page-in 0.36s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.page.is-leaving { animation: page-out 0.18s ease-in both; }

@keyframes page-in {
  from { opacity: 0; filter: blur(14px); transform: translateX(calc(var(--dir, 1) * 28px)); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes page-out {
  to { opacity: 0; filter: blur(10px); transform: translateX(calc(var(--dir, 1) * -20px)); }
}

.placeholder {
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100vh - var(--topbar-h) - 80px);
  display: grid; place-content: center; justify-items: center; gap: 12px;
  text-align: center;
}
.placeholder h1 { font-size: clamp(40px, 7vw, 72px); }
.placeholder p { color: var(--muted); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { background: var(--accent-soft); }
.button--ghost { border: 1px solid var(--line-strong); }
.button--ghost:hover { border-color: var(--text); }

/* ---------- Hero ---------- */

/* Centred copy, then the device rising out of a soft mint glow. */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) 0 clamp(40px, 6vw, 72px);
  display: grid; justify-items: center;
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 42%;
  width: min(1400px, 140vw); aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(89, 214, 160, 0.16), rgba(89, 214, 160, 0.05) 55%, transparent);
  pointer-events: none;
}

.hero__copy { display: grid; justify-items: center; gap: 18px; max-width: 760px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); letter-spacing: -0.035em; }
.hero__lede { max-width: 34em; text-wrap: balance; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero__note { color: var(--faint); font-size: 13px; }

.beta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(89, 214, 160, 0.28);
  background: rgba(89, 214, 160, 0.08);
  color: var(--accent-soft);
  font-size: 13px; font-weight: 500;
}
.beta-chip__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(89, 214, 160, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70%, 100% { box-shadow: 0 0 0 7px rgba(89, 214, 160, 0); }
}

.hero__device {
  position: relative;
  width: min(1120px, 100%);
  margin: clamp(28px, 4vw, 48px) 0 0;
  animation: device-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}
.hero__device img { display: block; width: 100%; height: auto; }
/* Contact shadow where the base meets the "table". */
.hero__device::after {
  content: ""; position: absolute; z-index: -1;
  left: 6%; right: 6%; bottom: -1.5%;
  height: 5%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  filter: blur(18px);
}
@keyframes device-in {
  from { opacity: 0; transform: translateY(40px) scale(0.98); }
}

/* ---------- Bands ---------- */

.band {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) 0;
  border-top: 1px solid var(--line);
}
.band__header { display: grid; gap: 14px; max-width: 720px; margin-bottom: 40px; }
.band h2 { font-size: clamp(28px, 4vw, 44px); }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.step a {
  display: grid; gap: 12px; align-content: start;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.step a:hover { border-color: rgba(89, 214, 160, 0.45); background: var(--surface-2); }
.step__index { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.step h3 { font-size: 22px; }
.step p { color: var(--muted); font-size: 15px; }

.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.method {
  display: grid; gap: 12px; align-content: start;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.method__tag {
  justify-self: start;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(89, 214, 160, 0.12); color: var(--accent);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.method p:last-child { color: var(--muted); font-size: 15px; }

.spec-strip {
  max-width: var(--max);
  margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spec-strip div { display: grid; gap: 6px; padding: 28px 24px; }
.spec-strip div + div { border-left: 1px solid var(--line); }
.spec-strip strong { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

.cta {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 11vw, 140px) 0;
  display: grid; justify-items: center; gap: 16px;
  text-align: center;
}
.cta h2 { font-size: clamp(34px, 5vw, 56px); }
.cta p { color: var(--muted); margin-bottom: 8px; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .methods { grid-template-columns: 1fr; }
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-strip div:nth-child(3) { border-left: 0; }
  .spec-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Six segments don't fit: switch to the menu. */
@media (max-width: 720px) {
  .segmented { display: none; }
  .nav__menu-button { display: inline-flex; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .page.is-entering, .page.is-leaving { animation: none; }
  .hero__device, .nav__menu { animation: none; }
  .beta-chip__dot { animation: none; }
  .segmented.is-ready .segmented__thumb { transition: none; }
}
