/* Iberia Clever Turism — azulejo & sun
   azulejo blue #1D4E9E, terracotta #D2603A, sun yellow #F5B82E, whitewash #FBF7EE
   Tile-pattern bands, postcards with stamp corners, wave dividers, bottom dock. */

*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }

:root {
  --azul: #1D4E9E;
  --azul-deep: #143A78;
  --terra: #D2603A;
  --terra-deep: #A4411E;
  --sol: #F5B82E;
  --cal: #FBF7EE;
  --paper: #FFFFFF;
  --ink: #1A2745;
  --line: #DDD3BD;
  --dock-space: 132px;
  --serif: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Hind", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-bottom: var(--dock-space) }
body {
  margin: 0;
  background: var(--cal);
  color: var(--ink);
  font: 400 1.0938rem/1.65 var(--sans);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .55em; color: var(--azul); overflow-wrap: anywhere }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.5rem) }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem) }
h3 { font-size: 1.4rem }
p { margin: 0 0 1.05em }
a { color: var(--azul); text-underline-offset: .2em }
a:hover { color: var(--terra-deep) }
svg { max-width: 100% }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 3px }
.skip { position: absolute; top: -6rem; left: .75rem; z-index: 99; padding: .6rem 1rem; background: var(--azul); color: #fff; border-radius: 0 0 6px 6px }
.skip:focus { top: 0; color: #fff }
.shell { width: min(100% - 2rem, 1080px); margin-inline: auto }

/* ---------- azulejo tile band ---------- */
.tileband {
  height: 52px;
  border-block: 4px solid var(--azul);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 50% 50%, var(--sol) 0 5px, transparent 5.6px),
    radial-gradient(circle at 50% 50%, transparent 0 9px, var(--azul) 9.6px 12px, transparent 12.6px),
    radial-gradient(circle at 0 0, var(--azul) 0 11px, transparent 11.6px),
    radial-gradient(circle at 100% 0, var(--azul) 0 11px, transparent 11.6px),
    radial-gradient(circle at 0 100%, var(--azul) 0 11px, transparent 11.6px),
    radial-gradient(circle at 100% 100%, var(--azul) 0 11px, transparent 11.6px),
    linear-gradient(45deg, transparent 47%, rgba(29, 78, 158, .4) 47% 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(29, 78, 158, .4) 47% 53%, transparent 53%);
  background-size: 44px 44px;
  background-position: center top;
}
.tileband.thin { height: 30px; background-size: 22px 22px; border-block-width: 3px;
  background-image:
    radial-gradient(circle at 50% 50%, var(--sol) 0 3px, transparent 3.5px),
    radial-gradient(circle at 0 0, var(--azul) 0 6px, transparent 6.5px),
    radial-gradient(circle at 100% 0, var(--azul) 0 6px, transparent 6.5px),
    radial-gradient(circle at 0 100%, var(--azul) 0 6px, transparent 6.5px),
    radial-gradient(circle at 100% 100%, var(--azul) 0 6px, transparent 6.5px);
}

/* ---------- crest (brand, no top navigation) ---------- */
.crest { text-align: center; padding: 1.4rem 1rem .4rem }
.crest-link { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font: 400 clamp(1.35rem, 4.4vw, 1.9rem)/1.1 var(--serif); color: var(--azul); letter-spacing: .04em }
.crest-link svg { width: 38px; height: 38px; flex: none }
.crest-tag { margin: .35rem 0 0; font-size: .82rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--terra-deep) }

/* ---------- postcards ---------- */
.postcard { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 3px 0 #E9DFC9, 0 22px 34px -22px rgba(20, 58, 120, .55) }
.stamp { position: absolute; top: 14px; right: 14px; width: 64px; height: 80px; padding: 5px; background: radial-gradient(circle, transparent 0 2.6px, #fff 3px) -4px -4px / 8px 8px; filter: drop-shadow(0 1px 1.5px rgba(26, 39, 69, .4)); transform: rotate(4deg) }
.stamp svg { display: block; width: 100%; height: 100% }
.postmark { position: absolute; top: 22px; right: 62px; width: 92px; height: 70px; opacity: .45; pointer-events: none }
.kicker { margin: 0 0 .9rem; font-size: .82rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--terra-deep) }
.lead { font-size: clamp(1.1rem, 2vw, 1.25rem); line-height: 1.6 }

.btns { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0 }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .7rem 1.5rem .6rem; border-radius: 4px; border: 2px solid var(--azul); background: var(--azul); color: #fff; font: 600 1rem/1.2 var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s }
.btn:hover { color: #fff; background: var(--azul-deep); transform: translateY(-2px); box-shadow: 0 6px 0 var(--sol) }
.btn-sun { background: var(--sol); border-color: var(--ink); color: var(--ink) }
.btn-sun:hover { background: #FFCB52; color: var(--ink); box-shadow: 0 6px 0 var(--terra) }
.btn-line { background: transparent; color: var(--azul) }
.btn-line:hover { background: var(--azul); color: #fff }

/* hero / title postcard */
.hero { padding: 1.6rem 0 3rem }
.card-front { display: grid }
.card-front > * { min-width: 0 }
.card-view { background: var(--sol); border-radius: 4px 4px 0 0; overflow: hidden; min-height: 190px }
.card-view svg { display: block; width: 100%; height: 100%; min-height: 190px }
.card-back { padding: 5.6rem 1.3rem 1.8rem }
@media (min-width: 860px) {
  .hero { padding: 2.2rem 0 4rem }
  .card-front { grid-template-columns: 5fr 6fr; padding: 16px }
  .card-view { border-radius: 3px; min-height: 420px }
  .card-back { padding: 2.2rem 2.4rem 2.2rem 2.6rem; margin-left: 16px; border-left: 2px dashed var(--line); display: flex; flex-direction: column; justify-content: center }
  .card-back .kicker { padding-right: 150px }
  .card-front.is-title .card-view { min-height: 300px }
}

/* ---------- waves ---------- */
.wave { display: block; width: 100%; height: 34px }
.wave path { fill: currentColor }
.to-azul { color: var(--azul); background: var(--cal) }
.to-cal { color: var(--cal); background: var(--azul) }
.to-sand { color: #F4EAD3; background: var(--cal) }
.from-sand { color: var(--cal); background: #F4EAD3 }

/* ---------- home: three postcards ---------- */
.trio { padding: 1rem 0 4rem }
.trio-head { max-width: 40rem; margin-bottom: 2rem }
.trio-grid { display: grid; gap: 2rem }
.trio-grid > * { min-width: 0 }
.mini { display: flex; flex-direction: column; padding: 12px 12px 1.4rem; transition: transform .25s }
.mini:hover { transform: translateY(-6px) rotate(0deg) }
.mini-view { height: 150px; border-radius: 3px; overflow: hidden; margin-bottom: 1.2rem }
.mini-view svg { display: block; width: 100%; height: 100% }
.mini h3 { padding: 0 .5rem; font-size: 1.6rem; margin-bottom: .4rem }
.mini h3 a { text-decoration: none }
.mini h3 a::after { content: ""; position: absolute; inset: 0 }
.mini p { padding: 0 .5rem; margin-bottom: .9rem }
.mini-go { margin: auto .5rem 0; padding-top: .7rem; border-top: 2px dotted var(--terra); font-weight: 600; color: var(--terra-deep) }
.mini .stamp { top: 20px; right: 20px; width: 48px; height: 56px }
@media (min-width: 820px) {
  .trio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; padding: 0 .4rem }
  .mini:nth-child(1) { transform: rotate(-1.2deg) }
  .mini:nth-child(2) { transform: translateY(1.6rem) rotate(.8deg) }
  .mini:nth-child(3) { transform: rotate(-.6deg) }
  .mini:nth-child(n):hover { transform: translateY(-6px) rotate(0deg) }
  .trio { padding-bottom: 5.5rem }
}

/* ---------- home: region explorer ---------- */
.explorer { background: var(--azul); color: #fff; padding: 2.6rem 0 3.4rem }
.explorer h2 { color: var(--sol) }
.explorer-intro { max-width: 40rem; margin-bottom: 1.8rem }
.explorer-grid { display: grid; gap: 1.6rem }
.explorer-grid > * { min-width: 0 }
@media (min-width: 880px) { .explorer-grid { grid-template-columns: 1.1fr .9fr; gap: 2.2rem; align-items: start } }
.mapbox { background: #CFE0F5; border: 6px solid var(--paper); border-radius: 6px; box-shadow: 0 0 0 2px var(--sol); padding: .4rem }
.map { display: block; width: 100%; height: auto }
.map .sea { stroke: #9DBBE3; stroke-width: 1.5; fill: none }
.region { cursor: pointer; outline: none }
.region polygon, .region ellipse { fill: var(--cal); stroke: var(--azul); stroke-width: 2; stroke-linejoin: round; transition: fill .15s }
.region.pt polygon { fill: #FCE9B8 }
.region text { font: 600 13px var(--sans); fill: var(--azul); text-anchor: middle; pointer-events: none }
.region:hover polygon, .region:hover ellipse { fill: #F2B79F }
.region:focus-visible polygon, .region:focus-visible ellipse { stroke: var(--terra-deep); stroke-width: 4 }
.region[aria-pressed="true"] polygon, .region[aria-pressed="true"] ellipse { fill: var(--terra) }
.region[aria-pressed="true"] text { fill: #fff }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; list-style: none }
.chip { min-height: 44px; padding: .45rem .8rem .35rem; border: 2px solid rgba(255, 255, 255, .7); border-radius: 999px; background: transparent; color: #fff; font: 500 .95rem/1.2 var(--sans); cursor: pointer }
.chip:hover { background: rgba(255, 255, 255, .16) }
.chip[aria-pressed="true"] { background: var(--sol); border-color: var(--sol); color: var(--ink); font-weight: 600 }
.explorer :focus-visible { outline-color: var(--sol) }
.region-card { color: var(--ink); padding: 1.6rem 1.3rem 1.4rem }
.region-card .kicker { padding-right: 76px }
.region-card h3 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); padding-right: 76px; min-height: 2.3em }
.region-card ul { list-style: none; margin: 0; padding: 0 }
.region-card li { padding: .7rem 0 .6rem 1.6rem; border-top: 1px solid var(--line); position: relative; line-height: 1.5 }
.region-card li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 10px; height: 10px; background: var(--azul); transform: rotate(45deg) }
.region-note { margin: 1rem 0 0; font-size: .98rem; color: #4A5673 }

/* ---------- route (how an enquiry goes) ---------- */
.route { padding: 3rem 0 3.6rem }
.route.sand { background: #F4EAD3 }
.route-list { list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: stop; display: grid; gap: 0 }
.route-list li { counter-increment: stop; position: relative; min-width: 0; padding: 0 0 1.8rem 3.6rem; border-left: 3px dotted var(--terra); margin-left: 1.2rem }
.route-list li:last-child { border-left-color: transparent; padding-bottom: 0 }
.route-list li::before { content: counter(stop); position: absolute; left: -1.3rem; top: -.2rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--terra); color: #fff; font: 400 1.2rem/1 var(--serif) }
.route-list li::after { content: counter(stop); position: absolute; left: -1.3rem; top: -.2rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; color: #fff; font: 400 1.25rem/1 var(--serif) }
.route-list li::before { color: transparent }
.route-list h3 { margin-bottom: .25rem }
.route-list p { margin: 0 }
@media (min-width: 900px) {
  .route-list.across { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0 }
  .route-list.across li { margin: 1.2rem 0 0; padding: 2.4rem 1.4rem 0 0; border-left: 0; border-top: 3px dotted var(--terra) }
  .route-list.across li:last-child { border-top-color: var(--terra); padding-bottom: 0 }
  .route-list.across li::before, .route-list.across li::after { left: 0; top: -1.5rem }
}
.route-cta { margin-top: 2rem }

/* ---------- inner pages: letter ---------- */
.letter { padding: .5rem 0 3.5rem }
.letter-grid { display: grid; gap: 2.4rem }
.letter-grid > * { min-width: 0 }
.letter-body > p:first-of-type::first-letter { float: left; font: 400 3.9rem/.82 var(--serif); color: var(--terra); padding: .32rem .5rem 0 0 }
.factcard { padding: 1.6rem 1.3rem 1.3rem; align-self: start }
.factcard h2 { font-size: 1.5rem; padding-right: 72px; min-height: 3.6rem }
.ruled { list-style: none; margin: 0; padding: 0 }
.ruled li { padding: .7rem 0 .6rem; border-bottom: 1px solid #C9BFA8; line-height: 1.5 }
.ruled li:first-child { border-top: 1px solid #C9BFA8 }
@media (min-width: 900px) { .letter-grid { grid-template-columns: 1.35fr .65fr; gap: 3.2rem } .factcard { transform: rotate(1.2deg); margin-top: .6rem } }

.pairs { padding: 3rem 0 3.4rem }
.pairs-grid { display: grid; gap: 2rem }
.pairs-grid > * { min-width: 0 }
.addr { padding: 1.7rem 1.4rem 1.5rem }
.addr h2 { font-size: 1.6rem; padding-right: 70px; min-height: 3.6rem }
.addr.blue { background: var(--azul); border-color: var(--azul-deep); color: #fff }
.addr.blue h2 { color: var(--sol) }
.addr.blue .ruled li { border-color: rgba(255, 255, 255, .4) }
@media (min-width: 820px) { .pairs-grid { grid-template-columns: 1fr 1fr; gap: 2.4rem } .pairs-grid .addr:first-child { transform: rotate(-.7deg) } .pairs-grid .addr:last-child { transform: rotate(.6deg) translateY(1rem) } }

.send { padding: 1rem 0 3.5rem; text-align: center }
.send h2 { max-width: 18em; margin-inline: auto }
.send p { max-width: 36em; margin-inline: auto }
.send .btns { justify-content: center }
.send-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.6rem; margin: 1.8rem 0 0; padding: 0; font-weight: 600 }

/* ---------- contact ---------- */
.reach { padding: .5rem 0 3.5rem }
.reach-grid { display: grid; gap: 2.2rem }
.reach-grid > * { min-width: 0 }
@media (min-width: 900px) { .reach-grid { grid-template-columns: .8fr 1.2fr; gap: 2.6rem; align-items: start } }
.to { padding: 1.7rem 1.4rem 1.5rem }
.to h2 { font-size: 1.6rem; padding-right: 72px; min-height: 3.6rem }
.to-list { margin: 0 }
.to-list > div { padding: .7rem 0 .6rem; border-bottom: 1px solid #C9BFA8 }
.to-list dt { font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--terra-deep) }
.to-list dd { margin: .1rem 0 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; overflow-wrap: anywhere }
.to-note { margin: 1.2rem 0 0; font-size: 1rem }
.write { padding: 1.7rem 1.3rem 1.8rem }
@media (min-width: 720px) { .write { padding: 2.2rem 2.2rem 2.4rem } }
.line { margin-bottom: 1.15rem }
.line label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--azul) }
.line input, .line select, .line textarea { display: block; width: 100%; max-width: 100%; padding: .75rem .9rem; border: 2px solid var(--azul); border-radius: 4px; background: var(--cal); color: var(--ink); font: 400 1.05rem/1.4 var(--sans) }
.line textarea { min-height: 9.5rem; resize: vertical; background-image: repeating-linear-gradient(transparent 0 1.75rem, #E3D9C3 1.75rem calc(1.75rem + 1px)); line-height: 1.75rem }
.line input:focus, .line select:focus, .line textarea:focus { outline: 3px solid var(--sol); outline-offset: 1px }
.line .bad { border-color: var(--terra-deep); background-color: #FDF0EA }
.oops { margin: .35rem 0 0; color: var(--terra-deep); font-weight: 600 }
.write-note { margin: 1.1rem 0 0; padding: .8rem 1rem; background: #FCE9B8; border-left: 5px solid var(--sol); font-size: 1rem; line-height: 1.5 }
.write-mail { margin: 1rem 0 0; overflow-wrap: anywhere }

/* ---------- footer ---------- */
.foot { background: var(--azul); color: #fff; padding-bottom: var(--dock-space) }
.foot a { color: #fff }
.foot a:hover { color: var(--sol) }
.foot :focus-visible { outline-color: var(--sol) }
.foot-grid { display: grid; gap: 2rem; padding: 2.6rem 0 1.6rem }
.foot-grid > * { min-width: 0 }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.1fr .7fr 1.3fr; gap: 2.6rem } }
.foot-name { font: 400 1.7rem/1.15 var(--serif); margin: 0 0 .6rem; color: var(--sol) }
.foot h2 { font: 600 .82rem/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--sol); margin-bottom: .8rem }
.foot ul { list-style: none; margin: 0; padding: 0 }
.foot li { margin-bottom: .4rem }
.foot-co { margin: 0 }
.foot-co > div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .5rem; padding: .28rem 0 }
.foot-co dt { font-weight: 600; color: #D4E1F5 }
.foot-co dd { margin: 0; overflow-wrap: anywhere }
.foot-end { margin: 0; padding: 1rem 0 1.4rem; border-top: 1px solid rgba(255, 255, 255, .3); font-size: .95rem; overflow-wrap: anywhere }

/* ---------- bottom dock ---------- */
.dock { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); width: min(100% - 16px, 660px); z-index: 70 }
.dock-bar { background: var(--cal); border: 2px solid var(--azul); border-radius: 16px 0 16px 16px; box-shadow: 0 12px 28px -8px rgba(20, 40, 90, .6); padding: 5px }
.dock-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; list-style: none; margin: 0; padding: 0 }
.dock-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 1px 4px; border-radius: 11px; text-decoration: none; color: var(--azul); font-size: .7rem; font-weight: 600; line-height: 1.1; white-space: nowrap; text-align: center }
.dock-links svg { width: 24px; height: 24px; flex: none }
.dock-links a:hover { background: #FCE9B8; color: var(--azul-deep) }
.dock-links a[aria-current="page"] { background: var(--azul); color: #fff }
.dock-hint { display: none; font-weight: 400; font-size: .95rem; white-space: normal; text-align: left }
.dock-toggle { position: absolute; right: 0; bottom: 100%; margin-bottom: -2px; height: 44px; min-width: 52px; padding: .15rem .8rem 0; display: inline-flex; align-items: center; gap: .4rem; border: 2px solid var(--azul); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--sol); color: var(--ink); font: 600 .85rem/1 var(--sans); letter-spacing: .06em; cursor: pointer }
.dock-toggle:hover { background: #FFCB52 }
.dock-toggle::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(-45deg); margin-top: 4px }
.dock-toggle[aria-expanded="true"]::after { transform: rotate(135deg); margin-top: -4px }
.dock.is-open .dock-links { grid-template-columns: minmax(0, 1fr) }
.dock.is-open .dock-links a { flex-direction: row; justify-content: flex-start; gap: .8rem; min-height: 54px; padding: 6px 12px; font-size: 1.05rem; white-space: normal; text-align: left }
.dock.is-open .dock-links a > span:first-of-type { min-width: 6.2rem }
.dock.is-open .dock-hint { display: block }
@media (min-width: 620px) {
  .dock-links a { flex-direction: row; gap: .5rem; font-size: .95rem; min-height: 50px }
  .dock-links svg { width: 22px; height: 22px }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .btn, .mini { transition: none }
}

/* ---------- inner pages: route beside its heading ---------- */
.route-split { display: grid; gap: 1.2rem }
.route-split > * { min-width: 0 }
@media (min-width: 900px) { .route-split { grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start } .route-split .route-list { margin-top: .6rem } }

/* route list on the blue band */
.explorer .route-list h3 { color: var(--sol) }
.explorer .route-list li { border-left-color: var(--sol) }
.explorer .route-list li:last-child { border-left-color: transparent }
.explorer .route-list li::before { background: var(--sol) }
.explorer .route-list li::after { color: var(--ink) }
