/* Ordinary Logic site styles. No external fonts, scripts or trackers. */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5d6470;
  --line: #e6e2da;
  --accent: #0a63d8;
  --accent-text: #ffffff;

  /* App screenshots and the Pro tag (amber from design/tokens.json) */
  --bezel: #15171c;
  --bezel-edge: #3a3f48;
  --pro-bg: #ffc21a;
  --pro-text: #3b2c00;
  --ok: #1f9d5c;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --gutter: 16px;
  --max: 960px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --text: #eceae4;
    --muted: #9aa1ac;
    --line: #262a33;
    --accent: #4c9bff;
    --accent-text: #0b0f14;
    --bezel: #000000;
    --bezel-edge: #30353e;
    --pro-bg: rgba(255, 194, 26, 0.16);
    --pro-text: #ffc21a;
    --ok: #3ddc84;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand svg { width: 26px; height: 26px; }

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* Type */

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 650; margin-top: 2em; }
h3 { font-size: 1.1rem; font-weight: 650; margin-top: 1.6em; }

p, ul, ol { margin: 0 0 1em; }

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 40em;
}

.muted { color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Sections */

main { padding-bottom: 72px; }

.hero { padding-top: 40px; padding-bottom: 8px; }

.section { padding-top: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 760px) {
  .product-card { grid-template-columns: 1.1fr 1fr; padding: 32px; }
}

.product-card h2 { margin-top: 0; }

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-3 .card h3 { margin-top: 0; }
.grid-3 .card p { margin: 0; color: var(--muted); font-size: 16px; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 18px;
  border-radius: 999px;
}

.button:hover { filter: brightness(1.08); }

.pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Prose pages (privacy, support) */

.prose { max-width: 44em; padding-top: 56px; }
.prose h2 { font-size: 1.3rem; }
.prose li { margin-bottom: 0.4em; }

/* Pricing */

.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .pricing { grid-template-columns: 1fr 1fr; }
}

.price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }

/* Free vs Pro comparison */

.table-scroll {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.compare th,
.compare td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.compare thead th {
  border-top: 0;
  font-weight: 650;
}

.compare tbody th { font-weight: 500; }

.compare td { width: 26%; color: var(--muted); }

@media (max-width: 480px) {
  .compare { font-size: 15px; }
  .compare th, .compare td { padding: 10px 10px; }
  .compare th:first-child { padding-left: 14px; }
  .compare td { width: 24%; }
}

.compare .yes { color: var(--ok); font-weight: 700; }
.compare .no { color: var(--muted); }

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

/* App screenshots. A thin dark bezel drawn with box-shadow follows the screen's
   rounded corners (iPhone 17 Pro Max: about 62 of 440 points wide; iPad Pro 13": 30 of 1376). */

.phone,
.tablet {
  display: block;
  height: auto;
  box-shadow:
    0 0 0 6px var(--bezel),
    0 0 0 7px var(--bezel-edge),
    0 18px 30px -20px rgba(0, 0, 0, 0.5);
}

.phone { border-radius: 14% / 6.5%; }
.tablet { border-radius: 2.6% / 3.4%; }

/* Home page: the top of the board, fading out */
.screen-peek {
  justify-self: center;
  width: 100%;
  max-width: 300px;
  height: auto;
  /* Show as much of the board as the window has room for, so the whole card fits on load */
  max-height: clamp(220px, calc(100svh - 495px), 391px);
  object-fit: cover;
  object-position: top;
  border-radius: 44px 44px 0 0;
  box-shadow: 0 0 0 6px var(--bezel), 0 0 0 7px var(--bezel-edge);
  margin: 7px 7px 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}

/* Feature tour (whatflights/tour.js) */

.tour-section { padding-top: 32px; }
.tour-intro .pill + h1 { margin-top: 12px; }
.tour-intro .lede { font-size: 1.1rem; }
.tour-heading { margin-top: 1em; }

.tour {
  display: grid;
  gap: 8px 48px;
  align-items: center;
}

.tour-stage { min-width: 0; }

.tour-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius);
}

.tour-track::-webkit-scrollbar { display: none; }

.tour-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tour-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px 16px 36px;
  height: calc(var(--shot-h) + 52px);
}

.tour-slide .phone { height: var(--shot-h); width: auto; }
.tour-slide .tablet { width: 100%; max-height: var(--shot-h); object-fit: contain; }

/* Phones: the screen sits under the intro at about two-thirds of the window's height.
   Wider screens (below) give it whatever height the window leaves, so the whole tour is visible on load. */
.tour { --shot-h: clamp(380px, 64vh, 600px); }

.tour-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}

.tour-controls[hidden] { display: none; }

.tour-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.tour-arrow svg { width: 20px; height: 20px; }
.tour-arrow:hover:not(:disabled) { border-color: var(--muted); }
.tour-arrow:disabled { opacity: 0.35; cursor: default; }
.tour-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tour-count {
  min-width: 3.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--muted);
}

.tour-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tour-item {
  display: block;
  padding: 12px 16px;
  border-left: 3px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.tour-title {
  display: block;
  font-weight: 650;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.tour-text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
}

.tag {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pro-text);
  background: var(--pro-bg);
}

/* With the script: only the current caption is open, and it's marked. */
.is-enhanced .tour-item { cursor: pointer; }
.is-enhanced .tour-item:not([aria-current]) .tour-text { display: none; }
.is-enhanced .tour-item:not([aria-current]) .tour-title { color: var(--muted); }
.is-enhanced .tour-item:not([aria-current]):hover .tour-title { color: var(--text); }
.is-enhanced .tour-item[aria-current] { border-left-color: var(--accent); }
.tour-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Phones: screen on top, then only the current caption */
@media (max-width: 859px) {
  .is-enhanced .tour-list li:not(:has([aria-current])) { display: none; }
  .is-enhanced .tour-item { border-left: 0; padding: 4px 0 0; text-align: center; cursor: default; }
  .is-enhanced .tour-list { min-height: 8.5em; }
  .tour-list li + li { margin-top: 4px; }
}

/* Wider screens: captions on the left, the screen on the right */
@media (min-width: 860px) {
  .tour {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "intro stage" "list stage";
    gap: 0 40px;
    align-items: start;
    --shot-h: clamp(360px, calc(100svh - 216px), 600px);
  }
  .tour-intro { grid-area: intro; }
  .tour-stage { grid-area: stage; align-self: center; }
  .tour-list { grid-area: list; }
  .tour-item { padding: 8px 16px; }
}

/* Laptop-height windows: tighter, so the intro, captions and arrows still fit on load (down to about 700px) */
@media (min-width: 860px) and (max-height: 860px) {
  .tour-section { padding-top: 20px; }
  .tour-intro .lede { font-size: 1rem; margin-bottom: 0; }
  .tour-heading { margin-top: 16px; font-size: 1.3rem; }
  .tour-item { padding: 5px 16px; }
  .tour-text { font-size: 15px; }
  .tour { --shot-h: clamp(360px, calc(100svh - 196px), 600px); }
  .tour-slide { padding-bottom: 28px; height: calc(var(--shot-h) + 44px); }
}

.tour-note { font-size: 14px; margin-top: 16px; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
