/* Isla — air.islaperttula.com
   Gulf haze, cockpit-display numerals, fare tables. See docs/design-tokens.md §1. */

@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("/fonts/b612-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("/fonts/b612-mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #F6F8F8;
  --haze: #DCE5E7;
  --ink: #16252C;
  --slate: #52666D;
  --gulf: #2B5856;
  --sodium: #DB9A2E;

  --rule: color-mix(in srgb, var(--gulf) 28%, transparent);
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --data: "B612 Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --margin: clamp(20px, 5vw, 72px);
  --measure: 1240px;
  --t: 120ms;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--ui); }
img { max-width: 100%; display: block; }
a { color: var(--gulf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-weight: 400; margin: 0; }
h1 { font: 300 clamp(38px, 5.5vw, 68px)/1.04 var(--display); letter-spacing: -0.01em; }
h2 { font: 400 clamp(26px, 3vw, 34px)/1.15 var(--display); }
h3 { font: 600 17px/1.3 var(--ui); font-stretch: 87.5%; }
p { margin: 0 0 1em; max-width: 64ch; }
.place { font-family: var(--display); font-style: italic; }
.data, code, kbd, .mono { font-family: var(--data); font-variant-numeric: tabular-nums; }
.muted { color: var(--slate); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus: sodium outline with an ink inner ring so it reads on any ground. */
:focus-visible { outline: 3px solid var(--sodium); outline-offset: 2px; box-shadow: 0 0 0 1px var(--ink); border-radius: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--margin); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header: every page hangs from the horizon line. */
.masthead { border-bottom: 1px solid var(--gulf); }
.masthead .wrap { display: flex; align-items: baseline; gap: 40px; min-height: 72px; padding-top: 18px; }
.wordmark { font: 400 34px/1 var(--display); color: var(--gulf); text-decoration: none; letter-spacing: -0.02em; }
.nav { display: flex; gap: 28px; flex: 1; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--rule); }
.nav a[aria-current="page"] { border-color: var(--gulf); }
.nav .signin { margin-left: auto; color: var(--slate); }
.menu-toggle { display: none; }

/* The one bold place: the horizon. */
.horizon { position: relative; min-height: min(78vh, 760px); background: var(--haze) center / cover no-repeat; color: var(--ink); display: grid; grid-template-rows: 62% 38%; }
.horizon picture, .horizon picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.horizon .sky { position: relative; align-self: end; padding-bottom: 64px; }
.horizon h1 { max-width: 13ch; }
.horizon .sea { position: relative; }
.search-form { position: relative; display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(0, 2.7fr) minmax(0, 2.2fr) minmax(0, 2.2fr) minmax(0, 1.7fr) minmax(0, 1.4fr); gap: 0; background: var(--paper); border: 1px solid var(--gulf); transform: translateY(-50%); }
.search-form .field { display: flex; flex-direction: column; padding: 10px 14px 12px; border-right: 1px solid var(--haze); min-width: 0; }
.search-form label, .field-label { font: 600 13px/1.2 var(--ui); font-stretch: 87.5%; color: var(--slate); margin-bottom: 4px; }
.search-form input, .search-form select { font: 400 16px/1.3 var(--data); border: 0; background: transparent; color: var(--ink); padding: 2px 0; width: 100%; min-width: 0; }
.search-form select { font: 500 18px/1.3 var(--ui); }
.search-form input::placeholder { color: var(--slate); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--ui); font-stretch: 87.5%; background: var(--gulf); color: #fff; border: 1px solid var(--gulf); border-radius: 2px; padding: 14px 22px; cursor: pointer; text-decoration: none; transition: background var(--t); }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn.quiet { background: transparent; color: var(--gulf); }
.btn.quiet:hover { background: var(--haze); color: var(--ink); }
.btn[disabled] { background: var(--haze); border-color: var(--haze); color: var(--slate); cursor: not-allowed; }
.search-form .go .btn { width: 100%; height: 100%; }
.tripkind { display: flex; gap: 20px; margin-bottom: 10px; font-size: 15px; }
.tripkind label { display: flex; gap: 6px; align-items: center; }

/* Sections: hairlines, not cards. */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--haze); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 24px; }

/* Timetable list (home, where-we-fly). */
.timetable { width: 100%; border-collapse: collapse; }
.timetable th { text-align: left; font: 600 13px/1.2 var(--ui); font-stretch: 87.5%; color: var(--slate); padding: 0 12px 10px 0; border-bottom: 1px solid var(--gulf); }
.timetable td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--haze); vertical-align: baseline; }
.timetable td.num, .timetable th.num { text-align: right; }
.timetable .dest { font: 400 24px/1.2 var(--display); }
.timetable .dest a { color: var(--ink); text-decoration: none; }
.timetable .dest a:hover { text-decoration: underline; }
.timetable .data { font-size: 15px; }

/* Fare table (search results). */
.results-head { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; padding: 32px 0 20px; }
.results-head .route { font: 300 40px/1.1 var(--display); }
.datebar { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--haze); margin-bottom: 28px; }
.datebar a { display: block; padding: 10px 8px; text-align: center; text-decoration: none; color: var(--ink); border-right: 1px solid var(--haze); font-size: 14px; }
.datebar a:last-child { border-right: 0; }
.datebar a .data { display: block; font-size: 15px; color: var(--gulf); }
.datebar a[aria-current="date"] { background: var(--ink); color: #fff; }
.datebar a[aria-current="date"] .data { color: #fff; }

.fares { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fares caption { text-align: left; padding-bottom: 12px; color: var(--slate); }
.fares th[scope="col"] { font: 600 14px/1.25 var(--ui); font-stretch: 87.5%; text-align: center; padding: 10px 6px; background: var(--haze); border-left: 1px solid var(--paper); }
.fares th[scope="col"]:first-child { text-align: left; width: 36%; background: transparent; }
.fares th[scope="row"] { text-align: left; font-weight: 400; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--haze); vertical-align: top; }
.fares td { border-bottom: 1px solid var(--haze); border-left: 1px solid var(--haze); padding: 0; text-align: center; vertical-align: middle; }
.leg-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-family: var(--data); font-size: 15px; }
.leg-line .t { font-size: 17px; white-space: nowrap; }
.leg-line .track { border-top: 1px solid var(--rule); position: relative; top: -4px; min-width: 16px; }
.leg-meta { color: var(--slate); font-size: 13.5px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.leg-meta span { white-space: nowrap; }
.fare-cell { display: block; width: 100%; height: 100%; min-height: 76px; border: 0; background: transparent; font: 400 18px/1.2 var(--data); color: var(--ink); cursor: pointer; padding: 10px 4px; transition: background var(--t); }
.fare-cell:hover { background: var(--haze); }
.fare-cell small { display: block; font: 400 12px/1.3 var(--ui); color: var(--slate); margin-top: 4px; }
.fare-cell[aria-pressed="true"] { background: var(--paper); box-shadow: inset 0 0 0 3px var(--sodium); font-weight: 700; }
.fare-cell.none { cursor: default; color: var(--slate); font: 400 14px/1.2 var(--ui); }
.fare-cell.none:hover { background: transparent; }
.soldout-row th[scope="row"] { opacity: .75; }

.brand-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 32px; border-top: 1px solid var(--gulf); margin-top: 32px; padding-top: 20px; }
.brand-rules ul { padding-left: 1.1em; margin: 6px 0 0; color: var(--slate); font-size: 14.5px; }

/* Summary rail used across the booking steps. */
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; padding-bottom: 72px; }
.summary { position: sticky; top: 16px; border-top: 3px solid var(--gulf); padding-top: 16px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 12px 0; }
.summary dt { color: var(--slate); }
.summary dd { margin: 0; text-align: right; font-family: var(--data); }
.summary .total { border-top: 1px solid var(--gulf); padding-top: 10px; font-size: 20px; }
.steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 28px 0 32px; border-bottom: 1px solid var(--haze); counter-reset: s; }
.steps li { counter-increment: s; padding: 0 20px 12px 0; color: var(--slate); font-size: 15px; }
.steps li::before { content: counter(s) "  "; font-family: var(--data); }
.steps li[aria-current="step"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--sodium); }

/* Forms. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 24px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
.form-grid input, .form-grid select, .input { font: 400 17px/1.3 var(--ui); padding: 10px 12px; border: 1px solid #8a9ca2; border-radius: 2px; background: #fff; color: var(--ink); }
.form-grid .hint { font-weight: 400; color: var(--slate); font-size: 13.5px; }
fieldset { border: 0; border-top: 1px solid var(--haze); padding: 20px 0 8px; margin: 0; }
legend { font: 400 24px/1.2 var(--display); padding-right: 12px; }
.error { color: #9B2C1F; font-weight: 500; }
[aria-invalid="true"] { border-color: #9B2C1F !important; }

/* Seat map: the aircraft drawn as an object. */
.seatmap-wrap { overflow-x: auto; padding: 8px 0 24px; }
.seatmap { --seat: 34px; display: inline-block; background: #fff; border: 1px solid var(--haze); border-radius: 120px 120px 24px 24px; padding: 80px 28px 36px; min-width: min-content; }
.cabin-label { font: 400 20px/1.2 var(--display); margin: 18px 0 8px; text-align: center; }
.seat-row { display: flex; align-items: center; gap: 4px; margin: 3px 0; }
.seat-row .rownum { width: 28px; text-align: center; font: 400 12px var(--data); color: var(--slate); }
.seat-row .aisle { width: 22px; }
.seat-row.exit { position: relative; }
.seat-row.exit::before, .seat-row.exit::after { content: "EXIT"; position: absolute; top: 50%; transform: translateY(-50%); font: 700 9px var(--data); color: var(--slate); }
.seat-row.exit::before { left: -26px; }
.seat-row.exit::after { right: -26px; }
.seat { width: var(--seat); height: var(--seat); border: 1px solid var(--gulf); border-radius: 6px 6px 3px 3px; background: #fff; font: 400 11px var(--data); color: var(--gulf); cursor: pointer; padding: 0; transition: background var(--t); }
.seat.salon { width: 46px; height: 46px; }
.seat.veranda { width: 40px; height: 40px; }
.seat:hover { background: var(--haze); }
.seat[aria-disabled="true"] { background: var(--haze); border-color: var(--haze); color: transparent; cursor: not-allowed; }
.seat.blocked { background: repeating-linear-gradient(45deg, var(--haze) 0 4px, #fff 4px 8px); border-color: var(--haze); }
.seat.pref { border-width: 2px; }
.seat[aria-pressed="true"] { background: var(--sodium); border-color: var(--ink); color: var(--ink); font-weight: 700; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--slate); margin: 12px 0; }
.seat-legend .seat { width: 18px; height: 18px; cursor: default; vertical-align: middle; margin-right: 6px; }

/* Boarding pass. */
.pass { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--gulf); display: grid; grid-template-columns: 1fr 200px; }
.pass-main { padding: 24px 28px; border-right: 1px dashed var(--gulf); }
.pass-stub { padding: 24px 20px; }
.pass .wordmark { font-size: 28px; }
.pass-route { display: flex; justify-content: space-between; align-items: end; margin: 18px 0; }
.pass-route .code { font: 400 56px/1 var(--data); }
.pass-route .arc { flex: 1; margin: 0 16px 18px; border-top: 1px solid var(--gulf); }
.pass-fields { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
.pass-fields dt { font-size: 12px; color: var(--slate); font-weight: 600; font-stretch: 87.5%; }
.pass-fields dd { margin: 0; font: 400 18px/1.2 var(--data); white-space: nowrap; }
.pass-stub .pass-fields { flex-direction: column; }
.pass-barcode { margin-top: 22px; }
.pass-barcode svg { width: 100%; height: auto; max-height: 120px; }
.bcbp-raw { font: 400 11px var(--data); color: var(--slate); word-break: break-all; margin-top: 8px; }

/* Route map. */
.routemap { width: 100%; height: auto; background: #fff; border: 1px solid var(--haze); }
.routemap .land { fill: var(--haze); stroke: #fff; stroke-width: .6; }
.routemap .arc { fill: none; stroke: var(--gulf); stroke-width: 1.3; opacity: .75; }
.routemap .arc.company { stroke-dasharray: 1 4; stroke-linecap: round; opacity: .9; }
.routemap .dot { fill: var(--ink); }
.routemap .hub { fill: var(--sodium); stroke: var(--ink); stroke-width: 1; }
.routemap text { font: 400 11px var(--data); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; }

/* Plain data tables (fleet, loyalty). */
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { text-align: left; font-weight: 600; font-stretch: 87.5%; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--gulf); vertical-align: bottom; }
.data-table td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--haze); vertical-align: top; }
.data-table td.num, .data-table th.num { text-align: right; font-family: var(--data); }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--haze) 45%, transparent); }
.table-scroll { overflow-x: auto; }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.profile svg { width: 100%; height: auto; }
.figure-photo { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: var(--haze); }
.note { border-left: 3px solid var(--gulf); padding: 4px 0 4px 16px; color: var(--slate); }
.callout-num { font: 400 44px/1 var(--data); color: var(--gulf); }
.lede { font: 300 24px/1.4 var(--display); max-width: 42ch; }

/* Footer. */
.footer { border-top: 1px solid var(--gulf); margin-top: 40px; padding: 32px 0 40px; font-size: 14px; }
.footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.footer ul { list-style: none; padding: 0; margin: 8px 0 0; }
.footer li { margin: 6px 0; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.legal { color: var(--slate); font-size: 12px; margin-top: 28px; }
.legal p { max-width: none; margin: 4px 0; }

@media (max-width: 900px) {
  .masthead .wrap { flex-wrap: wrap; gap: 12px 24px; }
  .menu-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--rule); padding: 6px 12px; font: 600 15px var(--ui); color: var(--ink); border-radius: 2px; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .nav a { border-bottom: 1px solid var(--haze); padding: 12px 0; }
  .nav .signin { margin-left: 0; }
  .horizon { grid-template-rows: auto auto; min-height: 0; }
  .horizon .sky { padding: 120px 0 24px; }
  .search-form { transform: none; grid-template-columns: 1fr 1fr; margin-bottom: 32px; }
  .search-form .field { border-bottom: 1px solid var(--haze); }
  .search-form .field.wide, .search-form .go { grid-column: 1 / -1; }
  .search-form .go .btn { min-height: 52px; }
  .book-grid, .split { grid-template-columns: 1fr; }
  .summary { position: static; }
  .fares, .fares tbody, .fares tr, .fares th, .fares td { display: block; width: 100%; }
  .fares thead { display: none; }
  .fares tr { border-bottom: 1px solid var(--gulf); padding-bottom: 8px; margin-bottom: 8px; }
  .fares td { border-left: 0; display: grid; grid-template-columns: 1fr auto; text-align: left; }
  .fares td::before { content: attr(data-brand); padding: 14px 0; font-weight: 600; font-stretch: 87.5%; }
  .fare-cell { min-height: 0; text-align: right; }
  .pass { grid-template-columns: 1fr; }
  .pass-main { border-right: 0; border-bottom: 1px dashed var(--gulf); }
  .datebar { grid-template-columns: repeat(4, 1fr); }
  .datebar a:nth-child(n+5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .masthead, .footer .cols, .nav, .btn { display: none; }
  .pass { border-color: #000; }
}
