/* TravelJotter — shared styles */

@font-face {
  font-family: "Jakarta";
  src: url("fonts/PlusJakartaSans-SemiBold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("fonts/PlusJakartaSans-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}

:root {
  --blue: #0ea5e9;
  --blue-deep: #0284c7;
  --navy: #0a3a66;
  --coral: #f43f5e;
  --sky: #e0f2fe;
  --bg: #f6f9fc;
  --surface: #ffffff;
  --ink: #0f1c2e;
  --muted: #4a5b70;
  --line: #dbe4ee;
  --link: #0369a1;
  --hero-from: #0ea5e9;
  --hero-to: #0369a1;
  --shadow: 0 24px 60px -20px rgba(10, 58, 102, 0.35);
  --radius: 18px;
  --display: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1e33;
    --surface: #10294a;
    --ink: #e8f1fa;
    --muted: #a3b6ca;
    --line: #1f3c5e;
    --link: #7dd3fc;
    --sky: #133457;
    --hero-from: #0b1e33;
    --hero-to: #0a3a66;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark { font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.wordmark b { font-weight: 800; color: var(--navy); }
.wordmark span { font-weight: 600; color: var(--blue-deep); }
@media (prefers-color-scheme: dark) {
  .wordmark b { color: #ffffff; }
  .wordmark span { color: #cfeeff; }
}

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 10px; border-radius: 10px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--sky); }

@media (max-width: 420px) {
  .brand img { display: none; }
  .site-nav a { padding: 8px 7px; font-size: 14px; }
}

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

.hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #ffffff;
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px;
  padding-top: 72px; padding-bottom: 0;
}
.hero-copy { padding-bottom: 72px; }
.hero-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.45); margin-bottom: 24px; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  color: #cfeeff; margin: 0 0 12px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(44px, 7vw, 72px); line-height: 1.02; margin: 0 0 20px;
}
.hero .lead { font-size: 20px; line-height: 1.55; color: #e6f6ff; max-width: 34ch; margin: 0 0 32px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: #0b1220; color: #ffffff; border-radius: 14px; padding: 12px 20px;
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.pill svg { width: 20px; height: 20px; }
.pill small { display: block; font-size: 11px; font-weight: 500; opacity: .75; letter-spacing: .02em; }
.ghost {
  color: #ffffff; font-weight: 600; text-decoration: none; padding: 12px 16px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.55);
}
.ghost:hover { background: rgba(255,255,255,.12); }

.hero-phone { align-self: end; justify-self: center; width: min(320px, 80vw); margin-bottom: -60px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; padding-top: 48px; text-align: left; }
  .hero-copy { padding-bottom: 32px; }
  .hero-phone { width: min(280px, 76vw); margin-bottom: -150px; }
  .hero .lead { font-size: 18px; }
}

/* ---------- phone frame ---------- */

.phone {
  border-radius: 46px; padding: 9px; background: #0b1220;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #2a3446;
}
.phone img { border-radius: 38px; width: 100%; height: auto; aspect-ratio: 720 / 1564; }

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

.features { padding-top: 40px; }
@media (max-width: 820px) { .features { padding-top: 16px; } }

.feature { padding: 56px 0; }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature:nth-child(even) .feature-media { order: -1; }
.feature-media { justify-self: center; width: min(300px, 72vw); }
.kicker {
  font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--coral); margin: 0 0 10px;
}
.feature h2, .band h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(30px, 4.2vw, 42px); line-height: 1.1; margin: 0 0 18px;
}
.feature .kicker { color: var(--coral); }
.feature p:not(.kicker) { color: var(--muted); font-size: 18px; margin: 0 0 18px; max-width: 46ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

@media (max-width: 820px) {
  .feature { padding: 44px 0; }
  .feature .wrap { grid-template-columns: 1fr; gap: 32px; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* ---------- bands ---------- */

.band { padding: 80px 0; }
.band.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .intro { color: var(--muted); font-size: 18px; max-width: 56ch; margin: 0 0 36px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card h3 { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card svg { width: 28px; height: 28px; color: var(--blue); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

.band .more { margin-top: 28px; font-weight: 600; }

.support { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.support .actions a { font-weight: 600; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; padding: 13px 20px; border-radius: 14px;
  background: var(--blue-deep); color: #ffffff;
}
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn:hover { filter: brightness(1.06); }
@media (max-width: 820px) { .support { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- document pages ---------- */

.doc-head { background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); color: #fff; }
.doc-head .wrap { padding-top: 48px; padding-bottom: 44px; }
.doc-head h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(34px, 5.5vw, 52px); line-height: 1.05; margin: 0;
}
.doc-head p { margin: 12px 0 0; color: #e6f6ff; font-size: 18px; max-width: 60ch; }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 80px; }

.toc { position: sticky; top: 88px; align-self: start; font-size: 15px; }
.toc summary {
  font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); list-style: none; cursor: default; margin-bottom: 10px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; line-height: 1.35;
}
.toc li a:hover { color: var(--ink); border-left-color: var(--blue); }

.prose { max-width: 70ch; overflow-wrap: break-word; }
.prose a, .callout a { overflow-wrap: anywhere; }
.prose h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: 27px; line-height: 1.2;
  margin: 48px 0 14px; padding-top: 8px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--display); font-weight: 800; font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 650; }
.prose code {
  font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sky); padding: 1px 6px; border-radius: 6px;
}
.prose .meta { color: var(--muted); font-size: 15px; margin-top: 0; }

.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: 12px; padding: 16px 18px; margin: 0 0 36px;
}
.callout p { margin: 0; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
  .toc summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
  .toc[open] summary::after { content: "–"; }
  .toc[open] summary { margin-bottom: 10px; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer p.legal { margin-top: 8px; font-size: 13px; line-height: 1.5; }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: -0.03em; margin: 0 0 12px; }
.notfound p { color: var(--muted); margin: 0 0 28px; }

/* Plus Jakarta Sans has a narrow space; open it up in tight-tracked headings */
.hero h1, .feature h2, .band h2, .card h3, .doc-head h1, .prose h2, .prose h3, .notfound h1 { word-spacing: 0.1em; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
