/* ───────────────────────────────────────────────────────────
   tapiosagihazam.hu — landing page
   Inspiráció: Studio McGee projektoldalak (editorial, csendes,
   visszafogott tipográfia, sok levegő).
   ─────────────────────────────────────────────────────────── */

:root {
  /* Warm, editorial paletta */
  --bg: #F2EDE5;
  --bg-deep: #EAE2D5;
  --surface: #FAF6F0;
  --paper: #FFFFFF;
  --text: #1F1D1A;
  --text-soft: #3A3631;
  --muted: #6B645B;
  --accent: #8B7355;
  --accent-soft: #B59E80;
  --line: #D9D2C7;

  /* Tipográfia */
  --serif: "Cormorant Garamond", "Cormorant", "Times New Roman", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Ritmus */
  --gutter:    clamp(1.25rem, 4vw, 3.5rem);
  --section:   clamp(5rem, 12vw, 11rem);
  --container: 1480px;

  /* Animáció */
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out-quint: cubic-bezier(0.83, 0, 0.17, 1);
}

/* ───── reset / base ───── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Custom selection */
::selection { background: var(--accent); color: var(--bg); }
::-moz-selection { background: var(--accent); color: var(--bg); }

/* Custom scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Focus states (accessibility) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ───── tipográfia ───── */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
h1 { font-size: clamp(3rem, 8vw, 7rem);   line-height: 1.0;  letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; }
p  { margin: 0 0 1em; color: var(--text-soft); max-width: 62ch; }

em, .italic { font-style: italic; color: var(--text-soft); }
strong { font-weight: 500; color: var(--text); }

.lede {
  font-size: clamp(1.15rem, 1.55vw, 1.4rem);
  line-height: 1.55;
  color: var(--text-soft);
}

.dropcap::first-letter,
.has-dropcap > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 4.4em;
  float: left;
  line-height: 0.86;
  margin: 0.08em 0.12em 0 -0.04em;
  color: var(--accent);
  font-weight: 400;
  font-style: italic;
}

/* In-text links: animált aláhúzás */
.prose a,
.editorial__body p > a {
  color: var(--text);
  background-image: linear-gradient(to right, var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size 320ms var(--ease-out-quart), color 200ms ease;
}
.prose a:hover,
.editorial__body p > a:hover { background-size: 100% 2px; color: var(--accent); }

/* ───── layout helpers ───── */
.wrap     { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section  { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 7vw, 6rem); }

.cols { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 3vw, 3rem); }
@media (min-width: 900px) {
  .cols--2 { grid-template-columns: 1fr 1fr; }
  .cols--editorial      { grid-template-columns: 5fr 7fr; align-items: start; gap: clamp(2rem, 5vw, 5rem); }
  .cols--editorial-flip { grid-template-columns: 7fr 5fr; align-items: start; gap: clamp(2rem, 5vw, 5rem); }
}
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ───── scroll progress (felső vékony szín-csík) ───── */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 60;
  transition: width 70ms linear;
}

/* ───── header ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg), transparent 12%);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line), transparent 40%);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1rem;
}
.site-header__brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  font-style: italic;
}
.site-header__brand span {
  color: var(--muted);
  margin-left: 0.4rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-nav { display: none; gap: 2.25rem; }
@media (min-width: 880px) { .site-nav { display: flex; } }
.site-nav a {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 200ms ease;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease-out-quart);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); }

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  transition: background 200ms ease, border-color 200ms ease;
}
.nav-toggle:hover { background: var(--surface); border-color: var(--muted); }
.nav-toggle__lines { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__lines::before,
.nav-toggle__lines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  transition: transform 240ms var(--ease-out-quart), top 240ms var(--ease-out-quart);
}
.nav-toggle__lines::before { top: -6px; }
.nav-toggle__lines::after  { top:  6px; }
@media (min-width: 880px) { .nav-toggle { display: none; } }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  padding: clamp(5rem, 14vw, 7rem) var(--gutter) var(--gutter);
  z-index: 45;
  display: flex; flex-direction: column; gap: 1.25rem;
  opacity: 0; visibility: hidden;
  transition: opacity 320ms var(--ease-out-quart), visibility 320ms;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--text);
  letter-spacing: -0.01em;
}
.mobile-menu a:hover { color: var(--accent); font-style: italic; }
.mobile-menu .eyebrow { margin-top: 1rem; }

body.menu-open { overflow: hidden; }

/* ───── hero ───── */
.hero { padding-block: clamp(3.5rem, 6vw, 6rem); }
.hero__media {
  aspect-ratio: 21 / 9;
  background: var(--bg-deep);
  overflow: hidden;
  border-radius: 2px;
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1200ms var(--ease-out-quart);
}
.hero__media:hover img { transform: scale(1.02); }

.hero__caption {
  display: grid; gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .hero__caption { grid-template-columns: 6fr 6fr; align-items: end; gap: clamp(3rem, 6vw, 5rem); }
}
.hero__title { max-width: 14ch; }
.hero__title .em { font-style: italic; color: var(--text-soft); }
.hero__lede { max-width: 52ch; }

/* ───── meta band ───── */
.meta-band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.meta-band__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 1.5rem;
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem);
}
@media (min-width: 700px)  { .meta-band__grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .meta-band__grid { grid-template-columns: repeat(8, 1fr); } }

.meta-band__item .eyebrow { display: block; margin-bottom: 0.6rem; }
.meta-band__item strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ───── editorial sections ───── */
.editorial__head .eyebrow { display: block; margin-bottom: 1rem; }
.editorial__head h2 { max-width: 14ch; }
.editorial__body > p:first-of-type { margin-top: 0; }

/* ───── figure / image building blocks ───── */
.figure { margin: 0; }
.figure__media {
  background: var(--bg-deep);
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}
.figure__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1000ms var(--ease-out-quart), filter 600ms ease;
}
.figure__media:hover img { transform: scale(1.035); }
.figure figcaption {
  margin-top: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.aspect-3-2  .figure__media,  .aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-4-3  .figure__media,  .aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-1-1  .figure__media,  .aspect-1-1  { aspect-ratio: 1 / 1; }
.aspect-3-4  .figure__media,  .aspect-3-4  { aspect-ratio: 3 / 4; }
.aspect-21-9 .figure__media,  .aspect-21-9 { aspect-ratio: 21 / 9; }
.aspect-16-9 .figure__media,  .aspect-16-9 { aspect-ratio: 16 / 9; }

.bleed { width: 100vw; margin-inline: calc(50% - 50vw); }

/* Clickable images cursor cue */
.figure__media img,
.gallery img { cursor: zoom-in; }
.placeholder { cursor: default; }

/* ───── gallery grids ───── */
.gallery {
  display: grid;
  gap: clamp(0.85rem, 1.4vw, 1.25rem);
}
.gallery--2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .gallery--2 { grid-template-columns: 1fr 1fr; } }

.gallery--mosaic { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .gallery--mosaic {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 14vw;
  }
  .gallery--mosaic > .figure:nth-child(1) { grid-column: span 4; grid-row: span 2; }
  .gallery--mosaic > .figure:nth-child(2) { grid-column: span 2; grid-row: span 1; }
  .gallery--mosaic > .figure:nth-child(3) { grid-column: span 2; grid-row: span 1; }
  .gallery--mosaic > .figure:nth-child(4) { grid-column: span 3; grid-row: span 2; }
  .gallery--mosaic > .figure:nth-child(5) { grid-column: span 3; grid-row: span 2; }
  .gallery--mosaic > .figure { height: 100%; }
  .gallery--mosaic .figure__media { height: 100%; aspect-ratio: auto; }
}

/* ───── placeholder image ───── */
.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(139,115,85,0.05) 14px 15px),
    linear-gradient(180deg, var(--bg-deep), color-mix(in oklab, var(--bg-deep), white 5%));
  color: var(--muted);
  padding: 1.5rem;
}
.placeholder__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.placeholder__desc {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-style: italic;
  max-width: 28ch;
  line-height: 1.45;
}

/* ───── specs (data table-style) ───── */
.specs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.specs__group {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
.specs__group:last-child { border-bottom: 0; }
@media (min-width: 800px) { .specs__group { grid-template-columns: 1fr 2fr; gap: clamp(2rem, 4vw, 3rem); } }

.specs__group h3 { font-size: clamp(1.4rem, 1.8vw, 1.6rem); font-style: italic; }
.specs__list { display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.specs__list li {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--line);
}
.specs__list li:last-child { border-bottom: 0; }
.specs__list dt {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.specs__list dd { margin: 0; color: var(--text-soft); }

/* ───── tags ───── */
.tags { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.tags li {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--paper);
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}
.tags li:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }

/* ───── location / map ───── */
.map {
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.map iframe, .map > * { width: 100%; height: 100%; border: 0; display: block; }

/* ───── floor plan ───── */
.floorplan {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 2.5rem);
  border-radius: 2px;
}
.floorplan img { margin-inline: auto; max-height: 80vh; object-fit: contain; }

/* ───── CTA / contact ───── */
.cta {
  background: var(--text);
  color: var(--bg);
  padding-block: clamp(5rem, 10vw, 8rem);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(139,115,85,0.18), transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { color: var(--bg); max-width: 20ch; }
.cta p { color: color-mix(in oklab, var(--bg), white 8%); }
.cta .eyebrow { color: var(--accent-soft); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 1.1rem 1.7rem;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: var(--bg);
  transition: background 240ms var(--ease-out-quart), color 240ms ease, transform 200ms ease, border-color 240ms ease;
}
.btn:hover { background: var(--bg); color: var(--text); transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn--primary:hover {
  background: color-mix(in oklab, var(--accent), white 12%);
  border-color: color-mix(in oklab, var(--accent), white 12%);
  color: var(--bg);
}

/* ───── lightbox ───── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(31, 29, 26, 0.96);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0; visibility: hidden;
  transition: opacity 320ms var(--ease-out-quart), visibility 320ms;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 95vw; max-height: 92vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  cursor: default;
}
.lightbox__close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--bg), transparent 60%);
  color: var(--bg);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background 200ms ease, border-color 200ms ease;
}
.lightbox__close:hover {
  background: color-mix(in oklab, var(--bg), transparent 80%);
  border-color: var(--bg);
}

/* ───── footer ───── */
.site-footer {
  padding-block: 2.75rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ───── scroll fade-up ───── */
[data-fade] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out-quart), transform 900ms var(--ease-out-quart);
  will-change: opacity, transform;
}
[data-fade].is-visible { opacity: 1; transform: none; }

/* ───── kis utilities ───── */
.small  { font-size: 0.88rem; color: var(--muted); }
.italic { font-style: italic; color: var(--text-soft); }
.center { text-align: center; }

/* ───── reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-fade] { opacity: 1; transform: none; }
  .figure__media img,
  .hero__media img { transform: none !important; }
}
