/* Reroll website v5 — PROPOSED tokens (recommendation; palette is not locked). */

:root {
  --bg: #fff7ee;
  --surface: #ffffff;
  --cream-2: #fcebd9;
  --ink: #1f1a17;
  --ink-2: #6b5f57;
  --ink-3: #9a8e86;
  --separator: rgba(31, 26, 23, 0.12);
  --accent: #c9461c;
  --accent-hover: #b93f17;
  --ember: #c9461c;
  --ember-dark: #b93f17;
  --glow-a: #ffb067;
  --glow-b: #f7843f;
  --glow-c: #ef5a3a;
  --focus: #c9461c;
  --shadow-card: 0 8px 24px rgba(90, 40, 10, 0.07);
  --shadow-phone: 0 4px 7px -2px rgba(35, 27, 24, 0.36), 0 25px 46px -15px rgba(61, 40, 27, 0.38);
  --topbar-h: 64px;
  --wrap: 70rem; /* 1120px */
  --space: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f;
    --surface: #241c18;
    --cream-2: #2f2520;
    --ink: #f7efe7;
    --ink-2: #bfb2a8;
    --ink-3: #8a7d74;
    --separator: rgba(255, 240, 228, 0.14);
    --accent: #ff8a5c;
    --accent-hover: #ffb067;
    --focus: #ff8a5c;
    --shadow-card: none;
    --shadow-phone: 0 4px 7px -2px rgba(0, 0, 0, 0.8), 0 25px 46px -15px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

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

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

a:focus-visible,
.brand:focus-visible,
.slider-range:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  z-index: 40;
}

.skip:focus,
.skip:focus-visible {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.4rem 0.7rem;
  clip: auto;
  clip-path: none;
  overflow: visible;
  white-space: normal;
  border-radius: 6px;
}

/* Ambience */

.ambience {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: clip;
}

.ambience::before,
.ambience::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.ambience::before {
  width: min(40rem, 90vw);
  height: min(40rem, 90vw);
  left: -12%;
  top: -8%;
  background: color-mix(in srgb, var(--glow-a) 34%, transparent);
}

.ambience::after {
  width: min(36rem, 80vw);
  height: min(36rem, 80vw);
  right: -10%;
  top: 12%;
  background: color-mix(in srgb, var(--glow-b) 26%, transparent);
}

.page-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(28rem 18rem at 80% 70%, color-mix(in srgb, var(--glow-c) 16%, transparent), transparent 70%);
}

.page-home::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

@media (prefers-color-scheme: dark) {
  .ambience::before { background: color-mix(in srgb, var(--glow-a) 16%, transparent); }
  .ambience::after { background: color-mix(in srgb, var(--glow-b) 12%, transparent); }
  .page-home::before {
    background: radial-gradient(28rem 18rem at 80% 70%, color-mix(in srgb, var(--glow-c) 10%, transparent), transparent 70%);
  }
  .page-home::after { opacity: 0.055; }
}

.page-home > *:not(.ambience) { position: relative; z-index: 2; }
.page-legal { position: relative; z-index: 1; }

/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  border-radius: 8px;
}

.brand:hover { color: var(--ink); text-decoration: none; }

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 22.37%;
  overflow: hidden;
  flex: none;
  background: var(--cream-2);
  box-shadow: 0 1px 3px rgba(31, 26, 23, 0.16);
}

.brand-icon img { width: 28px; height: 28px; }

/* Top bar (home) + legal header */

.topbar,
.site-header {
  width: 100%;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.2) blur(16px);
  -webkit-backdrop-filter: saturate(1.2) blur(16px);
  border-bottom: 1px solid var(--separator);
}

.topbar-soon {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

.site-header {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  width: min(100%, var(--wrap));
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero-copy {
  text-align: center;
  max-width: 36rem;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 22.37%;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(201, 70, 28, 0.28), 0 2px 6px rgba(31, 26, 23, 0.1);
  background: var(--cream-2);
}

.hero-icon img { width: 80px; height: 80px; }

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.headline {
  margin: 0.75rem 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  color: var(--ink);
  text-wrap: pretty;
}

.headline-accent {
  background: linear-gradient(180deg, #d24c1e 0%, #c9461c 55%, #b93f17 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  color: var(--ember-dark); /* fallback */
  -webkit-text-fill-color: transparent;
}

@media (prefers-color-scheme: dark) {
  .headline-accent {
    background: linear-gradient(180deg, #ffb067 0%, #ff8a5c 55%, #f7843f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #ff8a5c;
    -webkit-text-fill-color: transparent;
  }
  .hero-icon {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

.subline {
  margin: 1.25rem auto 0;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 24rem;
  text-wrap: pretty;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.75rem 0 0;
  padding: 0.45rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  background: var(--cream-2);
  border-radius: 999px;
}

.phone-glyph { display: block; flex: none; }

/* iPhone frame + slider */

.device-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.phone {
  --phone-width: min(68vw, 280px);
  --corner: calc(var(--phone-width) * 0.158);
  --bezel: calc(var(--phone-width) * 0.03);
  position: relative;
  width: var(--phone-width);
  aspect-ratio: 9 / 19.5;
  border-radius: var(--corner);
  background: linear-gradient(112deg, #444342, #cbc9c5 9%, #797672 29%, #393a3c 56%, #a09d98 83%, #48494b);
  box-shadow: inset 0 0 0 1px #454442, inset 0 1.5px 1px #e1dfda, var(--shadow-phone);
}

/* The rail, black glass border and display share one circular corner center. */
.phone::before {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: calc(var(--corner) - 2.5px);
  background: #101113;
  box-shadow: inset 0 0 0 1px #060607, 0 0 0 0.5px #b0ada8;
}

.phone-buttons span {
  position: absolute;
  right: 100%;
  width: 2px;
  border-radius: 1px 0 0 1px;
  background: linear-gradient(to right, #999692, #504e4d);
  box-shadow: inset 0 1px 0 #c7c4c0, inset 0 -1px 0 #484644;
}

.phone-buttons .action { top: 18%; height: 3.4%; }
.phone-buttons .volume-up { top: 25%; height: 6%; }
.phone-buttons .volume-down { top: 32.6%; height: 6%; }
.phone-buttons .power {
  left: 100%;
  right: auto;
  top: 28%;
  height: 9%;
  border-radius: 0 1px 1px 0;
}

.phone-screen {
  position: absolute;
  inset: var(--bezel);
  border-radius: calc(var(--corner) - var(--bezel));
  overflow: hidden;
  isolation: isolate;
  background: #19191a;
}

/* Screen furniture sits above the comparison and lets all gestures through. */
.phone-screen::before,
.phone-screen::after,
.phone-status {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.phone-screen::before {
  content: "";
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
  background: linear-gradient(to bottom, rgb(0 0 0 / 54%), transparent 10%, transparent 92%, rgb(0 0 0 / 36%));
}

.phone-screen::after {
  content: "";
  bottom: 1.4%;
  left: 34%;
  width: 32%;
  height: 3px;
  border-radius: 3px;
  background: rgb(255 255 255 / 90%);
}

.phone-status {
  inset: 1.5% 0 auto;
  height: 3.3%;
  display: grid;
  grid-template-columns: 1fr 24% 1fr;
  align-items: center;
  justify-items: center;
  color: white;
}

.phone-time {
  font-size: calc(var(--phone-width) * 0.038);
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.phone-island {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #09090a;
}

.phone-island::after {
  content: "";
  position: absolute;
  right: 9%;
  top: 34%;
  height: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #293246, #101116 75%);
}

.phone-indicators { width: 46%; height: auto; }

.slider {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  user-select: none;
  --pos: 50%;
}

.phone:has(.slider-range:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.slide {
  position: absolute;
  inset: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.slide-before {
  inset: 0;
  width: auto;
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.slider-divider {
  position: absolute;
  top: 5.8%;
  bottom: 3.8%;
  left: var(--pos);
  z-index: 3;
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--phone-width) * 0.126);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  color: #1f1a17;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.slider-pill {
  position: absolute;
  top: 8.5%;
  z-index: 4;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  pointer-events: none;
  line-height: 1.2;
}

.slider-pill-before {
  left: 4.5%;
  background: rgba(0, 0, 0, 0.55);
}

.slider-pill-after {
  right: 4.5%;
  background: rgba(201, 70, 28, 0.92);
}

.slider-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  background: transparent;
}

.device-caption {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

/* How it works */

.steps {
  padding: 1rem 1.5rem 5rem;
}

.steps-inner {
  width: min(100%, var(--wrap));
  margin: 0 auto;
}

.steps-title {
  margin: 0 0 1.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: 1.25rem;
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-card);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #d24c1e 0%, #c9461c 55%, #b93f17 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-name {
  margin: 0.9rem 0 0;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.step-line {
  margin: 0.4rem 0 0;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}

/* Footer */

.site-footer {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--separator);
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-inner {
  width: min(100%, var(--wrap));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.15rem;
  align-items: center;
}

.footer-nav a { padding: 0.15rem 0; }

.dot {
  color: var(--ink-2);
  margin: 0 0.45rem;
  user-select: none;
}

.footer-meta p { margin: 0.2rem 0 0; }
.footer-meta p:first-child { margin-top: 0; }

/* Reveal */

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

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

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Desktop hero */

@media (min-width: 960px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 2rem 2rem 3rem;
    min-height: calc(100dvh - var(--topbar-h));
  }

  .hero-copy {
    text-align: left;
    flex: 1 1 0;
    max-width: 34rem;
  }

  .hero-icon { margin-left: 0; margin-right: auto; }

  .subline { margin-left: 0; margin-right: 0; max-width: 28rem; }

  .phone { --phone-width: 300px; }

  .device-wrap { flex: 0 0 auto; }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .steps { padding: 2rem 2rem 7rem; }

  .footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-nav { justify-content: center; }
  .footer-meta { text-align: right; }
}

/* Legal pages */

.page-legal {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.legal {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3.5rem;
  flex: 1 0 auto;
}

.legal h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.doc-meta {
  margin: 0.55rem 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.legal h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal h3 {
  margin: 1.35rem 0 0.4rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.legal p,
.legal ul,
.legal ol { margin: 0.4rem 0 0; }

.legal ul,
.legal ol { padding-left: 1.3rem; }

.legal li + li { margin-top: 0.35rem; }

.legal hr {
  border: 0;
  border-top: 1px solid var(--separator);
  margin: 2.25rem 0 1.25rem;
}

.page-legal {
  background: radial-gradient(ellipse 55rem 28rem at 50% 0%, var(--cream-2), transparent), var(--bg);
}

.legal .intro {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.legal .plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.legal .plan h3 { margin: 0; }
.plan p { color: var(--ink-2); }
.plan .price { color: var(--ink); font-size: 1.65rem; font-weight: 700; }
.plan .price span { color: var(--ink-2); font-size: 1rem; font-weight: 500; }

.legal .eyebrow { margin-bottom: 0.45rem; color: var(--accent); }
.footer-nav [aria-current="page"] { color: var(--ink); font-weight: 650; }

@media (min-width: 640px) {
  .legal { padding-top: 2.25rem; }
}

/* Legal pages use a narrower footer column, matching the reading width. */
.page-legal .footer-inner {
  width: min(100%, 40rem);
}

@media (min-width: 960px) {
  .page-legal .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }
  .page-legal .footer-nav { justify-content: flex-start; }
  .page-legal .footer-meta { text-align: left; }
}
