/* Reebel landing page. Brand: docs/BRAND.md in the app repo ("Ink"). */

:root {
  --background: #F3EEE6;
  --surface: #FBF8F3;
  --text-primary: #161513;
  --text-secondary: #5E5A53;
  --accent: #161513;
  --on-accent: #FBF8F3;
  --success: #2A7241;
  --warning: #9A5A00;
  --danger: #BF3A2B;
  --separator: #D9D2C6;
  /* Mock-up only: soft placeholder tones for fictional posts and avatars. */
  --placeholder-1: #E4DDD1;
  --placeholder-2: #D6CDBF;
  --placeholder-3: #C9BFAF;
  --phone-frame: #161513;

  --radius: 14px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #121110;
    --surface: #1E1C1A;
    --text-primary: #F3EEE6;
    --text-secondary: #A8A39A;
    --accent: #F3EEE6;
    --on-accent: #161513;
    --success: #74CF8F;
    --warning: #F0B44E;
    --danger: #FF8676;
    --separator: #3A3632;
    --placeholder-1: #2A2724;
    --placeholder-2: #353130;
    --placeholder-3: #423D39;
    --phone-frame: #3A3632;
  }
}

:root[data-theme="dark"] {
  --background: #121110;
  --surface: #1E1C1A;
  --text-primary: #F3EEE6;
  --text-secondary: #A8A39A;
  --accent: #F3EEE6;
  --on-accent: #161513;
  --success: #74CF8F;
  --warning: #F0B44E;
  --danger: #FF8676;
  --separator: #3A3632;
  --placeholder-1: #2A2724;
  --placeholder-2: #353130;
  --placeholder-3: #423D39;
  --phone-frame: #3A3632;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17 px, like iOS body text */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

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

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 680px; }

/* Header and logo */

.site-header { padding: 20px 0 8px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.lockup {
  display: inline-flex; align-items: center; gap: 0.32em;
  color: var(--text-primary); text-decoration: none; font-weight: 500;
  font-size: 1.625rem; letter-spacing: -0.01em; line-height: 1;
}
.lockup svg { height: 0.82em; width: auto; fill: currentColor; }
.lockup:hover { text-decoration: none; }

.header-link { font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.header-link:hover { text-decoration: underline; }

/* Hero */

.hero { padding: 32px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text-secondary);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

h1 {
  margin: 0; font-size: clamp(2.5rem, 9vw, 4.25rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 700;
}

.lede { margin: 20px 0 0; font-size: 1.1875rem; color: var(--text-secondary); max-width: 34em; }
.lede strong { color: var(--text-primary); font-weight: 600; }

/* Waitlist form */

.waitlist { margin-top: 28px; max-width: 30rem; }
.waitlist-row { display: flex; flex-direction: column; gap: 10px; }

.waitlist input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 16px;
  font: inherit; color: var(--text-primary); background: var(--surface);
  border: 1.5px solid var(--separator); border-radius: var(--radius);
  appearance: none;
}
.waitlist input[type="email"]::placeholder { color: var(--text-secondary); opacity: 1; }
.waitlist input[type="email"]:focus { outline: none; border-color: var(--accent); }
.waitlist input[aria-invalid="true"] { border-color: var(--danger); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  font: inherit; font-weight: 600; white-space: nowrap;
  color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.button:active { transform: scale(0.98); }
.button[disabled] { opacity: 0.6; cursor: progress; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { margin: 12px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--text-secondary); }
.consent a { color: var(--text-primary); }

.form-status { margin: 12px 0 0; font-size: 0.9375rem; font-weight: 600; min-height: 1px; }
.form-status:empty { margin: 0; }
.form-status[data-kind="error"] { color: var(--danger); }
.form-status[data-kind="success"] { color: var(--success); }

.waitlist.is-done .waitlist-row, .waitlist.is-done .consent { display: none; }
.success-panel {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius);
  padding: 16px; color: var(--text-primary); font-weight: 400;
}
.success-panel svg { flex: none; width: 24px; height: 24px; color: var(--success); }
.success-panel strong { display: block; font-weight: 600; }
.success-panel span { color: var(--text-secondary); font-size: 0.9375rem; }

@media (min-width: 520px) {
  .waitlist-row { flex-direction: row; }
  .waitlist input[type="email"] { flex: 1; }
}

/* Sections */

section { padding: 56px 0; }
.section-title { margin: 0 0 8px; font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.section-lede { margin: 0 0 36px; color: var(--text-secondary); max-width: 36em; }

.rule { border: 0; border-top: 1px solid var(--separator); margin: 0; }

/* Benefits */

.benefits { display: grid; gap: 48px; }
.benefit h3 { margin: 24px 0 6px; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; }
.benefit p { margin: 0; color: var(--text-secondary); }

@media (min-width: 900px) {
  .benefits { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}

/* Steps */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border-radius: var(--radius); padding: 18px 18px 18px 60px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.875rem;
}
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--text-secondary); }

@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* FAQ */

.faq { display: grid; gap: 8px; max-width: 720px; }
.faq details { background: var(--surface); border-radius: var(--radius); padding: 0 18px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 16px; color: var(--text-secondary); }

/* Final call to action */

.cta { background: var(--surface); border-radius: var(--radius); padding: 32px 20px; }
.cta .section-title { margin-bottom: 4px; }
.cta p.section-lede { margin-bottom: 0; }
@media (min-width: 700px) { .cta { padding: 48px; } }

/* Footer */

.site-footer { padding: 40px 0 48px; font-size: 0.875rem; color: var(--text-secondary); }
.site-footer .wrap { display: grid; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-primary); }
.disclaimer { margin: 0; max-width: 46em; }

/* Text pages (privacy notice, confirmation) */

.prose { padding: 24px 0 56px; }
.prose h1 { font-size: clamp(2rem, 7vw, 2.75rem); margin-bottom: 8px; }
.prose h2 { margin: 36px 0 8px; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
.prose p, .prose li { color: var(--text-secondary); }
.prose strong { color: var(--text-primary); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.updated { margin: 0 0 24px; font-size: 0.9375rem; }

.notice-box { background: var(--surface); border-radius: var(--radius); padding: 18px; margin: 24px 0; }
.notice-box p { margin: 0; }

/* Real app screens in 3D phones (screens from the app, other people replaced with placeholders). */

.stage { margin: 0; position: relative; perspective: 1800px; perspective-origin: 50% 40%; }
.device {
  --w: 240px;
  position: relative; width: var(--w); aspect-ratio: 600 / 1304;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.17);
  background: linear-gradient(150deg, #3b3835 0%, #151412 45%, #0b0a09 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.10),
    inset 0 0 0 4px rgba(0, 0, 0, 0.55),
    0 60px 90px -30px rgba(38, 26, 12, 0.45),
    0 22px 40px -18px rgba(38, 26, 12, 0.35);
  transform-style: preserve-3d;
}
/* The phone's side, so the tilt reads as a solid object. */
.device::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: #0b0a09; transform: translateZ(-10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
/* A soft glass highlight across the screen. */
.device::after {
  content: ""; position: absolute; inset: calc(var(--w) * 0.035); border-radius: calc(var(--w) * 0.14);
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 32%);
  pointer-events: none; transform: translateZ(1px);
}
.device-screen { width: 100%; height: 100%; border-radius: calc(var(--w) * 0.14); overflow: hidden; background: #fff; transform: translateZ(0.5px); }
.device-screen img { width: 100%; height: 100%; display: block; object-fit: cover; }

.chip {
  position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--text-primary); background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--separator) 70%, transparent);
  box-shadow: 0 18px 30px -14px rgba(38, 26, 12, 0.35), 0 2px 6px rgba(38, 26, 12, 0.08);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* Hero: three phones fanned out. */
.stage--hero { min-height: 520px; display: grid; place-items: center; }
.stage--hero::before {
  content: ""; position: absolute; left: 50%; top: 52%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--success) 22%, transparent), transparent 70%);
  filter: blur(10px); z-index: -1;
}
.fan { position: relative; width: 100%; height: 520px; transform-style: preserve-3d; animation: float 9s ease-in-out infinite; }
.fan .device { position: absolute; left: 50%; top: 50%; --w: 200px; }
.device--front { transform: translate(-50%, -50%) rotateY(-14deg) rotateX(6deg) translateZ(60px); z-index: 3; }
.device--left  { transform: translate(-50%, -50%) translateX(-62%) rotateY(26deg) rotateX(6deg) rotateZ(-5deg) translateZ(-40px) scale(0.9); z-index: 1; filter: brightness(0.96); }
.device--right { transform: translate(-50%, -50%) translateX(62%) rotateY(-30deg) rotateX(6deg) rotateZ(5deg) translateZ(-40px) scale(0.9); z-index: 2; filter: brightness(0.96); }
.chip--a { left: 2%; top: 12%; transform: translateZ(120px) rotate(-3deg); }
.chip--b { right: 0; top: 30%; transform: translateZ(120px) rotate(3deg); }
.chip--c { left: 8%; bottom: 12%; transform: translateZ(120px) rotate(2deg); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-10px) rotateY(3deg); }
}
@media (prefers-reduced-motion: reduce) { .fan { animation: none; } }

/* Feature phones: one tilted phone each, on a soft glow. */
.stage--benefit { height: 470px; display: grid; place-items: center; }
.stage--benefit::before {
  content: ""; position: absolute; inset: 12% 8% 6%; border-radius: 40px; z-index: -1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--success) 18%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--separator) 60%, transparent);
}
.stage--benefit .device { --w: 190px; }
.tilt-l .device { transform: rotateY(18deg) rotateX(8deg) rotateZ(-3deg); }
.tilt-r .device { transform: rotateY(-18deg) rotateX(8deg) rotateZ(3deg); }
.chip--float { bottom: 9%; transform: translateZ(80px); }
.tilt-l .chip--float { right: 6%; }
.tilt-r .chip--float { left: 6%; }

@media (min-width: 900px) {
  .fan .device { --w: 230px; }
  .stage--hero, .fan { min-height: 600px; height: 600px; }
  .stage--benefit .device { --w: 200px; }
}
/* Phones first: everything fits the screen, smaller and tidier. */
@media (max-width: 599px) {
  .stage--hero, .fan { min-height: 400px; height: 400px; }
  .fan .device { --w: 150px; }
  .device--left  { transform: translate(-50%, -50%) translateX(-60%) rotateY(24deg) rotateX(6deg) rotateZ(-5deg) translateZ(-30px) scale(0.84); }
  .device--right { transform: translate(-50%, -50%) translateX(60%) rotateY(-26deg) rotateX(6deg) rotateZ(5deg) translateZ(-30px) scale(0.84); }
  .stage--hero::before { width: 100%; }
  .chip { font-size: 0.75rem; padding: 7px 11px; gap: 6px; }
  .chip .dot { width: 6px; height: 6px; }
  .chip--a { left: 4%; top: 8%; }
  .chip--b { right: 2%; top: 36%; }
  .chip--c { left: 12%; bottom: 7%; }
  .device { border-radius: calc(var(--w) * 0.18); }
  .stage--benefit { height: 360px; }
  .stage--benefit .device { --w: 148px; }
  .stage--benefit::before { inset: 14% 14% 8%; border-radius: 32px; }
  .tilt-l .chip--float { right: 12%; }
  .tilt-r .chip--float { left: 12%; }
  .chip--float { bottom: 10%; }
  .benefit h3 { margin-top: 12px; }
}
@media (max-width: 359px) {
  .stage--hero, .fan { min-height: 350px; height: 350px; }
  .fan .device { --w: 128px; }
  .stage--benefit { height: 320px; }
  .stage--benefit .device { --w: 132px; }
  .chip { font-size: 0.6875rem; padding: 6px 10px; }
}
@media (prefers-color-scheme: dark) {
  .device { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.16), inset 0 0 0 4px rgba(0,0,0,0.6), 0 60px 90px -30px rgba(0,0,0,0.7), 0 22px 40px -18px rgba(0,0,0,0.6); }
}

/* The header's links to the app's help pages (every page). */
.site-nav { display: flex; gap: 18px; }
.site-nav a { font-size: 0.9375rem; font-weight: 600; text-decoration: none; color: var(--text-primary); }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.2em; }

/* Entrance: the front phone rises in, the side phones slide out from behind it, then the labels pop in.
   Each keyframe sets only the start, so every phone ends on its own (screen-size) position. */
.device--front { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
.device--left  { animation: from-behind-l 0.85s cubic-bezier(0.2, 0.85, 0.25, 1) 0.15s both; }
.device--right { animation: from-behind-r 0.85s cubic-bezier(0.2, 0.85, 0.25, 1) 0.15s both; }
.fan .chip { animation: pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.fan .chip--a { animation-delay: 1.05s; }
.fan .chip--b { animation-delay: 1.25s; }
.fan .chip--c { animation-delay: 1.45s; }
/* Until the phones are well up on the screen (anim.js adds .is-visible), only the middle phone shows:
   the side phones and labels wait, held at their start (behind the middle phone, hidden). */
.js .stage--hero:not(.is-visible) .device--left,
.js .stage--hero:not(.is-visible) .device--right,
.js .stage--hero:not(.is-visible) .chip { animation-play-state: paused; }
.fan { animation: float 9s ease-in-out 2.4s infinite; }

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, -42%) rotateY(-14deg) rotateX(6deg) translateZ(60px); }
}
@keyframes from-behind-l {
  from { opacity: 0; transform: translate(-50%, -50%) rotateY(-14deg) rotateX(6deg) translateZ(-80px) scale(0.86); }
  25% { opacity: 1; }
}
@keyframes from-behind-r {
  from { opacity: 0; transform: translate(-50%, -50%) rotateY(-14deg) rotateX(6deg) translateZ(-80px) scale(0.86); }
  25% { opacity: 1; }
}
@keyframes pop {
  from { opacity: 0; transform: translateZ(120px) translateY(12px) scale(0.6); }
}

/* Feature phones: they turn from flat into their tilt as they scroll into view, then the label pops in
   (anim.js adds .is-visible; without JavaScript they simply show). */
.js .stage--benefit .device { transition: transform 1s cubic-bezier(0.2, 0.85, 0.25, 1), opacity 0.7s ease; }
.js .stage--benefit .chip--float { transition: opacity 0.4s ease 0.6s, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s; }
.js .stage--benefit:not(.is-visible) .device { opacity: 0; transform: translateY(40px) rotateY(0deg) rotateX(18deg) scale(0.92); }
.js .stage--benefit:not(.is-visible) .chip--float { opacity: 0; transform: translateZ(80px) translateY(14px) scale(0.6); }

@media (prefers-reduced-motion: reduce) {
  .device--front, .device--left, .device--right, .fan .chip, .fan { animation: none; }
  .js .stage--benefit .device, .js .stage--benefit .chip--float { transition: none; }
  .js .stage--benefit:not(.is-visible) .device, .js .stage--benefit:not(.is-visible) .chip--float { opacity: 1; transform: none; }
}
