/* ============================================================
   Ralto — one-page site
   Tokens mirror Ralto/Theme.swift so the site and the app match.
   ============================================================ */

/* Saira (body) + Saira Semi Condensed (display) — the same faces the app bundles.
   https://fonts.google.com/specimen/Saira */
@import url("https://fonts.googleapis.com/css2?family=Saira:wght@400;500;700&family=Saira+Semi+Condensed:wght@600;700&display=swap");

:root {
  --bg: #EDE6E3;
  --bg-soft: #F6F2F0;
  --surface: #FFFFFF;
  --ink: #1A1C1E;
  --ink-60: rgba(26, 28, 30, .62);
  --ink-12: rgba(26, 28, 30, .12);
  --line: rgba(26, 28, 30, .14);

  --orange: #FF5600;
  --ontime: #87E6C9;
  --delayed: #F8D44C;
  --cancelled: #F25C6E;

  --card-ink: #1A1C1E;             /* card text is fixed dark in both themes */
  --shadow: 0 24px 60px rgba(26, 28, 30, .16);
  --radius: 20px;
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1C1E;
    --bg-soft: #202325;
    --surface: #2A2D30;
    --ink: #EDE6E3;
    --ink-60: rgba(237, 230, 227, .62);
    --ink-12: rgba(237, 230, 227, .12);
    --line: rgba(237, 230, 227, .16);
    --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Saira", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Saira Semi Condensed", "Saira", sans-serif;
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.01em;
  margin: 0;
}

a { color: inherit; }

.wordmark { width: 92px; height: 38px; fill: currentColor; display: block; }

/* ───────────────────────── Nav ───────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__brand { margin-right: auto; text-decoration: none; }

.nav__links {
  display: flex;
  gap: 28px;
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
}
.nav__links a { text-decoration: none; opacity: .72; transition: opacity .18s ease; }
.nav__links a:hover { opacity: 1; }

.nav__ig {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: background .18s ease, transform .18s ease;
}
.nav__ig:hover { background: var(--ink-12); transform: translateY(-1px); }
.nav__ig img { display: block; }

@media (prefers-color-scheme: dark) {
  .nav__ig img, .footer__ig img { filter: invert(1); }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
}

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

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 88px) var(--pad) clamp(60px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 14px;
}

.hero h1 { font-size: clamp(48px, 7.4vw, 92px); }

.lede {
  max-width: 46ch;
  margin: 22px 0 0;
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-60);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: #E64E00; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--ink-12); }

.hero__note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-60);
}

/* ─────────────────── iPhone 17 mock ──────────────────── */

.hero__device {
  display: grid;
  place-items: center;
  perspective: 1600px;
}

.phone {
  --w: 300;                   /* rendered width in px, unitless for the maths */
  --bezel: calc(var(--w) * .0135px);
  position: relative;
  width: calc(var(--w) * 1px);
  border-radius: calc(var(--w) * .155px);
  padding: var(--bezel);
  background:
    linear-gradient(150deg, #6f7377 0%, #2b2e31 26%, #4c5054 52%, #24262a 74%, #75797d 100%);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, .5) inset,
    var(--shadow),
    -34px 46px 90px rgba(26, 28, 30, .22);
  transform: rotateY(-19deg) rotateX(7deg) rotateZ(2.4deg) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22, .8, .2, 1);
}
.phone:hover { transform: rotateY(-12deg) rotateX(4deg) rotateZ(1.4deg); }

@media (prefers-reduced-motion: reduce) { .phone, .phone:hover { transition: none; } }

/* Titanium edge highlight + glass sheen */
.phone__glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 34%, rgba(255,255,255,0) 66%, rgba(255,255,255,.14) 100%);
  pointer-events: none;
  z-index: 3;
}

.phone__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 393 / 852;    /* the screen — not the frame — matches the device */
  border-radius: calc(var(--w) * .143px);
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

/* A real capture, when one is dropped in, sits on top of the mock */
.phone__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* The in-app mock is authored at 393pt wide and scaled down to the frame */
.ui {
  position: absolute;
  top: 0; left: 0;
  width: 393px;
  height: 852px;
  transform: scale(calc(var(--w) * .973 / 393));
  transform-origin: top left;
  padding: 0 16px;
  background: var(--bg);
  font-family: "Saira Semi Condensed", sans-serif;
  color: var(--ink);
}

.ui__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6px 0;
  font-size: 15px;
  font-weight: 700;
}
.ui__status-icons { display: flex; gap: 5px; align-items: center; }
.ui__status-icons i { display: block; background: currentColor; border-radius: 2px; }
.bar  { width: 17px; height: 11px; clip-path: polygon(0 70%,18% 70%,18% 100%,0 100%,0 70%,27% 45%,45% 45%,45% 100%,27% 100%,27% 45%,55% 22%,73% 22%,73% 100%,55% 100%,55% 22%,82% 0,100% 0,100% 100%,82% 100%); }
.wifi { width: 15px; height: 11px; clip-path: polygon(50% 100%, 0 38%, 12% 26%, 50% 62%, 88% 26%, 100% 38%); }
.batt { width: 24px; height: 11px; border-radius: 3px; }

.ui__island {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 122px; height: 35px;
  border-radius: 99px;
  background: #000;
}

.ui__title {
  font-size: 40px;
  margin: 26px 0 18px;
}

.ui__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1.5px solid var(--ink-12);
}
.ui__route { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }
.ui__arrow { width: 17px; height: 17px; }
.ui__dots { font-size: 20px; letter-spacing: 1px; opacity: .85; }

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 120px;
  padding: 0 14px;
  margin-bottom: 12px;
  border-radius: 20px;
  color: var(--card-ink);
}
.card--ontime  { background: var(--ontime); }
.card--delayed { background: var(--delayed); }
.card--wait    { background: var(--ink-12); color: var(--ink); }
.card--cancelled { background: var(--cancelled); }

.card__platform {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: #fff;
  color: var(--card-ink);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
}
.card__platform--wait { font-size: 22px; letter-spacing: -.02em; }

.card__body { flex: 1 1 auto; min-width: 0; }
.card__head { display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 700; }
.card__star { font-size: 18px; }
.card__time { font-family: "Saira Semi Condensed", sans-serif; font-size: 44px; font-weight: 700; line-height: 1.05; }
.card__foot { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; }

.ui__tabs {
  position: absolute;
  left: 16px; right: 16px; bottom: 26px;
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-60);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.ui__tabs .is-active { color: var(--orange); }

@media (min-width: 900px) {
  .phone { --w: 336; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero__device { margin-top: 10px; }
  .phone { --w: 268; transform: rotateY(-14deg) rotateX(5deg) rotateZ(1.6deg); }
}

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

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 108px) var(--pad);
}

.section__head { max-width: 620px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head h2 { font-size: clamp(34px, 4.6vw, 56px); }
.section__head p { margin: 14px 0 0; color: var(--ink-60); }

.section--gallery { max-width: none; }
.section--gallery .section__head { max-width: var(--maxw); margin-inline: auto; padding-inline: 0; }

/* ─────────────────────── Carousel ────────────────────── */

.carousel {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}

.carousel__track {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 4px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

.slide {
  position: relative;
  flex: 0 0 clamp(240px, 34%, 380px);
  aspect-ratio: 4 / 5;
  scroll-snap-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--tint) 16%, transparent) 0 14px,
      transparent 14px 28px),
    var(--bg-soft);
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--ink-60);
  overflow: hidden;
}
.slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: var(--tint);
}
.slide__index {
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 46px;
  color: var(--ink);
  opacity: .28;
  line-height: 1;
}
.slide__label { font-size: 14px; letter-spacing: .04em; }

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: transform .16s ease, opacity .16s ease;
}
.carousel__btn:hover { transform: translateY(-50%) scale(1.06); }
.carousel__btn svg { width: 22px; height: 22px; }
.carousel__btn--prev { left: calc(var(--pad) * -.5); }
.carousel__btn--next { right: calc(var(--pad) * -.5); }
.carousel__btn[disabled] { opacity: .32; cursor: default; }
.carousel__btn[disabled]:hover { transform: translateY(-50%); }

@media (max-width: 860px) {
  .carousel__btn--prev { left: 6px; }
  .carousel__btn--next { right: 6px; }
}

.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.carousel__dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink-12);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}
.carousel__dots button[aria-selected="true"] { width: 26px; border-radius: 99px; background: var(--orange); }

/* ─────────────────────── Features ────────────────────── */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  background: var(--bg);
  padding: clamp(24px, 3vw, 36px);
  transition: background .2s ease;
}
.feature:hover { background: var(--bg-soft); }
.feature__mark {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 30%, transparent);
  color: var(--ink);
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.feature h3 { font-size: 24px; }
.feature p { margin: 10px 0 0; color: var(--ink-60); font-size: 16px; }

/* ──────────────────────── Contact ────────────────────── */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 4vw, 52px);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.contact h2 { font-size: clamp(32px, 4.2vw, 48px); }
.contact__copy p { color: var(--ink-60); max-width: 40ch; }
.contact__mail {
  display: inline-block;
  margin-top: 8px;
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--orange);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--orange) 40%, transparent);
}

.contact__form { display: grid; gap: 14px; }
.contact__form label { display: grid; gap: 6px; }
.contact__form span {
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  resize: vertical;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}
.contact__form .btn { justify-self: start; margin-top: 4px; }
.contact__hint { margin: 0; font-size: 13px; color: var(--ink-60); }
.contact__hint.is-error { color: var(--cancelled); }

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

/* ───────────────────────── Footer ────────────────────── */

.footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px var(--pad) 48px;
  border-top: 1px solid var(--line);
}
.footer__mark { width: 74px; height: 30px; margin-right: auto; opacity: .9; }

.footer__ig {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-family: "Saira Semi Condensed", sans-serif;
  font-weight: 600;
  transition: background .18s ease, transform .18s ease;
}
.footer__ig:hover { background: var(--ink-12); transform: translateY(-1px); }

.footer__legal { margin: 0; width: 100%; font-size: 13px; color: var(--ink-60); }

/* ───────────────────── Scroll reveal ─────────────────── */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
