/* Demo: Casa Teilor, city mini-hotel. Plan: drafts/demo-hotel-plan.md */
@font-face { font-family: "Literata"; font-weight: 400 700; font-display: swap; src: url("fonts/literata-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Literata"; font-weight: 400 700; font-display: swap; src: url("fonts/literata-latin-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF; }
@font-face { font-family: "Literata"; font-weight: 400 700; font-display: swap; src: url("fonts/literata-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap; src: url("fonts/golos-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap; src: url("fonts/golos-latin-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap; src: url("fonts/golos-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --var: #f6f5f1;
  --ink: #26211d;
  --nuc: #4b3324;
  --nuc-2: #3d2a1d;
  --poarta: #2c5784;
  --poarta-2: #224567;
  --tei: #dcd27a;
  --tei-soft: #efe9b8;
  --muted: #6f675e;
  --line: #e4e0d8;
  --card: #ffffff;
  --on-nuc: #d9cbbb;
  --brass: #c9a45a;
  --serif: "Literata", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { font-family: "Golos Text", system-ui, sans-serif; font-size: 17px; line-height: 1.55; background: var(--var); color: var(--ink); overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--poarta); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--tei); color: var(--ink); }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
section, footer { scroll-margin-top: 76px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.6vw, 40px); }
.lede { color: var(--muted); font-size: 18px; max-width: 580px; margin-top: 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.demo-strip { background: var(--poarta); color: #fff; font-size: 15px; }
.demo-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.demo-strip a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.top { position: sticky; top: 0; z-index: 40; background: rgba(246,245,241,.96); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.menu { display: flex; gap: 28px; color: var(--muted); font-size: 16px; }
.menu a:hover { color: var(--ink); }
.top-right { display: flex; align-items: center; gap: 16px; }
.lang { font-size: 15px; color: var(--muted); }
.lang b { color: var(--ink); font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent; font-weight: 500; font-size: 16px; }
.btn svg { width: 18px; height: 18px; }
.btn-blue { background: var(--poarta); color: #fff; }
.btn-blue:hover { background: var(--poarta-2); }
.btn-blue:disabled { background: #b8b3aa; cursor: not-allowed; }
.btn-light { background: var(--var); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }

/* ---------- Hero: dates on the left, the key board on the right ---------- */
.hero { padding-top: 52px; padding-bottom: 76px; }
.hero > .wrap { display: grid; grid-template-columns: 1fr 500px; gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(38px, 4.8vw, 56px); }
.hero .lede { margin-top: 14px; }
.when { margin-top: 30px; }
.when-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.when-head b { font-weight: 500; }
.when-head span { color: var(--muted); font-size: 15px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.cal .wd { text-align: center; font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.cal button { position: relative; height: 46px; border: 0; background: transparent; font-variant-numeric: tabular-nums; font-size: 16px; }
.cal button span { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.cal button:hover:not(:disabled) span { background: var(--line); }
.cal button:disabled { color: #bdb7ad; cursor: default; }
.cal button[data-m]::after { content: attr(data-m); position: absolute; top: -1px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.cal button.mid { background: var(--tei-soft); }
.cal button.in { background: linear-gradient(90deg, transparent 50%, var(--tei-soft) 50%); }
.cal button.out { background: linear-gradient(90deg, var(--tei-soft) 50%, transparent 50%); }
.cal button.in span, .cal button.out span { background: var(--ink); color: #fff; font-weight: 500; }
.cal button.in.out { background: none; }
.when-sum { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.when-sum p { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .lbl { color: var(--muted); margin-right: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #cfc9be; background: var(--card); font-size: 20px; line-height: 1; }
.stepper button:disabled { color: #c3bdb3; cursor: default; }
.stepper output { min-width: 26px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

/* The board: walnut planks, brass hooks, keys with numbered fobs */
.board { background-color: var(--nuc);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 2px, transparent 2px 11px), repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 1px, transparent 1px 29px);
  border-radius: 16px; padding: 10px 22px 6px; color: var(--on-nuc); box-shadow: inset 0 0 0 6px var(--nuc-2); }
.floor { display: grid; grid-template-columns: 92px 1fr; align-items: start; padding: 14px 0 6px; }
.floor + .floor { border-top: 1px solid rgba(0,0,0,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.plate { margin-top: 2px; justify-self: start; font-size: 13px; font-weight: 500; color: #3a2a12; background: var(--brass); border-radius: 4px; padding: 2px 8px; }
.hooks { display: flex; gap: 10px; list-style: none; }
.slot { position: relative; width: 82px; height: 118px; display: flex; justify-content: center; }
.slot::before { content: ""; position: absolute; top: 3px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0d79a, var(--brass) 60%, #8a6a2c); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.slot.empty::after { content: attr(data-n); position: absolute; top: 20px; left: 0; right: 0; text-align: center; font-family: var(--serif); font-size: 15px; color: rgba(217,203,187,.45); font-variant-numeric: tabular-nums; }
.key { position: relative; z-index: 1; width: 64px; height: 118px; border: 0; background: none; padding: 0; transition: opacity .3s ease, transform .3s ease; }
.key .swing { position: absolute; inset: 0; transform-origin: 50% 8px; }
.key svg { position: absolute; top: 0; left: 50%; width: 48px; height: 100px; margin-left: -24px; }
.fob { position: absolute; top: 22px; left: 50%; width: 42px; height: 66px; margin-left: -21px; border-radius: 12px 12px 20px 20px; background: var(--tei); color: var(--ink);
  display: grid; place-items: end center; padding-bottom: 12px; font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 10px -4px rgba(0,0,0,.55), inset 0 -3px 0 rgba(0,0,0,.12); transition: background-color .2s ease, color .2s ease; }
.fob::before { content: ""; position: absolute; top: 7px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--nuc); box-shadow: inset 0 1px 1px rgba(0,0,0,.5); }
.key:hover .fob { background: #e8df92; }
.key[aria-pressed="true"] .fob { background: var(--poarta); color: #fff; }
.key.gone { opacity: 0; transform: translateY(-14px); pointer-events: none; }
.key.nofit { opacity: .38; }
.key.nofit .fob { background: #b9b39a; }
.key:focus-visible { outline: 3px solid var(--tei); outline-offset: 2px; border-radius: 12px; }
.key.go .swing { animation: swing .9s ease-out both; animation-delay: calc(var(--i) * 30ms); }
@keyframes swing { 0% { transform: rotate(0); } 22% { transform: rotate(7deg); } 50% { transform: rotate(-4.5deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
.board-cap { padding: 10px 0 12px; border-top: 1px solid rgba(0,0,0,.35); font-size: 15px; }
.board-cap b { color: #fff; font-weight: 500; }

.pick { margin-top: 16px; min-height: 108px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.pick p { color: var(--muted); }
.pick h3 { font-size: 22px; }
.pick .sum { margin-top: 4px; color: var(--ink); }
.pick .sum b { font-family: var(--serif); font-size: 20px; }
.pick .btn { margin-top: 12px; }

/* ---------- Rooms: rows, not identical cards ---------- */
.rooms { padding-top: 84px; padding-bottom: 84px; border-top: 1px solid var(--line); background: var(--card); }
.room-list { margin-top: 34px; border-top: 2px solid var(--ink); }
.room { display: grid; grid-template-columns: 300px 1fr 230px; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.room img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.room h3 { font-size: 28px; }
.room .facts { margin-top: 8px; }
.room .for { margin-top: 6px; color: var(--muted); }
.room .free { margin-top: 14px; font-size: 15px; color: var(--muted); }
.room .free b { color: var(--ink); font-weight: 500; }
.room-price { text-align: right; }
.room-price .pn { font-family: var(--serif); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.room-price .pn small { font-family: "Golos Text", sans-serif; font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.room-price .tot { margin-top: 2px; color: var(--muted); font-size: 15px; }
.room-price .btn { margin-top: 14px; width: 100%; }

/* ---------- House rules and the walk around, on walnut ---------- */
.house { background: var(--nuc); color: var(--var); padding-top: 80px; padding-bottom: 84px; }
.house .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; }
.house .lede { color: var(--on-nuc); }
.rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; margin-top: 34px; }
.rules b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; color: #fff; }
.rules span { display: block; margin-top: 4px; color: var(--on-nuc); font-size: 16px; }
.walk h3 { font-size: 24px; color: #fff; }
.walk ul { list-style: none; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.25); }
.walk li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.walk li span:last-child { color: var(--tei); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Booking ---------- */
.book { padding-top: 84px; padding-bottom: 88px; }
.book .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.bill { margin-top: 30px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.bill-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bill-row > span:first-child { color: var(--muted); }
.bill-val { text-align: right; }
.bill-row a { color: var(--poarta); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.bill label { display: block; color: var(--muted); padding-top: 12px; margin-bottom: 6px; }
.bill select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid #cfc9be; border-radius: 10px; background: #fff; }
.bill .total { border-bottom: 0; padding-top: 14px; }
.bill .total b { font-family: var(--serif); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.save { margin-top: 6px; padding: 10px 14px; background: var(--tei-soft); border-radius: 8px; font-size: 15px; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid #cfc9be; background: #fff; font: inherit; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .bill select:focus { outline: none; border-color: var(--poarta); box-shadow: 0 0 0 3px rgba(44,87,132,.2); }
.form .btn { width: 100%; }
.err { color: #a3261b; font-size: 15px; min-height: 1.3em; margin-bottom: 6px; }
.done svg { width: 46px; height: 46px; color: var(--poarta); }
.done h3 { font-size: 30px; margin: 12px 0 8px; }
.done p { color: var(--muted); }
.done p[data-what] { color: var(--ink); }
.done .note { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--tei); background: var(--var); color: var(--ink); font-size: 15px; }

/* ---------- Yard and breakfast ---------- */
.gallery { padding-top: 84px; padding-bottom: 84px; background: var(--card); border-top: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 230px 230px; gap: 12px; margin-top: 32px; }
.shots img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.shots .big { grid-row: span 2; }

/* ---------- Contact, on walnut ---------- */
.contact { background: var(--nuc); color: var(--var); padding-top: 80px; padding-bottom: 80px; }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact .lede { color: var(--on-nuc); }
.how { list-style: none; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.25); max-width: 480px; }
.how li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.how li span:first-child { color: var(--on-nuc); }
.contact .btn { margin-top: 26px; }
.map { width: 100%; height: auto; border-radius: 14px; }

.foot { background: var(--nuc-2); color: var(--on-nuc); padding-top: 28px; padding-bottom: 28px; font-size: 15px; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; color: #fff; }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 60; max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 20px 40px -14px rgba(0,0,0,.4); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast, .key, .fob { transition: none; }
  .key.go .swing { animation: none; }
}

@media (max-width: 1080px) {
  .hero > .wrap { grid-template-columns: 1fr 440px; gap: 36px; }
  .floor { grid-template-columns: 1fr; }
  .plate { margin-bottom: 8px; }
  .room { grid-template-columns: 240px 1fr 200px; gap: 24px; }
}
@media (max-width: 900px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .menu { display: none; }
  .hero { padding-top: 30px; padding-bottom: 52px; }
  .hero > .wrap, .house .wrap, .book .wrap, .contact .wrap { grid-template-columns: 1fr; gap: 32px; }
  .board, .pick { max-width: 520px; }
  .room { grid-template-columns: 200px 1fr; }
  .room-price { grid-column: 2; text-align: left; }
  .room-price .btn { width: auto; }
  .rooms, .house, .book, .gallery, .contact { padding-top: 60px; padding-bottom: 60px; }
}
@media (max-width: 560px) {
  .top .wrap { height: 58px; }
  .brand { font-size: 21px; }
  .lang { display: none; }
  .when-head { flex-direction: column; gap: 2px; }
  .demo-strip .wrap { font-size: 13px; }
  .board { padding: 8px 12px 4px; }
  .hooks { gap: 4px; }
  .slot { width: 70px; }
  .room { grid-template-columns: 1fr; gap: 14px; }
  .room-price { grid-column: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
  .room-price .btn { width: 100%; margin-top: 8px; }
  .rules { grid-template-columns: 1fr; gap: 18px; }
  .shots { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .shots img { height: 170px; }
  .shots .big { grid-column: span 2; grid-row: auto; height: 230px; }
  .how li { grid-template-columns: 1fr; gap: 2px; }
  .form, .bill { padding: 18px; }
}
