/* directvfr.com: home and news pages.
   Colours are the phone app's chart tokens (direct-vfr-mobile src/ui/tokens.ts): paper, ink, route
   magenta, tint blue, amber callout. Self-hosted Fira Sans (the nav log's typeface). No scripts. */

@font-face { font-family: "Fira Sans"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/fira-sans-light.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/fira-sans-regular.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/fira-sans-bold.woff2") format("woff2"); }

:root {
  --paper: #F6F2E7;
  --surface: #FFFDF8;
  --ink: #13233A;
  --ink2: #3D4859;
  --ink3: #5C6575;
  --rule: #DCD3BF;
  --rule-strong: #A79D86;
  --graticule: rgba(167, 157, 134, 0.22);
  --route: #AE1169;
  --tint: #1A5CA8;
  --tint-hover: #134A8A;
  --callout-bg: #FBF1DE;
  --callout-border: rgba(138, 75, 0, 0.22);
  --callout-text: #5A3A08;
  --warn: #B26A00;
  --bezel: #13233A;
  --shadow: 0 1px 2px rgba(19, 35, 58, 0.10), 0 18px 40px -18px rgba(19, 35, 58, 0.45);
  /* The Garmin band is a night chart in both schemes. */
  --band: #13233A;
  --band-ink: #EFE9DC;
  --band-ink2: #B9C1CC;
  --band-rule: #2A3A52;
  --band-route: #E0649F;
  --band-link: #8DB4E2;
  --watch-case: #2A3647;

  --font: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --max: 1180px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E151F;
    --surface: #16202D;
    --ink: #E4DED1;
    --ink2: #AAB2BE;
    --ink3: #8F98A6;
    --rule: #2A3647;
    --rule-strong: #4A5566;
    --graticule: rgba(74, 85, 102, 0.28);
    --route: #D2579A;
    --tint: #8DB4E2;
    --tint-hover: #A9C7EA;
    --callout-bg: #2A2113;
    --callout-border: rgba(221, 166, 84, 0.3);
    --callout-text: #E8C58A;
    --warn: #DDA654;
    --bezel: #2A3647;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
    --band: #16202D;
    --band-rule: #2A3647;
    --watch-case: #2A3647;
  }
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: var(--tint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tint-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-weight: 300; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 1.3rem + 4.2vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.85rem, 1.35rem + 1.9vw, 2.75rem); line-height: 1.08; }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }
.small { font-size: 0.9375rem; color: var(--ink3); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 40px; } }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- masthead */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Language menu: a <details>, so it works without scripts. */
.langmenu { position: relative; flex: none; }
.langmenu summary {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none;
  color: var(--ink2); font-size: 0.9375rem; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px;
}
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover { color: var(--ink); border-color: var(--rule-strong); }
.langmenu summary svg { fill: currentColor; }
.langmenu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 10.5em;
  margin: 0; padding: 6px; list-style: none; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow);
}
.langmenu li a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.langmenu li a:hover { background: var(--paper); text-decoration: underline; }
.langmenu li a[aria-current] { font-weight: 700; }

/* "Read this page in German?" banner on English pages (server-rendered, dismissed by a cookie). */
.lang-hint { background: var(--callout-bg); border-bottom: 1px solid var(--callout-border); color: var(--callout-text); }
.lang-hint__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; padding-top: 9px; padding-bottom: 9px; font-size: 0.9375rem; }
.lang-hint a { color: var(--callout-text); }
.lang-hint__go { font-weight: 700; }
.lang-hint__no { font-size: 0.875rem; }

.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; fill: var(--tint); }
.brand__name { white-space: nowrap; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.01em; }
.masthead__end { display: flex; align-items: center; gap: 8px 22px; min-width: 0; }
.topnav ul { display: flex; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.topnav a { color: var(--ink2); text-decoration: none; font-size: 0.9875rem; padding: 6px 0; }
.topnav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 560px) {
  .topnav li:not(.topnav__news) { display: none; }
  .topnav ul { gap: 16px; }
  .masthead__end { gap: 14px; }
}

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(60px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.split { display: grid; gap: 28px; }
.split__head p { color: var(--ink2); margin-top: 18px; }
.split__head h2 + p { margin-top: 20px; }
.prose { max-width: 66ch; color: var(--ink2); }
.prose p { margin-bottom: 1.05em; }
@media (min-width: 920px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 72px; align-items: start; }
}

/* Waypoint bullets: the route symbol from the app (a ring on the magenta line). */
.waypoints { list-style: none; margin: 0; padding: 0; }
.waypoints li { position: relative; padding: 0 0 0 30px; margin: 0 0 14px; color: var(--ink2); }
.waypoints li strong { color: var(--ink); }
.waypoints li::before {
  content: ""; position: absolute; left: 1px; top: 0.42em; width: 13px; height: 13px;
  border: 3px solid var(--route); border-radius: 50%; background: var(--paper);
}
.whatsnew .intro { color: var(--ink2); max-width: 40em; font-size: 1.125rem; }
.waypoints--cols { margin-top: clamp(36px, 5vw, 60px); }
.waypoints--cols li { break-inside: avoid; }
@media (min-width: 640px) { .waypoints--cols { columns: 2; column-gap: 48px; } }
@media (min-width: 1040px) { .waypoints--cols { columns: 3; } }
@media (min-width: 920px) { .whatsnew .split { align-items: end; } }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--graticule) 1px, transparent 1px),
    linear-gradient(90deg, var(--graticule) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--rule);
}
.hero__grid { display: grid; gap: 48px; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); align-items: center; }
.hero h1 span { display: block; }
.lede { font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.55; color: var(--ink2); max-width: 36em; margin: 26px 0 30px; }
.hero__note { margin-top: 16px; color: var(--ink3); font-size: 0.9375rem; }

.hero__art { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 400 / 560; }
.hero__route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route-line {
  fill: none; stroke: var(--route); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: route-draw 1.6s cubic-bezier(.45, 0, .2, 1) 0.25s both;
}
.wpt { fill: var(--surface); stroke: var(--route); stroke-width: 4; animation: wpt-in 0.3s ease-out both; }
.wpt:nth-of-type(1) { animation-delay: 0.7s; }
.wpt:nth-of-type(2) { animation-delay: 1.1s; }
.wpt:nth-of-type(3) { animation-delay: 1.45s; }
@keyframes route-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wpt-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .route-line, .wpt { animation: none; } }

.hero__phone { position: absolute; top: 0; right: 2%; width: 60%; }
/* The watch images are full renders (case, bezel, strap, shadow) on a transparent background. */
.hero__watch { position: absolute; left: -2%; bottom: 0; width: 52%; }

@media (min-width: 920px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
  .hero__art { margin: 0 0 0 auto; }
}

/* Phone frame */
.device--phone {
  background: var(--bezel);
  padding: 2.4%;
  border-radius: 12% / 5.6%;
  box-shadow: var(--shadow);
}
.device--phone img { border-radius: 10.4% / 4.8%; width: 100%; }

/* ---------------------------------------------------------------- badges */

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 0; padding: 0; list-style: none; }
.badge-img { display: block; line-height: 0; margin: -8px -9px; }
.badge-img img { height: 62px; width: auto; }
/* Google's localized badges have less transparent padding than the English file. */
.badge-img--intl { margin: -8px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 11px;
  border-radius: 9px; text-decoration: none; line-height: 1.1;
}
.badge svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.badge__small { display: block; font-size: 0.6875rem; letter-spacing: 0.01em; }
.badge__large { display: block; font-size: 1.0625rem; font-weight: 700; }
.badge--text { padding-left: 16px; }
.badge--dark { background: #000; color: #fff; border: 1px solid #a6a6a6; }
.badge--dark:hover { color: #fff; background: #1d1d1d; }
.badge--light { background: var(--band-ink); color: #13233A; }
.badge--light:hover { color: #13233A; background: #fff; }
.badge-soon {
  display: inline-flex; align-items: center; height: 46px; padding: 0 16px;
  border: 1.5px dashed var(--rule-strong); border-radius: 9px; color: var(--ink2); font-size: 0.9875rem;
}

/* ---------------------------------------------------------------- features */

.features h2 { max-width: 16em; margin-bottom: clamp(36px, 5vw, 56px); }
.feature-grid { display: grid; gap: 36px 32px; margin: 0; padding: 0; list-style: none; }
.feature-grid li { border-top: 2px solid var(--ink); padding-top: 16px; }
.feature-grid h3 { margin-bottom: 8px; }
.feature-grid p { color: var(--ink2); font-size: 1rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- phone gallery */

.availability { font-weight: 700; color: var(--ink) !important; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 64%);
  gap: 20px; margin: 52px 0 0; padding: 6px 2px 20px; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery li { scroll-snap-align: start; }
.gallery figure, .watches figure { margin: 0; }
.gallery figcaption { margin-top: 14px; color: var(--ink2); font-size: 0.9375rem; }
@media (min-width: 720px) { .gallery { grid-auto-columns: minmax(220px, 38%); } }
@media (min-width: 1000px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; gap: 28px; }
}

/* ---------------------------------------------------------------- Garmin band */

.garmin {
  background: var(--band);
  color: var(--band-ink);
  border-top: 0 !important;
  --ink: var(--band-ink); --ink2: var(--band-ink2); --ink3: var(--band-ink2);
  --rule: var(--band-rule); --route: var(--band-route); --tint: var(--band-link); --tint-hover: #B5D0EE;
  --paper: var(--band);
}
.garmin + .section { border-top: 0; }
.watches {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px;
  margin: clamp(44px, 6vw, 72px) 0; padding: 0; list-style: none;
}
.watches figcaption { margin-top: 6px; text-align: center; color: var(--band-ink2); font-size: 0.9375rem; }
@media (min-width: 820px) { .watches { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; } }

.garmin__lists { display: grid; gap: 32px 72px; }
.garmin__lists h3, .devices h3 { margin-bottom: 18px; }
@media (min-width: 820px) { .garmin__lists { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.devices { margin-top: clamp(48px, 6vw, 72px); }
.devices__count { font-weight: 400; color: var(--band-ink2); }
.devices dl { margin: 0 0 18px; border-top: 1px solid var(--band-rule); }
.devices dl > div { display: grid; gap: 2px 32px; padding: 12px 0; border-bottom: 1px solid var(--band-rule); }
.devices dt { font-weight: 700; }
.devices dd { margin: 0; color: var(--band-ink2); }
@media (min-width: 720px) { .devices dl > div { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; } }
.devices .small { color: var(--band-ink2); }

.garmin__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 40px; }
.works-with { width: 96px; height: auto; }

/* ---------------------------------------------------------------- community */

.safeguards {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 16px;
  padding: clamp(22px, 3vw, 34px);
}
.safeguards h3 { margin-bottom: 8px; }
.safeguards dl { margin: 0; }
.safeguards dl > div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.safeguards dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.safeguards dt { font-weight: 700; }
.safeguards dd { margin: 2px 0 0; color: var(--ink2); }

/* ---------------------------------------------------------------- languages */

.languages__grid { display: grid; gap: 48px; align-items: center; }
.languages__copy p { color: var(--ink2); max-width: 34em; margin-top: 20px; }
.langs {
  list-style: none; margin: 34px 0 0; padding: 0;
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem); font-weight: 300; line-height: 1.12; letter-spacing: -0.02em;
}
.langs li { padding: 4px 0; border-bottom: 1px solid var(--rule); }
.langs li:first-child { border-top: 1px solid var(--rule); }
.languages__phone { width: 100%; max-width: 300px; margin: 0 auto; }
@media (min-width: 860px) {
  .languages__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; }
}

/* ---------------------------------------------------------------- safety */

.safety-wrap { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.safety {
  background: var(--callout-bg); color: var(--callout-text);
  border: 1px solid var(--callout-border); border-left: 5px solid var(--warn); border-radius: 12px;
  padding: clamp(22px, 3.5vw, 40px) clamp(22px, 4vw, 48px);
}
.safety h2 { color: var(--callout-text); font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 16px; }
.safety p { max-width: 70ch; }
@media (min-width: 920px) {
  .safety { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
  .safety h2 { margin-bottom: 0; }
}
.safety a { color: var(--callout-text); text-decoration-thickness: 1.5px; }

/* ---------------------------------------------------------------- FAQ */

.faq__list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 44px 18px 0; font-size: 1.125rem; font-weight: 700; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2.5px solid var(--route); border-bottom: 2.5px solid var(--route);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--tint); }
.faq details p { color: var(--ink2); padding: 0 0 22px; margin: 0; max-width: 64ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------------------------------------------------------------- news */

.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.post-list > li { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.post-list h2, .post-list h3 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; }
.post-list h2 a, .post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover, .post-list h3 a:hover { color: var(--tint); text-decoration: underline; }
.post-list p { color: var(--ink2); }
.post-date { color: var(--ink3) !important; font-size: 0.9375rem; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }

.page { max-width: 820px; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(56px, 8vw, 104px); }
.page h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 3.6rem); margin-bottom: 28px; }
.post-list--page { margin-top: 8px; }
.crumb { margin-bottom: 18px; font-size: 0.9375rem; }
.post h1 { margin-bottom: 8px; }
.post > .post-date { margin-bottom: 36px; }
.post__body { font-size: 1.0625rem; }
.post__body h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin: 44px 0 14px; }
.post__body h3 { margin: 28px 0 10px; }
.post__body ul, .post__body ol { margin: 0 0 1.2em; padding: 0; }
.post__body ul { list-style: none; }
.post__body ol { padding-left: 1.4em; }
.post__body li { margin-bottom: 10px; }
.post__body ul > li { position: relative; padding-left: 30px; }
.post__body ul > li::before {
  content: ""; position: absolute; left: 1px; top: 0.42em; width: 13px; height: 13px;
  border: 3px solid var(--route); border-radius: 50%;
}
.post__body strong { color: var(--ink); }
.more { margin-top: 64px; }
.more h2 { font-size: 1.5rem; margin-bottom: 16px; }

/* ---------------------------------------------------------------- footer (_legal_footer.html) */

.site-footer { border-top: 1px solid var(--rule); background: var(--paper); }
.footer-langs ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0; padding: 28px 0 0; list-style: none; font-size: 0.9375rem; }
.footer-langs a { color: var(--ink2); }
.footer-langs a[aria-current] { color: var(--ink); font-weight: 700; text-decoration: none; }
.post-note { font-size: 0.9375rem; color: var(--ink3); }
.site-footer footer { padding: 18px 0 44px; text-align: center; color: var(--ink3); font-size: 0.9375rem; line-height: 1.9; }
.site-footer footer p { margin: 0 0 6px; }
.site-footer footer a { color: var(--ink2); margin: 0 6px; white-space: nowrap; }
.site-footer footer a:hover { color: var(--tint); }
.footer-small { font-size: 0.8125rem; max-width: 60em; margin: 10px auto 0 !important; line-height: 1.6; }
