/* Kestrel EFB website. Same colours and typeface as the app. */
:root {
  --ground: #10161a; --panel: #1a2228; --raised: #252f37;
  --ink: #eef3f6; --soft: #a7b5bf; --accent: #2bb3a0; --accent-ink: #06211d;
  --band-1: #12544b; --band-2: #1c3f66; --band-3: #5a4410; --band-4: #1d4f2c; --band-5: #5a2330;
  --vfr: #3fc35f; --mvfr: #3d8bff; --ifr: #ef4444; --lifr: #e05ad8;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: clamp(44px, 5.2vw, 80px); --h2: clamp(32px, 3.6vw, 56px); --statement: clamp(22px, 2.2vw, 30px);
  --body: 18px; --small: 15px;
  --m: clamp(20px, 2.8vw, 40px); --gap: clamp(96px, 12vw, 176px); --r: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: var(--body)/1.5 var(--font); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--display); line-height: 1; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
h2 { font-size: var(--h2); line-height: 1.04; letter-spacing: -.03em; font-weight: 650; text-wrap: balance; }
h3 { font-size: var(--statement); line-height: 1.2; letter-spacing: -.015em; font-weight: 600; }
p { max-width: 62ch; }
.soft { color: var(--soft); }
.small { font-size: var(--small); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { padding-inline: var(--m); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); }
section { margin-top: var(--gap); }

/* Navigation: wordmark, links, one action */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px var(--m); font-size: var(--small); }
.nav .mark { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.nav .mark img { width: 28px; height: 28px; border-radius: 6px; }
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.by-top { font-size: 13px; color: var(--soft); text-decoration: none; white-space: nowrap; }
.by-top:hover, footer .by:hover { color: var(--accent); }
footer .by { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--accent); }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; }
.nav ul a:not(.btn) { padding: 10px 0; }
.nav ul a:not(.btn):hover, .nav a[aria-current] { color: var(--accent); }

/* Buttons: flat, one fill, small radius */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 600 16px/1 var(--font); white-space: nowrap; text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.btn:hover { background: #39c9b5; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.quiet { background: var(--raised); color: var(--ink); }
.btn.quiet:hover { background: #303c46; }
.btn.dark { background: var(--accent-ink); color: var(--ink); }
.btn.dark:hover { background: #0b332d; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: var(--small); }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); transition: color .15s; }
.link:hover { color: var(--accent); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }

/* Home hero: text, then the app */
.hero { margin-top: 0; padding-top: clamp(36px, 6vw, 80px); }
.hero .copy { max-width: 760px; }
.hero .copy p { margin-top: 24px; max-width: 52ch; }
.hero .shot { margin-top: clamp(40px, 5vw, 64px); border-radius: 10px; overflow: hidden; border: 1px solid var(--raised); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.hero .shot img { width: 100%; }

/* What's in the app */
.feats { row-gap: 12px; margin-top: 32px; }
.feat { grid-column: span 4; background: var(--panel); border-radius: var(--r); padding: 24px; }
.feat h3 { font-size: 22px; }
.feat p { margin-top: 8px; }
.more { margin-top: 24px; }

/* Weather check between two airports */
.check { padding-block: clamp(48px, 6vw, 80px); background: var(--panel); }
.check .lead2 { margin-top: 12px; }
.route-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-top: 28px; }
.route-form label { display: flex; flex-direction: column; gap: 6px; font-size: var(--small); font-weight: 600; }
.route-form input { width: 160px; height: 52px; padding: 0 14px; border: 2px solid #3a4853; border-radius: var(--r); background: var(--ground); color: var(--ink);
  font: 600 22px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.route-form input::placeholder { color: #5d6b75; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 17px; }
.route-form input:hover { border-color: #52626e; }
.route-form input:focus { outline: none; border-color: var(--accent); }
.route-form .btn { height: 52px; }
.check .hint { margin-top: 14px; }
.answer { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); row-gap: 20px; margin-top: 32px; align-items: start; }
.answer > p { grid-column: 1 / -1; }
.leg { grid-column: span 4; }
.leg .big { font-size: var(--h2); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.leg .soft { margin-top: 8px; }
.stn { grid-column: span 4; background: var(--raised); border-radius: var(--r); padding: 18px 20px; }
.stn .id { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--statement); }
.stn .cat { font-size: var(--small); font-weight: 700; padding: 3px 8px; border-radius: 4px; color: #06120a; }
.stn .name { color: var(--soft); font-size: var(--small); margin-top: 2px; }
.stn dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: var(--body); font-variant-numeric: tabular-nums; }
.stn dt { color: var(--soft); } .stn dd { margin: 0; text-align: right; font-weight: 600; }
.stn .raw { margin-top: 12px; font-size: var(--small); color: var(--soft); overflow-wrap: anywhere; }
.examples { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }

/* Drag through the stages */
.stages { margin-top: var(--gap); }
.stages .split { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78svh, 760px); }
.stages .say { background: var(--band-2); padding: clamp(32px, 5vw, 72px) var(--m) 150px; transition: background .3s; }
.stages .say h2 { font-size: clamp(36px, 4.6vw, 76px); }
.stages .say p { margin-top: 20px; max-width: 34ch; }
.stages .see { background: var(--panel); display: grid; place-items: center; padding: clamp(24px, 4vw, 56px) clamp(20px, 3vw, 48px) 150px; overflow: hidden; }
.stages .see .frame { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; }
.stages .see img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; opacity: 0; transition: opacity .25s; }
.stages .see img.on { opacity: 1; }
.stages .fade { transition: opacity .2s; }
.stages .control { margin-top: -126px; padding: 0 var(--m) 28px; position: relative; }
.stages input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: none; margin: 0; cursor: pointer; }
.stages .track { position: relative; height: 32px; }
.stages .track::before, .stages .track i { content: ""; position: absolute; left: 0; top: 12px; height: 8px; }
.stages .track::before { right: 0; background: rgba(238, 243, 246, .28); }
.stages .track i { width: var(--pos, 0%); background: var(--ink); transition: width .15s; }
.stages .track input { position: absolute; inset: 0; }
.stages input[type=range]::-webkit-slider-runnable-track { height: 8px; background: none; }
.stages input[type=range]::-moz-range-track { height: 8px; background: none; }
.stages input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; background: var(--accent); border: 0; border-radius: 0; transition: transform .15s var(--ease); }
.stages input[type=range]::-moz-range-thumb { width: 32px; height: 32px; background: var(--accent); border: 0; border-radius: 0; }
.stages input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.stages .names { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; font-size: var(--small); }
.stages .names button { all: unset; cursor: pointer; color: rgba(238, 243, 246, .7); padding: 8px 0; min-height: 28px; transition: color .2s; }
.stages .names button:nth-child(2) { text-align: center; transform: translateX(-17%); } .stages .names button:nth-child(3) { text-align: center; transform: translateX(17%); } .stages .names button:nth-child(4) { text-align: right; }
.stages .names button.on, .stages .names button:hover { color: var(--ink); font-weight: 600; }
.stages .names button:focus-visible { outline: 3px solid var(--accent); }

/* Closing action tiles: a row cropped from a longer one */
.tiles { display: grid; grid-template-columns: 1.6fr 8fr 1.6fr; gap: 12px; margin-inline: -6vw; margin-top: var(--gap); }
.tile { height: 380px; border-radius: var(--r); overflow: hidden; }
.tile.photo img { width: 100%; height: 100%; object-fit: cover; }
.tile.flat { background: var(--band-2); }
.tile.act { background: var(--accent); color: var(--accent-ink); display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 4vw, 56px); }
.tile.act h2 { font-size: clamp(30px, 3vw, 44px); }
.tile.act p { margin-top: 12px; max-width: 46ch; }
.tile.act .link { text-decoration-color: var(--accent-ink); }
.tile.act .link:hover { color: #0f4039; }

/* Inner pages */
.page-head { margin-top: 0; padding-top: clamp(40px, 7vw, 96px); }
.page-head .lead { margin-top: 24px; font-size: var(--statement); line-height: 1.3; max-width: 34ch; }
.pic.trio { display: grid; grid-template-columns: 1fr 1.6fr; grid-template-rows: repeat(3, 1fr); gap: 12px; background: none; }
.pic.trio img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.pic.trio img:first-child { grid-row: 1 / -1; object-position: top; }
.row { align-items: center; row-gap: 28px; }
.row .text { grid-column: 1 / span 5; }
.row .pic { grid-column: 6 / -1; border-radius: var(--r); overflow: hidden; background: var(--panel); }
.row.flip .text { grid-column: 8 / -1; order: 2; }
.row.flip .pic { grid-column: 1 / span 7; }
.row.narrow .pic { grid-column: 8 / span 4; }
.row .text p { margin-top: 16px; }
.row ul, .cols ul { margin: 18px 0 0; padding: 0; list-style: none; }
.row li, .cols li { padding: 7px 0 7px 22px; position: relative; }
.row li::before, .cols li::before { content: ""; position: absolute; left: 0; top: 17px; width: 10px; height: 10px; background: var(--accent); }
.pic img { width: 100%; transition: transform 1.2s var(--ease); }
.pic:hover img { transform: scale(1.03); }
.field { background: var(--panel); padding-block: clamp(56px, 8vw, 112px); }
.cols { row-gap: 40px; margin-top: 40px; }
.cols > div { grid-column: span 4; }
.cols h3 + p { margin-top: 10px; }

/* Download blocks */
.gets { row-gap: 12px; margin-top: clamp(40px, 6vw, 72px); }
.get { grid-column: span 6; background: var(--panel); border-radius: var(--r); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; }
.get.main { grid-column: 1 / -1; background: var(--accent); color: var(--accent-ink); }
.get h2 { font-size: clamp(28px, 2.6vw, 40px); }
.get p { margin-top: 12px; }
.get ol { margin: 16px 0 0; padding-left: 22px; } .get li { padding: 4px 0; }
.get .acts { margin-top: auto; padding-top: 24px; }

/* Footer: one quiet line */
footer { margin-top: clamp(120px, 18svh, 220px); padding: 0 var(--m) 30px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px 24px; align-items: baseline; font-size: var(--small); color: var(--soft); }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
footer nav a:hover { color: var(--accent); }
footer .end { text-align: right; }
.credit { margin: 0 var(--m) 24px; font-size: var(--small); color: var(--soft); max-width: none; }

/* Motion: parts of each section rise in turn; content stays visible without script */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-rise].in { opacity: 1; transform: none; }
.drift img { animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-2%, -2%, 0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise] { opacity: 1; transform: none; clip-path: none; transition: none; }
  .drift img { animation: none; }
  * { transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .leg, .stn { grid-column: span 6; }
  .feat { grid-column: span 6; }
  .cols > div { grid-column: span 6; }
  .row { row-gap: 0; padding-top: 6px; }
  .row .text, .row.flip .text { display: contents; }
  .row .text > * { grid-column: 1 / -1; order: -1; }
  .row .pic { margin-top: 28px; }
  .row .pic, .row.flip .pic, .row.narrow .pic { grid-column: 1 / -1; }
  .get { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  :root { --display: 10vw; --h2: 8.4vw; --statement: 21px; --body: 17px; }
  .nav { padding-block: 16px; }
  .nav ul li.opt, .nav ul li.opt2 { display: none; }
  .by-top { display: none; }
  .head2 > * { grid-column: 1 / -1 !important; }
  .head2 p { margin-top: 12px; }
  .stages .see .frame { aspect-ratio: 4 / 3; }
  .hero { padding-top: 28px; }
  .feat { grid-column: 1 / -1; }
  .route-form label { flex: 1 1 120px; }
  .route-form input { width: 100%; }
  .route-form .btn { flex: 1 1 100%; }
  .leg, .stn { grid-column: 1 / -1; }
  .examples .btn { flex: 1 1 auto; }
  .stages .split { grid-template-columns: 1fr; min-height: 0; }
  .stages .see { order: 1; padding: 20px var(--m) 20px; }
  .stages .control { order: 2; margin-top: 0; padding: 12px var(--m) 4px; background: var(--band-2); }
  .stages .say { order: 3; padding: 12px var(--m) 40px; }
  .stages .say h2 { font-size: 9vw; }
  .stages .inner { display: flex; flex-direction: column; }
  .stages .split { display: contents; }
  .tiles { grid-template-columns: 1fr 1fr; margin-inline: var(--m); }
  .tile { height: 120px; }
  .tile.act { grid-column: 1 / -1; order: -1; height: auto; min-height: 300px; padding: 32px 24px; }
  .tile.act h2 { font-size: 28px; }
  .cols > div { grid-column: 1 / -1; }
  footer { grid-template-columns: 1fr; gap: 8px; margin-top: 20svh; padding-bottom: 24px; }
  footer .end { text-align: left; }
}
