/* ============================================================
   Auto Nord Investment — www.aninvestment.cz
   Design system převzatý 1:1 z autonord.cz (harvested 08/2026):
   Inter pro text, Geist Mono pro kickery a data, pilulková
   tlačítka, vlasové linky mezi sekcemi, bílé karty s ring 1px.
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* barvy — světlé tokeny autonord.cz */
  --bg: #fbfdfd;            /* surface-base (gray-1) */
  --sunken: #eaf1ef;        /* surface-sunken (gray-2) */
  --raised: #ffffff;        /* surface-raised */
  --ink: #07090c;           /* text-primary (gray-12) */
  --text-2: #202327;        /* text-secondary (gray-11) */
  --muted: #53575b;         /* text-muted (gray-9) */
  --border: #d7dbdd;        /* border-subtle (gray-4) */
  --border-strong: #b5b5b5; /* border-default (gray-6) */
  --navy: #1c2f76;          /* brand-primary (blue-9) */
  --navy-hover: #14235f;    /* brand-primary-hover (blue-10) */
  --peri-3: #e7eaf9;        /* brand-muted — podklad ikon */
  --peri-7: #a0aae0;        /* brand-accent — hover akcent */
  --peri-9: #838dc8;        /* brand-accent — focus ring, nav underline */
  --peri-11: #4f5785;       /* brand-accent-on-surface — velká čísla */
  --on-navy: #cbd2f6;       /* periwinkle-5 — sekundární text na navy */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --radius-card: 18px;      /* rounded-2xl při --radius 10px */
  --container: 1280px;      /* max-w-7xl */
  --header-h: 80px;         /* h-20, na desktopu h-24 (viz media query) */

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad-section: clamp(4rem, 3rem + 2.5vw, 5rem);          /* py-16 → py-20 */
  --pad-hero-top: clamp(4rem, 2.5rem + 4.7vw, 7rem);       /* pt-16 → pt-fluid-section */

  color-scheme: light;
}

/* ---------- base ---------- */

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Inter OpenType alternativy — přesně jako autonord.cz (public-surface.css) */
  font-feature-settings: "cv11", "ss03", "ss01", "ss07", "cv02";
}

@media (min-width: 1024px) {
  :root { --header-h: 96px; }
}

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

h1, h2, h3 { color: var(--ink); }

h1 {
  font-size: clamp(3rem, 1.25rem + 3.9vw, 5rem);  /* text-5xl → text-fluid-display */
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 21ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 1.2rem + 2.1vw, 3rem);  /* text-3xl → text-5xl */
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

a { color: inherit; }

/* periwinkle focus ring — viditelný na světlém i navy podkladu */
:focus-visible {
  outline: 3px solid var(--peri-9);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(24px, 3vw, 32px);   /* px-6 lg:px-8 */
}

/* kicker — mono, uppercase, tracking 0.22em (přesně autonord.cz) */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

/* blok kicker + h2 nad obsahem sekce */
.section h2 { margin-bottom: clamp(2.5rem, 2rem + 1.5vw, 3.5rem); }

.text-link {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--navy) 30%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.text-link:hover { text-decoration-color: var(--navy); }

/* ---------- tlačítka — pilulky jako na autonord.cz ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;                 /* h-11 */
  padding-inline: 24px;         /* px-6 */
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.875rem;          /* text-sm */
  font-weight: 500;             /* font-medium */
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-sm { height: 36px; padding-inline: 16px; }   /* h-9 px-4 (header) */

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-hover); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--peri-3); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand img { height: 44px; width: auto; }

@media (min-width: 1024px) {
  .brand img { height: 52px; }
}

.nav-menu {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 2.2vw, 32px);
  list-style: none;
  align-self: stretch;
}

.nav-menu li { display: flex; }

.nav-menu a:not(.btn) {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-menu a:not(.btn):hover { color: var(--ink); }

/* periwinkle podtržení při hoveru — jako aktivní položka na autonord.cz */
@media (min-width: 721px) {
  .nav-menu a:not(.btn)::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--peri-9);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .nav-menu a:not(.btn):hover::after,
  .nav-menu a:not(.btn):focus-visible::after { transform: scaleX(1); }
}

.nav-cta { align-self: center; }

.nav-toggle { display: none; }

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

.hero {
  padding-top: var(--pad-hero-top);
  padding-bottom: var(--pad-section);
}

.hero .kicker { margin-bottom: 0.9rem; }

.hero-lead {
  max-width: 60ch;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
  font-size: 1rem;         /* text-base, od lg text-lg (hero-typography.ts) */
  line-height: 1.5;
  color: var(--text-2);
}

@media (min-width: 1024px) {
  .hero-lead { font-size: 1.125rem; line-height: 28px; }
}

/* chips — pilulkové štítky jako „Rychlé filtry“ na autonord.cz */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.75rem;
}

.chips li {
  border: 1px solid var(--border-strong);
  background: var(--raised);
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chips li:hover { border-color: var(--peri-9); color: var(--ink); }

/* úvodní fotografie — blok je v HTML zakomentovaný, dokud není fotka */
.hero-media {
  margin-top: clamp(40px, 6vh, 64px);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--raised);
}

.hero-media img { width: 100%; }

/* ---------- sekce — vlasové linky přes celou šířku ---------- */

.section {
  border-top: 1px solid var(--border);
  padding-block: var(--pad-section);
}

.section-sunken { background: var(--sunken); }

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- o nás ---------- */

.about-grid {
  display: grid;
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}

/* dvousloupcové rozložení se zapne samo, jakmile sekce znovu dostane fotografii */
.about-grid:has(.about-media) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.about-text { max-width: 46rem; }

.about-text h2 { margin-bottom: 2rem; }

.about-text p + p { margin-top: 1em; }

.about-text p:last-child { color: var(--ink); font-weight: 500; }

.about-media {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--raised);
}

/* ---------- co děláme — bílé karty s ring 1px ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.card {
  grid-column: span 2;
  background: var(--raised);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 1px var(--border);   /* ring-1, bez stínu (feature-grid) */
  padding: 24px;
}

/* 5 karet: druhou řadu (4. a 5. karta) vycentrovat */
.card:nth-child(4) { grid-column: 2 / span 2; }

/* ikonka v kruhu — přesně feature-grid z autonord.cz (h-10 rounded-full, brand 10 %) */
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(28, 47, 118, 0.1);
  color: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 { margin-bottom: 12px; }

.card p { font-size: 0.875rem; line-height: 1.625; color: var(--text-2); }

/* ---------- jak přemýšlíme — velká mono čísla jako „Jak to funguje“ ---------- */

.principles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;                /* gap-8, od lg gap-12 (steps.tsx) */
}

@media (min-width: 1024px) {
  .principles { gap: 48px; }
}

.principle {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.principle:nth-child(4) { grid-column: 2 / span 2; }

.principle-num {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 2.4rem + 1.5vw, 3.75rem);   /* text-5xl → text-6xl */
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--peri-11);
}

.principle h3 { margin-bottom: 0.45em; }

.principle p { font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }

/* ---------- hledáme nové příležitosti ---------- */

.interest-intro { font-weight: 500; color: var(--ink); margin-bottom: 1.2rem; }

.interest-list {
  list-style: none;
  columns: 2;
  column-gap: 48px;
  max-width: 880px;
}

.interest-list li {
  position: relative;
  padding-left: 1.5em;
  break-inside: avoid;
  margin-bottom: 0.8rem;
  color: var(--text-2);
}

.interest-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4.5px 0 4.5px 7px;
  border-color: transparent transparent transparent var(--peri-11);
}

/* navy karta s výzvou — zaoblená jako promo karty na autonord.cz */
.offer-card {
  position: relative;
  overflow: hidden;
  margin-top: clamp(40px, 6vh, 64px);
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--radius-card);
  background: var(--navy);
  color: var(--on-navy);
}

.offer-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 380px;
  height: 380px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-mask: url("../img/favicon.svg") no-repeat center / contain;
  mask: url("../img/favicon.svg") no-repeat center / contain;
  pointer-events: none;
}

.offer-card h3 {
  color: #fff;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  max-width: 30ch;
}

.offer-card > p { margin-top: 0.7rem; font-size: 1rem; }

.offer-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.8rem;
}

/* ---------- kontakt ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* firemní karta vlevo přes obě řady, karty osob napravo pod sebou */
.company-card { grid-row: span 2; }

.contact-card {
  background: var(--raised);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 1px var(--border);   /* ring-1; stín má jen firemní karta */
  padding: 24px;
}

.company-card { box-shadow: 0 0 0 1px var(--border), var(--shadow-sm); }

/* mono štítek uvnitř karty („Sídlo“) — jako company-info-card na autonord.cz */
.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.company-card h3 { font-size: 1.25rem; }

.company-address {
  font-style: normal;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-2);
}

.company-address svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* firemní údaje v mono — přesně jako sídlo na autonord.cz/kontakt */
.company-facts {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

.company-facts div { display: grid; gap: 2px; }

.company-facts dt {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.company-facts dd { font-size: 12px; color: var(--ink); }

.company-mail-row {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.company-mail-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 4px;
}

.company-mail-row a:hover { text-decoration: underline; }

.company-mail-row svg { width: 14px; height: 14px; }

/* karta osoby — anatomie ContactPersonCard z autonord.cz */
.person-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.person-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.person-photo {
  width: 56px;
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}

.person-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.375;
  color: var(--ink);
}

.person-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.person-mail {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
  word-break: break-all;
}

.person-mail:hover { color: var(--navy); }

.person-mail svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ---------- závěrečný claim ---------- */

.section-claim { text-align: center; }

.claim-mark { margin: 0 auto 1.5rem; width: 48px; height: 48px; }

.claim {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.claim-sub {
  max-width: 56ch;
  margin: 1rem auto 0;
  color: var(--text-2);
}

/* ---------- patička — anatomie Footer.tsx z autonord.cz ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;                /* gap-12, od lg gap-20 (Footer.tsx) */
}

@media (min-width: 1024px) {
  .footer-grid { gap: 80px; }
}

.footer-identity img {
  height: 56px;
  width: auto;
  margin-bottom: 24px;
}

.footer-company {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.footer-facts {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-top: 4px;
}

.footer-facts span { color: var(--muted); }

.footer-facts .footer-dot { margin-inline: 6px; }

.footer-facts a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-facts a:hover { color: var(--ink); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--ink); }

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- reveal animace ---------- */

/* skryté jen s aktivním JS (třída .js na <html>), jinak vše viditelné */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .card, .card:nth-child(4) { grid-column: auto; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .principle, .principle:nth-child(4) { grid-column: auto; }
  .about-grid:has(.about-media) { grid-template-columns: 1fr; }
  .about-media { order: -1; max-height: 420px; }
  .about-media img { object-fit: cover; height: 100%; width: 100%; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-card { grid-column: 1 / -1; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
    background: none;
    border: 0;
    padding: 10px;
    margin: -10px;
    cursor: pointer;
  }

  .nav-toggle-box {
    display: block;
    width: 24px;
    height: 18px;
    position: relative;
  }

  .nav-toggle-box span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
  }

  .nav-toggle-box span:nth-child(1) { top: 0; }
  .nav-toggle-box span:nth-child(2) { top: 8px; }
  .nav-toggle-box span:nth-child(3) { top: 16px; }

  .nav-open .nav-toggle-box span:nth-child(1) { top: 8px; transform: rotate(45deg); }
  .nav-open .nav-toggle-box span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle-box span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--raised);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(7, 9, 12, 0.08);
    padding: 8px 24px 20px;
    display: none;
  }

  .nav-open .nav-menu { display: flex; }

  .nav-menu li { display: block; }

  .nav-menu li a:not(.btn) {
    display: block;
    padding: 13px 4px;
    font-size: 1rem;
  }

  .nav-menu li + li { border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }

  .nav-cta { padding-top: 16px; }

  .nav-cta .btn { display: flex; width: 100%; }

  .cards-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .interest-list { columns: 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .offer-actions .btn { flex: 1 1 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
