:root {
  color-scheme: light;
  --cream: #f7f1e5;
  --paper: #fffaf1;
  --sand: #e8ddc6;
  --terracotta: #b96240;
  --red: #9d3529;
  --deep-red: #78261e;
  --blue: #245c73;
  --ink: #302d27;
  --muted: #625b50;
  --line: #c9bca7;
  --footer: #342f29;
  --font-body: Arial, Helvetica, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --radius: 12px;
  --shadow: 0 12px 32px rgb(48 45 39 / 10%);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 7vw, 6rem);
  --content-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  scroll-padding-bottom: 15rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

:where(main, section, article, aside, div, nav, form, figure, span) {
  min-width: 0;
}

:where(h1, h2, h3, p, figure) {
  margin: 0;
}

:where(h1, h2, h3, p, a, label, address, td, th, code, output) {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.75rem);
  line-height: 1.04;
}

h2 {
  font-size: clamp(2rem, 3.7vw, 3.25rem);
  line-height: 1.12;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.2;
}

em {
  color: var(--red);
  font-weight: inherit;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transition: color 180ms ease;
}

a:hover {
  color: var(--deep-red);
}

button,
input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
  font: inherit;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

::selection {
  background: var(--red);
  color: var(--paper);
}

svg,
img {
  display: block;
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

address {
  font-style: normal;
}

.shell {
  width: min(var(--content-width), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section {
  margin-block: var(--section-space);
}

.eyebrow {
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.small-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.skip-link {
  position: fixed;
  inset: 0.75rem auto auto 1rem;
  z-index: 100;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation */
.site-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 68px;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  color: var(--red);
  font-size: clamp(0.72rem, 2.7vw, 0.95rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand svg {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
}

.brand-caption {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.header-cta {
  display: none !important;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
}

.menu-toggle[aria-expanded="true"] {
  border-color: var(--red);
  background: var(--red);
  color: var(--paper);
}

.main-nav {
  position: absolute;
  inset: 100% 0 auto;
  display: none;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  padding: 1rem var(--gutter) 1.5rem;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.main-nav.is-open {
  display: flex;
}

.main-nav a {
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.75rem;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--red);
  text-decoration: underline;
}

/* Shared controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 48px;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--red);
  border-radius: 6px;
  background: var(--red);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.button:hover {
  border-color: var(--deep-red);
  background: var(--deep-red);
  color: var(--paper);
  box-shadow: 0 4px 12px rgb(48 45 39 / 12%);
}

.button:active {
  transform: translateY(1px);
}

.button-small {
  min-height: 42px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}

.button-outline {
  background: transparent;
  color: var(--red);
}

.button-outline:hover {
  background: var(--sand);
  color: var(--deep-red);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.text-link {
  display: inline-block;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-button,
.footer-preferences {
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.text-button:hover {
  color: var(--deep-red);
}

/* Homepage */
.hero {
  display: grid;
  align-items: center;
  gap: 2.75rem;
  padding-block: var(--section-space);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-copy .small-note {
  max-width: 58ch;
}

.framed-art {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 0 7px 7px 0;
}

.framed-art::before {
  position: absolute;
  z-index: -1;
  inset: 7px 0 0 7px;
  border-radius: var(--radius);
  background: var(--blue);
  content: "";
}

.framed-art > svg {
  width: 100%;
  border-radius: var(--radius);
}

.hero-art {
  width: 100%;
  max-width: 580px;
  justify-self: center;
}

.hero-art > .madrid-vintage-art-illustration {
  border-radius: var(--radius) var(--radius) 0 0;
}

.art-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--blue);
  color: var(--paper);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.intro-band {
  padding-block: clamp(2rem, 4vw, 3rem);
  border-block: 1px solid var(--line);
  background: var(--sand);
}

.intro-inner {
  display: grid;
  align-items: center;
  gap: 1.75rem;
}

.intro-inner > p {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.intro-inner h2 {
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.intro-inner div p {
  max-width: 61ch;
  color: var(--muted);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-top: 0.75rem;
}

.section-heading > p {
  color: var(--muted);
  font-size: 0.88rem;
}

.collection {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(86%, 360px);
  align-items: stretch;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding: 0.5rem 0.25rem 1.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--sand);
}

.collection::-webkit-scrollbar {
  height: 7px;
}

.collection::-webkit-scrollbar-track {
  background: var(--sand);
}

.collection::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--red);
}

.frame-card {
  position: relative;
  isolation: isolate;
  padding: 0 7px 7px 0;
  scroll-snap-align: start;
}

.frame-card::before {
  position: absolute;
  z-index: -1;
  inset: 7px 0 0 7px;
  border-radius: var(--radius);
  background: var(--terracotta);
  content: "";
}

.card-surface {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card-art {
  flex-shrink: 0;
  width: 100%;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.15rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
}

.card-body .eyebrow {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.card-body h3 {
  font-size: 1.7rem;
}

.card-body p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-body .text-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0.5rem;
}

.route-section {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}

.route-section h2 {
  margin-block: 0.85rem 1.5rem;
}

.route-section p:not(.eyebrow) {
  color: var(--muted);
}

.route-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.route-button {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.5;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.route-button:hover {
  border-color: var(--blue);
}

.route-button[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--paper);
}

.route-detail {
  padding-block: 1.25rem;
  font-size: 0.9rem;
}

/* Editorial and legal pages */
.article-heading {
  padding-block: var(--section-space);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.article-heading h1 {
  max-width: 22ch;
  margin-block: 1rem 1.5rem;
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.article-tools .is-saved,
.article-tools [aria-pressed="true"] {
  color: var(--blue);
}

.article-heading > .small-note:not(:empty) {
  margin-top: 0.75rem;
}

.article-layout {
  display: grid;
  align-items: start;
  gap: 3rem;
  padding-block: var(--section-space);
}

.article-aside nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 1rem;
}

.article-aside nav a {
  padding-block: 0.25rem;
  font-size: 0.88rem;
  text-decoration: none;
}

.article-aside nav a:hover {
  text-decoration: underline;
}

.aside-note {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-left: 3px solid var(--terracotta);
  background: var(--sand);
  font-size: 0.85rem;
}

.aside-note p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.article-copy {
  width: 100%;
  max-width: 760px;
}

.article-copy > section + section,
.legal-copy section + section {
  margin-top: clamp(2.75rem, 5vw, 4rem);
}

.article-copy section h2,
.legal-copy h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.article-copy section h3 {
  margin-block: 1.75rem 1rem;
  font-size: 1.4rem;
}

.article-copy p,
.legal-copy p {
  line-height: 1.85;
}

.article-copy p + p,
.legal-copy p + p {
  margin-top: 1.1rem;
}

.article-copy :where(ul, ol),
.legal-copy :where(ul, ol) {
  padding-left: 1.5rem;
}

.article-copy li + li,
.legal-copy li + li {
  margin-top: 0.65rem;
}

.next-guide {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 3px solid var(--red);
  background: var(--sand);
}

.next-guide h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.next-guide p:not(.eyebrow) {
  color: var(--muted);
}

.legal-page,
.contact-page {
  padding-block: var(--section-space);
}

.legal-heading {
  margin-bottom: var(--section-space);
}

.legal-heading h1 {
  margin-block: 1rem 1.5rem;
}

.legal-heading .small-note {
  margin-top: 1.5rem;
}

.legal-copy {
  max-width: 850px;
}

.legal-copy section > .button {
  margin-top: 1.5rem;
}

.table-scroll {
  width: 100%;
  margin-top: 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.65;
  text-align: left;
}

caption {
  padding: 1rem;
  color: var(--muted);
  text-align: left;
}

th,
td {
  padding: 1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--sand);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: rgb(232 221 198 / 24%);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85em;
  white-space: normal;
}

/* Budget tools */
.price-tag {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 3px;
  background: var(--red);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-3deg);
}

.price-tag-blue {
  background: var(--blue);
  transform: rotate(2deg);
}

.budget-section {
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.budget-section .eyebrow {
  margin-bottom: 1rem;
}

.budget-form {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.budget-result {
  display: block;
  padding: 1.5rem;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: var(--sand);
  color: var(--ink);
}

/* Contact and form elements */
.contact-layout {
  display: grid;
  align-items: start;
  gap: 3.5rem;
}

.contact-surface {
  gap: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.contact-surface h2 {
  font-size: 2rem;
}

.contact-surface > p {
  color: var(--muted);
  font-size: 0.93rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field > label {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.form-field label span {
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.9rem;
  border: 1px solid #8b8070;
  border-radius: 4px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0.2rem 0 0;
  padding: 0;
  accent-color: var(--red);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.is-invalid,
[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.field-error {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 600;
}

.form-status {
  padding: 1rem;
  border-left: 3px solid var(--blue);
  background: var(--sand);
  color: var(--blue);
  font-size: 0.9rem;
}

.form-status:empty,
[data-save-status]:empty,
[data-cookie-message]:empty {
  display: none;
}

.contact-details section + section,
.contact-map {
  margin-top: 3rem;
}

.contact-details h2 {
  margin-block: 1rem 1.25rem;
  font-size: 1.85rem;
}

.contact-details p + p,
.contact-details address + p {
  margin-top: 1.25rem;
}

.contact-map > .madrid-neighbourhood-static-map {
  border-radius: var(--radius) var(--radius) 0 0;
}

.contact-map figcaption {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-map figcaption a {
  display: inline-block;
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem;
  background: var(--footer);
  color: var(--cream);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

.site-footer a {
  color: var(--cream);
}

.site-footer a:hover,
.footer-preferences:hover {
  color: #f1cda4;
}

.site-footer :focus-visible {
  outline-color: #f2dba9;
}

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
  text-decoration: none;
}

.footer-grid h2 {
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-grid p {
  margin-block: 1rem;
  font-size: 0.9rem;
}

.footer-grid > div > a:not(.footer-brand) {
  display: block;
  width: fit-content;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.site-footer .small-note {
  max-width: 58ch;
  color: #d6cbbb;
  font-size: 0.75rem;
}

.footer-preferences {
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 400;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #6d6255;
  color: #d6cbbb;
  font-size: 0.73rem;
}

/* Privacy banner and native dialog */
.cookie-banner {
  position: fixed;
  z-index: 50;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: max(0.75rem, env(safe-area-inset-left));
  display: grid;
  align-items: center;
  gap: 1rem 1.5rem;
  max-height: 65vh;
  max-height: 65dvh;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 40px rgb(48 45 39 / 22%);
}

.cookie-banner strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.cookie-banner p {
  max-width: 78ch;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.65;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.cookie-actions .button {
  flex: 1 1 145px;
  min-height: 44px;
}

.cookie-actions .text-button {
  font-size: 0.8rem;
}

.cookie-banner > .small-note {
  grid-column: 1 / -1;
  margin: 0;
}

.preferences-dialog {
  position: fixed;
  width: min(560px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 70px rgb(0 0 0 / 25%);
}

.preferences-dialog::backdrop {
  background: rgb(32 29 25 / 65%);
}

.preferences-dialog h2 {
  font-size: 2rem;
}

.preferences-dialog > * + * {
  margin-top: 1.5rem;
}

.preferences-dialog .button-row {
  gap: 0.75rem;
}

.js-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive enhancements */
@media (min-width: 480px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .header-cta {
    display: inline-flex !important;
    padding-inline: 0.75rem;
    font-size: 0.72rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .budget-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-form > .button,
  .budget-result {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: clamp(1rem, 2.5vw, 2.5rem);
    min-height: 78px;
  }

  .brand {
    font-size: 0.85rem;
  }

  .brand svg {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .brand-caption {
    font-size: 0.55rem;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav,
  .main-nav.is-open {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .main-nav a {
    padding-block: 0.65rem;
    border: 0;
    font-family: var(--font-body);
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .header-cta {
    justify-self: end;
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
  }

  .hero-copy h1 {
    max-width: 10ch;
  }

  .hero-art {
    transform: rotate(1deg);
  }

  .hero-art.js-reveal {
    transform: translateY(14px) rotate(1deg);
  }

  .hero-art.js-reveal.is-visible {
    transform: rotate(1deg);
  }

  .intro-inner {
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
  }

  .section-heading {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .section-heading > p {
    flex-shrink: 0;
  }

  .route-section {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .route-detail {
    min-height: 8.5em;
  }

  .article-layout {
    grid-template-columns: minmax(170px, 0.7fr) minmax(0, 2.3fr);
    gap: clamp(2.5rem, 5vw, 4rem);
  }

  .article-aside nav {
    flex-direction: column;
    gap: 0.65rem;
  }

  .aside-note {
    margin-top: 2rem;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }

  .cookie-banner {
    right: 1.5rem;
    bottom: 1rem;
    left: 1.5rem;
  }

  .cookie-actions .button {
    flex: 0 1 auto;
  }
}

@media (min-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .brand {
    font-size: 0.98rem;
  }

  .header-cta {
    padding-inline: 1.1rem;
    font-size: 0.8rem;
  }

  .article-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .article-aside {
    position: sticky;
    top: 2rem;
  }

  .cookie-banner {
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 1360px;
    margin-inline: auto;
  }

  .route-detail {
    min-height: 7em;
  }
}

@media (hover: hover) and (pointer: fine) {
  .collection .frame-card:hover .card-surface,
  .collection .frame-card:focus-within .card-surface {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 359px) {
  .brand {
    gap: 0.35rem;
    font-size: 0.68rem;
  }

  .brand svg {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
  }

  .brand-caption {
    font-size: 0.46rem;
  }

  .menu-toggle {
    padding-inline: 0.45rem;
    font-size: 0.72rem;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .collection {
    grid-auto-columns: 94%;
  }

  .cookie-actions .button {
    flex-basis: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js-reveal,
  .js-reveal.is-visible,
  .hero-art.js-reveal,
  .hero-art.js-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .collection {
    scroll-snap-type: none;
  }
}

@media (forced-colors: active) {
  .button,
  .route-button,
  .menu-toggle,
  .card-surface,
  .budget-result,
  .aside-note {
    border: 1px solid ButtonText;
  }

  .route-button[aria-pressed="true"],
  .menu-toggle[aria-expanded="true"] {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }

  .framed-art::before,
  .frame-card::before {
    display: none;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  .shell {
    width: 100%;
    max-width: none;
  }

  .site-header,
  .skip-link,
  .article-aside,
  .article-tools,
  [data-save-status],
  .site-footer,
  .cookie-banner,
  .preferences-dialog,
  .route-controls,
  .contact-form,
  .budget-form,
  .next-guide .button {
    display: none !important;
  }

  .hero,
  .intro-inner,
  .route-section,
  .article-layout,
  .contact-layout {
    display: block;
  }

  .article-heading,
  .legal-page,
  .contact-page,
  .article-layout {
    padding-block: 1rem;
  }

  .article-copy,
  .legal-copy {
    max-width: none;
  }

  h1 {
    font-size: 34pt;
  }

  h2 {
    font-size: 23pt;
  }

  h3 {
    font-size: 17pt;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  a {
    color: inherit;
  }

  .js-reveal,
  .hero-art.js-reveal,
  .hero-art.js-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .collection {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .frame-card,
  .framed-art,
  figure,
  tr {
    break-inside: avoid;
  }

  .card-surface,
  .cookie-banner,
  .preferences-dialog {
    box-shadow: none;
  }

  .hero-art {
    max-width: 380px;
    margin: 2rem auto;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    min-width: 0;
    font-size: 9pt;
  }

  .article-copy > section + section,
  .legal-copy section + section {
    margin-top: 2rem;
  }
}