/* Pääskykodit – tyylit. Mobile first. */

:root {
  --cream: #F3EBE1;
  --cream-deep: #EAE0D3;
  --paper: #FAF6F0;
  --taupe: #A89580;
  --taupe-ink: #73624F;   /* taupe pienelle tekstille, kontrasti ≥ 4.5:1 kermaa vasten */
  --brown: #4A3F35;
  --brown-deep: #3A3129;
  --line: rgba(74, 63, 53, 0.16);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 20px;
  --max: 1200px;
  --radius: 2px;
  --section: clamp(72px, 12vw, 152px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--taupe); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
h2 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h3 { font-size: clamp(1.6rem, 3.5vw, 2rem); }

p { margin: 0 0 1.2em; max-width: 62ch; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe-ink);
  font-weight: 500;
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--taupe); }

.lead { font-size: 1.125rem; line-height: 1.75; }

.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * 0.6) 0; }

/* Täydennettävät kohdat – näkyvä mutta hillitty merkintä */
.tbd {
  color: var(--taupe-ink);
  font-style: italic;
  background: rgba(168, 149, 128, 0.14);
  padding: 0 6px;
  border-radius: var(--radius);
  white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--brown); color: var(--cream); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Napit ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--brown);
  border-radius: var(--radius);
  background: var(--brown);
  color: var(--cream);
  font: 500 0.9375rem/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { background: var(--brown-deep); border-color: var(--brown-deep); }
.btn--ghost { background: transparent; color: var(--brown); }
.btn--ghost:hover { background: var(--brown); color: var(--cream); }
.btn--light { background: var(--cream); color: var(--brown); border-color: var(--cream); }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn--outline-light { background: transparent; color: var(--cream); border-color: rgba(243, 235, 225, 0.7); }
.btn--outline-light:hover { background: var(--cream); color: var(--brown); border-color: var(--cream); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 4px;
}
.link-arrow::after { content: "→"; transition: transform 0.25s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 235, 225, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand span { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: 0.01em; color: var(--brown); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -12px;
  background: none; border: 0; color: var(--brown); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 1.5px; background: currentColor; position: relative;
  transition: transform 0.3s, background 0.3s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 28px;
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a {
  display: block; padding: 14px 0;
  font-family: var(--serif); font-size: 1.6rem;
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.site-nav li a[aria-current="page"] { color: var(--taupe-ink); }
.site-nav .nav-cta { display: none; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex; align-items: center; gap: 40px;
    padding: 0; background: none; border: 0;
  }
  .site-nav ul { display: flex; gap: 36px; }
  .site-nav li a {
    padding: 6px 0; border: 0;
    font-family: var(--sans); font-size: 0.9375rem; font-weight: 500;
    border-bottom: 1px solid transparent;
  }
  .site-nav li a:hover, .site-nav li a[aria-current="page"] { border-bottom-color: var(--taupe); color: var(--brown); }
  .site-nav .nav-cta { display: inline-flex; min-height: 44px; padding: 0 20px; }
  .header-inner { height: 88px; }
}

/* ---------- Etusivun hero ---------- */

.hero { position: relative; }
.hero-media { aspect-ratio: 4 / 3; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; }
.hero-content { padding-top: 40px; padding-bottom: 8px; }
.hero h1 { max-width: 14ch; margin-bottom: 0.45em; }
.hero .hero-sub { font-size: 1.0625rem; color: var(--brown); margin-bottom: 32px; }
.hero .btn-row .btn { flex: 1 1 220px; }

@media (min-width: 900px) {
  .hero { min-height: calc(100svh - 88px); max-height: 960px; display: flex; align-items: flex-end; color: var(--cream); }
  .hero-media { position: absolute; inset: 0; aspect-ratio: auto; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(90deg, rgba(42, 35, 29, 0.5) 0%, rgba(42, 35, 29, 0) 62%),
      linear-gradient(180deg, rgba(42, 35, 29, 0) 35%, rgba(42, 35, 29, 0.55) 100%);
  }
  .hero-content { position: relative; z-index: 1; padding-top: 0; padding-bottom: clamp(56px, 9vh, 104px); }
  .hero .eyebrow { color: var(--cream); }
  .hero .eyebrow::before { background: var(--cream); }
  .hero .hero-sub { color: var(--cream); opacity: 0.92; }
  .hero h1 { font-size: clamp(4rem, 6.4vw, 6.25rem); }
  .hero .btn-row .btn { flex: 0 0 auto; }
  .hero .btn--hero-primary { background: var(--cream); color: var(--brown); border-color: var(--cream); }
  .hero .btn--hero-primary:hover { background: #fff; border-color: #fff; }
  .hero .btn--hero-secondary { background: transparent; color: var(--cream); border-color: rgba(243, 235, 225, 0.7); }
  .hero .btn--hero-secondary:hover { background: var(--cream); color: var(--brown); }
}

/* ---------- Kohdekortti ---------- */

.section-head { margin-bottom: clamp(32px, 5vw, 56px); }

.listing-card {
  display: grid;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
}
.listing-card .card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.listing-card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.listing-card:hover .card-media img { transform: scale(1.03); }
.badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--cream); color: var(--brown);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 14px;
}
.card-body { padding: 28px 24px 32px; }
.card-body h3 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 4px; }
.card-loc { color: var(--taupe-ink); margin-bottom: 24px; }
.card-facts { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.card-facts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-facts li:nth-child(odd) { padding-right: 12px; }
.card-facts small { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--taupe-ink); }
.card-facts strong { font-weight: 500; }
.card-price { font-family: var(--serif); font-size: 2rem; line-height: 1.1; margin-bottom: 24px; }
.card-price small { font-family: var(--sans); font-size: 0.875rem; color: var(--taupe-ink); }

@media (min-width: 900px) {
  .listing-card { grid-template-columns: 1.45fr 1fr; }
  .listing-card .card-media { aspect-ratio: auto; min-height: 520px; }
  .card-body { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- Meistä ---------- */

.about { display: grid; gap: 32px; }
.about-mark { width: 120px; opacity: 0.9; }
@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
  .about-mark { width: 180px; }
}

/* ---------- Vihjepalkkio-nosto ---------- */

.tip-band { background: var(--brown); color: var(--cream); }
.tip-band .eyebrow { color: var(--taupe); }
.tip-band .eyebrow::before { background: var(--taupe); }
.tip-inner { display: grid; gap: 28px; }
.tip-amount { font-family: var(--serif); font-size: clamp(4rem, 16vw, 8.5rem); line-height: 0.9; color: var(--taupe); font-weight: 500; }
.tip-band h2 { max-width: 18ch; }
.tip-band p { opacity: 0.88; }
@media (min-width: 900px) {
  .tip-inner { grid-template-columns: auto 1fr; gap: 80px; align-items: center; }
}

/* ---------- Kohdesivu ---------- */

.page-intro { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-intro h1 { margin-bottom: 0.25em; }
.page-intro .addr { color: var(--taupe-ink); font-size: 1.0625rem; margin: 0; }

.gallery { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.gallery button {
  position: relative; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; overflow: hidden;
  aspect-ratio: 4 / 3; display: block; width: 100%;
}
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity 0.3s; }
.gallery button:hover img { transform: scale(1.03); }
.gallery .is-plan { background: #fff; }
.gallery .is-plan img { object-fit: contain; padding: 8px; }
.gallery .g-label {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(243, 235, 225, 0.92); color: var(--brown);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px;
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: min(68vh, 640px); }
  .gallery button, .gallery button:first-child { aspect-ratio: auto; height: 100%; }
  .gallery button:first-child { grid-column: 1; grid-row: 1 / span 2; }
}

.key-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line); margin: 0;
}
.key-facts div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.key-facts div:nth-child(odd) { padding-right: 16px; }
.key-facts dt { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--taupe-ink); margin-bottom: 4px; }
.key-facts dd { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
@media (min-width: 900px) {
  .key-facts { grid-template-columns: repeat(4, 1fr); }
  .key-facts div { padding: 28px 24px 28px 0; }
}

.split { display: grid; gap: 48px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.2fr 1fr; gap: 96px; } }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font-weight: 400; color: var(--taupe-ink); width: 46%; padding-right: 16px; }
.spec-table td { font-weight: 500; }

.units { display: grid; gap: 12px; }
.unit {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--paper); padding: 22px 24px;
}
.unit h3 { margin: 0; font-size: 1.75rem; }
.unit p { margin: 2px 0 0; font-size: 0.9375rem; color: var(--taupe-ink); }
.status {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6F8F5E; }
@media (min-width: 600px) { .units { grid-template-columns: 1fr 1fr; } }

/* ---------- Lomakkeet ---------- */

.form-panel { background: var(--paper); padding: clamp(28px, 6vw, 64px) clamp(20px, 6vw, 64px); }
.form-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

fieldset { border: 0; padding: 0; margin: 0 0 36px; min-width: 0; }
legend { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; padding: 0; margin-bottom: 18px; }

.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; }
.field label .opt { font-weight: 400; color: var(--taupe-ink); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: 400 1rem/1.5 var(--sans);
  color: var(--brown);
  background: var(--cream);
  border: 1px solid rgba(74, 63, 53, 0.22);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A3F35' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brown); background: #fff; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #9A4A3A; }
.field .err { color: #8A3F31; font-size: 0.8125rem; margin-top: 6px; display: none; }
.field .err.is-visible { display: block; }
.err-ehdot { display: none; }
.err-ehdot.is-visible { display: block; }

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-group label {
  position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border: 1px solid rgba(74, 63, 53, 0.22); background: var(--cream); cursor: pointer; margin: 0; font-weight: 400;
}
.radio-group input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-group input:checked + span { font-weight: 500; }
.radio-group label:has(input:checked) { border-color: var(--brown); background: #fff; box-shadow: inset 0 0 0 1px var(--brown); }
.radio-group label:has(input:focus-visible) { outline: 2px solid var(--brown); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--brown); flex: none; }

.form-note { font-size: 0.8125rem; color: var(--taupe-ink); margin: 16px 0 0; }
.form-actions { margin-top: 28px; }
.form-actions .btn { width: 100%; }
@media (min-width: 700px) { .form-actions .btn { width: auto; } }

.confirm {
  display: none;
  border-left: 2px solid var(--taupe);
  background: var(--cream);
  padding: 24px 24px 20px;
  margin-top: 28px;
}
.confirm.is-visible { display: block; }
.confirm h3 { font-size: 1.75rem; margin-bottom: 8px; }
.confirm time { font-weight: 500; }
.confirm p:last-child { margin-bottom: 0; }

/* ---------- Ehdot ---------- */

.terms { counter-reset: t; list-style: none; padding: 0; margin: 0; }
.terms li {
  counter-increment: t;
  display: grid; grid-template-columns: 44px 1fr; gap: 8px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.terms li:first-child { border-top: 1px solid var(--line); }
.terms li::before { content: counter(t, decimal-leading-zero); font-family: var(--serif); font-size: 1.25rem; color: var(--taupe-ink); line-height: 1.4; }
.terms strong { font-weight: 500; }

.big-figure { font-family: var(--serif); font-size: clamp(4.5rem, 20vw, 9rem); line-height: 0.9; color: var(--taupe); margin: 0 0 12px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--cream-deep); padding: clamp(64px, 10vw, 112px) 0 40px; }
.footer-grid { display: grid; gap: 44px; }
.footer-logo { width: 180px; margin: -24px 0 -16px -18px; }
.site-footer h2 { font-size: 2rem; margin-bottom: 16px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-list li { padding: 4px 0; }
.contact-name { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a { display: inline-block; padding: 6px 0; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.8125rem; color: var(--taupe-ink);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.footer-bottom p { margin: 0; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1.4fr 1fr; gap: 64px; } }

/* ---------- Kiinteä WhatsApp-nappi (mobiili) ---------- */

.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px 0 16px;
  background: var(--brown); color: var(--cream);
  border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  box-shadow: 0 10px 28px rgba(58, 49, 41, 0.28);
}
.wa-float svg { width: 24px; height: 24px; }
@media (max-width: 899px) { body { padding-bottom: 88px; } }
@media (min-width: 900px) { .wa-float { display: none; } }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: rgba(30, 25, 21, 0.96); color: var(--cream);
}
.lightbox::backdrop { background: rgba(30, 25, 21, 0.96); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; font-size: 0.875rem; letter-spacing: 0.06em; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.lb-stage img.is-plan { background: #fff; }
.lb-caption { text-align: center; padding: 14px 20px 24px; font-family: var(--serif); font-size: 1.35rem; }
.lb-btn {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(243, 235, 225, 0.3); border-radius: 50%;
  color: var(--cream); cursor: pointer; font-size: 1.25rem; line-height: 1;
}
.lb-btn:hover { background: rgba(243, 235, 225, 0.12); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(30, 25, 21, 0.55); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (min-width: 900px) { .lb-stage { padding: 0 88px; } .lb-prev { left: 24px; } .lb-next { right: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
