/* Goton's site: Apple's system (type, grid, bands), not Apple's assets.
   Mobile first; opens out at 734px and 1068px, Apple's breakpoints. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --band: #f5f5f7;
  --tile: #ffffff;
  --page: #ffffff;
  --line: #d2d2d7;
  --link: #0071e3;
  --dark: #000000;
  --dark-text: #f5f5f7;
  --dark-text-2: #a1a1a6;
  --brand: #f2c200; /* crossing-sign yellow, on trial */
  --country: #0071e3;
  --brand-ink: #1d1d1f;
  --late: #f2c200;
  --stop: #d93025;
  --ok: #1a7f2e;
  --radius-tile: 28px;
  --radius-card: 18px;
  --radius-pill: 980px;
  --ease: cubic-bezier(0.4, 0, 0.6, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --band: #000000;
    --tile: #1d1d1f;
    --page: #000000;
    --line: #424245;
    --link: #2997ff;
    --country: #2997ff;
    --dark: #161617;
    --stop: #ff6961;
    --ok: #73e685;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--tile); padding: 8px 12px; border-radius: 8px; }

.wrap { width: min(87.5%, 980px); margin: 0 auto; }
@media (max-width: 480px) { .wrap { width: auto; margin: 0 16px; } }

/* Local nav: frosted, sticky. */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 21px; letter-spacing: 0.011em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: none; gap: 24px; margin-left: auto; font-size: 12px; letter-spacing: -0.01em; }
.nav-links a { color: var(--text); opacity: 0.8; }
.pill {
  display: inline-block; border-radius: var(--radius-pill);
  padding: 4px 11px; font-size: 12px; font-weight: 400; letter-spacing: -0.01em;
  background: var(--brand); color: var(--brand-ink); white-space: nowrap;
}
.nav .pill { margin-left: auto; }
@media (min-width: 734px) {
  .nav-links { display: flex; }
  .nav .pill { margin-left: 0; }
}

/* Bands and sections. */
section { padding: 80px 0; }
@media (min-width: 734px) { section { padding: 120px 0; } }
.band { background: var(--band); }
.dark { background: var(--dark); color: var(--dark-text); }
.dark .sub { color: var(--dark-text-2); }

.eyebrow { font-size: 17px; font-weight: 600; color: var(--text-2); letter-spacing: -0.022em; margin-bottom: 8px; display: block; }
.dark .eyebrow { color: var(--brand); }
h1 { font-size: 48px; line-height: 1.08; letter-spacing: -0.003em; }
h2 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
h3 { font-size: 21px; line-height: 1.19; letter-spacing: 0.011em; }
.sub { font-size: 19px; line-height: 1.42; color: var(--text-2); letter-spacing: 0.012em; margin-top: 16px; max-width: 34em; }
.small { font-size: 12px; line-height: 1.33; letter-spacing: -0.01em; color: var(--text-2); }
@media (min-width: 734px) {
  h1 { font-size: 64px; line-height: 1.06; letter-spacing: -0.009em; }
  h2 { font-size: 48px; line-height: 1.08; letter-spacing: -0.003em; }
  .sub { font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }
}
@media (min-width: 1068px) {
  h1 { font-size: 80px; line-height: 1.05; letter-spacing: -0.015em; }
}
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

/* Hero. */
.hero { padding-top: 56px; }
.hero .soon { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; }
.hero-card { margin: 56px auto 0; max-width: 560px; text-align: left; }
.train-tile { background: #fff; border-radius: 12px; padding: 8px 10px; margin-top: 6px; }
.note { margin-top: 12px; }
.end-icon { margin: 0 auto 20px; }
.soon.end { margin-top: 24px; display: flex; justify-content: center; }
.soon .pill { font-size: 17px; padding: 11px 21px; }

/* A result card, as the app shows one. */
.card {
  background: var(--tile); border-radius: var(--radius-card);
  padding: 16px 18px; display: grid; gap: 6px;
  box-shadow: 0 1px 0 var(--line);
}
.band .card { box-shadow: none; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card .svc { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.card .times { font-size: 28px; font-weight: 600; letter-spacing: 0.007em; font-variant-numeric: tabular-nums; }
.card .times span { color: var(--text-2); font-weight: 400; }
.card .stations { font-size: 15px; }
.card .train { margin-top: 8px; width: 100%; height: auto; }
.status { display: inline-block; border-radius: var(--radius-pill); padding: 2px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; letter-spacing: -0.01em; }
.status.late { background: var(--late); color: var(--brand-ink); }
.status.cx { background: var(--stop); color: #fff; }
.status.ok { color: var(--ok); padding-left: 0; padding-right: 0; }
.status.plan { border: 1px dashed var(--text-2); color: var(--text-2); }
.status.info { background: var(--band); color: var(--text); }
.band .status.info { background: var(--page); }

/* Three steps. */
.steps { display: grid; gap: 16px; margin-top: 48px; counter-reset: step; }
.step { background: var(--tile); border-radius: var(--radius-card); padding: 28px 24px; display: grid; gap: 8px; counter-increment: step; }
.step::before {
  content: counter(step); width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 15px;
  display: grid; place-items: center; margin-bottom: 8px;
}
.step p { color: var(--text-2); font-size: 15px; }
@media (min-width: 734px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Split sections: words and a picture side by side from 734px. */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 734px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.stack { display: grid; gap: 12px; }

/* The route, drawing itself. */
.route { width: 100%; max-width: 440px; justify-self: center; border-radius: var(--radius-tile); background: #0d0d0e; overflow: hidden; }
.route svg { width: 100%; height: auto; display: block; }
.route .line { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .route .line {
      stroke-dashoffset: 1;
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 55%;
    }
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Meet your train: a strip that scrolls sideways. */
.trains { margin-top: 48px; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; }
@media (min-width: 734px) { .trains { padding-left: calc((100% - min(87.5%, 980px)) / 2); padding-right: calc((100% - min(87.5%, 980px)) / 2); } }
.trains figure {
  margin: 0; flex: 0 0 min(80%, 420px); scroll-snap-align: center;
  background: #fff; border-radius: var(--radius-card); padding: 20px 16px 16px; display: grid; gap: 12px;
}
.trains figcaption { font-size: 14px; color: #6e6e73; text-align: center; }
.trains img { width: 100%; height: auto; }

/* Lock Screen: a Live Activity. */
.activity {
  background: #1c1c1e; color: #f5f5f7; border-radius: 24px; padding: 18px 20px; display: grid; gap: 12px;
  max-width: 400px; margin: 0 auto; width: 100%;
}
.activity .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.activity .code { font-size: 28px; font-weight: 600; letter-spacing: 0.007em; }
.activity .t { font-size: 15px; color: #a1a1a6; font-variant-numeric: tabular-nums; }
.activity .bar { height: 6px; border-radius: 3px; background: #3a3a3c; overflow: hidden; }
.activity .bar i { display: block; height: 100%; width: 62%; background: var(--brand); border-radius: 3px; }
.activity .foot { font-size: 13px; color: #a1a1a6; display: flex; justify-content: space-between; gap: 8px; }
.alerts { display: grid; gap: 10px; margin-top: 28px; }
.alert { background: var(--tile); border-radius: 16px; padding: 12px 16px; display: grid; gap: 2px; }
.alert b { font-weight: 600; font-size: 15px; }
.alert span { font-size: 15px; color: var(--text-2); }

/* Friends. */
.friends { display: flex; justify-content: center; align-items: center; gap: 16px; }
.friends .card { flex: 1 1 0; min-width: 0; max-width: 220px; }
.friends .card .times { font-size: 21px; }
.friends .who { font-size: 13px; color: var(--text-2); }
.friends .swap { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 18px; }

/* Bento of the supporting features. */
.bento { display: grid; gap: 16px; margin-top: 48px; }
.tile { background: var(--tile); border-radius: var(--radius-tile); padding: 32px 28px; display: grid; gap: 10px; align-content: start; }
.tile p { color: var(--text-2); font-size: 17px; }
.tile .big { font-size: 40px; font-weight: 600; letter-spacing: -0.003em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .quote { font-size: 19px; font-weight: 600; color: var(--text); }
@media (min-width: 734px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.wide { grid-column: span 2; }
}

/* Countries. */
.flags { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }
.flags li { display: grid; justify-items: center; gap: 8px; font-size: 14px; text-align: center; }
.flags img { width: 48px; height: 48px; }
.flags .tunnel { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
@media (min-width: 734px) { .flags { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* Privacy. */
.privacy { display: grid; gap: 20px; justify-items: center; text-align: center; }
.privacy .lock { width: 64px; height: 64px; border-radius: 18px; background: var(--text); display: grid; place-items: center; }
.privacy .lock svg { width: 28px; height: 34px; fill: var(--page); }

/* FAQ. */
.faq { margin-top: 40px; border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 19px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--text-2); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--text-2); max-width: 40em; }

/* Footer. */
footer { background: var(--band); padding: 32px 0 48px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  a, .faq summary::after { transition: color 0.2s var(--ease), opacity 0.2s var(--ease); }
}

/* Tiles and alerts sit on the grey band in white sections, and the other way round. */
.tile, .alert { background: var(--band); }
.band .tile, .band .alert { background: var(--tile); }
@media (prefers-color-scheme: dark) {
  .tile, .alert { background: var(--tile); }
}
.card .status { justify-self: start; }

/* Hero: two countries, each changing in turn, a carousel. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.carousel { display: flex; justify-content: center; align-items: baseline; gap: 0.3em; margin: 6px 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: 0.004em; }
.carousel .or { color: var(--text-2); font-weight: 400; font-size: 0.7em; }
.slot { display: inline-grid; color: var(--country); }
.slot.left { justify-items: end; }
.slot.right { justify-items: start; }
.slot > span { grid-area: 1 / 1; white-space: nowrap; }
.slot .sizer { visibility: hidden; }
.slot .name { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.slot .name.out { opacity: 0; transform: translateY(-0.4em); }
.slot .name.in { opacity: 0; transform: translateY(0.4em); transition: none; }
.then { display: block; }
@media (min-width: 734px) { .carousel { font-size: 40px; } }



/* Train strip captions carry the country's flag. */
.trains figcaption { display: flex; align-items: center; justify-content: center; gap: 8px; }
.trains .flag { width: 20px; height: 20px; display: inline-block; flex: none; }
.trains .flag.tunnel { border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 600; display: inline-grid; place-items: center; }

/* Siri. */
.siri h2 { font-size: 40px; }
@media (min-width: 734px) { .siri h2 { font-size: 64px; letter-spacing: -0.009em; } }

/* Footer: made in. */
.made { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.madeflags { display: flex; gap: 6px; }
.madeflags img { width: 28px; height: 28px; }
.made .small { margin: 0; }

/* The platform, on split flaps as the app shows it (SBB board blue). */
.platform { display: inline-grid; justify-items: end; gap: 2px; align-self: center; }
.flaps { display: inline-flex; gap: 2px; padding: 3px; background: rgb(15 26 71); border-radius: 5px; }
.flap {
  width: 20px; height: 28px; border-radius: 2.5px; display: grid; place-items: center; position: relative;
  color: #fff; font: 700 20px/1 var(--font); font-variant-numeric: tabular-nums;
  background: linear-gradient(rgb(36 61 158) 50%, rgb(26 46 128) 50%);
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / 0.55); }
.platform .cap { font-size: 8.5px; letter-spacing: 0.2px; color: var(--text-2); width: 48px; text-align: center; }
.card .row:has(.platform) { align-items: center; }

/* The platform's flaps spin on load, as in the app: the drum turns from blank
   through 0–9 to the platform, one flap at a time — the top half falls over
   the hinge, the next bottom half lands. Reduce Motion: the platform at once. */
.flap.spin { background: none; perspective: 80px; }
.flap.spin .h { position: absolute; left: 0; right: 0; height: 14px; overflow: hidden; visibility: hidden; backface-visibility: hidden; }
.flap.spin .h span { position: absolute; left: 0; right: 0; height: 28px; display: grid; place-items: center; }
.flap.spin .top { top: 0; background: rgb(36 61 158); transform-origin: bottom; border-radius: 2.5px 2.5px 0 0; }
.flap.spin .bot { top: 14px; background: rgb(26 46 128); transform-origin: top; border-radius: 0 0 2.5px 2.5px; }
.flap.spin .bot span { top: -14px; }
.flap.spin .h.last { visibility: visible; }
.flap.spin::after { z-index: 200; }
@media (prefers-reduced-motion: no-preference) {
  .flap.spin .h { visibility: visible; }
  .flap.spin .t0 { z-index: 100; }
  .flap.spin .t1 { z-index: 99; }
  .flap.spin .t2 { z-index: 98; }
  .flap.spin .t3 { z-index: 97; }
  .flap.spin .t4 { z-index: 96; }
  .flap.spin .t5 { z-index: 95; }
  .flap.spin .t6 { z-index: 94; }
  .flap.spin .t7 { z-index: 93; }
  .flap.spin .t0 { animation: flap-fall 0.055s linear 0.420s both; }
  .flap.spin .t1 { animation: flap-fall 0.055s linear 0.530s both; }
  .flap.spin .t2 { animation: flap-fall 0.055s linear 0.640s both; }
  .flap.spin .t3 { animation: flap-fall 0.055s linear 0.750s both; }
  .flap.spin .t4 { animation: flap-fall 0.055s linear 0.860s both; }
  .flap.spin .t5 { animation: flap-fall 0.055s linear 0.970s both; }
  .flap.spin .t6 { animation: flap-fall 0.055s linear 1.080s both; }
  .flap.spin .b0 { z-index: 0; }
  .flap.spin .b1 { z-index: 1; animation: flap-land 0.055s linear 0.475s both; }
  .flap.spin .b2 { z-index: 2; animation: flap-land 0.055s linear 0.585s both; }
  .flap.spin .b3 { z-index: 3; animation: flap-land 0.055s linear 0.695s both; }
  .flap.spin .b4 { z-index: 4; animation: flap-land 0.055s linear 0.805s both; }
  .flap.spin .b5 { z-index: 5; animation: flap-land 0.055s linear 0.915s both; }
  .flap.spin .b6 { z-index: 6; animation: flap-land 0.055s linear 1.025s both; }
  .flap.spin .b7 { z-index: 7; animation: flap-land 0.055s linear 1.135s both; }
}
@keyframes flap-fall { from { transform: rotateX(0); filter: brightness(1); } to { transform: rotateX(-90deg); filter: brightness(0.75); visibility: hidden; } }
@keyframes flap-land { from { transform: rotateX(90deg); filter: brightness(0.75); } to { transform: rotateX(0); filter: brightness(1); } }

/* Footer links. */
footer .links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; margin-bottom: 20px; }
footer .links a { color: var(--text); }

/* The privacy policy. */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc .sub { margin-bottom: 24px; }
.doc h2 { font-size: 24px; line-height: 1.17; margin: 40px 0 12px; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.doc li { color: var(--text); }
