/* ==========================================================================
   Melay52 – main stylesheet
   All colours, fonts, sizes and spacing come from the design tokens below.
   See BRANDING.md for usage rules.
   ========================================================================== */

:root {
  /* Colour tokens */
  --c-forest: #2f4a3a;        /* primary: headings, buttons, links */
  --c-forest-2: #46664f;      /* secondary green: illustration, hover tints */
  --c-stone: #f4efe6;         /* page background */
  --c-stone-2: #ebe3d4;       /* borders, chips, subtle fills */
  --c-stone-3: #e9dfc9;       /* hero gradient top */
  --c-paper: #fffdf9;         /* cards, alternate sections */
  --c-white: #ffffff;
  --c-tile: #9e4724;          /* accent text: eyebrows, highlights (AA on all light backgrounds) */
  --c-tile-roof: #b5562f;     /* decorative roof red in logo/illustration only */
  --c-tile-dark: #8a3c1d;     /* text on tile tint */
  --c-tile-tint: #f3dccf;
  --c-ochre: #c9a24a;         /* accent on dark backgrounds, focus ring */
  --c-ochre-dark: #6b510f;    /* text on ochre tint */
  --c-ochre-tint: #f1e5c4;
  --c-green-tint: #dbe7dc;
  --c-ink: #1f2a24;           /* body text, footer background */
  --c-ink-2: #33433a;         /* lead text */
  --c-muted: #56635b;         /* secondary text */
  --c-footer-text: #d6ddd8;
  --c-footer-muted: #a3aea8;
  --c-footer-line: #34423a;
  --c-header-bg: rgba(244, 239, 230, .94);
  /* Illustration palette (nearby cards) */
  --c-hill-1: #cdd7c4;
  --c-hill-2: #9fb59a;
  --c-wall: #efe6d6;
  --c-wood: #7a5a3a;
  --c-slate: #7d8b80;
  --c-slate-2: #66746b;
  --c-water: #a9cbd0;
  --c-water-2: #6f9fa8;
  --c-warm: #f3dcc0;
  --c-dusk: #f1d3b0;
  --c-winter: #dfe8ea;
  --c-winter-2: #c4d3d8;

  /* Typography tokens (system fonts: no external requests, no layout shift) */
  --f-heading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-body: 17px;
  --fs-small: .9rem;
  --fs-xsmall: .78rem;
  --fs-h1: clamp(2rem, 6vw, 3rem);
  --fs-h1-hero: clamp(2.6rem, 9vw, 5.2rem);
  --fs-h2: clamp(1.6rem, 4vw, 2.2rem);
  --fs-h3: 1.2rem;
  --lh-body: 1.6;

  /* Spacing, radius, shadow */
  --s-1: 6px; --s-2: 10px; --s-3: 14px; --s-4: 18px; --s-5: 22px; --s-6: 30px; --s-7: 44px; --s-8: 64px;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 6px 20px rgba(31, 42, 36, .07);
  --header-h: 64px;
  --wrap: 1120px;
  --wrap-header: 1360px;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body { margin: 0; font-family: var(--f-body); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--c-ink); background: var(--c-stone); touch-action: manipulation; overflow-wrap: break-word; }
img, svg { max-width: 100%; display: block; }
a { color: var(--c-forest); text-underline-offset: 3px; }
a:hover { color: var(--c-tile); }
h1, h2, h3 { font-family: var(--f-heading); line-height: 1.15; margin: 0 0 .5em; color: var(--c-forest); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-ochre); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--c-white); padding: 8px 12px; }
.mt-1 { margin-top: var(--s-2); } .mt-2 { margin-top: var(--s-3); } .mt-3 { margin-top: var(--s-4); }
.mt-4 { margin-top: var(--s-5); } .mt-5 { margin-top: 36px; } .mt-6 { margin-top: var(--s-7); }

/* Header ---------------------------------------------------------------- */
header.top { position: sticky; top: 0; z-index: 50; background: var(--c-header-bg); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--c-stone-2); }
.top .wrap { max-width: var(--wrap-header); display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; height: var(--header-h); gap: 12px; }
.logo { display: flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--c-forest); min-width: 0; flex: none; }
.logo img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.logo b { font-family: var(--f-heading); font-size: 1.35rem; line-height: 1; }
.logo small { display: block; font-size: .72rem; color: var(--c-muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; white-space: nowrap; }
nav.menu { order: 2; margin-left: auto; }
nav.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
nav.menu a { display: block; padding: 8px 12px; border-radius: var(--radius-pill); text-decoration: none; color: var(--c-ink); font-weight: 600; font-size: .95rem; }
nav.menu a:hover { background: var(--c-stone-2); color: var(--c-forest); }
nav.menu a[aria-current="page"] { background: var(--c-forest); color: var(--c-white); }
.right { display: flex; align-items: center; gap: var(--s-1); order: 3; }
.langs { display: flex; background: var(--c-stone-2); border-radius: var(--radius-pill); padding: 3px; }
.langs a { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--c-muted); padding: 6px 10px; border-radius: var(--radius-pill); min-width: 38px; min-height: 32px; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.langs a[aria-current="true"] { background: var(--c-forest); color: var(--c-white); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--s-2); cursor: pointer; padding: 0; flex: none; }
.burger span { display: block; width: 22px; height: 2px; background: var(--c-forest); margin: 5px auto; transition: .25s; }
@media (min-width: 1281px) and (max-width: 1400px) { nav.menu a { padding: 8px 9px; font-size: .92rem; } }
@media (max-width: 1280px) {
  .burger { display: block; }
  nav.menu { margin: 0; position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; background: var(--c-stone); border-bottom: 1px solid var(--c-stone-2); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s; }
  nav.menu.open { transform: none; opacity: 1; visibility: visible; }
  nav.menu ul { flex-direction: column; padding: 10px 16px 16px; }
  nav.menu a { padding: 12px 14px; font-size: 1.05rem; border-radius: var(--s-2); }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 400px) { .logo small { display: none; } .langs a { padding: 6px 8px; min-width: 34px; } }

/* Language suggestion bar ------------------------------------------------ */
.lang-hint { background: var(--c-forest); color: var(--c-white); font-size: var(--fs-small); }
.lang-hint .wrap { padding-top: 8px; padding-bottom: 8px; }
.lang-hint p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lang-hint p[hidden] { display: none; }
.lang-hint a { color: var(--c-white); font-weight: 700; }
.lang-hint button { font: inherit; background: transparent; color: var(--c-white); border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--radius-pill); padding: 4px 12px; cursor: pointer; min-height: 32px; }
.lang-hint[hidden] { display: none; }

/* Hero (home) ---------------------------------------------------------- */
.hero { position: relative; background: linear-gradient(var(--c-stone-3), var(--c-stone) 55%); overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 20px; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--c-tile); margin-bottom: var(--s-2); }
.hero h1 { font-size: var(--fs-h1-hero); margin-bottom: .15em; letter-spacing: -.01em; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 36em; color: var(--c-ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-pill); font-weight: 700; text-decoration: none; background: var(--c-forest); color: var(--c-white); border: 2px solid var(--c-forest); }
.btn:hover { background: var(--c-tile); border-color: var(--c-tile); color: var(--c-white); }
.btn.alt { background: transparent; color: var(--c-forest); }
.btn.alt:hover { background: var(--c-forest); color: var(--c-white); }
.landscape { width: 100%; height: auto; aspect-ratio: 1440 / 360; margin-top: -10px; }
.figures { background: var(--c-forest); color: var(--c-white); }
.figures .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: var(--s-5); padding-bottom: 26px; }
.figures div { text-align: center; }
.figures b { display: block; font-family: var(--f-heading); font-size: clamp(1.5rem, 4.5vw, 2.2rem); color: var(--c-ochre); }
.figures span { display: block; font-size: var(--fs-small); }
@media (max-width: 560px) { .figures .wrap { grid-template-columns: repeat(2, 1fr); row-gap: var(--s-4); } }

/* Page heading band (sub pages) ---------------------------------------- */
.page-head { background: linear-gradient(var(--c-stone-3), var(--c-stone)); border-bottom: 1px solid var(--c-stone-2); }
.page-head .wrap { padding-top: 40px; padding-bottom: 28px; }
.page-head h1 { margin-bottom: .25em; }
.page-head .lead { margin: 0; }
.crumbs { font-size: var(--fs-small); color: var(--c-muted); margin-bottom: var(--s-2); }
.crumbs a { color: var(--c-muted); }

/* Sections and cards --------------------------------------------------- */
section.bloc { padding: var(--s-8) 0; }
section.bloc.tight { padding-top: 40px; }
section.bloc.alt { background: var(--c-paper); }
.intro { max-width: 44em; color: var(--c-muted); margin-bottom: 28px; }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--c-paper); border: 1px solid var(--c-stone-2); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); min-width: 0; }
.alt .card { background: var(--c-stone); }
.card h2, .card h3 { display: flex; align-items: center; gap: var(--s-2); }
.card h2 { font-size: var(--fs-h3); }
.section-title { font-size: 1.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.ic { width: 36px; height: 36px; border-radius: var(--s-2); background: var(--c-stone-2); display: grid; place-items: center; flex: none; font-size: 1.1rem; }
.alt .ic { background: var(--c-white); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--c-tile-tint); color: var(--c-tile-dark); margin-bottom: var(--s-2); }
.tag.v { background: var(--c-green-tint); color: var(--c-forest); }
.tag.o { background: var(--c-ochre-tint); color: var(--c-ochre-dark); }
ul.list { padding-left: 1.1em; margin: 0 0 1em; }
ul.list li { margin-bottom: .35em; }
dl.info { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s-3); margin: 0; }
dl.info dt { font-weight: 700; color: var(--c-muted); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
.tel { white-space: nowrap; font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-5); }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
table.hours { width: 100%; border-collapse: collapse; }
table.hours td { padding: 9px 0; border-bottom: 1px solid var(--c-stone-2); vertical-align: top; }
table.hours td:last-child { text-align: right; }
.note { font-size: var(--fs-small); color: var(--c-muted); }

/* Home tiles ----------------------------------------------------------- */
.tiles { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tile { display: flex; gap: var(--s-3); align-items: flex-start; text-decoration: none; color: var(--c-ink); background: var(--c-paper); border: 1px solid var(--c-stone-2); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--c-forest-2); color: var(--c-ink); }
.tile b { display: block; font-family: var(--f-heading); color: var(--c-forest); font-size: 1.12rem; margin-bottom: 2px; }
.tile span.t { font-size: var(--fs-small); color: var(--c-muted); }
.more { display: inline-block; margin-top: var(--s-4); font-weight: 700; }

/* Accordions ----------------------------------------------------------- */
details { background: var(--c-paper); border: 1px solid var(--c-stone-2); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
details summary { cursor: pointer; list-style: none; padding: var(--s-4) var(--s-5); font-weight: 700; font-size: 1.08rem; display: flex; align-items: center; gap: 12px; color: var(--c-forest); }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; line-height: 1; color: var(--c-tile); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details .content { padding: 0 var(--s-5) 20px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 4px 24px; }
.cols p { margin-bottom: .8em; }

/* Emergency numbers ---------------------------------------------------- */
.emergency { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.emergency a { display: block; text-decoration: none; background: var(--c-white); border: 1px solid var(--c-stone-2); border-radius: 12px; padding: 12px var(--s-3); color: var(--c-ink); }
.emergency b { display: block; font-family: var(--f-heading); font-size: 1.6rem; color: var(--c-tile); line-height: 1.1; }
.emergency span { font-size: .88rem; color: var(--c-muted); }

/* Nearby places -------------------------------------------------------- */
.group { font-family: var(--f-body); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-tile); margin: var(--s-6) 0 12px; }
.nearby .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.place { position: relative; }
.place h3 { display: block; }
.km { display: inline-block; margin-bottom: var(--s-1); font-size: var(--fs-xsmall); font-weight: 700; background: var(--c-forest); color: var(--c-white); padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }

/* History timeline ----------------------------------------------------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-ochre); border: 3px solid var(--c-paper); box-shadow: 0 0 0 2px var(--c-ochre); }
.timeline li::after { content: ""; position: absolute; left: 14px; top: 24px; bottom: 0; width: 2px; background: var(--c-stone-2); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; color: var(--c-tile); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.history { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .history { grid-template-columns: 1fr; gap: 24px; } }

/* Prose (legal page) --------------------------------------------------- */
.prose { max-width: 46em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }

/* Footer --------------------------------------------------------------- */
footer { background: var(--c-ink); color: var(--c-footer-text); padding: 48px 0 28px; font-size: .95rem; }
footer a { color: var(--c-white); }
footer a:hover { color: var(--c-ochre); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-6); }
footer h2 { color: var(--c-white); font-size: 1.05rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 6px; }
footer .muted { color: var(--c-footer-muted); }
.bottom { border-top: 1px solid var(--c-footer-line); margin-top: var(--s-6); padding-top: var(--s-4); grid-column: 1 / -1; font-size: .85rem; color: var(--c-footer-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.bottom a { color: var(--c-footer-muted); }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }
footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }

/* Illustrations (nearby cards) ------------------------------------------ */
.ill { display: block; width: calc(100% + 2 * var(--s-5)); max-width: none; height: auto; aspect-ratio: 320 / 140; margin: calc(-1 * var(--s-5)) calc(-1 * var(--s-5)) var(--s-3); border-radius: var(--radius) var(--radius) 0 0; }
.ill .sky { fill: var(--c-stone-3); } .ill .warm { fill: var(--c-warm); } .ill .dusk { fill: var(--c-dusk); } .ill .winter { fill: var(--c-winter); }
.ill .h1 { fill: var(--c-hill-1); } .ill .h2 { fill: var(--c-hill-2); } .ill .h3 { fill: var(--c-forest-2); }
.ill .dk { fill: var(--c-forest); } .ill .dk2 { fill: var(--c-slate-2); } .ill .rf { fill: var(--c-tile-roof); }
.ill .wl { fill: var(--c-wall); } .ill .pp { fill: var(--c-paper); } .ill .wd { fill: var(--c-wood); } .ill .sl { fill: var(--c-slate); }
.ill .wa { fill: var(--c-water); } .ill .wa2 { fill: var(--c-water-2); } .ill .sn { fill: var(--c-white); } .ill .oc { fill: var(--c-ochre); }
.ill .paving { fill: var(--c-stone-2); } .ill .glass { fill: var(--c-water); opacity: .9; }
.ill .win rect { fill: var(--c-forest); } .ill .win2 rect { fill: var(--c-slate); } .ill .crenel rect { fill: var(--c-slate); }
.ill .vine path, .ill .steam path, .ill .antler path, .ill .mull path, .ill .pipe, .ill .willow path, .ill .handle, .ill .weave path, .ill .weave2 path,
.ill .ripple, .ill .gate path, .ill .bird path, .ill .crane, .ill .reed path, .ill .track, .ill .support path, .ill .wheel circle, .ill .wheel path,
.ill .leg, .ill .oar, .ill .piste, .ill .cable, .ill .chair path, .ill .skier { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ill .vine path { stroke: var(--c-forest-2); stroke-width: 6; stroke-dasharray: 1 10; }
.ill .steam path { stroke: var(--c-slate); stroke-width: 3; opacity: .6; }
.ill .antler path { stroke: var(--c-wood); stroke-width: 3; }
.ill .mull path { stroke: var(--c-wall); stroke-width: 2; }
.ill .pipe { stroke: var(--c-slate-2); stroke-width: 4; }
.ill .willow path { stroke: var(--c-forest-2); stroke-width: 3; }
.ill .handle { stroke: var(--c-wood); stroke-width: 7; }
.ill .weave path { stroke: var(--c-wall); stroke-width: 3; opacity: .7; }
.ill .weave2 path { stroke: var(--c-forest); stroke-width: 2; opacity: .3; }
.ill .ripple { stroke: var(--c-water-2); stroke-width: 2; }
.ill .gate path { stroke: var(--c-ochre); stroke-width: 3; }
.ill .bird path { stroke: var(--c-forest); stroke-width: 2; }
.ill .crane { stroke: var(--c-slate); stroke-width: 3; }
.ill .reed path { stroke: var(--c-forest-2); stroke-width: 3; }
.ill .track { stroke: var(--c-tile-roof); stroke-width: 5; }
.ill .support path { stroke: var(--c-slate); stroke-width: 2; }
.ill .wheel circle, .ill .wheel path { stroke: var(--c-slate); stroke-width: 3; }
.ill .leg { stroke: var(--c-slate-2); stroke-width: 4; }
.ill .oar { stroke: var(--c-wood); stroke-width: 3; }
.ill .piste { stroke: var(--c-winter-2); stroke-width: 12; }
.ill .cable { stroke: var(--c-forest); stroke-width: 1.5; }
.ill .chair path { stroke: var(--c-forest); stroke-width: 2; }
.ill .skier { stroke: var(--c-forest); stroke-width: 3; }
.ill .paper-bg { fill: var(--c-paper); }
.ill .awning path { fill: var(--c-white); }
.ill .jar rect { fill: var(--c-water); opacity: .85; }
.ill .shutter rect { fill: var(--c-forest-2); }
.ill .log circle { fill: var(--c-wood); stroke: var(--c-wall); stroke-width: 2; }
.ill .jet, .ill .bread, .ill .plank path, .ill .axe, .ill .chair2 path, .ill .sign, .ill .bp path, .ill .bp rect { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ill .jet { stroke: var(--c-water-2); stroke-width: 3; }
.ill .bread { stroke: var(--c-ochre); stroke-width: 7; }
.ill .plank path { stroke: var(--c-slate-2); stroke-width: 2; opacity: .4; }
.ill .axe { stroke: var(--c-wood); stroke-width: 3; }
.ill .chair2 path { stroke: var(--c-wood); stroke-width: 3; }
.ill .sign { stroke: var(--c-ochre); stroke-width: 3; stroke-dasharray: 10 6; }
.ill .bp path, .ill .bp rect { stroke: var(--c-water-2); stroke-width: 2; }
