/* ════════════════════════════════════════════════════
   TRABUCCO VON OTT — trabuccovonott.ch
   Dual palette: Lino bianco (light) / Ardesia caldo (dark)
   Spatial system: Fibonacci 8 · 13 · 21 · 34 · 55 · 89 · 144
   Type scale: golden ratio (φ ≈ 1.618) from 13px base
   ════════════════════════════════════════════════════ */

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

:root {
  --bg:     #f8f7f4;
  --bg-alt: #f0ede8;
  --text:   #181614;
  --muted:  #6e6860;
  --accent: #7a6a52;
  --rule:   #e2ddd8;
  --hover:  #e9e5de;
  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  --s-8: 8px;  --s-13: 13px; --s-21: 21px; --s-34: 34px;
  --s-55: 55px; --s-89: 89px; --s-144: 144px;

  --pad-x: clamp(21px, 8vw, 144px);
  --col: 610px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #1a1816;
    --bg-alt: #211e1b;
    --text:   #e8e0d4;
    --muted:  #8a8178;
    --accent: #b8a082;
    --rule:   #2e2b27;
    --hover:  #262220;
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

::selection { background: var(--accent); color: var(--bg); }

a:focus-visible, button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* ───────────── NAV ───────────── */
nav#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--s-55);
  padding: 0 var(--pad-x);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
nav#main-nav.scrolled { border-color: var(--rule); }

.nav-brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.nav-brand-mark { display: flex; align-items: center; }
.nav-brand-mark path { stroke: var(--accent); }
.nav-brand-mark circle { stroke: var(--accent); }
.nav-brand-mark .dot { fill: var(--accent); stroke: none; }
.nav-brand-divider {
  width: 1px; height: 20px;
  background: var(--rule); flex-shrink: 0;
}
.nav-brand-text {
  font-family: var(--serif); font-weight: 300; font-size: 13px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text);
}
.nav-right { display: flex; align-items: center; gap: var(--s-34); }
.nav-links { display: flex; gap: var(--s-21); list-style: none; }
.nav-links a {
  font-size: 10px; font-weight: 300; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.on { color: var(--text); }

/* services dropdown */
.nav-item-services { position: relative; }
.nav-dropdown {
  position: absolute; top: 100%; left: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  min-width: 234px;
  opacity: 0; pointer-events: none;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.21s ease;
  z-index: 200;
  padding-top: 13px; /* bridge — fills the gap so hover doesn't break */
}
.nav-dropdown::before {
  content: '';
  position: absolute; top: 5px; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--rule);
}
.nav-item-services:hover .nav-dropdown,
.nav-item-services:focus-within .nav-dropdown {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: flex; align-items: baseline; gap: 10px;
  padding: var(--s-13) var(--s-21);
  font-size: 10px; font-weight: 300; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.nav-dropdown a:first-child { padding-top: var(--s-13); }
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { color: var(--text); background-color: var(--hover); }
.nav-dropdown .dd-num {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--accent); flex-shrink: 0;
}

.lang-switcher { display: flex; gap: var(--s-13); }
.lang-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: 10px; font-weight: 300;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); transition: color 0.25s;
}
.lang-btn.active, .lang-btn:hover { color: var(--accent); }

.menu-btn {
  display: none;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: 10px; font-weight: 300;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text);
}

/* mobile menu overlay */
.menu-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: none; flex-direction: column;
  padding: 0 var(--pad-x) var(--s-55);
}
.menu-overlay.open { display: flex; }
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--s-55); margin-bottom: var(--s-89);
}
.menu-head .menu-btn { display: block; }
.menu-links { display: flex; flex-direction: column; gap: var(--s-34); }
.menu-links a {
  font-family: var(--serif); font-weight: 300; font-size: 34px;
  letter-spacing: -0.01em; color: var(--text); text-decoration: none;
}
.menu-langs { display: flex; gap: var(--s-21); margin-top: auto; padding-top: var(--s-55); }
.menu-langs .lang-btn { font-size: 13px; }

/* ───────────── HERO ───────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad-x) var(--s-89);
}
.hero-name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(55px, 11vw, 144px);
  line-height: 0.92; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: var(--s-34);
}
.hero-rule {
  width: var(--s-55); height: 1px;
  background: var(--accent); margin-bottom: var(--s-21);
}
.hero-descriptor {
  font-size: 11px; font-weight: 300; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); line-height: 2.2;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(13px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-name       { animation: fadeUp 1s cubic-bezier(0.22,0.61,0.36,1) both; }
.hero-rule       { animation: fadeUp 1s 0.13s cubic-bezier(0.22,0.61,0.36,1) both; }
.hero-descriptor { animation: fadeUp 1s 0.21s cubic-bezier(0.22,0.61,0.36,1) both; }
.page-title      { animation: fadeUp 1s cubic-bezier(0.22,0.61,0.36,1) both; }

/* ───────────── SCROLL REVEAL ───────────── */
.reveal {
  opacity: 0; transform: translateY(13px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.13s; }
.reveal[data-delay="2"] { transition-delay: 0.21s; }
.reveal[data-delay="3"] { transition-delay: 0.34s; }
.reveal[data-delay="4"] { transition-delay: 0.55s; }

/* ───────────── SECTIONS ───────────── */
section.panel {
  padding: var(--s-144) var(--pad-x);
  border-top: 1px solid var(--rule);
}
.eyebrow {
  font-size: 9px; font-weight: 400; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--s-55);
}

/* ───────────── APPROACH ───────────── */
.approach-text { max-width: var(--col); }
.approach-text p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(21px, 2.3vw, 34px); line-height: 1.55; color: var(--text);
}
.approach-text p + p {
  margin-top: 1.4em; color: var(--muted);
  font-size: clamp(17px, 1.7vw, 21px); line-height: 1.7;
}

/* ───────────── SERVICES ───────────── */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; }
.service-item {
  border-top: 1px solid var(--rule);
  transition: background-color 0.5s;
}
.service-item:hover { background-color: var(--bg-alt); }
.service-item:nth-child(odd)  { padding: var(--s-55) var(--s-55) var(--s-55) 0; }
.service-item:nth-child(even) { padding: var(--s-55) 0 var(--s-55) var(--s-55); border-left: 1px solid var(--rule); }

.service-number {
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--accent); letter-spacing: 0.05em;
  margin-bottom: var(--s-21); display: block;
}
.service-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(21px, 2vw, 27px); line-height: 1.2;
  letter-spacing: -0.01em; color: var(--text);
  margin-bottom: var(--s-13);
}
.service-desc {
  font-size: 13px; font-weight: 300; line-height: 1.85;
  color: var(--muted); margin-bottom: var(--s-21);
}
.service-link {
  display: inline-block;
  font-size: 9px; font-weight: 300; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color 0.25s;
}
.service-link:hover { border-color: var(--accent); }

/* ───────────── PROFILE ───────────── */
.about-strip {
  background: var(--bg-alt);
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.about-left  { padding: var(--s-144) var(--s-55) var(--s-144) var(--pad-x); }
.about-right { padding: var(--s-144) var(--pad-x) var(--s-144) var(--s-55); border-left: 1px solid var(--rule); }
.about-left p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(21px, 2.1vw, 27px); line-height: 1.65; color: var(--text);
}
.about-left p + p {
  margin-top: 1.3em; color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px); line-height: 1.75;
}
.credential { padding: var(--s-21) 0; border-top: 1px solid var(--rule); }
.credential:last-child { border-bottom: 1px solid var(--rule); }
.credential-label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-8);
}
.credential-value {
  font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.8;
}

/* ───────────── CONTACT ───────────── */
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-89);
  align-items: start;
}
.contact-heading {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 4vw, 55px); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--text);
  margin-bottom: var(--s-34);
}
.contact-note {
  font-size: 13px; font-weight: 300; line-height: 1.85; color: var(--muted);
}
.contact-item { padding: var(--s-21) 0; border-top: 1px solid var(--rule); }
.contact-item:last-child { border-bottom: 1px solid var(--rule); }
.contact-item-label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-8);
}
.contact-item-value { font-size: 13.5px; font-weight: 300; color: var(--text); }
.contact-item-value a { color: var(--text); text-decoration: none; transition: color 0.25s; }
.contact-item-value a:hover { color: var(--accent); }

/* ───────────── FOOTER ───────────── */
footer {
  border-top: 1px solid var(--rule);
  min-height: var(--s-55);
  padding: var(--s-21) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-name {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-size: 12px; font-weight: 300;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
}
.footer-center {
  font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
}
.footer-right { font-size: 10px; color: var(--muted); }
.footer-mark { display: flex; align-items: center; opacity: 0.45; }
.footer-mark path { stroke: var(--accent); }
.footer-mark circle { stroke: var(--accent); }
.footer-mark .dot { fill: var(--accent); stroke: none; }

/* ───────────── SERVICE PAGES ───────────── */
.page-header {
  padding: var(--s-144) var(--pad-x) var(--s-89);
  border-bottom: 1px solid var(--rule);
}
.page-eyebrow {
  font-size: 9px; font-weight: 400; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--s-34);
}
.page-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(42px, 6vw, 89px); line-height: 0.95;
  letter-spacing: -0.02em; color: var(--text);
  margin-bottom: var(--s-34);
}
.page-lead {
  font-size: 11px; font-weight: 300; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); line-height: 1.9;
  padding: var(--s-21) 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  max-width: var(--col);
}
.page-body { padding: var(--s-89) var(--pad-x) var(--s-144); }
.page-body-inner { max-width: var(--col); }
.body-p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(18px, 1.9vw, 21px); line-height: 1.7;
  color: var(--text); margin-bottom: 1.5em;
}
.body-p:last-child { margin-bottom: 0; }
.body-p-muted {
  font-size: 14px; font-weight: 300; line-height: 1.85;
  color: var(--muted); margin-bottom: 1.5em;
}
.body-p-muted:last-child { margin-bottom: 0; }
hr.section-rule {
  border: none; border-top: 1px solid var(--rule);
  margin: var(--s-89) 0;
}
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: var(--s-89);
}
.detail-item { padding: var(--s-34) 0; border-top: 1px solid var(--rule); }
.detail-item:nth-child(odd)  { padding-right: var(--s-55); }
.detail-item:nth-child(even) { padding-left: var(--s-55); border-left: 1px solid var(--rule); }
.detail-label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s-8);
}
.detail-value {
  font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.8;
}
.cta-strip {
  background: var(--bg-alt);
  padding: var(--s-89) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-55);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.cta-text {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(21px, 2.2vw, 27px); line-height: 1.45;
  color: var(--text); max-width: var(--col);
}
.cta-link {
  font-size: 10px; font-weight: 300; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 3px;
  white-space: nowrap; transition: opacity 0.25s;
}
.cta-link:hover { opacity: 0.7; }

/* ───────────── LANGUAGE VISIBILITY ───────────── */
[data-lang] { display: none; }
[data-lang].active { display: revert; }

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 768px) {
  :root { --pad-x: 21px; }
  .nav-links { display: none; }
  nav#main-nav .lang-switcher { display: none; }
  .menu-btn { display: block; }
  .hero { padding-bottom: var(--s-55); }
  section.panel { padding: var(--s-89) var(--pad-x); }
  .services-grid { grid-template-columns: 1fr; }
  .service-item:nth-child(odd),
  .service-item:nth-child(even) { padding: var(--s-34) 0; border-left: none; }
  .about-strip { grid-template-columns: 1fr; }
  .about-left  { padding: var(--s-89) var(--pad-x) var(--s-55); }
  .about-right { padding: 0 var(--pad-x) var(--s-89); border-left: none; }
  .contact-inner { grid-template-columns: 1fr; gap: var(--s-55); }
  .page-header { padding: calc(var(--s-89) + var(--s-21)) var(--pad-x) var(--s-55); }
  .page-body { padding: var(--s-55) var(--pad-x) var(--s-89); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item:nth-child(odd),
  .detail-item:nth-child(even) { padding-left: 0; padding-right: 0; border-left: none; }
  .cta-strip { flex-direction: column; align-items: flex-start; gap: var(--s-34); padding: var(--s-55) var(--pad-x); }
  footer { flex-direction: column; gap: var(--s-13); text-align: center; }
}

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

/* ───────────── SCROLL CUE ───────────── */
.hero-scroll-cue {
  position: absolute; bottom: var(--s-34); left: 50%;
  transform: translateX(-50%);
  color: var(--muted); opacity: 0.45;
  animation: scrollBob 2.6s cubic-bezier(0.45,0.05,0.55,0.95) infinite;
  pointer-events: none;
}
@keyframes scrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.45; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 0.25; }
}
.hero { position: relative; }
