/* =========================================================
   FinoviaHouse — Design System
   Palette: Terracotta · Forest Green · Sand Beige ·
            Warm White · Slate Gray
   Editorial / architectural magazine aesthetic
   ========================================================= */

:root {
  /* Core palette */
  --terracotta: #b8623f;
  --terracotta-dark: #9a4e30;
  --terracotta-soft: #d98b6b;
  --forest: #2f4a3c;
  --forest-dark: #22382d;
  --forest-soft: #46654f;
  --sand: #e6dbc7;
  --sand-light: #f0e9db;
  --warm-white: #fbf7f0;
  --slate: #444a52;
  --slate-light: #6b727b;

  /* Semantic */
  --bg: var(--warm-white);
  --bg-alt: var(--sand-light);
  --ink: #262b2c;
  --ink-soft: #545b5c;
  --line: #e2d9c8;
  --card: #ffffff;

  /* Type */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --radius: 18px;
  --radius-lg: 28px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 16px rgba(47, 74, 60, 0.06);
  --shadow-md: 0 14px 40px rgba(47, 74, 60, 0.10);
  --shadow-lg: 0 30px 70px rgba(38, 43, 44, 0.16);
  --maxw: 1200px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --section: clamp(3.5rem, 8vw, 7rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.02rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal scroll without breaking position: sticky */
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest-dark);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

p, li, a, span, strong, em { overflow-wrap: break-word; }
a[href^="mailto:"] { overflow-wrap: anywhere; }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section { padding-block: var(--section); }

.section--sand { background: var(--bg-alt); }
.section--forest {
  background: var(--forest);
  color: var(--sand-light);
}
.section--forest h2,
.section--forest h3 { color: var(--warm-white); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--terracotta-dark);
  display: inline-block;
  margin-bottom: 1rem;
}
.section--forest .eyebrow { color: var(--terracotta-soft); }

.section-head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.75;
}
.section--forest .lead { color: rgba(240, 233, 219, 0.85); }

p + p { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-3px); }

.btn--primary {
  background: var(--terracotta-dark);
  color: #fff;
  box-shadow: 0 12px 28px rgba(154, 78, 48, 0.34);
}
.btn--primary:hover { background: #7f3c22; }

.btn--ghost {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}
.btn--ghost:hover { background: var(--forest); color: var(--warm-white); }

.btn--light {
  background: var(--warm-white);
  color: var(--forest-dark);
}
.btn--light:hover { background: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 240, 0.94);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s, background 0.3s;
}
.site-header.scrolled {
  background: rgba(251, 247, 240, 0.98);
  box-shadow: 0 6px 24px rgba(47, 74, 60, 0.09);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.42rem;
  color: var(--forest-dark);
  letter-spacing: -0.01em;
}
.brand .mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand b { color: var(--terracotta); font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-links a {
  position: relative;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: var(--forest-dark);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--forest-dark); background: rgba(47, 74, 60, 0.08); }
.nav-links a.active {
  color: var(--terracotta-dark);
  background: rgba(184, 98, 63, 0.12);
}

.nav-cta { margin-left: 0.6rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--forest-dark);
  position: relative;
  transition: 0.3s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--forest-dark);
  transition: 0.3s;
}
.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 { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 1.3rem; }
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .accent { color: var(--terracotta); font-style: italic; }
.hero-copy .lead { max-width: 40ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.4rem; }

.hero-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}
.hero-badge .icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--forest);
  display: grid; place-items: center;
}
.hero-badge .icon svg { width: 24px; height: 24px; stroke: var(--sand-light); }
.hero-badge strong { display: block; font-family: var(--font-serif); font-size: 1.15rem; color: var(--forest-dark); }
.hero-badge span { font-size: 0.85rem; color: var(--ink-soft); }

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero-strip div strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--terracotta);
  display: block;
}
.hero-strip div span { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Feature cards (De ce FinoviaHouse) ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.feature-card .fc-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sand-light), var(--sand));
  display: grid; place-items: center;
  margin-bottom: 1.4rem;
}
.feature-card .fc-icon svg { width: 28px; height: 28px; stroke: var(--terracotta); }
.feature-card h3 { margin-bottom: 0.7rem; }
.feature-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Split / alternating sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--reverse .split-media { order: 2; }
.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 5 / 4;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-copy h2 { margin-bottom: 1.2rem; }
.split-copy .lead { margin-bottom: 1.5rem; }

.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--terracotta);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/70% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/70% no-repeat;
}
.check-list li strong { color: var(--ink); }

/* Check-list readable on dark (forest) sections */
.section--forest .check-list li { color: rgba(240, 233, 219, 0.92); }
.section--forest .check-list li strong { color: #ffffff; }
.section--forest .check-list li::before { background: var(--terracotta-soft); }

/* ---------- Statistics ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.stat {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}
.stat strong {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--terracotta-soft);
  display: block;
  line-height: 1;
}
.stat span { font-size: 0.92rem; color: rgba(240,233,219,0.82); margin-top: 0.5rem; display: block; }

/* ---------- Steps / methodology timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 1.4rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--terracotta), var(--sand));
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.4rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.4rem 1.2rem;
}
.tl-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--sand-light);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  display: grid; place-items: center;
  position: relative; z-index: 1;
}
.tl-item h3 { margin-bottom: 0.4rem; }
.tl-item p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Content prose (analize / legal) ---------- */
.prose { max-width: 760px; }
.prose.wide { max-width: 860px; }
.prose h2 { margin: 2.6rem 0 1rem; }
.prose h3 { margin: 2rem 0 0.7rem; color: var(--terracotta-dark); }
.prose p { color: var(--ink-soft); margin-bottom: 1rem; }
.prose ul:not(.check-list) {
  list-style: disc;
  padding-left: 1.3rem;
  margin-bottom: 1.2rem;
  color: var(--ink-soft);
}
.prose ul:not(.check-list) li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); }

.takeaway {
  background: var(--sand-light);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.6rem;
  margin: 1.6rem 0 2.4rem;
}
.takeaway h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  margin-bottom: 0.6rem;
}
.takeaway p { margin: 0; color: var(--slate); }

/* ---------- Article / analiza cards ---------- */
.analiza {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.analiza:first-of-type { border-top: 0; }
.analiza--reverse .analiza-media { order: 2; }
.analiza-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}
.analiza-media img { width: 100%; height: 100%; object-fit: cover; }
.analiza .tag {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--forest-soft);
  background: var(--sand-light);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.analiza h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.analiza p { color: var(--ink-soft); }

/* ---------- Values grid ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
.value {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid var(--line);
}
.value .v-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--terracotta-dark);
}
.value h3 { margin: 0.5rem 0 0.5rem; font-size: 1.25rem; }
.value p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.member {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.member-photo { aspect-ratio: 4 / 4.4; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-body { padding: 1.4rem 1.5rem 1.7rem; }
.member-body h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.member-body .role { color: var(--terracotta-dark); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.7rem; }
.member-body p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.contact-card .cc-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--sand-light);
  display: grid; place-items: center;
}
.contact-card .cc-icon svg { width: 24px; height: 24px; stroke: var(--terracotta); }
.contact-card h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.contact-card p, .contact-card a { color: var(--ink-soft); font-size: 0.96rem; word-break: break-word; }
.contact-card a:hover { color: var(--terracotta-dark); }

.contact-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}
.contact-figure img { width: 100%; height: 100%; object-fit: cover; }

.social-row { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
.social-row a {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--sand-light);
  display: grid; place-items: center;
  transition: background 0.25s, transform 0.25s;
}
.social-row a:hover { background: var(--terracotta); transform: translateY(-3px); }
.social-row a svg { width: 20px; height: 20px; fill: var(--forest-dark); transition: fill 0.25s; }
.social-row a:hover svg { fill: #fff; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5rem);
  background: var(--forest);
  color: var(--sand-light);
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(184,98,63,0.35), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(70,101,79,0.6), transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--warm-white); margin-bottom: 1rem; max-width: 16ch; }
.page-hero .lead { color: rgba(240,233,219,0.88); max-width: 56ch; }
.breadcrumb { font-size: 0.85rem; color: rgba(240,233,219,0.7); margin-bottom: 1.4rem; }
.breadcrumb a:hover { color: var(--terracotta-soft); }

/* ---------- Banner CTA ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-dark));
  border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 5vw, 3.6rem);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-banner h2 { color: #fff; margin-bottom: 0.9rem; }
.cta-banner p { color: rgba(255,255,255,0.9); max-width: 52ch; margin-inline: auto; margin-bottom: 1.6rem; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  font-size: 0.9rem;
  color: var(--slate);
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.disclaimer svg { width: 22px; height: 22px; flex-shrink: 0; stroke: var(--terracotta); margin-top: 2px; }
.disclaimer strong { color: var(--forest-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(240,233,219,0.8);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.4rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(240,233,219,0.14);
}
.footer-brand .brand { color: var(--warm-white); margin-bottom: 1rem; }
.footer-brand .brand b { color: var(--terracotta-soft); }
.footer-brand p { font-size: 0.92rem; color: rgba(240,233,219,0.82); max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta-soft);
  margin-bottom: 1.1rem;
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { font-size: 0.94rem; color: rgba(240,233,219,0.86); transition: color 0.25s; }
.footer-col a:hover { color: var(--warm-white); }
.footer-social { display: flex; gap: 0.7rem; margin-top: 0.4rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(240,233,219,0.08);
  display: grid; place-items: center;
  transition: background 0.25s;
}
.footer-social a:hover { background: var(--terracotta); }
.footer-social svg { width: 18px; height: 18px; fill: var(--sand-light); }

.footer-disclaimer {
  font-size: 0.82rem;
  color: rgba(240,233,219,0.75);
  line-height: 1.7;
  padding-block: 1.6rem;
  border-bottom: 1px solid rgba(240,233,219,0.14);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(240,233,219,0.75);
}
.footer-bottom a:hover { color: var(--warm-white); }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(160%);
  width: min(720px, calc(100% - 2rem));
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.4rem 1.6rem;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.5s var(--ease);
}
.cookie.show { transform: translateX(-50%) translateY(0); }
.cookie-text { flex: 1 1 320px; font-size: 0.9rem; color: var(--slate); }
.cookie-text strong { color: var(--forest-dark); display: block; margin-bottom: 0.25rem; font-family: var(--font-serif); font-size: 1.05rem; }
.cookie-text a { color: var(--terracotta-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie .btn { padding: 0.7rem 1.3rem; font-size: 0.9rem; }
.cookie .btn--text {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--slate);
}
.cookie .btn--text:hover { border-color: var(--forest); color: var(--forest); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 520px; margin-inline: auto; aspect-ratio: 4/4; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .analiza { grid-template-columns: 1fr; }
  .analiza--reverse .analiza-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ---- Mobile navigation (hamburger) ---- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { margin-left: 0; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background: var(--warm-white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.85rem var(--gutter) 1.35rem;
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s;
    z-index: 90;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.9rem 0.85rem;
    border-radius: 12px;
    font-size: 1rem;
  }
  .nav-cta { margin: 0.5rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; padding: 0.95rem 1.3rem; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-strip { gap: 1.4rem 2rem; }
  .brand { font-size: 1.28rem; }
  .brand .mark { width: 34px; height: 34px; }

  /* Cookie banner as a mobile-safe bottom sheet */
  .cookie {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    transform: translateY(160%);
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 1.15rem;
    gap: 0.9rem;
  }
  .cookie.show { transform: translateY(0); }
  .cookie-actions { justify-content: stretch; width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

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