/* =======================================================================
   FILE: styles.css — shared by every page
   ======================================================================= */

:root {
    --ink: #111111;
    --muted: #6b6b6b;
    --rule: #dcdcdc;
    --paper: #ffffff;
    --tint: #f3f3f1;
    --link: #1a4fd6;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.skip-link {
    position: absolute; left: 8px; top: -48px; z-index: 100;
    background: var(--ink); color: var(--paper); padding: 8px 12px; text-decoration: none; font-size: 0.85rem;
}
.skip-link:focus { top: 8px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; width: 100%; }
main { flex: 1; }

/* Small uppercase label used across the site */
.label {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

/* --- Site header (same on every page) --- */
.site-header { border-bottom: 1px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.wordmark {
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; text-decoration: none;
}
.site-nav { display: flex; gap: 24px; }
.site-nav a {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
    text-decoration: none; color: var(--muted); padding: 4px 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); }

/* --- Page intro --- */
.intro { padding: 56px 0 40px; border-bottom: 1px solid var(--rule); }
.intro h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 16px; max-width: 18ch; }
.intro p { margin: 0; max-width: 52ch; color: #333333; font-size: 1.05rem; }

/* --- Home: airport list --- */
.airport-list { list-style: none; margin: 0 0 64px; padding: 0; }
.airport-list li { border-bottom: 1px solid var(--rule); }
.airport-row {
    display: grid; grid-template-columns: 96px 1fr auto; align-items: baseline; gap: 16px;
    padding: 20px 8px; text-decoration: none; transition: background-color 0.15s;
}
.airport-row:hover { background-color: var(--tint); }
.airport-code { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.04em; }
.airport-name { font-size: 1rem; }
.airport-city { font-size: 0.85rem; color: var(--muted); text-align: right; }

/* --- Airport page heading --- */
.airport-head { padding: 48px 0 32px; border-bottom: 1px solid var(--ink); }
.airport-head .code { font-size: 4.5rem; font-weight: 700; line-height: 1; letter-spacing: 0.02em; margin: 0; }
.airport-head .name { font-size: 1.25rem; margin: 12px 0 4px; }
.airport-head .meta { margin: 0; }

/* --- Places --- */
.places { list-style: none; margin: 0 0 64px; padding: 0; }
.place {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px;
    padding: 40px 0; border-bottom: 1px solid var(--rule);
}
.place.no-photo { grid-template-columns: minmax(0, 1fr); }
.place-text { max-width: 62ch; }
.place-location { margin: 0 0 8px; }
.place-location span { display: block; }
.place h2 { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 0 0 14px; }
.place-description { margin: 0 0 20px; color: #2a2a2a; }
.place-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.crew { margin: 0; font-size: 0.9rem; color: var(--muted); }
.crew a { color: var(--link); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.crew a:hover { color: var(--ink); }

.place-photo { margin: 0; }
.place-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.place-photo figcaption { font-size: 0.68rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }

.button {
    display: inline-block; padding: 10px 18px; background: var(--ink); color: var(--paper); text-decoration: none;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; transition: background-color 0.15s;
}
.button:hover { background-color: #3a3a3a; }

/* --- Crew page --- */
.crew-list { list-style: none; margin: 0; padding: 0; }
.crew-row {
    display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px;
    padding: 32px 0; border-bottom: 1px solid var(--rule);
}
.crew-who h2 { font-size: 1.35rem; margin: 0 0 6px; line-height: 1.25; }
.crew-who h2 a { text-decoration: none; border-bottom: 2px solid var(--link); }
.crew-who h2 a:hover { color: var(--link); }
.crew-who p { margin: 0; }
.crew-picks { list-style: none; margin: 0; padding: 0; }
.crew-picks li { display: flex; gap: 16px; align-items: baseline; padding: 6px 0; }
.crew-pick-code { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; width: 40px; flex-shrink: 0; color: var(--muted); }
.crew-picks a { text-decoration: none; }
.crew-picks a:hover { text-decoration: underline; }

/* --- "Add a pick" call to action --- */
.cta { padding: 48px 0 64px; }
.cta h2 { font-size: 1.6rem; margin: 0 0 8px; }
.cta p { margin: 0 0 20px; max-width: 52ch; color: #333333; }

.status-msg { padding: 64px 0; }
.status-msg h2 { font-size: 1.6rem; margin: 0 0 8px; }
.status-msg p { color: #333333; margin: 0 0 24px; }

/* --- Prose pages (about / 404) --- */
.prose { max-width: 62ch; padding-bottom: 64px; }
.prose h2 { font-size: 1.1rem; margin: 40px 0 8px; }
.prose p { color: #2a2a2a; }

/* --- Footer (same on every page) --- */
.site-footer { border-top: 1px solid var(--ink); padding: 28px 0 36px; font-size: 0.8rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 6px; }
.site-footer p { margin: 0; max-width: 80ch; }
.credits { margin-top: 10px !important; font-size: 0.72rem; }

@media (max-width: 720px) {
    .wrap { padding: 0 16px; }
    .intro { padding: 36px 0 28px; }
    .intro h1 { font-size: 1.9rem; }
    .airport-row { grid-template-columns: 72px 1fr; padding: 16px 4px; }
    .airport-code { font-size: 1.3rem; }
    .airport-city { grid-column: 2; text-align: left; margin-top: -12px; }
    .airport-head .code { font-size: 3.2rem; }
    .place { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 0; }
    .place-photo { order: -1; }
    .place h2 { font-size: 1.35rem; }
    .site-nav { gap: 18px; flex-wrap: wrap; }
    .crew-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
