/* ==========================================================
   KAHVILA AITTA - café & bakery, Porvoo old town (multipage)
   World: the red riverside storehouses. Punamulta boards, tarred roofs,
   white door trims, the river reflecting the row. Warm window light
   means "open now" and nothing else.
   ========================================================== */
:root {
  --sky: #E6EDEF;
  --mist: #EEF2F2;
  --sky-2: #D3DFE3;
  --red: #9B2D20;
  --red-deep: #7A2116;
  --red-light: #B13A2A;
  --roof: #1C1C1C;
  --trim: #F2EADB;
  --trim-2: #E7DCC7;
  --river: #2E4A5A;
  --river-deep: #22394A;
  --river-light: #4E6E7E;
  --deck: #6E5641;
  --deck-2: #5A4532;
  --window: #F4C46A;
  --ink: #1E1B19;
  --ink-2: #55504A;

  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ring: var(--red-deep);
}

html[data-lang="fi"] body [lang="en"],
html[data-lang="en"] body [lang="fi"] { display: none !important; }

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  caret-color: var(--red); scrollbar-color: var(--red) var(--mist);
}
::selection { background: var(--red); color: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; }
svg { width: 1em; height: 1em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 40; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 3px; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.boards { background-color: var(--red); background-image: url("boards.svg"); background-size: 44px 200px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 3px;
  font-weight: 700; font-size: 1.0625rem; text-decoration: none;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn svg { width: 20px; height: 20px; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn--red { background: var(--red); color: #fff; box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 4px rgba(242, 234, 219, 0.5); }
.btn--red:hover { background: var(--red-light); }
.btn--trim { background: var(--trim); color: var(--ink); }
.btn--trim:hover { background: #fff; }
.btn--line { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--line:hover { background: rgba(30, 27, 25, 0.06); }

/* ---------- header: the row of small storehouses is the navigation ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: flex-end; gap: 24px;
  padding: 10px var(--gutter) 0; background: var(--sky); border-bottom: 3px solid var(--roof);
}
.brand { padding-bottom: 12px; text-decoration: none; margin-right: auto; font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; }
.brand small { display: block; font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.01em; color: var(--ink-2); margin-top: 4px; }
.sheds { display: flex; align-items: flex-end; gap: 6px; }
.shed-link { display: grid; justify-items: center; gap: 4px; text-decoration: none; padding: 0 4px; }
.shed-link__label { font-weight: 600; font-size: 0.875rem; color: var(--ink-2); padding-bottom: 4px; transition: color 0.3s var(--ease); }
.shed-link__house {
  position: relative; width: 50px; height: 42px;
  clip-path: polygon(0 40%, 50% 0, 100% 40%, 100% 100%, 0 100%);
  background-color: var(--red-deep); background-image: url("boards.svg"); background-size: 22px 100px;
  transition: background-color 0.3s var(--ease);
}
.shed-link__house::before { /* gable roof edge */
  content: ""; position: absolute; inset: 0; background: var(--roof);
  clip-path: polygon(0 40%, 50% 0, 100% 40%, 100% 52%, 50% 13%, 0 52%);
}
.shed-link__house::after { /* door */
  content: ""; position: absolute; left: 34%; right: 34%; bottom: 0; height: 46%;
  background: var(--red); box-shadow: inset 0 0 0 2px var(--trim), inset 1px 0 0 0 var(--trim);
}
.shed-link:hover .shed-link__house { background-color: var(--red); }
.shed-link:hover .shed-link__label { color: var(--ink); }
.shed-link[aria-current="page"] .shed-link__house { background-color: var(--red); }
.shed-link[aria-current="page"] .shed-link__house::after { background: var(--window); box-shadow: inset 0 0 0 2px var(--trim); }
.shed-link[aria-current="page"] .shed-link__label { color: var(--ink); }
.top__end { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.lang { display: inline-flex; gap: 2px; }
.lang button { border: 0; background: transparent; cursor: pointer; min-width: 38px; height: 34px; border-radius: 3px; font-weight: 700; font-size: 0.8125rem; color: var(--ink-2); transition: color 0.3s var(--ease), background-color 0.3s var(--ease); }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--roof); color: var(--trim); }
.top__cta { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }

/* ---------- the shore (home hero) ---------- */
.shore { position: relative; background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 62%); overflow: hidden; }
.shore__sky { max-width: var(--max); margin: 0 auto; padding: clamp(18px, 3vw, 40px) var(--gutter) 0; display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.shore__sky p { max-width: 40ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--ink-2); }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 3px; background: var(--trim); font-weight: 700; font-size: 0.9375rem; white-space: nowrap; box-shadow: 0 0 0 1px rgba(30, 27, 25, 0.12); }
.status__win { width: 14px; height: 14px; background: #3A3632; box-shadow: inset 0 0 0 2px var(--trim), 0 0 0 1px var(--roof); }
.status.is-open .status__win { background: var(--window); }

.row {
  position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 0.8vw, 12px);
  max-width: 1360px; margin: clamp(10px, 2vw, 24px) auto 0; padding: 0 var(--gutter);
}
.aitta {
  --h: clamp(150px, 20vw, 290px);
  position: relative; flex: 1 1 0; min-width: 0; height: var(--h); display: block; text-decoration: none; color: var(--trim);
}
.aitta--s { --h: clamp(118px, 15vw, 220px); }
.aitta--m { --h: clamp(136px, 17.5vw, 250px); }
.aitta--l { --h: clamp(200px, 27vw, 380px); flex-grow: 1.45; }
.aitta__body {
  position: absolute; inset: 0;
  clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 100%, 0 100%);
}
.aitta__roof { position: absolute; inset: 0; background: var(--roof); clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 41%, 50% 8%, 0 41%); z-index: 2; }
.aitta__wall { position: absolute; inset: 0; }
.aitta--tone2 .aitta__wall { filter: brightness(0.9) saturate(1.05); }
.aitta--tone3 .aitta__wall { filter: brightness(1.06); }
.aitta__hatch { position: absolute; left: 44%; right: 44%; top: 22%; height: 9%; background: var(--roof); box-shadow: inset 0 0 0 2px var(--trim); z-index: 1; }
.aitta__board {
  position: absolute; z-index: 3; left: 18%; right: 18%; top: 37%; padding: clamp(4px, 0.6vw, 8px) 6px;
  background: var(--trim); color: var(--red-deep); text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.aitta__board h1 { font-size: clamp(1rem, 2.3vw, 2.2rem); line-height: 1; }
.aitta__board small { display: block; font-family: var(--sans); font-weight: 700; font-size: clamp(0.55rem, 0.8vw, 0.75rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin-top: 2px; }
.aitta__door {
  position: absolute; z-index: 2; left: 34%; right: 34%; bottom: 0; height: 40%;
  perspective: 600px; background: #2A1A12; box-shadow: 0 0 0 clamp(3px, 0.4vw, 5px) var(--trim);
}
.aitta__inside { position: absolute; inset: 0; overflow: hidden; background: #3A2418; }
.aitta__inside img { width: 100%; height: 100%; object-fit: cover; }
.aitta__inside--light { background: radial-gradient(80% 70% at 50% 60%, #F7D58A, #C98A3A); }
.aitta__leaf {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background-color: var(--red-deep); background-image: url("boards.svg"); background-size: 18px 80px;
  box-shadow: inset 0 0 0 2px rgba(242, 234, 219, 0.85);
  transition: transform 1.1s var(--ease);
}
.aitta__leaf--l { left: 0; transform-origin: left center; }
.aitta__leaf--r { right: 0; transform-origin: right center; }
.aitta.is-open .aitta__leaf--l { transform: rotateY(-72deg); }
.aitta.is-open .aitta__leaf--r { transform: rotateY(72deg); }
a.aitta:hover .aitta__leaf--l { transform: rotateY(-30deg); }
a.aitta:hover .aitta__leaf--r { transform: rotateY(30deg); }
.aitta.is-open:hover .aitta__leaf--l { transform: rotateY(-72deg); }
.aitta.is-open:hover .aitta__leaf--r { transform: rotateY(72deg); }
.aitta__label {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 43%; text-align: center;
  font-family: var(--serif); font-size: clamp(0.8rem, 1.3vw, 1.2rem); color: var(--trim); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.aitta:focus-visible { outline-offset: 4px; }

.shore__stones { height: clamp(10px, 1.2vw, 16px); background: repeating-linear-gradient(90deg, #6D6A64 0 38px, #57544F 38px 40px, #7B7770 40px 70px, #57544F 70px 72px); border-top: 2px solid #3E3B37; }
.river { position: relative; height: clamp(110px, 15vw, 210px); background: linear-gradient(180deg, var(--river-light), var(--river) 40%, var(--river-deep)); overflow: hidden; }
.river__mirror { /* the row again, flipped about its own middle so the sheds' feet meet the waterline */
  position: absolute; top: 0; left: 0; right: 0; height: clamp(200px, 27vw, 380px);
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 0.8vw, 12px);
  max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter);
  transform: scaleY(-1); transform-origin: 50% 50%; opacity: 0.34; filter: url(#ripple) blur(0.7px) saturate(0.7) brightness(0.85);
}
.river__mirror .aitta { pointer-events: none; }
.river__mirror .aitta__board, .river__mirror .aitta__label { visibility: hidden; }

/* ---------- jetty ---------- */
.jetty { background: var(--deck); background-image: repeating-linear-gradient(90deg, transparent 0 118px, rgba(0, 0, 0, 0.22) 118px 120px); color: var(--trim); --ring: var(--window); }
.jetty .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; padding-top: clamp(22px, 3vw, 36px); padding-bottom: clamp(22px, 3vw, 36px); }
.jetty p { font-size: 1.125rem; max-width: 52ch; color: #EFE6D4; }
.jetty__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.jetty .btn--line { color: var(--trim); box-shadow: inset 0 0 0 2px var(--trim); }
.jetty .btn--line:hover { background: rgba(242, 234, 219, 0.1); }

/* ---------- page head (inner pages): a gable board ---------- */
.pagehead { background: linear-gradient(180deg, var(--sky), var(--sky-2)); }
.pagehead .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: end; padding-top: clamp(32px, 5vw, 64px); }
.pagehead__shed { --ph: clamp(150px, 16vw, 220px); width: calc(var(--ph) * 0.86); height: var(--ph); flex: none; }
.pagehead__shed .aitta { width: 100%; height: 100%; }
.pagehead__shed .aitta__door { left: 30%; right: 30%; height: 44%; }
.pagehead h1 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); padding-bottom: 10px; }
.pagehead p { max-width: 56ch; color: var(--ink-2); font-size: 1.1875rem; padding-bottom: clamp(20px, 3vw, 36px); }
.pagehead + .shore__stones { margin-top: 0; }

/* ---------- content sections ---------- */
.sec { padding: clamp(64px, 8vw, 120px) 0; }
.sec--red { color: var(--trim); --ring: var(--window); }
.sec h2 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.sec__lead { margin-top: 16px; max-width: 54ch; font-size: 1.125rem; color: var(--ink-2); }
.sec--red .sec__lead { color: #F5E4DD; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.split__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 0 0 clamp(8px, 1vw, 12px) var(--trim), 0 30px 50px -30px rgba(0, 0, 0, 0.5); }
.split__photo--wide img { aspect-ratio: 4 / 3; }

.case { list-style: none; margin: clamp(32px, 4vw, 52px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.case li { background: var(--trim); color: var(--ink); padding: 10px 10px 16px; box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.7); }
.case img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.case h3 { font-size: 1.3rem; margin-top: 14px; padding: 0 6px; }
.case p { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px 0; color: var(--ink-2); }
.case b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* menu lists on trim paper */
.paper { background: #FBF7EF; padding: clamp(24px, 3.4vw, 48px); box-shadow: 0 0 0 1px rgba(30, 27, 25, 0.1), 0 26px 44px -30px rgba(0, 0, 0, 0.4); }
.paper h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--red-deep); }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); align-items: start; }
.items { list-style: none; margin: 16px 0 0; padding: 0; }
.items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px dashed rgba(30, 27, 25, 0.25); }
.items li:last-child { border-bottom: 0; }
.items__name { font-weight: 600; font-size: 1.0625rem; }
.items__desc { grid-column: 1; color: var(--ink-2); font-size: 0.9375rem; }
.items__eur { grid-row: 1; grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums; }
.diet { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: #2F6B4F; margin-left: 4px; }

/* cakes */
.cakes { list-style: none; margin: clamp(32px, 4vw, 52px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); }
.cake { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); background: #FBF7EF; box-shadow: 0 0 0 1px rgba(30, 27, 25, 0.1), 0 26px 44px -30px rgba(0, 0, 0, 0.4); }
.cake img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.cake__body { padding: clamp(20px, 2.6vw, 32px); }
.cake h2 { font-size: 1.6rem; color: var(--red-deep); }
.cake p { margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; }
.sizes { width: 100%; margin-top: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sizes th, .sizes td { padding: 7px 0; border-top: 1px dashed rgba(30, 27, 25, 0.25); text-align: left; font-weight: 500; }
.sizes td { text-align: right; font-weight: 700; }
.steps { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; background: var(--trim); color: var(--red-deep); clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 100%, 0 100%); padding-top: 8px; }
.steps b { display: block; font-size: 1.125rem; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 44px); align-items: stretch; }
.contact address { font-style: normal; font-family: var(--serif); font-size: 1.7rem; line-height: 1.3; }
.facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--red); }
.facts a { font-weight: 700; }
.hours { width: 100%; border-collapse: collapse; margin-top: 18px; font-variant-numeric: tabular-nums; }
.hours caption { text-align: left; font-family: var(--serif); font-size: 1.3rem; padding-bottom: 6px; }
.hours th, .hours td { padding: 9px 0; border-top: 1px dashed rgba(30, 27, 25, 0.25); text-align: left; font-weight: 500; }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 800; color: var(--red-deep); }
.map { width: 100%; height: 100%; min-height: 380px; border: 0; box-shadow: 0 0 0 clamp(8px, 1vw, 12px) #FBF7EF; }

/* ---------- footer ---------- */
.foot { background: var(--river); color: #DCE6EA; --ring: var(--window); }
.foot .wrap { padding-top: clamp(48px, 6vw, 80px); padding-bottom: 28px; }
.foot__name { font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 6rem); line-height: 1; color: var(--trim); }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.foot a { color: #fff; font-weight: 600; }
.foot__demo { margin-top: 36px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.875rem; color: #B7C8D0; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .top { flex-wrap: wrap; row-gap: 0; }
  .sheds { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-top: 6px; }
  .brand { padding-bottom: 8px; }
  .top__end { padding-bottom: 6px; }
  .case { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cakes { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .aitta--hide-md { display: none; }
  .split, .menu-grid, .contact { grid-template-columns: 1fr; }
  .jetty .wrap { grid-template-columns: 1fr; }
  .shore__sky { flex-direction: column; }
  .pagehead .wrap { grid-template-columns: 1fr; }
  .pagehead__shed { display: none; }
  .foot__cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand { font-size: 1.35rem; }
  .brand small { display: none; }
  .top__cta { padding: 6px 12px; min-height: 40px; font-size: 0.875rem; }
  .lang button { min-width: 32px; }
  .shed-link__house { width: 44px; height: 36px; }
  .aitta--hide-sm { display: none; }
  .aitta--l { --h: 210px; flex-grow: 2.2; }
  .river__mirror { height: 210px; }
  .case { grid-template-columns: 1fr; gap: 12px; }
  .case li { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 8px; }
  .case img { grid-row: 1 / span 2; }
  .case h3 { margin-top: 0; font-size: 1.2rem; }
  .aitta { --h: 150px; }
  .aitta--s { --h: 120px; }
  .aitta__board h1 { font-size: 1.15rem; }
  .cake { grid-template-columns: 1fr; }
  .cake img { min-height: 200px; aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
