/* kapair.app: the "Billet" style of the app (app/lib/core/theme/kapair_colors.dart). */

@font-face {
  font-family: Geist;
  src: url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f1f3f1;
  --surface: #ffffff;
  --surface-alt: #edf0ee;
  --line: #dfe4e2;
  --text: #0d1413;
  --muted: #58625f;
  --accent: #0e7a66;
  --accent-text: #0b6b59;
  --accent-soft: #0e7a661a;
  --warn: #945700;
  --warn-soft: #d68c0021;
  --bad: #b8322b;
  --bad-soft: #c2352e1a;
  --track: #dfe4e2;
  --globe-0: #ffffff;
  --globe-1: #e6eae8;
  --globe-dot: #98aaa4;
  --globe-track: #b5c0bc;
  --shadow: 0 1px 2px #0d141308, 0 8px 32px #0d14130d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c0d;
    --surface: #141819;
    --surface-alt: #1b2022;
    --line: #263033;
    --text: #f1f3f2;
    --muted: #98a3a5;
    --accent: #4fd1b5;
    --accent-text: #4fd1b5;
    --accent-soft: #4fd1b524;
    --warn: #f6b94a;
    --warn-soft: #f6b94a1f;
    --bad: #ff7a72;
    --bad-soft: #ff6b6321;
    --track: #263033;
    --globe-0: #1c2224;
    --globe-1: #0a0d0e;
    --globe-dot: #56696d;
    --globe-track: #3a4649;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.page.wide {
  max-width: 720px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

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

/* The ticket. */
.ticket {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
  overflow: hidden;
}

.head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #0d1413;
  font: 600 13px 'Geist Mono', ui-monospace, monospace;
}

.logo img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  background: #fff;
}

.ident {
  flex: 1;
  min-width: 0;
}

.number {
  margin: 0;
  font: 600 18px/1.2 'Geist Mono', ui-monospace, monospace;
  letter-spacing: -0.01em;
}

.airline {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.tone-warn .chip {
  background: var(--warn-soft);
  color: var(--warn);
}

.tone-bad .chip {
  background: var(--bad-soft);
  color: var(--bad);
}

.tone-live .chip::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
  margin: 26px 0 22px;
}

.code {
  font-weight: 600;
  font-size: clamp(34px, 11vw, 46px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.city {
  align-self: start;
  color: var(--muted);
  font-size: 14px;
  max-width: 11ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.right {
  text-align: right;
}

.right .city {
  margin-left: auto;
}

.track {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: var(--track);
}

.fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.plane {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.plane.flying {
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.plane svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transform: rotate(90deg);
}

.count {
  align-self: start;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.times {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}

/* The notches of a paper ticket, on the tear line. */
.times::before,
.times::after {
  content: '';
  position: absolute;
  top: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}

.times::before {
  left: -32px;
}

.times::after {
  right: -32px;
}

.label {
  color: var(--muted);
  font-size: 13px;
}

.time {
  font: 600 clamp(26px, 8vw, 30px) / 1.15 'Geist Mono', ui-monospace, monospace;
  letter-spacing: -0.03em;
}

.label s {
  margin-left: 4px;
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.sub {
  color: var(--muted);
  font-size: 13px;
}

.sub.mine:empty {
  display: none;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 12.5px;
}

.facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.globe {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-height: 440px;
  margin: 12px auto 0;
  /* Sideways turns the globe, up and down still scrolls the page. */
  touch-action: pan-y;
  cursor: grab;
}

.updated {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin: 4px 0 0;
}

.aside {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

footer.foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}

footer.foot a {
  color: var(--muted);
}

/* Home. */
.hero {
  padding: 28px 0 8px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 10vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.hero p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 34ch;
}

.soon {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
}

.features {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.features strong {
  display: block;
  font-weight: 600;
}

.features span {
  color: var(--muted);
  font-size: 14.5px;
}

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

/* Legal pages. */
.doc h1 {
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 8px 0 6px;
}

.doc .lead {
  color: var(--muted);
  margin: 0 0 24px;
}

.doc h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 32px 0 8px;
}

.doc p,
.doc li {
  color: var(--text);
}

.doc ul {
  padding-left: 20px;
}

.doc li + li {
  margin-top: 6px;
}

.doc .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  margin: 12px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--line);
}

.doc th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.table-scroll {
  overflow-x: auto;
}

.gone {
  text-align: center;
  padding: 64px 0 24px;
}

.gone h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.gone p {
  color: var(--muted);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tone-live .chip::before {
    animation: none;
  }
}
