/* ==========================================================================
   nevyuka.cz — identita „Les a kov"
   Zemitá zeleno-kamenná paleta, fonty Fraunces (nadpisy) + Hanken Grotesk (tělo).
   Žádný inline styl ani inline JS (přísné CSP). Vše přes třídy.
   ========================================================================== */

/* --- Self-hostované fonty (Google Fonts OFL, subsety latin + latin-ext) ----- */
/* Fraunces (nadpisy) — variable opsz,wght */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Hanken Grotesk (tělo) — variable wght */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/hanken-grotesk-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/assets/fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Designové proměnné ---------------------------------------------------- */
:root {
  --paper: #EDE9DE;        /* pozadí stránky */
  --surface: #FBF9F3;      /* karty, plochy */
  --surface-2: #F3EFE4;    /* jemné odlišení */
  --ink: #21271F;          /* základní text */
  --green: #344B3A;        /* primární, nadpisy */
  --green-deep: #26382B;
  --stone: #6F6F62;        /* sekundární text */
  --ember: #BC6536;        /* akcent */
  --ember-deep: #9E4F27;   /* hover akcentu */
  --line: rgba(33, 39, 31, .14);
  --line-strong: rgba(33, 39, 31, .26);

  --maxw: 1000px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(33, 39, 31, .06), 0 6px 22px rgba(33, 39, 31, .05);

  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset a základ -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--green);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--ember-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 3px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 720px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 600; color: var(--ember-deep); margin: 0 0 1rem;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--green); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Hlavička / navigace --------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 233, 222, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--green);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .97rem; }
.nav-links a:hover { color: var(--ember-deep); text-decoration: none; }

/* --- Hero ------------------------------------------------------------------ */
.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); text-align: center; }
.hero .claim {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08;
  color: var(--green-deep); margin: 0 0 1rem;
}
.hero .lede { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--stone); max-width: 48ch; margin: 0 auto 1.8rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* --- Sekce ----------------------------------------------------------------- */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h2 { margin-bottom: .3rem; }
.section-title p { color: var(--stone); margin: 0; }

/* --- Dlaždice projektů ----------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.tile {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-strong); }
.tile-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--green); color: var(--paper);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
}
.tile-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; }
.tile h3 { margin: 0 0 .4rem; color: var(--green); }
.tile p { color: var(--stone); margin: 0 0 1.1rem; flex: 1; }
.tile-cta { font-weight: 600; color: var(--ember-deep); display: inline-flex; align-items: center; gap: .4rem; }
.tile.soon { opacity: .8; }
.tile.soon .tile-icon { background: var(--stone); }
.badge {
  align-self: flex-start; font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--stone); background: var(--surface-2);
  border: 1px solid var(--line); padding: 3px 9px; border-radius: 99px; margin-bottom: 1rem;
}

/* --- Řádková dlaždice (jeden projekt) -------------------------------------- */
.tile-row {
  display: flex; align-items: center; gap: 1.3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.75rem; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tile-row:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-strong); }
.tile-row-icon { flex: none; color: var(--ember-deep); }
.tile-row-icon svg { width: 44px; height: 44px; stroke: currentColor; fill: none; }
.tile-row-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; color: var(--green); line-height: 1.2; }
.tile-row-desc { display: block; color: var(--stone); margin-top: .15rem; }

/* --- Tlačítka -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .72rem 1.35rem; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.btn-primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-deep); border-color: var(--ember-deep); }
.btn-ghost { background: transparent; }

/* --- Podstránky: hlavička + obsah ------------------------------------------ */
.page-head { padding: clamp(2.2rem, 7vw, 4rem) 0 .5rem; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--stone); font-size: .92rem; font-weight: 500; margin-bottom: 1rem; }
.back-link:hover { color: var(--ember-deep); text-decoration: none; }
.back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.prose { max-width: 68ch; margin: 0 auto; }
.prose h2 { margin-top: 2.2rem; }
.prose li { margin: .3rem 0; }
.lead { font-size: 1.2rem; color: var(--stone); }

/* --- Tři linie výbavy / vlastnosti ----------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.2rem; }
.feature h3 { font-size: 1.05rem; margin: 0 0 .35rem; color: var(--green); }
.feature p { font-size: .94rem; color: var(--stone); margin: 0; }
.feature-icon { color: var(--ember-deep); margin-bottom: .5rem; }
.feature-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }

/* --- Mistrovství (odznaky) ------------------------------------------------- */
.mastery-list { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; list-style: none; padding: 0; margin: 1.6rem 0; }
.mastery { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: .5rem 1rem; font-weight: 500; font-size: .95rem; color: var(--green); }

/* --- Den X — trezor -------------------------------------------------------- */
.vault { max-width: 30rem; margin: 2rem auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.vault label { display: block; font-weight: 600; margin-bottom: .9rem; color: var(--green); }
.code-input {
  font-family: var(--font-head); letter-spacing: .45em; text-transform: uppercase; text-align: center;
  font-size: 1.5rem; width: 100%; padding: .6rem .5rem; text-indent: .45em;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.vault .row { margin-top: 1rem; }
.vault .hint { color: var(--stone); font-size: .9rem; margin-top: .9rem; }
.vault .err { color: #a3331f; font-weight: 500; min-height: 1.4em; margin-top: .6rem; }
.vault.hide { display: none; }
.unlocked { display: none; max-width: 52ch; margin: 2rem auto; text-align: center; }
.unlocked.show { display: block; }
.seal { font-family: var(--font-head); color: var(--ember-deep); font-size: 1.05rem; font-weight: 600; letter-spacing: .03em; }
.message { font-family: var(--font-head); font-size: 1.3rem; line-height: 1.5; color: var(--green-deep); font-style: italic; margin: 1rem 0 1.5rem; }

/* --- Patička --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.5rem 0; color: var(--stone); font-size: .92rem; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: center; }
.site-footer a { color: var(--stone); }
.site-footer a:hover { color: var(--ember-deep); }

/* --- Drobnosti ------------------------------------------------------------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.divider { width: 60px; height: 3px; background: var(--ember); border: 0; border-radius: 3px; margin: 1.5rem auto; }
