/* Reset, type, layout helpers and the small reusable pieces. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 200; padding: 10px 16px; background: var(--gold); color: var(--ink); font-weight: 600; border-radius: var(--radius-s); text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--alt { background: var(--cream-alt); }
.section--night { background: var(--maroon-night); color: var(--on-night); }

.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-on-light); }
.section--night .eyebrow { color: var(--gold-on-night); }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--ink-muted); max-width: 36em; }
.section--night .lead { color: var(--on-night-muted); }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(36px, 6vw, 64px); }
.fine { font-size: var(--step--1); color: var(--ink-muted); }
.section--night .fine { color: var(--on-night-muted); }

/* The two banks. Anything marked data-for shows on one side of the bridge only.
   Put data-for on plain <span>/<div> wrappers, never on something with its own display rule. */
[data-for="owner"] { display: none; }
[data-bank="owner"] [data-for="owner"] { display: revert; }
[data-bank="owner"] [data-for="guest"] { display: none; }

/* Gold foil text */
.foil {
  background: linear-gradient(100deg, var(--gold-dark) 0%, var(--gold) 28%, #F8E7B0 50%, var(--gold) 72%, var(--gold-dark) 100%);
  background-size: 260% 100%;
  background-position: var(--foil) 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.foil--ink { background-image: linear-gradient(100deg, var(--maroon-dark) 0%, var(--maroon) 30%, #B5404F 50%, var(--maroon) 70%, var(--maroon-dark) 100%); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid transparent; border-radius: 14px;
  background: var(--maroon); color: #fff;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--maroon-dark); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: none; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #E2B02B; }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn--small { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; border-radius: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { text-decoration-color: var(--gold); }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; }

/* "Coming soon on Google Play": a label, not a link, until the apps are out. */
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px; border-radius: 14px;
  background: var(--ink); color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1.2;
}
.soon svg { flex: none; color: var(--gold); }
.soon small { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.soon strong { font-size: 1.02rem; font-weight: 600; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--gold-tint); color: #7a5a08; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }

/* A phone that holds a real screenshot */
.phone {
  position: relative; width: 100%; aspect-ratio: 600 / 1156;
  border-radius: clamp(22px, 9%, 34px); padding: 7px;
  background: var(--ink); box-shadow: var(--shadow-2);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: clamp(16px, 7.5%, 28px); background: var(--cream); }

/* Things that rise into place when they scroll into view. ui.js adds .reveal-on itself, so if the
   scripts never run nothing stays hidden. */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .reveal-on [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- For people who need the page to behave differently ---------- */

/* Reduce motion: the rule above shortens every animation; this also stops the looping ones. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; }
}

/* Windows high-contrast and other forced-colour modes drop background pictures, and foil text is
   a background picture with see-through letters. Give the letters a real colour back. */
@media (forced-colors: active) {
  .foil { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .bank__btn[aria-pressed="true"], .tabs__btn[aria-selected="true"], .chips input:checked + span { outline: 2px solid Highlight; }
  .btn, .soon, .type, .perk, .card, .terms, .strength, .mini__phone, .phone { border: 1px solid CanvasText; }
  .step__bulb, .rope i { forced-color-adjust: none; }
}

/* Printing: the words, without the stage lighting. */
@media print {
  .header, .hero__setu, .rope, .skip, .rail-nav, .bank, .crossing__more, #stage, .card-form, .footer::before, .card-maker::before, .river::before { display: none !important; }
  .reveal-on [data-reveal] { opacity: 1 !important; transform: none !important; }
  body, .section, .section--night, .section--alt, .hero, .footer, .crossing, .contact, .city, .owners { background: #fff !important; color: #000 !important; }
  .hero::before, .hero::after { display: none; }
  .hero { min-height: 0; }
  .hero__content { padding-top: 24px; }
  .foil { background: none; color: #000; -webkit-text-fill-color: #000; }
  .section { padding-block: 24px; break-inside: avoid; }
  .lead, .fine, p, .card p, .bridge p, .section--night .lead, .hero__lead { color: #222 !important; }
  .rail, .types__rail { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; padding-inline: 0; }
  .rail[hidden] { display: grid !important; }
  .rail__item, .type { width: auto; break-inside: avoid; }
  details > p { display: block; }
  a[href^="mailto:"]::after, a[href^="tel:"]::after { content: ""; }
}
