/* ravintola-varikko — teema fork-grid (S5 card catalog)
   Paletti johdettu uudelleen nimestä "Varikko": halli- ja vaunuvihreä,
   rautaharmaa ja lämmin messinkipaperi Askolan maaseudun sävyihin.
     valkoinen  #FFFFFF
     paperi     #F5F2EA   (lämmin kaura)
     rauta      #22262A   (teksti/ink)
     rauta-dim  #5A6167   (toissijainen teksti)
     vihreä     #2F7150   (täytöt, chipit, viivat)
     vihreä-ink #235840   (AA-turvallinen tekstivihreä)
     vihreä-soft#E2ECE5
     messinki   #F3E8CF
     hiusviiva  #E3DFD6

   AA-kontrastit (WCAG relative luminance, laskettu):
     rauta / valkoinen ................. 15.23:1
     rauta / paperi .................... 13.62:1
     rauta / vihreä-soft ............... 12.59:1
     rauta / messinki .................. 12.52:1
     rauta-dim / paperi ................  5.62:1
     rauta-dim / valkoinen .............  6.29:1
     vihreä-ink / valkoinen ............  8.26:1
     vihreä-ink / paperi ...............  7.39:1
     vihreä-ink / vihreä-soft ..........  6.83:1
     valkoinen / vihreä (chip) .........  5.84:1
     valkoinen / rauta (footer) ....... 15.23:1
     vaalea vihreä #C9D6CD / rauta .... 10.14:1
   Kylläinen --green on tekstinä vain valkoisen päällä (chip, painike);
   leipätekstissä käytetään aina --green-ink. */

@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/young-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("assets/fonts/nunito-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --white: #FFFFFF;
  --paper: #F5F2EA;
  --char: #22262A;
  --muted: #5A6167;
  --green: #2F7150;
  --green-ink: #235840;
  --green-soft: #E2ECE5;
  --brass: #F3E8CF;
  --line: #E3DFD6;
  --footer-dim: #C9D6CD;
  --display: "Young Serif", Georgia, serif;
  --body: "Nunito", "Segoe UI", sans-serif;
  --shell: 74rem;
  --gutter: 1.25rem;
  --r: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--char);
  background: var(--white);
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 3px; border-radius: 3px; }
.sprite { display: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- LUONNOS-banneri ---- */
.draft-banner {
  display: block;
  background: var(--char);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
}
.draft-banner b { color: #A9DCC0; font-weight: 800; }
.draft-banner:hover { background: #171B1E; }

/* ---- hero: kompakti käyttöpalkki ---- */
.hero { border-bottom: 1px solid var(--line); }
.hero-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  align-items: center; justify-content: space-between;
  padding-block: 1rem;
}
.wordmark { font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.01em; }
.wordmark span { display: block; font-family: var(--body); font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-ink); line-height: 1.4; }
.hero-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.hero-nav a {
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
  color: var(--green-ink); padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.hero-nav a:hover { border-bottom-color: var(--green); }

.hero-body { padding-block: 1.5rem 2rem; }
.kicker {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-ink); margin-bottom: 0.9rem;
}
.hero-body h1 { font-size: clamp(2rem, 8.2vw, 3.6rem); letter-spacing: -0.015em; }
.lede { margin-top: 1rem; max-width: 48ch; color: var(--muted); font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }

.btn {
  display: inline-block; text-decoration: none;
  background: var(--green-ink); color: var(--white);
  font-weight: 800; font-size: 0.95rem;
  padding: 0.7rem 1.3rem; border-radius: 999px;
  transition: background 0.2s ease;
}
.btn:hover { background: #1B4632; }
.btn--ghost {
  background: var(--white); color: var(--green-ink);
  box-shadow: inset 0 0 0 2px var(--green-ink);
}
.btn--ghost:hover { background: var(--green-soft); }

.strip {
  display: grid; gap: 0.35rem;
  border-top: 1px solid var(--line);
  padding-block: 0.9rem;
  font-size: 0.85rem; color: var(--muted);
}
.strip b { color: var(--char); font-weight: 800; }
.strip a { font-weight: 800; color: var(--green-ink); text-decoration: none;
  border-bottom: 2px solid var(--green-soft); }
.strip a:hover { border-bottom-color: var(--green); }

/* ---- lohkot ---- */
.block { padding-block: 2.75rem; }
.block + .block { border-top: 1px solid var(--line); }
.block-head { max-width: 54ch; margin-bottom: 1.5rem; }
.label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-ink);
  border-bottom: 3px solid var(--green);
  padding-bottom: 0.2rem; margin-bottom: 0.7rem;
}
.block-head h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: -0.01em; }
.block-lede { margin-top: 0.8rem; color: var(--muted); }

/* ---- esimerkki-/varoituslaatikko ---- */
.esimerkki {
  border: 2px dashed var(--green);
  border-radius: var(--r);
  background: var(--green-soft);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--char);
  max-width: 62ch;
}
.esimerkki strong { font-weight: 800; color: var(--green-ink); }

/* ---- korttiruudukko ---- */
.grid { display: grid; gap: 1rem; }
.tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.tile:hover { box-shadow: 0 10px 24px rgba(34, 38, 42, 0.09); transform: translateY(-2px); }
.tile-img { position: relative; background: var(--paper); }
.tile-img svg { width: 100%; height: auto; }
.tile-img svg {
  --tint: var(--paper);
  --f1: var(--green);
  --f2: var(--green-soft);
  --f3: var(--green-ink);
  --f4: var(--brass);
}
.chip {
  position: absolute; right: 0.6rem; bottom: 0.6rem;
  background: var(--green-ink); color: var(--white);
  font-size: 0.8rem; font-weight: 800;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  white-space: nowrap;
}
.chip--placeholder { background: var(--char); }
.tile-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.tile-body h3 { font-size: 1.1rem; }
.tile-body p { font-size: 0.9rem; color: var(--muted); }
.day {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-ink);
}
.tile--flat .tile-body p { font-size: 0.85rem; }

/* ---- tarjouspyyntötaulukko (skeletonin hinnastopaikka) ---- */
.hinnasto { width: 100%; border-collapse: collapse; max-width: 44rem; }
.hinnasto th, .hinnasto td {
  text-align: left; padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line); font-size: 0.95rem;
}
.hinnasto th { font-weight: 600; }
.hinnasto td { text-align: right; font-weight: 800; color: var(--green-ink); }
.note { margin-top: 0.9rem; font-size: 0.8rem; color: var(--muted); max-width: 60ch; }

/* ---- kuvituskuvagalleria ---- */
.kuvat { display: grid; gap: 0.8rem; grid-template-columns: 1fr; }
.kuvat figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
/* height:auto is required — the img `height` attribute is a presentational
   hint and would otherwise beat `aspect-ratio`. */
.kuvat img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.kuvat figcaption { padding: 0.5rem 0.7rem 0.7rem; font-size: 0.78rem; color: var(--muted); }

.photo-note {
  margin-top: 1.25rem;
  border-left: 4px solid var(--green);
  background: var(--brass);
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  max-width: 62ch;
  border-radius: 0 var(--r) var(--r) 0;
}
.photo-note strong { font-weight: 800; }

/* ---- tarina ---- */
.block--tarina { background: var(--paper); }
.tarina-grid { display: grid; gap: 1rem; }
.tarina-grid p { color: var(--muted); max-width: 42ch; }

/* ---- yhteys ---- */
.yhteys-grid { display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }
.yhteys-grid > div { border-top: 2px solid var(--green); padding-top: 0.6rem; }
.yhteys-grid dt {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-ink);
}
.yhteys-grid dd { font-size: 0.95rem; }
.yhteys-grid dd a { font-weight: 800; color: var(--green-ink); text-decoration: none;
  border-bottom: 2px solid var(--green-soft); }
.yhteys-grid dd a:hover { border-bottom-color: var(--green); }
.yhteys-grid .hint { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---- footer ---- */
.footer {
  background: var(--char); color: var(--white);
  padding: 2.25rem 0 1rem;
  text-align: center;
}
.footer .small { font-size: 0.85rem; color: var(--footer-dim); margin-top: 0.4rem; }
.footer .small b { color: #A9DCC0; }
.footer a { color: inherit; }

/* ---- suuremmat näytöt ---- */
@media (min-width: 560px) {
  .grid--palvelut, .grid--menu { grid-template-columns: repeat(2, 1fr); }
  .grid--kokous { grid-template-columns: repeat(2, 1fr); }
  .strip { grid-template-columns: repeat(3, auto); gap: 1.5rem; justify-content: start; }
  .yhteys-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .kuvat { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  :root { --gutter: 2rem; }
  .block { padding-block: 4rem; }
  .grid { gap: 1.25rem; }
  .grid--palvelut { grid-template-columns: repeat(3, 1fr); }
  .grid--menu { grid-template-columns: repeat(3, 1fr); }
  .grid--kokous { grid-template-columns: repeat(4, 1fr); }
  .tile--wide { grid-column: span 2; }
  .tile--wide .tile-img svg { aspect-ratio: 16 / 7; height: auto; }
  .tile--wide .tile-body h3 { font-size: 1.35rem; }
  .yhteys-grid { grid-template-columns: repeat(4, 1fr); }
  .tarina-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .hero-body { padding-block: 2.5rem 3rem; }
  .block-head { margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transform: none !important;
  }
}

/* Tekoälyilmoitus (EU AI Act 50 art.) — ks. webpages/kit/ai-disclosure/.
   Teemaneutraali: perii värin ja fontin alatunnisteesta. */
.ai-note {
  margin: 1.5rem auto 0;
  max-width: 62ch;
  padding: 0 1rem 2rem;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--footer-dim);
}

.ai-note strong {
  font-weight: 600;
  color: var(--white);
}
