/*
 * Reditoe — public site.
 *
 * One stylesheet, no framework and no build step: this is a marketing page
 * that has to sit on S3 or an nginx box and keep working for years without
 * anybody running an install. Every colour below is the same one the apps
 * use, so the site and the product look like the same company.
 */

:root {
  --brand: #ed3241;
  --brand-dark: #e8112d;
  --brand-soft: #fff1f2;
  --leaf: #22a45d;
  --leaf-soft: #eefaf3;
  --sun: #f59e0b;
  --ink: #1c1c1c;
  --ink-soft: #4a4a4a;
  --ink-muted: #6b7280;
  --line: #e8e8ec;
  --surface: #ffffff;
  --sunken: #f7f7f9;
  --radius: 18px;
  /*
   * How wide the content runs. 1120 is comfortable on a 1366 laptop and looks
   * lost on a 2560 monitor, where it fills barely a third of the glass and
   * reads as a phone layout stretched onto a desktop - which is exactly how
   * it was reported. The value grows with the screen below.
   */
  --wrap: 1180px;
}

/* Roomier on a large monitor, and larger with it - a wider column of the same
   small type is just a longer line to read, not a better page. */
@media (min-width: 1500px) {
  :root { --wrap: 1360px; }
  .hero { padding: 96px 0 88px; }
  .hero-grid { gap: 64px; }
  section { padding: 92px 0; }
}

@media (min-width: 1900px) {
  :root { --wrap: 1520px; }
  body { font-size: 17px; }
  .stage { min-height: 540px; }
  .phone { width: 300px; height: 484px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /*
   * The floating cards in the hero deliberately hang outside the phone, and
   * on a narrow screen that would otherwise let the whole page be dragged
   * sideways - a decoration that breaks scrolling. `clip` refuses the drag
   * without turning the body into a scroll container, which `hidden` would,
   * and that would break the sticky header. Older browsers fall back to the
   * line above it.
   */
  overflow-x: hidden;
  overflow-x: clip;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-dark); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
}

/*
 * The wordmark is the logo itself - it already says "Reditoe", so there is no
 * text beside it to compete with. Sized by width with height auto, so the
 * artwork's own proportions decide the rest.
 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-mark img {
  width: 200px;
  height: auto;
  max-width: 52vw;
}

.site-footer .brand-mark img { width: 168px; }

@media (max-width: 560px) {
  .brand-mark img { width: 158px; }
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.nav a:hover { color: var(--brand-dark); }

/* The menu is a nicety on a phone; the page reads fine without it. */
@media (max-width: 800px) { .nav { display: none; } }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(237, 50, 65, 0.28);
}

.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  background:
    radial-gradient(1000px 420px at 12% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(800px 380px at 92% 0%, var(--leaf-soft), transparent 62%);
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 48px 0 44px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 18px 0 14px;
  font-weight: 800;
}

h1 .accent { color: var(--brand); }

.lede {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 26px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(28, 28, 28, 0.09);
}

.hero-art img { margin: 0 auto; width: 190px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
  text-align: center;
}

.hero-stats strong { display: block; font-size: 20px; letter-spacing: -0.02em; }
.hero-stats span { font-size: 12px; color: var(--ink-muted); }

/* Three short labels side by side get cramped on a narrow phone before they
   get unreadable, so they lose a little size rather than wrapping mid-phrase. */
@media (max-width: 420px) {
  .hero-stats strong { font-size: 17px; }
  .hero-stats span { font-size: 11px; }
}

/*
 * A drawn dot rather than an emoji: an emoji is a font the visitor may not
 * have, and a missing one shows as an empty box in the first thing they read.
 */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 3px rgba(34, 164, 93, 0.18);
}

/* ── Sections ───────────────────────────────────────────────────────── */

section { padding: 74px 0; }

section.sunken { background: var(--sunken); }

.section-head { max-width: 62ch; margin-bottom: 38px; }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 800;
}

.section-head p { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.card .step {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.card h3 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ── Two-up partner blocks ──────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.panel {
  border-radius: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  background: #fff;
}

.panel.brand { background: linear-gradient(160deg, #fff5f6, #ffffff 62%); }
.panel.leaf { background: linear-gradient(160deg, var(--leaf-soft), #ffffff 62%); }

.panel h3 { margin: 0 0 10px; font-size: 1.35rem; letter-spacing: -0.02em; }
.panel p { color: var(--ink-soft); margin: 0 0 18px; }

.ticks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }

.ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.ticks li::before {
  content: "✓";
  color: var(--leaf);
  font-weight: 800;
  flex: none;
}

/* ── Download ───────────────────────────────────────────────────────── */

.download {
  background: linear-gradient(150deg, #1c1c1c, #2c1418);
  color: #fff;
  border-radius: 26px;
  padding: 46px;
  text-align: center;
}

.download h2 { color: #fff; }
.download p { color: #d6d6da; max-width: 56ch; margin: 0 auto 24px; }

/* ── Contact & footer ───────────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.contact-grid .card strong { display: block; margin-bottom: 4px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 34px;
  background: var(--sunken);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--brand-dark); }

/* ── Legal pages ────────────────────────────────────────────────────── */

.legal { padding: 56px 0 76px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 6px; }
.legal .updated { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 30px; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 7px; }

.callout {
  background: var(--sunken);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 22px 0;
}

.callout p { margin: 0; }

/* ══════════════════════════════════════════════════════════════════════
 * Depth and motion
 *
 * All of it is CSS transforms and a little vanilla JS. A marketing page on
 * an Indian mobile connection should not download a 3D engine to tilt a
 * card, and this site has to keep working on static hosting for years with
 * nobody maintaining a dependency tree.
 *
 * Everything here is decoration. The page is laid out and readable before a
 * single animation runs, so a phone that cannot keep up loses nothing but
 * the flourish.
 * ══════════════════════════════════════════════════════════════════════ */

/* ── The 3D stage in the hero ───────────────────────────────────────── */

.stage {
  perspective: 1200px;
  perspective-origin: 50% 40%;
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
}

@media (max-width: 900px) { .stage { min-height: 400px; } }

/*
 * The phone is one 3D object: the shell, the screen and the cards around it
 * all live in the same transformed space, so they turn together and keep
 * their depth relative to each other instead of sliding like flat layers.
 */
.phone {
  position: relative;
  width: 260px;
  height: 420px;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-18deg);
  animation: drift 9s ease-in-out infinite;
  will-change: transform;
}

@keyframes drift {
  0%, 100% { transform: rotateX(8deg) rotateY(-18deg) translateY(0); }
  50%      { transform: rotateX(4deg) rotateY(-10deg) translateY(-14px); }
}

.phone-shell {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  background: linear-gradient(155deg, #2a2a30, #131316);
  box-shadow:
    0 40px 80px rgba(28, 28, 28, 0.32),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
}

.phone-screen {
  position: absolute;
  inset: 9px;
  border-radius: 30px;
  background: var(--surface);
  overflow: hidden;
  transform: translateZ(1px);
  display: flex;
  flex-direction: column;
}

/* The notch, because without it the shell reads as a picture frame. */
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%) translateZ(2px);
  width: 92px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  background: #131316;
  z-index: 3;
}

.screen-top {
  background: linear-gradient(150deg, var(--brand), #ff6b57);
  color: #fff;
  padding: 34px 16px 16px;
}

.screen-top .hi { font-size: 10px; opacity: 0.85; }
.screen-top .place { font-size: 13px; font-weight: 800; }

.screen-search {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 10px;
  color: var(--ink-muted);
}

.screen-body { padding: 12px; display: grid; gap: 9px; }

.dish {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}

.dish .thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: none;
  background: linear-gradient(140deg, #ffd9a8, #ff9a6b);
}

.dish:nth-child(2) .thumb { background: linear-gradient(140deg, #cdebd4, #6fc98d); }
.dish:nth-child(3) .thumb { background: linear-gradient(140deg, #ffd0d4, #f8626f); }

.dish .name { font-size: 10.5px; font-weight: 700; line-height: 1.3; }
.dish .meta { font-size: 9px; color: var(--ink-muted); }
.dish .price { margin-left: auto; font-size: 10.5px; font-weight: 800; }

/*
 * The cards float in front of and behind the phone. Pushing them out on Z
 * rather than just offsetting them is what makes the scene read as depth
 * when it turns.
 */
.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 13px;
  box-shadow: 0 18px 40px rgba(28, 28, 28, 0.14);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.float-card small { display: block; font-weight: 600; color: var(--ink-muted); font-size: 9.5px; }

.float-card .pip {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex: none;
}

.fc-order {
  top: -2%;
  left: -27%;
  transform: translateZ(70px);
  animation: bobA 6s ease-in-out infinite;
}

.fc-order .pip { background: var(--leaf-soft); }

.fc-rider {
  bottom: 16%;
  right: -20%;
  transform: translateZ(52px);
  animation: bobB 7.5s ease-in-out infinite;
}

.fc-rider .pip { background: var(--brand-soft); }

.fc-pay {
  bottom: -3%;
  left: -14%;
  transform: translateZ(30px);
  animation: bobA 8.5s ease-in-out infinite reverse;
}

.fc-pay .pip { background: #e8f0ff; }

@keyframes bobA {
  0%, 100% { transform: translateZ(70px) translateY(0); }
  50%      { transform: translateZ(70px) translateY(-13px); }
}

@keyframes bobB {
  0%, 100% { transform: translateZ(52px) translateY(0); }
  50%      { transform: translateZ(52px) translateY(11px); }
}

/* The glow sits behind everything and never intercepts a tap. */
.stage::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 50, 65, 0.16), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 560px) {
  .phone { width: 216px; height: 350px; }
  .fc-order { left: -8%; }
  .fc-rider { right: -6%; }
  .fc-pay { display: none; }
}

/* ── Cards that lean toward the pointer ─────────────────────────────── */

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.tilt:hover { box-shadow: 0 22px 46px rgba(28, 28, 28, 0.13); }

.tilt > * { transform: translateZ(22px); }

/* ── Revealed on scroll ─────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.shown { opacity: 1; transform: none; }

/* Staggered so a row arrives as a row, not all at once. */
.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }

/*
 * Someone who has asked their device for less motion gets none of it: every
 * animation stops and every revealed element is simply present.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .phone { transform: rotateX(6deg) rotateY(-12deg); }
}
