/* FindMeTunnel: the app's road passport look (DESIGN.md) on the web. Palette A, IBM Plex, dark only like the app.
   The page follows the same logic as lebenapp, vatra-site and buildwild: nav, hero, sections with a kicker and a title,
   feature rows with phones, privacy, FAQ, closing, footer. Lines and spacing group things, not cards. */

@font-face { font-family: 'Plex Sans'; src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url('/fonts/IBMPlexSansCondensed-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #131415;
  --raised: #1c1e20;
  --line: #2c2f32;
  --text: #f1f0eb;
  --text-2: #9b9ea1;
  --accent: #f2c12e;
  --on-accent: #131415;
  --head: 'Plex Condensed', 'Arial Narrow', sans-serif;
  --body: 'Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', ui-monospace, monospace;
  --radius: 14px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

/* The terrain contour lines of the App Store frames, one tile that repeats without a seam. */
body {
  margin: 0;
  background: var(--bg) url('/contours.svg') 50% 0 / 1800px 1800px repeat;
  color: var(--text);
  font: 17px/1.55 var(--body);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 10; padding: 12px 16px; background: var(--accent); color: var(--on-accent); border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; text-decoration: none; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* One type system: Plex Condensed for titles and figures, Plex Sans for text, Plex Mono capitals for labels. */
.kicker, .facts li, .plate, .figure-label, .credits, .langs, .meta, .caption, .price {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-2);
}
h1, h2, h3 { font-family: var(--head); font-weight: 600; margin: 0; hyphens: auto; overflow-wrap: break-word; }
h2 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1; letter-spacing: -0.01em; }
h3 { font-size: clamp(36px, 4vw, 52px); line-height: 1.02; letter-spacing: -0.008em; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, .closing p { text-wrap: balance; }
h1, h2, h3, p, li, summary, .figure { text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg); }
.panel p, .panel li, .panel h2 { text-shadow: none; }
.lede { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 36em; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font: 600 22px/1 var(--head); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { color: var(--text-2); font-size: 15px; padding: 12px 0; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.langs { display: flex; gap: 4px; }
.langs a, .langs span { display: inline-block; padding: 14px 10px 10px; border-bottom: 2px solid transparent; color: var(--text-2); }
.langs a:hover { color: var(--text); text-decoration: none; }
.langs [aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 150px; }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 { font-size: clamp(50px, 6.1vw, 88px); line-height: 0.98; letter-spacing: -0.015em; }
.hero h1 span { display: block; }
.accent { color: var(--accent); }
.intro { font-size: 21px; line-height: 1.55; color: var(--text-2); max-width: 31em; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.plate { display: inline-flex; align-items: center; gap: 12px; padding: 16px 22px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); background: rgba(19, 20, 21, 0.72); }
.plate::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.badge img { height: 56px; width: auto; }
.device { font-size: 15px; color: var(--text-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0; padding: 0; list-style: none; }
.facts li { font-size: 12px; padding: 0 18px; border-left: 1px solid var(--line); line-height: 16px; }
.facts li:first-child { padding-left: 0; border-left: 0; }

.hero-visual { z-index: 1; }
.stack { position: relative; z-index: 1; width: min(100%, 600px); margin-left: auto; aspect-ratio: 600 / 700; }
.phone { position: absolute; height: auto; aspect-ratio: 644 / 1400; border: 1px solid var(--line); border-radius: 13% / 6%; background: var(--raised); }
.stack .p1 { left: 3.3%; top: 15.7%; width: 43.7%; }
.stack .p2 { left: 50%; top: 1.4%; width: 48.3%; }
/* The road of the marketing frames runs behind the phones. */
.road { position: absolute; left: 50%; bottom: -10px; width: 100vw; height: 340px; margin-left: -50vw; z-index: 0; pointer-events: none; }

/* The place: a real scheme and its figures */
.place { padding: 72px 0; }
.place-head { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 80px; align-items: end; }
.place-head .kicker { margin-bottom: 16px; }
.scheme { margin: 40px 0; }
.scheme img { width: 100%; height: auto; aspect-ratio: 1200 / 396; }
.scheme { position: relative; }
.scheme .driven { position: absolute; inset: 0; }
.figure, .numbers strong { font-variant-numeric: tabular-nums; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin: 0; padding: 0; list-style: none; }
.figures li { border-top: 3px solid var(--accent); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.figure { font-family: var(--head); font-weight: 600; font-size: 56px; line-height: 1; }
.figure small { font-size: 26px; color: var(--text-2); margin-left: 8px; }
.caption { margin-top: 40px; font-size: 12px; }

/* Numbers */
.numbers { border-top: 1px solid var(--line); padding: 56px 0; }
.numbers ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px; margin: 0; padding: 0; list-style: none; }
.numbers strong { display: block; font: 600 72px/1 var(--head); letter-spacing: -0.01em; margin-bottom: 10px; }
.numbers li > span { font-size: 16px; line-height: 1.45; color: var(--text-2); display: block; max-width: 14em; }

/* How it works */
.how { border-top: 1px solid var(--line); }
.how-head { padding-top: 88px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.row { border-top: 1px solid var(--line); }
.row-grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 80px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.row:nth-of-type(even) .row-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); }
.row:nth-of-type(even) .row-copy { order: 2; }
.row-copy { display: flex; flex-direction: column; gap: 20px; }
.row-copy p:last-child { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 34em; }
.row-phones { display: flex; justify-content: center; gap: 28px; }
.row-phones .phone { position: static; width: 270px; flex: 0 1 270px; }
.row-phones .phone:only-child { width: 300px; flex-basis: 300px; }

/* Pro */
.pro { border-top: 1px solid var(--line); padding: 88px 0; }
.pro-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.plan { border-top: 3px solid var(--line); padding-top: 20px; }
.plan.paid { border-top-color: var(--accent); }
.plan h3 { font-size: 40px; line-height: 1; }
.plan .price { margin-top: 8px; font-size: 13px; color: var(--text); }
.plan:not(.paid) .price { color: var(--text-2); }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; }
.plan li { padding: 16px 0; border-top: 1px solid var(--line); }
.note { margin-top: 32px; font-size: 15px; color: var(--text-2); }

/* Privacy: the one raised panel besides the closing one */
.privacy { padding-bottom: 88px; }
.panel { background: var(--raised); border-radius: var(--radius); padding: 56px; }
.privacy .panel { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 80px; align-items: center; }
.privacy .statement { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.privacy h2 { font-size: clamp(38px, 4.4vw, 56px); line-height: 1.02; }
.link { font-weight: 600; font-size: 16px; }
.points { margin: 0; padding: 0; list-style: none; }
.points li { display: flex; align-items: center; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.points li:first-child { border-top: 0; }
.points li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Support */
.support { padding-bottom: 88px; }
.support-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 80px; align-items: start; }
.support-copy { display: flex; flex-direction: column; gap: 20px; }
.support h2 { font-size: clamp(38px, 4.4vw, 56px); line-height: 1.02; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 22px 0; cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 20px/1 var(--mono); color: var(--accent); flex: none; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 32px 22px 0; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 40em; }

/* Closing */
.closing { padding-bottom: 88px; }
.closing .panel { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 72px 56px; text-align: center; }
.closing .app-icon { width: 88px; height: 88px; border-radius: 20px; }
.closing h2 { max-width: 14em; }
.closing p { font-size: 19px; color: var(--text-2); max-width: 32em; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; font-size: 14px; color: var(--text-2); }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.footer a { color: var(--text); display: inline-block; padding: 8px 0; }
.credits { margin-top: 14px; font-size: 12px; line-height: 1.7; letter-spacing: 0.08em; }

/* Documents: privacy policy and 404 */
.doc { max-width: 720px; margin: 0 auto; padding: 48px var(--pad) 72px; }
.doc h1 { font-size: clamp(34px, 7vw, 56px); line-height: 1; margin: 10px 0 18px; }
.doc h2 { font-size: 24px; line-height: 1.2; margin: 36px 0 8px; letter-spacing: 0; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 20px; }
.doc .lead { color: var(--text-2); font-size: 18px; margin: 0 0 18px; }
.doc .meta { margin: 0; }
.back { display: inline-block; margin-bottom: 28px; padding: 8px 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; }
  .intro { font-size: 19px; }
  .place-head, .row-grid, .row:nth-of-type(even) .row-grid, .support-grid { gap: 48px; }
  .privacy .panel { gap: 48px; padding: 44px; }
  .numbers strong { font-size: 56px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .wrap { height: 64px; }
  .brand { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 40px; gap: 24px; }
  .hero-copy { gap: 24px; }
  .intro { font-size: 18px; }
  .facts { gap: 10px 0; }
  .hero-visual { position: relative; padding-top: 84px; }
  .stack { z-index: 1; }
  .stack { width: min(100%, 460px); margin: 0 auto; aspect-ratio: 335 / 430; }
  .stack .p1 { left: 0; top: 11.6%; width: 50.7%; }
  .stack .p2 { left: 43.3%; top: 0; width: 56.7%; }
  .road { bottom: auto; top: -52px; height: 170px; }
  .r-shoulder { stroke-width: 56px; }
  .r-asphalt { stroke-width: 48px; }
  .r-edge { stroke-width: 2px; }
  .r-line { stroke-width: 5px; stroke-dasharray: 32 26; }
  .place { padding: 40px 0; }
  .place-head { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .scheme { margin: 24px 0; }
  .figures { gap: 16px; }
  .figure { font-size: 34px; }
  .figure small { font-size: 16px; margin-left: 4px; }
  .caption { margin-top: 24px; }
  .numbers { padding: 40px 0; }
  .numbers ul { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .numbers strong { font-size: 52px; }
  .numbers li > span { font-size: 15px; }
  .how-head { padding-top: 56px; padding-bottom: 8px; }
  .row-grid, .row:nth-of-type(even) .row-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 40px; }
  .row:nth-of-type(even) .row-copy { order: 0; }
  .row-copy { gap: 16px; }
  .row-copy p:last-child { font-size: 17px; }
  .row-phones { gap: 14px; }
  .row-phones .phone { width: 220px; flex-basis: 220px; }
  .row-phones .phone:only-child { width: 280px; flex-basis: 280px; }
  .pro { padding: 56px 0; }
  .pro-head { margin-bottom: 32px; }
  .plans { grid-template-columns: 1fr; gap: 32px; }
  .plan h3 { font-size: 34px; }
  .privacy { padding-bottom: 56px; }
  .panel { padding: 28px; }
  .privacy .panel { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px; }
  .points li { padding: 14px 0; }
  .support { padding-bottom: 56px; }
  .support-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq summary { padding: 18px 0; font-size: 17px; }
  .closing { padding-bottom: 48px; }
  .closing .panel { padding: 40px 24px; gap: 16px; }
  .closing .app-icon { width: 72px; height: 72px; border-radius: 16px; }
  .closing h2 { font-size: 36px; }
  .closing p { font-size: 17px; }
  .footer { padding: 32px 0 48px; }
  body { background-size: 1500px 1500px; }
}

@media (max-width: 560px) {
  .facts { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
  .facts li { padding: 0; border-left: 0; }
  .intro { font-size: 18px; }
  .lede { font-size: 17px; }
  .faq details p { font-size: 16px; }
  .credits { font-size: 11px; }
  .stack { width: min(100%, 335px); }
  .row-phones .phone { width: 155px; flex-basis: 155px; }
  .row-phones .phone:only-child { width: 230px; flex-basis: 230px; }
}

@media (max-width: 400px) {
  .langs a, .langs span { padding-left: 7px; padding-right: 7px; }
  .brand { font-size: 18px; gap: 8px; }
}

/* Motion (only with html.anim: the reader has not asked to reduce motion, JavaScript runs).
   Each movement says something: the road's marking rolls in once as the page opens, the route is driven
   through the Gotthard while its length counts up (the app does the same when a place opens), the phones
   rise into place as you reach them, an answer unfolds. Nothing loops. */
:root { interpolate-size: allow-keywords; }
.anim .r-line { animation: roll 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
@keyframes roll { from { stroke-dashoffset: 348px; } to { stroke-dashoffset: 0; } }
.anim .drive .driven { clip-path: inset(0 100% 0 0); }
.anim .drive.in .driven { clip-path: inset(0 0 0 0); transition: clip-path 1.8s cubic-bezier(0.45, 0, 0.55, 1) 0.1s; }
.anim .row .phone { opacity: 0; transform: translateY(28px); }
.anim .row.in .phone { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.anim .row.in .phone + .phone { transition-delay: 0.12s; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

@media (max-width: 860px) {
  @keyframes roll { from { stroke-dashoffset: 174px; } to { stroke-dashoffset: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .faq details::details-content { transition: none; }
  html { scroll-behavior: auto; }
}
