/* ============================================================
   Fonte Viva Kft. — corporate site
   Design register: brand (Scandinavian-minimal, premium industrial)
   Identity preserved from existing logo: water blue + nature green
   Color space: OKLCH throughout
   ============================================================ */

:root {
  /* --- Ink & text (contrast-checked ≥ 4.5:1 on white) --- */
  --ink:        oklch(0.24 0.03 245);   /* headings / near-black */
  --text:       oklch(0.36 0.02 245);   /* body */
  --muted:      oklch(0.50 0.02 245);   /* secondary */

  /* --- Brand (water) --- */
  --brand:        oklch(0.46 0.11 245);
  --brand-strong: oklch(0.38 0.10 248);
  --brand-bright: oklch(0.60 0.13 240);
  --deep:         oklch(0.30 0.07 252); /* deep-water sections */
  --deep-2:       oklch(0.23 0.06 254);

  /* --- Accent (nature) — used sparingly --- */
  --accent:       oklch(0.58 0.10 158);

  /* --- Surfaces --- */
  --bg:         #ffffff;
  --surface:    oklch(0.976 0.008 240);
  --surface-2:  oklch(0.955 0.012 238);
  --line:       oklch(0.905 0.014 240);
  --line-soft:  oklch(0.94 0.01 240);

  /* --- On-dark --- */
  --on-deep:        oklch(0.96 0.01 240);
  --on-deep-muted:  oklch(0.80 0.02 240);

  --font-display: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --maxw: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);      /* ease-out-quint-ish */
  --shadow: 0 18px 50px -22px oklch(0.30 0.06 250 / 0.35);

  /* z-scale (semantic, no magic 9999) */
  --z-header: 100;
  --z-nav: 200;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 108px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; max-width: 68ch; text-wrap: pretty; }
a { color: var(--brand-strong); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2.5px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.35s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); }
.btn-line { background: transparent; color: #fff; border-color: oklch(1 0 0 / 0.55); }
.btn-line:hover { background: oklch(1 0 0 / 0.12); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-strong); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-strong); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: oklch(1 0 0 / 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 96px; }
.brand-logo { height: 72px; width: auto; }
.nav { display: flex; gap: clamp(1rem, 2vw, 1.9rem); margin-inline: auto; }
.nav-link {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.96rem;
  padding: 0.4rem 0; position: relative; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -0.35rem; height: 2px; width: 0;
  background: var(--brand); transition: width 0.3s var(--ease);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }
.nav-link[aria-current="page"] { color: var(--brand-strong); }

.header-tools { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.lang-switch { display: inline-flex; align-items: center; gap: 0.15rem; }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  font: 600 0.85rem/1 var(--font-body); color: var(--muted);
  padding: 0.35rem 0.5rem; border-radius: 6px; letter-spacing: 0.02em;
}
.lang-switch button.is-active { color: var(--brand-strong); background: var(--surface-2); }
.lang-switch button:hover { color: var(--ink); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(0.24 0.06 254 / 0.55) 0%, oklch(0.28 0.07 252 / 0.62) 55%, oklch(0.22 0.06 254 / 0.78) 100%);
}
.hero-inner {
  position: relative;
  padding-block: clamp(6rem, 18vh, 11rem);
  max-width: 46rem;
}
.hero-title {
  color: #fff;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.04;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 30px oklch(0.2 0.05 254 / 0.4);
}
.hero-lead {
  color: oklch(0.97 0.01 240);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
  max-width: 40ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--surface); }
.section-head { max-width: 52ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-sub { color: var(--muted); font-size: 1.12rem; margin: 0; }

/* ---------- Intro + facts ---------- */
.intro-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.intro-copy p { color: var(--text); }
.intro-copy p:last-child { margin-bottom: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts li { background: var(--bg); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.fact-n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--brand-strong); letter-spacing: -0.02em; line-height: 1; }
.fact-l { font-size: 0.85rem; color: var(--muted); }

/* ---------- Partnership band ---------- */
.band-partner { background: var(--surface-2); }
.band-partner-inner { max-width: 60ch; }
.band-quote { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 500; color: var(--ink); line-height: 1.25; letter-spacing: -0.02em; text-wrap: balance; margin-bottom: 0.9rem; }
.band-note { color: var(--muted); margin: 0; }

/* ---------- Brands ---------- */
.brand-list { border-top: 1px solid var(--line); }
.brand-row {
  display: grid; grid-template-columns: minmax(180px, 0.5fr) 2fr auto; gap: 1.5rem 2.5rem;
  align-items: baseline; padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-bottom: 1px solid var(--line);
}
.brand-name { font-family: var(--font-display); font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.brand-desc { color: var(--text); margin: 0; }
.brand-link { align-self: center; white-space: nowrap; font-weight: 600; text-decoration: none; color: var(--brand-strong); }
.brand-link:hover { text-decoration: underline; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-media { border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-2), oklch(0.86 0.04 240)); box-shadow: var(--shadow); }
.about-media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; }
.about-copy p { color: var(--text); }
.mv { margin-top: 2.25rem; display: grid; gap: 1.5rem; }
.mv-item { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.mv-label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 0.4rem; }
.mv-text { font-family: var(--font-display); font-size: 1.14rem; font-weight: 500; color: var(--ink); line-height: 1.35; margin: 0; }

/* ---------- Manufacturing ---------- */
.mfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.mfg-list { list-style: none; margin: 0; padding: 0; }
.mfg-list li { font-family: var(--font-display); font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 500; color: var(--ink); padding: 1rem 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 0.9rem; }
.mfg-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mfg-list li:first-child { padding-top: 0; }

.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; align-content: start; }
.process li { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius-sm); }
.process-n { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.process-t { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; color: var(--ink); }

/* ---------- PPWR deep teaser ---------- */
.section--deep { background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 100%); color: var(--on-deep); }
.section--deep h2 { color: #fff; }
.ppwr-teaser { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.ppwr-teaser p { color: var(--on-deep-muted); margin: 0; max-width: 52ch; }
.ppwr-teaser h2 { margin-bottom: 0.5rem; }

/* ---------- Contact ---------- */
.contact-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.contact-cell { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.5rem; }
.contact-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-strong); }
.contact-cell p { margin: 0; font-size: 1.12rem; color: var(--ink); line-height: 1.5; }
.contact-cell a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact-cell a:hover { color: var(--brand-strong); text-decoration: underline; }

/* ============================================================
   FOOTER — calm crystalline water layer
   ============================================================ */
.site-footer { position: relative; background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%); color: var(--on-deep); overflow: hidden; }
.footer-water { position: absolute; top: 0; left: 0; right: 0; height: 120px; pointer-events: none; }
.footer-surface {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, oklch(0.72 0.09 236 / 0.55) 0%, oklch(0.5 0.09 244 / 0.15) 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
          mask-image: linear-gradient(180deg, #000, transparent);
}
.footer-surface::before {
  content: ""; position: absolute; top: 6px; left: -20%; right: -20%; height: 2px;
  background: linear-gradient(90deg, transparent, oklch(0.9 0.05 235 / 0.7), transparent);
  filter: blur(0.5px);
  animation: surface-drift 14s var(--ease) infinite alternate;
}
@keyframes surface-drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

.footer-inner {
  position: relative;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 2.5rem;
  padding-block: clamp(3.5rem, 6vw, 5rem); align-items: start;
}
.footer-logo { height: 42px; background: #fff; padding: 8px 12px; border-radius: 8px; }
.footer-tag { margin-top: 1rem; color: var(--on-deep); font-family: var(--font-display); font-size: 1.05rem; max-width: 24ch; }
.footer-nav { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-nav a, .footer-meta a { color: var(--on-deep-muted); text-decoration: none; }
.footer-nav a:hover, .footer-meta a:hover { color: #fff; }
.footer-meta p { color: var(--on-deep-muted); font-size: 0.95rem; margin: 0 0 0.9rem; line-height: 1.5; }
.footer-docs { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.9rem; }
.footer-doc { display: inline-block; align-self: flex-start; font-size: 0.9rem; border-bottom: 1px solid oklch(1 0 0 / 0.3); padding-bottom: 1px; }
.footer-eu img { border-radius: 8px; width: 100%; max-width: 240px; }
.footer-bottom { position: relative; border-top: 1px solid oklch(1 0 0 / 0.12); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.1rem; font-size: 0.85rem; color: var(--on-deep-muted); }

/* ============================================================
   REVEAL MOTION (enhances an already-visible default)
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .nav {
    position: fixed; inset: 96px 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    padding: 0.5rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); transform: translateY(-130%);
    transition: transform 0.4s var(--ease); z-index: var(--z-nav);
  }
  .nav.is-open { transform: translateY(0); }
  .nav-link { padding: 0.95rem 0; border-bottom: 1px solid var(--line-soft); font-size: 1.05rem; }
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; }

  .intro-grid, .about-grid, .mfg-grid { grid-template-columns: 1fr; }
  .contact-bar { grid-template-columns: 1fr; }
  .about-media { order: -1; max-width: 420px; }
  .brand-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .brand-link { align-self: start; }
}

@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .footer-surface::before { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
