/* Spain Food & Wine — "la carta": set like a printed menu and wine list.
   Hairline rules instead of cards, square corners, a Spanish serif (Ibarra Real Nova,
   after Joaquín Ibarra's 1780 Quixote type) for display, Libre Franklin for the UI. */
:root {
  --wine: #7A1F2B; --wine-dk: #5A1520; --ink: #221C18; --paper: #F5F0E6; --paper-2: #EDE6D8;
  --olive: #4F5B3A; --olive-bg: #E8EDDF;
  --body: #3E3731; --muted: #6E655B; --rule: #CFC4B2; --rule-2: #B8AC98;
  --serif: 'Ibarra Real Nova', 'Iowan Old Style', Georgia, serif;
  --sans: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; font-feature-settings: 'kern'; }
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea { font: inherit; }
a { color: var(--wine); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--wine-dk); }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }

/* the page: one column, ruled at the sides on wider screens like a menu card */
.frame { max-width: 520px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }
@media (min-width: 560px) { .frame { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); } }

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--ink); min-height: 60px; }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: 0.01em; color: var(--ink); text-decoration: none; order: 1; }
.brand { align-self: center; line-height: 0; }
.brand img { height: 50px; width: auto; }
.tr { order: 2; margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav { font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule-2); padding: 2px 0; }
.nav:hover { color: var(--wine); border-color: var(--wine); }
.back { background: none; border: none; padding: 6px 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.back:hover { color: var(--ink); }
.dots { padding: 10px 24px 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.dots b { color: var(--wine); font-weight: 600; }

main { flex: 1; padding: 22px 24px 36px; display: flex; flex-direction: column; }
.step { display: flex; flex-direction: column; gap: 12px; flex: 1; animation: in .3s ease; }
@keyframes in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .step { animation: none; } }

h1 { margin: 0; font-family: var(--serif); font-size: 48px; line-height: 0.98; font-weight: 400; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--wine); }
h2 { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1.08; font-weight: 400; }
h3 { margin: 10px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.lede { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.35; color: var(--body); }
.sub { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.small { margin: 0; font-size: 13px; color: var(--muted); }

/* photographs: square corners, a caption underneath like a magazine */
figure { margin: 0; }
figcaption { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }
.banner, .hero { width: 100%; object-fit: cover; }
.hero { height: 340px; }

/* buttons: rectangular, printed */
.primary { height: 54px; border-radius: 2px; border: none; background: var(--wine); color: var(--paper); font-size: 16px; font-weight: 600; letter-spacing: 0.02em; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.primary::after { content: '→'; font-weight: 400; font-size: 20px; }
.primary:hover { background: var(--wine-dk); }
.ghost { height: 50px; border-radius: 2px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; }
.ghost:hover { background: var(--paper-2); color: var(--ink); }

/* list choices: rows divided by rules, not floating cards */
.opt, .bud, .fl { text-align: left; border: none; border-bottom: 1px solid var(--rule); background: transparent; border-radius: 0; position: relative; }
.opt { padding: 14px 0; display: flex; align-items: center; gap: 18px; }
.list { display: flex; flex-direction: column; }
.list > :first-child { border-top: 1px solid var(--ink); }
.opt img { width: 104px; height: 78px; object-fit: cover; flex: none; }
.opt.tall img { width: 96px; height: 96px; }
.opt .t { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.opt .s, .bud .s, .fl .s { font-size: 14px; line-height: 1.4; color: var(--muted); }
.opt:hover .t, .bud:hover .t, .fl:hover .t { color: var(--wine); }
.opt.on, .bud.on, .fl.on { box-shadow: inset 3px 0 0 var(--wine); padding-left: 14px; }
.opt.on .t, .bud.on .t, .fl.on .t { color: var(--wine); }
.col { display: flex; flex-direction: column; gap: 4px; }

/* wine importance: one ruled strip, like a tally */
.nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 14px; border: 1px solid var(--ink); }
.num { height: 58px; border: none; border-left: 1px solid var(--ink); border-radius: 0; background: transparent; font-family: var(--serif); font-size: 26px; }
.num:first-child { border-left: none; }
.num:hover { background: var(--paper-2); }
.num.on { background: var(--wine); color: var(--paper); }
.scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.tip { margin-top: 10px; padding: 14px 0 0; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--body); }

/* travelers + budget, set like a wine list with dotted leaders */
.people { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 14px; border-bottom: 1px solid var(--ink); margin-top: 6px; }
.people .lab { font-family: var(--serif); font-size: 22px; }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--ink); }
.stepper button { width: 44px; height: 44px; border: none; border-radius: 0; background: transparent; font-size: 20px; line-height: 1; padding: 0; }
.stepper button:hover { background: var(--paper-2); }
.stepper span { min-width: 44px; text-align: center; font-family: var(--serif); font-size: 24px; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); line-height: 44px; }
.bud { padding: 14px 0; display: block; width: 100%; }
.bud .line { display: flex; align-items: baseline; gap: 8px; }
.bud .t { font-family: var(--serif); font-size: 23px; }
.bud .lead { flex: 1; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-5px); }
.bud .r { font-family: var(--serif); font-size: 19px; white-space: nowrap; font-variant-numeric: oldstyle-nums; }
.bud .s { display: block; margin-top: 2px; }

/* months: a ruled table */
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.chip { height: 54px; border: none; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; font-family: var(--serif); font-size: 20px; }
.chip:hover { background: var(--paper-2); }
.chip.on { background: var(--wine); color: var(--paper); }
.dashed { height: 50px; border: none; background: transparent; color: var(--body); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); align-self: flex-start; padding: 0; }
.dashed:hover { color: var(--wine); }

/* regions */
.reg { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.reg img { width: 60px; height: 60px; object-fit: cover; flex: none; }
.reg.x img { opacity: 0.3; filter: grayscale(1); }
.reg.x .n { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule-2); }
.reg .info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.reg .n { font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.reg .d { font-size: 13px; color: var(--muted); }
.ib { width: 42px; height: 42px; border-radius: 0; border: 1px solid var(--rule-2); background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--muted); }
.ib:hover { border-color: var(--ink); color: var(--ink); }
.ib.heart.on { background: var(--wine); border-color: var(--wine); color: var(--paper); }
.ib.heart.on svg { fill: var(--paper); }
.ib.skip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* airport */
label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field { height: 50px; border: none; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 0 2px; font-family: var(--serif); font-size: 22px; background: transparent; color: var(--ink); width: 100%; }
.field::placeholder { color: #A89D8E; font-style: italic; }
.field:focus { outline: none; border-bottom: 2px solid var(--wine); }
.fl { padding: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.fl .t { font-family: var(--serif); font-size: 21px; }

/* ---------- results: one printed page ---------- */
.res { gap: 20px; }
.rhead { display: flex; flex-direction: column; gap: 14px; }
.rhead img { width: 100%; height: 220px; object-fit: cover; }
.rtitle { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kicker b { color: var(--wine); font-weight: 600; }
.label { display: block; margin-top: 4px; font-family: var(--serif); font-size: 42px; line-height: 1; }
.summary { display: block; margin-top: 8px; font-size: 14px; color: var(--body); }
.score { flex: none; text-align: right; }
.score b { display: block; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 0.85; color: var(--wine); font-variant-numeric: lining-nums; }
.score small { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.stops { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.stops li { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 20px; }
.stops li i { font-size: 16px; color: var(--wine); width: 18px; }
.stops li span { margin-left: auto; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.flight { margin: 0; font-size: 14px; line-height: 1.5; color: var(--body); }

.card { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 0; border-top: 1px solid var(--ink); }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine); font-weight: 600; }
.leader { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--body); }
.leader .dot { flex: 1; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-4px); }
.leader .v { font-family: var(--serif); font-size: 20px; color: var(--ink); min-width: 24px; text-align: right; }
.note { font-size: 13px; color: var(--muted); line-height: 1.45; }

.books { margin: 0; padding: 0; list-style: none; }
.book { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.book .i { flex: none; width: 22px; font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--wine); font-variant-numeric: oldstyle-nums; }
.book .t { font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.book .w { font-size: 13px; color: var(--muted); }

.alts h3 { margin: 6px 0 4px; }
.alt { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border: none; border-bottom: 1px solid var(--rule); background: transparent; text-align: left; width: 100%; }
.alt:first-of-type { border-top: 1px solid var(--rule); }
.alt .tg { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); width: 66px; flex: none; }
.alt .n { font-family: var(--serif); font-size: 19px; }
.alt .dot { flex: 1; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-4px); }
.alt .sc { font-family: var(--serif); font-size: 22px; color: var(--wine); }
.alt:hover .n { color: var(--wine); }

.tier { font-size: 15px; line-height: 1.5; color: var(--body); }
.tier strong { font-weight: 600; color: var(--ink); }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 6px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 3px double var(--ink); }
.total .amt { font-family: var(--serif); font-size: 26px; color: var(--ink); white-space: nowrap; }
.how { padding: 16px 18px; border: 1px solid var(--rule-2); background: var(--paper-2); font-size: 15px; line-height: 1.5; color: var(--body); }
.how strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 18px; color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 2px; font-size: 14px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 24px 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--ink); }
.foot a { color: inherit; }

/* ---------- photographs edge to edge, and the "From the road" strip ---------- */
figure.bleed { margin-left: -24px; margin-right: -24px; }
figure.bleed figcaption { padding: 0 24px; }
.step > figure.bleed:first-child { margin-top: -22px; }
.hero { height: min(58vh, 440px); }
.road { margin: 22px -24px 0; padding-top: 16px; border-top: 1px solid var(--ink); }
.road-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 24px 10px; }
.road-head h3 { margin: 0; font-style: italic; }
.road-nav { display: flex; }
.road-nav button { width: 38px; height: 34px; border: 1px solid var(--ink); background: transparent; border-radius: 0; font-size: 16px; padding: 0; }
.road-nav button + button { border-left: none; }
.road-nav button:hover { background: var(--ink); color: var(--paper); }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 24px 6px; scroll-padding: 0 24px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; width: 58%; scroll-snap-align: start; }
.strip img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s ease; }
.strip figure { overflow: hidden; }
.strip figure:hover img { transform: scale(1.04); }
.strip figcaption { font-style: normal; font-family: var(--sans); font-size: 12px; color: var(--muted); }
.strip figcaption span { display: block; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }
.opt img, .reg img { transition: filter .3s ease; }
.opt:hover img, .reg:hover img { filter: saturate(1.15) contrast(1.05); }

/* ---------- wide screens: Karl's landscapes behind the page ---------- */
.scene { display: none; }
@media (min-width: 900px) {
  body { background: #1E1915; }
  .scene { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; }
  .layer { position: absolute; inset: -2%; background-size: cover; background-position: center; opacity: 0; transform: scale(1); transition: opacity 1.4s ease, transform 40s linear; }
  .layer.on { opacity: 1; transform: scale(1.07); }
  .credit { position: absolute; right: 28px; bottom: 24px; margin: 0; padding: 6px 12px; background: var(--paper); color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 15px; }
  .credit:empty { display: none; }
  .frame { position: relative; z-index: 1; background: var(--paper); margin-left: max(6vw, 40px); border: none; }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) { .layer, .layer.on { transform: none; transition: opacity .2s; } }

/* ---------- the regions: a drawn map and the guides ---------- */
.map { display: block; width: 100%; height: auto; background: var(--paper); }
.map .sea text { font-family: var(--serif); font-style: italic; font-size: 15px; fill: #8A7F72; letter-spacing: 0.04em; }
.map .land text { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.32em; text-transform: uppercase; fill: #9A8F80; }
.map .sm { font-family: var(--serif); font-style: italic; font-size: 14px; fill: var(--body); paint-order: stroke; stroke: #EDE6D8; stroke-width: 3px; stroke-linejoin: round; }
.map .dot { fill: var(--ink); }
.map .compass text { font-family: var(--serif); font-size: 15px; fill: var(--ink); }
.map .pin { cursor: pointer; text-decoration: none; }
.map .pin circle { fill: var(--paper); stroke: var(--wine); stroke-width: 1.4; transition: fill .2s ease; }
.map .pin .pn { font-family: var(--serif); font-size: 14px; fill: var(--wine); }
.map .pin .pl { font-family: var(--serif); font-size: 23px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; transition: fill .2s ease; }
.map .pin:hover circle, .map .pin.hi circle, .map .pin.on circle, .map .pin:focus-visible circle { fill: var(--wine); }
.map .pin:hover .pn, .map .pin.hi .pn, .map .pin.on .pn, .map .pin:focus-visible .pn { fill: var(--paper); }
.map .pin:hover .pl, .map .pin.hi .pl, .map .pin.on .pl { fill: var(--wine); }
.map .pin:focus { outline: none; }
.mapfig { margin: 6px -24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 10px; background: var(--paper); }
.mapfig.small { margin: 10px 0 4px; padding: 0; border: none; }
.mapfig.small figcaption { margin-top: 8px; }
.mapfig.small .pin:not(.on) .pl { font-size: 19px; }

.rlist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.rlist a { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.rlist .i, .recs .i { flex: none; width: 20px; font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--wine); font-variant-numeric: oldstyle-nums; }
.rlist img { width: 64px; height: 64px; object-fit: cover; flex: none; transition: filter .3s ease; }
.rlist .col { flex: 1; }
.rlist .t { font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.rlist .s { font-size: 13px; color: var(--muted); }
.rlist .go { font-size: 18px; color: var(--muted); }
.rlist a:hover .t, .rlist a.hi .t { color: var(--wine); }
.rlist a:hover .go, .rlist a.hi .go { color: var(--wine); }
.rlist a:hover img, .rlist a.hi img { filter: saturate(1.15) contrast(1.05); }
a.primary { text-decoration: none; }
a.primary:hover { color: var(--paper); }

.region h1 { font-size: 44px; }
.region .kicker b { font-weight: 600; }
.body { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.55; color: var(--body); }
.sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 28px; }
.recs { margin: 0; padding: 0; list-style: none; }
.recs li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.recs .col { flex: 1; min-width: 0; }
.recs .line { display: flex; align-items: baseline; gap: 8px; }
.recs .t { font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.recs .lead { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-5px); }
.recs .w { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); text-align: right; }
.recs .s { font-size: 14px; line-height: 1.45; color: var(--body); }
.menu { margin: 0; }
.menu div { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.menu div:first-child { border-top: 1px solid var(--rule); }
.menu dt { font-family: var(--serif); font-size: 20px; }
.menu dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.region .road { margin-top: 18px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-top: 6px; }
.pager a { padding: 12px 0; font-family: var(--serif); font-size: 19px; color: var(--ink); text-decoration: none; }
.pager a + a { text-align: right; border-left: 1px solid var(--rule); }
.pager small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pager a:hover { color: var(--wine); }

/* the home page: the map as a way in */
.regions-teaser { margin: 26px -24px 0; padding-top: 16px; border-top: 1px solid var(--ink); }
.regions-teaser .road-head a { font-size: 14px; }
.regions-teaser .mapwrap { padding: 0 14px; min-height: 120px; }
.regions-teaser p { margin: 10px 24px 0; }
.hero.lo { height: min(40vh, 280px); }   /* the older 480px photos: keep them small until Karl's originals arrive */
@media (max-width: 520px) {
  .map .pin .pl, .mapfig.small .pin:not(.on) .pl { font-size: 30px; stroke-width: 5px; }
  .map .pin circle { r: 15px; }
  .map .pin .pn { font-size: 18px; transform: translateY(1.5px); }
  .map .sm { font-size: 19px; }
}
