/* Silves Tours — "The painter's eye" */
:root {
  --ground: #F2F4EF;
  --surface: #E4E9E1;
  --ink: #18241D;
  --muted: #4A5A50;
  --field: #23392C;
  --field-2: #1B2D22;
  --field-ink: #E6EDE4;
  --field-muted: #A9BCAD;
  --accent: #E7A93A;
  --accent-ink: #1F1A0E;
  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --text: "Literata", Georgia, serif;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 144px;
  --pad: clamp(20px, 5vw, 72px);
  --section: clamp(72px, 11vw, 160px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-small: .9375rem;
  --fs-h3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h2: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --fs-h1: clamp(3rem, 1.6rem + 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; scrollbar-color: var(--field) var(--surface); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--text);
  font-optical-sizing: auto; caret-color: var(--field);
}
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; max-width: 66ch; }
.h2 { font-size: var(--fs-h2); margin-bottom: var(--s4); }
.h3 { font-size: var(--fs-h3); margin-bottom: var(--s3); }
.num, td, .calc-total strong, .ptable, .gps { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--pad);
}
.wordmark { font: 800 1.375rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: var(--s4); align-items: center; font: 500 1rem/1 var(--display); }
.nav a { text-decoration: none; padding: 12px 2px; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.nav-call { font-variant-numeric: tabular-nums; }
.top-tools { display: flex; gap: var(--s2); align-items: center; }
.lang { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 3px; }
.lang button { font: 600 .875rem/1 var(--display); border: 0; background: transparent; color: var(--muted); border-radius: 999px; min-width: 44px; min-height: 38px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.menu-btn { display: none; font: 600 1rem/1 var(--display); border: 0; background: var(--ink); color: var(--ground); border-radius: 999px; padding: 0 18px; min-height: 44px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 650 1.0625rem/1 var(--display); letter-spacing: -0.01em; text-decoration: none;
  transition: transform .18s var(--ease), background-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #F0B851; }
.btn-quiet { background: var(--surface); color: var(--ink); }
.btn-quiet:hover { background: #D6DED3; }
.btn-quiet-light { background: rgba(230, 237, 228, .14); color: var(--field-ink); }
.btn-quiet-light:hover { background: rgba(230, 237, 228, .24); }
.btn-line { box-shadow: inset 0 0 0 2px currentColor; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--ground); }
.btn-line-light { color: var(--field-ink); }
.btn-line-light:hover { background: var(--field-ink); color: var(--field); }
.btn-wide { width: 100%; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ico .fill { fill: currentColor; stroke: none; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100svh; align-items: center;
}
.hero-copy { padding: 120px var(--s5) var(--s7) var(--pad); }
@media (min-width: 900px) {
  .nav { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35); }
}
.hero-title { font-size: clamp(3rem, 1.2rem + 4.4vw, 5.25rem); letter-spacing: -0.04em; line-height: .95; margin-bottom: var(--s5); font-weight: 800; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-sub { font-size: clamp(1.0625rem, 1rem + .35vw, 1.3125rem); color: var(--muted); max-width: 34ch; margin-bottom: var(--s5); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--s5); }
.hero-facts { font-size: var(--fs-small); color: var(--muted); max-width: 40ch; margin: 0; }
.hero-facts strong { color: var(--ink); font-family: var(--display); font-size: 1.0625rem; }
.hero-media { margin: 0; height: 100svh; position: relative; }
.hero-frame { position: absolute; inset: 0; overflow: hidden; clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }

/* ---------- Thyl ---------- */
.thyl {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px);
  padding: var(--section) var(--pad); align-items: center;
}
.thyl-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; }
.thyl-copy p { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }
.thyl-facts { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s2); }
.thyl-facts li { background: var(--surface); padding: 14px 18px; font: 600 1rem/1.3 var(--display); }

/* ---------- tours ---------- */
.tours { padding: 0 var(--pad) var(--section); }
.tours-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4) clamp(32px, 6vw, 96px); margin-bottom: var(--s8); align-items: end; }
.tours-head .h2 { grid-column: 1; }
.tours-head > p { grid-column: 1; margin: 0; }
.tour-index { grid-column: 2; grid-row: 1 / span 2; list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tour-index a {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  padding: 14px 18px; background: var(--field); color: var(--field-ink);
  font: 600 1.0625rem/1.2 var(--display); text-decoration: none; transition: background-color .2s ease, padding .25s var(--ease);
}
.tour-index a b small { font: 500 .875rem/1 var(--display); color: var(--field-muted); margin-right: 4px; }
.calc-img { width: 100%; aspect-ratio: 3 / 1.4; object-fit: cover; margin-top: var(--s5); }
.tour-index a b { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.tour-index a:hover { background: var(--field-2); padding-left: 26px; }

.tour { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.tour + .tour { margin-top: var(--section); }
.tour-flip .tour-media { order: 2; }
.tour-media { position: sticky; top: 24px; }
.tour-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.tour-media-wide { display: grid; gap: 12px; }
.tour-media-wide img { aspect-ratio: 16 / 9; }
.tour-media-wide img + img { width: 78%; margin-left: auto; aspect-ratio: 16 / 7; }
.tour-lede { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--ink); }
.tour-body > p:not(.tour-lede) { color: var(--muted); }

.facts { margin: var(--s5) 0; display: grid; gap: 4px; }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: var(--s3); padding: 12px 16px; background: var(--surface); }
.facts dt { font: 600 .9375rem/1.45 var(--display); color: var(--muted); }
.facts dd { margin: 0; font-size: var(--fs-small); line-height: 1.5; }

.price { background: var(--field); color: var(--field-ink); padding: var(--s4); margin-bottom: var(--s4); }
.price-rule { font: 600 1.125rem/1.35 var(--display); margin: 0 0 var(--s3); max-width: none; }
.price-walk .price-rule { margin: 0; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable caption { text-align: left; color: var(--field-muted); font-size: var(--fs-small); padding-bottom: var(--s2); }
.ptable th, .ptable td { padding: 7px 0; font-size: 1rem; }
.ptable th { text-align: left; font-weight: 400; color: var(--field-muted); }
.ptable td { text-align: right; font: 700 1.125rem/1 var(--display); }
.ptable tr:nth-child(odd) { background: rgba(230, 237, 228, .05); }
.ptable tr:first-child td { color: var(--accent); }
.tour-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- walk ---------- */
.walk { background: var(--field); color: var(--field-ink); padding: var(--section) var(--pad); }
.walk-inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.walk .tour-lede { color: var(--field-ink); }
.walk-body > p:not(.tour-lede) { color: var(--field-muted); }
.walk .facts > div { background: var(--field-2); }
.walk .facts dt { color: var(--field-muted); }
.walk .price { background: var(--field-2); }
.walk .guru { margin-top: var(--s5); font-size: var(--fs-small); }
.walk .guru a { color: var(--field-ink); }
.walk-media { position: relative; padding-bottom: 18%; }
.walk-a { width: 84%; aspect-ratio: 4 / 5; object-fit: cover; }
.walk-b { position: absolute; right: 0; bottom: 0; width: 48%; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .45); }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); padding: var(--section) var(--pad); align-items: start; }
.calc-copy p { color: var(--muted); }
.calc-box { background: var(--surface); padding: clamp(20px, 3vw, 40px); display: grid; gap: var(--s4); }
.calc-tours { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.calc-tours legend, .stepper-label { font: 600 .9375rem/1 var(--display); color: var(--muted); margin-bottom: 12px; padding: 0; }
.calc-tours label { position: relative; cursor: pointer; }
.calc-tours input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.calc-tours label span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--ground); font: 600 .9375rem/1.1 var(--display); transition: background-color .2s ease, color .2s ease; }
.calc-tours input:checked + span { background: var(--ink); color: var(--ground); }
.calc-tours input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; grid-template-rows: auto 52px; align-items: center; }
.stepper-label { grid-column: 1 / -1; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ground); font: 500 1.5rem/1 var(--display); cursor: pointer; transition: transform .15s var(--ease), opacity .2s; }
.stepper button:active { transform: scale(.92); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { text-align: center; font: 700 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stepper.is-off { opacity: .4; }
.calc-note { color: var(--muted); font-size: var(--fs-small); margin: 0; min-height: 1.5em; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); background: var(--field); color: var(--field-ink); padding: var(--s4); font: 600 1.0625rem/1.2 var(--display); }
.calc-total strong { font: 800 clamp(2.5rem, 2rem + 2vw, 3.5rem)/1 var(--display); color: var(--accent); letter-spacing: -0.03em; }

/* ---------- painter's eye ---------- */
.eye { position: relative; background: var(--field-2); color: var(--field-ink); }
.eye-stage { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; overflow: hidden; }
.eye-copy { position: relative; z-index: 2; padding: var(--s8) var(--s6) var(--s8) var(--pad); }
.eye-copy > p { font-size: clamp(1.0625rem, 1rem + .35vw, 1.3125rem); color: var(--field-ink); font-style: italic; max-width: 38ch; }
.eye-canvas { margin: var(--s5) 0 0; max-width: 420px; }
.eye-canvas img { width: 100%; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); outline: 10px solid #F2F4EF; outline-offset: -1px; }
.eye-canvas figcaption { margin-top: var(--s3); font-size: var(--fs-small); color: var(--field-muted); }
.eye-canvas figcaption a { color: var(--field-ink); }
.eye-photo { position: absolute; inset: 0; clip-path: inset(10% var(--pad) 10% 46%); z-index: 3; }
.eye-photo img { width: 100%; height: 100%; object-fit: cover; }
.eye-photo-cap { position: absolute; right: var(--pad); bottom: 7%; margin: 0; font: 700 clamp(1.75rem, 1.2rem + 2vw, 3rem)/1.05 var(--display); letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); max-width: 14ch; text-align: right; opacity: 0; }

/* ---------- reviews ---------- */
.reviews { padding: var(--section) var(--pad); }
.rev-lead { margin: 0 0 var(--s5); }
.rev-lead p { font: 700 clamp(1.875rem, 1.1rem + 3vw, 4rem)/1.06 var(--display); letter-spacing: -0.03em; max-width: 34ch; margin-bottom: var(--s3); text-wrap: balance; }
.rev-lead footer, .rev-grid footer { font: 600 1rem/1.3 var(--display); color: var(--muted); }
.rev-rating { background: var(--surface); padding: var(--s3) var(--s4); font-size: var(--fs-small); max-width: none; margin-bottom: var(--s7); }
.rev-rating strong { font-family: var(--display); }
.rev-grid { columns: 3 320px; column-gap: clamp(24px, 3vw, 48px); }
.rev-grid blockquote { break-inside: avoid; margin: 0 0 var(--s6); }
.rev-grid p { font-size: 1.0625rem; margin-bottom: var(--s2); }
.rev-note { color: var(--muted); font-size: var(--fs-small); margin: 0; }

/* ---------- meeting point ---------- */
.meet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); padding: 0 var(--pad) var(--section); align-items: center; }
.meet .h2 { margin-bottom: var(--s2); }
.stroke { width: min(100%, 460px); height: 28px; display: block; margin-bottom: var(--s4); }
.stroke path { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.meet-place { font: 700 1.375rem/1.25 var(--display); }
.meet-copy > p:not(.meet-place) { color: var(--muted); }
.gps { font: 600 1.0625rem/1 var(--display); color: var(--ink) !important; margin-bottom: var(--s5); }
.gps .num { background: var(--surface); padding: 6px 10px; margin-left: 6px; }
.meet-map { aspect-ratio: 4 / 3; background: var(--surface); }
.meet-map iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.75) contrast(1.02); }

/* ---------- FAQ ---------- */
.faq { padding: var(--section) var(--pad); background: var(--surface); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { display: grid; gap: 6px; }
.faq details { background: var(--ground); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font: 600 1.125rem/1.3 var(--display); position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 14px; height: 14px; margin-top: -10px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--field); }
.faq details p { padding: 0 20px 20px; margin: 0; color: var(--muted); }

/* ---------- end ---------- */
.end { position: relative; min-height: 88svh; display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--field-2); }
.end-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.end::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 45, 34, 0) 30%, rgba(27, 45, 34, .88) 100%); }
.end-copy { position: relative; z-index: 2; padding: var(--s8) var(--pad); }
.end-title { font-size: var(--fs-h2); max-width: 14ch; margin-bottom: var(--s3); font-weight: 800; }
.end-copy > p { font-size: 1.1875rem; color: var(--field-ink); margin-bottom: var(--s5); }
.end .hero-cta { margin: 0; }

/* ---------- footer ---------- */
.foot { background: var(--field-2); color: var(--field-muted); padding: var(--s7) var(--pad) var(--s6); font-size: var(--fs-small); }
.foot-mark { font: 800 clamp(2.5rem, 1.5rem + 5vw, 5.5rem)/1 var(--display); letter-spacing: -0.04em; color: var(--field-ink); margin-bottom: var(--s4); }
.foot p:last-child { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; max-width: none; }
.foot a { color: var(--field-ink); }

/* ---------- mobile dock ---------- */
.dock { display: none; }

@media (max-width: 1100px) {
  .nav a:not(.nav-call) { display: none; }
}
@media (max-width: 899px) {
  .top { padding: 12px var(--pad); }
  .wordmark { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .top.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; inset: 0; background: var(--field); color: var(--field-ink); padding: 96px var(--pad) var(--s6); z-index: -1;
    font-size: 1.75rem;
  }
  .top.is-open .nav a { display: block; padding: 14px 0; }
  .top.is-open .wordmark { color: var(--field-ink); }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { order: -1; height: clamp(240px, 46svh, 460px); }
  .hero-frame { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%); }
  .hero-copy { padding: var(--s4) var(--pad) var(--s6); }
  .hero-title { margin-bottom: var(--s3); font-size: clamp(2.6rem, 11.5vw, 4.5rem); }
  .hero-sub { margin-bottom: var(--s4); }
  .hero-cta { margin-bottom: var(--s4); }
  .thyl, .tour, .walk-inner, .calc, .meet, .faq, .tours-head { grid-template-columns: 1fr; }
  .tours-head .h2, .tours-head > p, .tour-index { grid-column: 1; grid-row: auto; }
  .tour-flip .tour-media { order: 0; }
  .tour-media { position: static; }
  .tour-media img { aspect-ratio: 4 / 3; }
  .thyl-photo img { aspect-ratio: 4 / 3; }
  .eye-stage { grid-template-columns: 1fr; min-height: 0; }
  .eye-copy { padding: var(--s8) var(--pad) var(--s5); }
  .eye-photo { position: relative; clip-path: none; aspect-ratio: 4 / 5; }
  .eye-photo-cap { opacity: 1; }
  .walk-media { order: -1; }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr auto; gap: 8px;
    padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
    background: var(--field-2);
    transform: translateY(110%); transition: transform .35s var(--ease);
  }
  .dock.is-on { transform: none; }
  .btn-dock-call { background: rgba(230, 237, 228, .14); color: var(--field-ink); }
  body.has-dock { padding-bottom: 76px; }
  .no-js .dock { display: none; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .hero-media { height: 32svh; }
  .hero-title { font-size: clamp(2.4rem, 10.5vw, 3rem); }
  .hero-sub { font-size: 1rem; margin-bottom: var(--s3); }
}
@media (max-width: 480px) {
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .steppers { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
