/* Vorsprung Connect website. The split stage: one photograph of the night holds still while the page is read. */

@font-face { font-family: Manrope; src: url("/fonts/Manrope_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url("/fonts/Manrope_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url("/fonts/Manrope_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  /* The app's night colours */
  --ground: #0a1726;
  --sheet: #0f2236;
  --raised: #193553;
  --ink: #eef1f4;
  --soft: #aebfd1;
  --accent: #7cb9ec;
  --accent-ink: #0a1726;
  --blue: #1d6fb8;
  --blue-deep: #165a97;
  --sky: #dcebf8;
  --paper: #f4f6f8;
  --paper-ink: #17202a;
  --paper-soft: #465260;

  --font: Manrope, system-ui, sans-serif;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);
  --step-head: clamp(1.875rem, 1.3rem + 1.2vw, 2.5rem);
  --step-display: clamp(2.5rem, 0.9rem + 3.3vw, 4rem);

  --edge: 12px;
  --pad: clamp(1.25rem, 3.4vw, 3.5rem);
  --radius: 20px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums; }

.link { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.link:hover, .link:focus-visible { text-decoration-color: currentColor; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.75rem;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:hover { background: #9accf3; }
.button:active { transform: scale(0.97); }
.wordmark { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.wordmark img { width: 2.25rem; height: 2.25rem; border-radius: 9px; }

/* ---------- the split: reading column and the photograph that stays ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--edge); padding: var(--edge); align-items: start; }
.read { display: flex; flex-direction: column; gap: var(--edge); min-width: 0; }
.sheet { background: var(--sheet); border-radius: var(--radius); }

.stage-photo { position: sticky; top: var(--edge); height: calc(100svh - 2 * var(--edge)); border-radius: var(--radius); overflow: hidden; background: var(--sheet); }
.stage-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1400ms ease; }
.stage-photo img.is-shown { opacity: 1; }
.photo-bar { position: absolute; inset: auto 0 0 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 1.25rem; background: var(--sheet); color: var(--ink); font-size: var(--step-small); }
.photo-bar [data-bar-caption] { color: var(--soft); text-align: right; }

/* ---------- hero: a menu card beside the photograph ---------- */
.hero { min-height: calc(100svh - 2 * var(--edge)); display: grid; grid-template-rows: auto 1fr auto; padding: 1.5rem var(--pad) 2rem; text-align: center; }
.hero-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; font-size: var(--step-small); }
.hero-nav .link:first-child { justify-self: start; }
.hero-nav .link:last-child { justify-self: end; }
.hero-body { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding: 3rem 0; }
.hero h1 { font-size: var(--step-display); line-height: 1.04; letter-spacing: -0.035em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero h1 [data-line] { display: block; }
.hero-lead { max-width: 34ch; font-size: var(--step-lead); line-height: 1.4; }
.hero-foot { color: var(--soft); font-size: var(--step-small); }

/* ---------- one night of charging ---------- */
.night { padding: 5rem var(--pad) 2rem; }
.night-title { font-size: var(--step-lead); color: var(--soft); font-weight: 600; letter-spacing: -0.01em; }
.stage { min-height: 82svh; display: grid; grid-template-columns: minmax(0, 1fr) clamp(11rem, 16vw, 15rem); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; padding: 3rem 0; }
.stage h3 { font-size: var(--step-head); line-height: 1.1; color: var(--soft); transition: color 500ms ease; }
.stage p { margin-top: 1rem; max-width: 34ch; }
.stage.is-active h3 { color: var(--ink); }
.stage-pic { display: none; }

.phone { position: relative; aspect-ratio: 780 / 1300; overflow: hidden; border-radius: 1.75rem; background: var(--paper); border: 6px solid var(--raised); }
.phone img { position: absolute; inset: 0; width: 100%; height: auto; transition: opacity 300ms ease; }
.phone img[hidden] { display: block; opacity: 0; }

/* ---------- tonight near you: the live forecast, full width ---------- */
.tonight { margin: 0 var(--edge); display: grid; grid-template-columns: 5fr 7fr; gap: var(--edge); }
.tonight-pic { border-radius: var(--radius); overflow: hidden; min-height: 100%; }
.tonight-pic img { width: 100%; height: 100%; object-fit: cover; }
.tonight-body { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 5rem var(--pad) 3rem; display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }
.tonight h2 { font-size: var(--step-display); line-height: 1.04; }
.tonight-intro { max-width: 40ch; font-size: var(--step-lead); line-height: 1.4; }
.tonight form { display: flex; gap: 8px; max-width: 34rem; }
.tonight input { flex: 1; min-width: 0; min-height: 3.5rem; padding: 0 1.4rem; border: 0; border-radius: 999px; background: var(--blue-deep); color: #fff; font-size: 1.125rem; font-weight: 600; text-transform: uppercase; }
.tonight input::placeholder { color: #d6e7f7; text-transform: none; font-weight: 400; }
.tonight input:focus { outline: 3px solid #fff; outline-offset: 0; }
.tonight form button { min-height: 3.5rem; padding: 0 1.6rem; border-radius: 999px; background: #fff; color: var(--blue-deep); font-weight: 600; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.tonight form button:hover { background: var(--sky); }
.tonight form button:active { transform: scale(0.97); }
.forecast { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 2rem; row-gap: 1.25rem; align-items: end; margin-top: 1.5rem; }
.forecast-window { font-size: var(--step-display); font-weight: 600; line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.forecast-note { max-width: 36ch; }
.bars { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 3px; height: 8rem; margin-top: 0.5rem; }
.bars span { flex: 1; background: #4f91cf; min-height: 4px; border-radius: 2px 2px 0 0; transform-origin: bottom; }
.bars span.best { background: #fff; }
.bars-axis { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: var(--step-small); margin-top: -0.5rem; }
.tonight-source { font-size: var(--step-small); margin-top: auto; }
.tonight-source a { color: #fff; }

/* ---------- in the app: the names on dark, the screen on light ---------- */
.tour { margin: var(--edge); display: grid; grid-template-columns: 1fr 1fr; min-height: 92svh; border-radius: var(--radius); overflow: hidden; }
.tour-pick { background: var(--sheet); padding: 5rem var(--pad); display: flex; flex-direction: column; gap: 2rem; }
.tour h2 { font-size: var(--step-display); line-height: 1.04; }
.tour-names { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.tour-names button { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; color: var(--soft); text-align: left; transition: color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.tour-names button:hover { color: var(--ink); }
.tour-names button:active { transform: translateX(4px); }
.tour-names button[aria-pressed="true"] { color: var(--accent); }
.tour-fact { max-width: 36ch; margin-top: auto; }
.tour-show { background: var(--sky); display: grid; place-items: center; padding: 4rem var(--pad); }
.phone-large { width: min(100%, 22rem); border-color: #c4d9ec; }

/* ---------- questions, set as reading text ---------- */
.faq { margin: 0 var(--edge); background: var(--sheet); border-radius: var(--radius); padding: 6rem var(--pad); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; }
.faq h2 { grid-column: 1 / span 3; font-size: var(--step-head); line-height: 1.1; }
.faq-text { grid-column: 5 / -1; columns: 2; column-gap: 3.5rem; }
.faq-text p { break-inside: avoid; margin-bottom: 1.5rem; }
.faq-text strong { font-weight: 600; color: var(--accent); }
.faq-text a { color: var(--ink); text-underline-offset: 0.2em; }

/* ---------- help: one field ---------- */
.help { width: min(36rem, calc(100% - 2 * var(--pad))); margin: 0 auto; padding: 10rem 0 4rem; }
.help-prompt { font-size: var(--step-lead); line-height: 1.35; letter-spacing: -0.015em; }
.help-prompt span { display: block; }
.help-prompt span:first-child { color: var(--soft); }
.help-field { position: relative; margin-top: 1.75rem; }
.help-field input { width: 100%; min-height: 4rem; padding: 0 4.5rem 0 1.5rem; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper-ink); font-size: 1.125rem; }
.help-field input::placeholder { color: var(--paper-soft); }
.help-field input:focus { outline: 3px solid var(--accent); outline-offset: -3px; }
.help-field button { position: absolute; right: 8px; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.help-field button:hover { background: var(--blue-deep); }
.help-field button:active { transform: scale(0.94); }
.help-next { margin-top: 1rem; font-size: var(--step-small); color: var(--soft); }
.help-rows { margin-top: 4.5rem; display: grid; gap: 1rem; font-size: var(--step-small); }
.help-rows div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
.help-rows dt { color: var(--soft); }
.help-rows a { color: var(--ink); }

/* ---------- footer: one quiet line ---------- */
.footer { padding: 4rem var(--pad) 2rem; font-size: var(--step-small); }
.credits { color: var(--soft); max-width: 90ch; }
.credits a { color: var(--soft); }
.footer-line { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: baseline; }
.footer-line p { color: var(--soft); }
.footer-line nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-end { text-align: right; }
.footer-end a { color: var(--ink); }

/* ---------- legal and help pages ---------- */
.doc-page { background: var(--paper); color: var(--paper-ink); }
.page-top { margin: var(--edge); background: var(--sheet); color: var(--ink); border-radius: var(--radius); padding: 1.5rem var(--pad) 4rem; }
.page-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: var(--step-small); }
.page-top h1 { margin-top: 5rem; font-size: var(--step-display); line-height: 1.04; }
.page-top p { margin-top: 1.25rem; max-width: 52ch; color: var(--soft); font-size: var(--step-lead); line-height: 1.4; }
.page-top p a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
.doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2rem; padding: 4.5rem var(--pad) 7rem; }
.doc-side { grid-column: 1 / span 3; font-size: var(--step-small); }
.doc-side nav { position: sticky; top: 2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.doc-side a { color: var(--paper-soft); text-decoration: none; }
.doc-side a:hover { color: var(--paper-ink); }
.doc-body { grid-column: 4 / span 7; }
.doc h2 { font-size: var(--step-head); line-height: 1.15; margin: 4rem 0 1rem; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.25rem; margin: 2rem 0 0.6rem; letter-spacing: -0.01em; }
.doc p, .doc ul, .doc ol { max-width: 64ch; }
.doc ul, .doc ol { padding-left: 1.25rem; margin: 0; }
.doc li + li { margin-top: 0.4rem; }
.doc p + p, .doc p + ul, .doc ul + p, .doc p + ol, .doc ol + p, .doc table + p { margin-top: 0.9em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 0; font-size: 1rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.8rem 1rem 0.8rem 0; border-bottom: 1px solid #d6dde5; }
.doc th { font-weight: 600; }
.doc a { color: var(--blue); }
.callout { background: var(--sky); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; max-width: 64ch; }
.doc-page .footer { background: var(--sheet); color: var(--ink); margin: var(--edge); border-radius: var(--radius); padding: 2rem var(--pad); }
.doc-page .footer-line { margin-top: 0; }
.not-found { min-height: calc(100svh - 2 * var(--edge)); display: flex; flex-direction: column; }
.not-found .page-nav { margin-bottom: auto; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 700ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 750ms); }
  .js [data-reveal], .js .stage-words, .js .stage .phone { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out), color 500ms ease; transition-delay: calc(var(--i, 0) * 75ms); }
  .js .stage .phone { transition-delay: 120ms; }
  .js [data-reveal].is-in, .js .stage.is-in .stage-words, .js .stage.is-in .phone { opacity: 1; transform: none; }
  .stage-photo img.is-shown { animation: drift 14s linear forwards; }
  .bars span { animation: grow 600ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 12ms); }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- tablet and phone: the photograph leads, then the reading column slides over it ---------- */
@media (max-width: 63.99em) {
  .split { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .stage-photo { order: -1; height: 58svh; z-index: 0; }
  .photo-bar [data-bar-caption] { display: none; }
  .read { position: relative; z-index: 1; margin-top: -3rem; gap: var(--edge); }
  .hero { min-height: auto; }
  .hero-body { padding: 3rem 0 2.5rem; }

  .night { padding-top: 4rem; }
  .stage { min-height: auto; grid-template-columns: minmax(0, 1fr) 15rem; padding: 2.5rem 0; }
  .stage-pic { display: block; grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
  .stage h3 { color: var(--ink); }

  .tonight { grid-template-columns: 1fr; margin-top: var(--edge); }
  .tonight-pic { aspect-ratio: 16 / 9; min-height: 0; }
  .tonight-pic img { object-position: 50% 40%; }
  .tour { grid-template-columns: 1fr; }
  .tour-show { padding: 3.5rem var(--pad); }
  .faq h2, .faq-text { grid-column: 1 / -1; }
  .faq-text { margin-top: 2.5rem; }
  .doc-side { display: none; }
  .doc-body { grid-column: 1 / -1; }
  .footer-line { grid-template-columns: 1fr; gap: 0.6rem; }
  .footer-line nav { justify-content: flex-start; column-gap: 1.25rem; row-gap: 0.4rem; }
  .footer-end { text-align: left; }
}

/* ---------- phone: its own composition, five type sizes ---------- */
@media (max-width: 47.99em) {
  :root { --step-display: 2.25rem; --step-lead: 1.25rem; --step-head: 1.75rem; }
  .stage-photo { height: 56svh; }
  .photo-bar { min-height: 48px; padding: 0.5rem 1rem; }
  .read { margin-top: -2.5rem; }
  .hero { padding: 1.25rem 1.25rem 2rem; }
  .hero-nav { grid-template-columns: auto 1fr auto; }
  .hero-nav .wordmark span { display: none; }
  .hero-nav .wordmark { justify-self: center; }
  .hero-body { padding: 2.5rem 0 2rem; gap: 1.5rem; }
  .hero .button { width: 100%; }

  .night { padding: 3.5rem 1.25rem 1rem; }
  .stage { grid-template-columns: 1fr; gap: 1.25rem; }
  .stage-pic { aspect-ratio: 4 / 3; }
  .stage .phone { width: 72%; justify-self: center; }

  .tonight { margin: var(--edge); }
  .tonight-pic { aspect-ratio: 4 / 3; }
  .tonight-body { padding: 3rem 1.25rem 2rem; }
  .tonight form { flex-direction: column; }
  .forecast { grid-template-columns: 1fr; }
  .bars { height: 6rem; gap: 2px; }

  .tour-pick { padding: 3rem 1.25rem 2rem; gap: 1.25rem; }
  .tour-names { flex-direction: row; flex-wrap: wrap; column-gap: 1.1rem; row-gap: 0.25rem; }
  .tour-names button { font-size: var(--step-lead); }
  .tour-show { padding: 2.5rem 1.25rem; }
  .phone-large { width: 74%; }

  .faq { padding: 3.5rem 1.25rem; }
  .faq-text { columns: 1; }

  .help { padding: 6rem 0 3rem; }
  .help-rows div { grid-template-columns: 1fr; gap: 0.15rem; }

  .footer { padding: 3rem 1.25rem 1.5rem; }

  .page-top { padding: 1.25rem 1.25rem 2.5rem; }
  .page-top h1 { margin-top: 3rem; }
  .page-nav .wordmark span { display: none; }
  .doc { padding: 3rem 1.25rem 5rem; }
  .doc-page .footer { padding: 1.5rem 1.25rem; }
}
