/*
 * Theme "npmk" — SMS bezpečnostní brána NPMK
 *
 * Barvy vycházejí z loga NPMK: inkoustová modř #003c72 a okr #ecaa63.
 * Citátové písmo EB Garamond je revival předlohy z roku 1592 — roku
 * narození J. A. Komenského. UI písmo Source Sans 3 (humanistický grotesk,
 * plná čeština), Source Code Pro jen pro pole s kódem z SMS.
 * Fonty jsou přibalené lokálně — uživatelé před ověřením nemají internet.
 */

@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/ebgaramond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/ebgaramond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/ebgaramond-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/ebgaramond-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/sourcecodepro-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/sourcecodepro-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/sourcesans3-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/sourcesans3-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- design tokens + Lumo ---------- */

html {
  --npmk-blue: #003c72;
  --npmk-blue-deep: #00294e;
  --npmk-amber: #ecaa63;
  --npmk-amber-ink: #8f5d1f;   /* okr ztmavený pro text na papíře (AA) */
  --npmk-paper: #faf9f6;
  --npmk-ink: #22303d;
  --npmk-ink-soft: #54606c;
  --npmk-line: #e7e3da;
  --npmk-parchment: #f5efe4;   /* text na modré */

  --lumo-font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --lumo-primary-color: var(--npmk-blue);
  --lumo-primary-color-50pct: rgba(0, 60, 114, 0.5);
  --lumo-primary-color-10pct: rgba(0, 60, 114, 0.08);
  --lumo-primary-text-color: var(--npmk-blue);
  --lumo-body-text-color: var(--npmk-ink);
  --lumo-border-radius-m: 4px;
  --lumo-border-radius-l: 6px;
}

body {
  background: var(--npmk-paper);
}

/* ---------- štít brány: dva panely ---------- */

.gate-shell {
  display: grid;
  grid-template-columns: clamp(400px, 42%, 640px) 1fr;
  min-height: 100dvh;
}

/* — panel identity: modř, logo, deska s citátem — */

.gate-identity {
  background: linear-gradient(165deg, var(--npmk-blue) 0%, var(--npmk-blue-deep) 100%);
  color: var(--npmk-parchment);
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 56px);
}

.gate-logo {
  width: min(300px, 72%);
  height: auto;
}

/*
 * Deska „Myšlenka dne" — rám jako u mědirytových tabulí Orbis Pictus:
 * dvojitá okrová linka, uvnitř citát v Garamondu s okrovou iniciálou.
 * Obsah se bude denně měnit (MainView.setDailyQuote), design je na to stavěný.
 */
.plate {
  position: relative;
  margin: auto 0;
  max-width: 36rem;
  border: 1px solid rgba(236, 170, 99, 0.55);
  padding: clamp(1.7rem, 2.6vw, 2.5rem);
}

.plate::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(236, 170, 99, 0.28);
  pointer-events: none;
}

.plate-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--npmk-amber);
  margin-bottom: 1.1rem;
}

.plate-quote {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2.05rem);
  line-height: 1.4;
  color: var(--npmk-parchment);
}

.plate-quote::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: 0.78;
  padding: 0.04em 0.09em 0 0;
  color: var(--npmk-amber);
}

.plate-source {
  margin-top: 1.2rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(245, 239, 228, 0.82);
}

.plate-source::before {
  content: '— ';
}

/* — panel akce: papír, kroky I/II/III — */

.gate-action {
  background: var(--npmk-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
}

.gate-form {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.9rem;
}

.gate-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--npmk-amber-ink);
}

.gate-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.12;
  color: var(--npmk-blue);
  margin: 0;
}

.gate-lede {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--npmk-ink-soft);
}

/* kroky jsou skutečná sekvence průchodu bránou: I přihlášení, II kód, III otevřeno */
.step {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-top: 1px solid var(--npmk-line);
  padding-top: 1.4rem;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.step-numeral {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--npmk-amber-ink);
}

.step-label {
  font-weight: 600;
  font-size: 1rem;
}

.step-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--npmk-ink-soft);
}

.gate-note {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* pole pro kód z SMS: jednoznačné číslice, prostrkání */
.code-field::part(input-field) {
  font-family: 'Source Code Pro', monospace;
  font-size: 1.3rem;
  letter-spacing: 0.32em;
}

/* stav SMS brány v patičce formuláře */
.gate-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.4rem;
  font-size: 0.85rem;
  color: var(--npmk-ink-soft);
}

.gate-status::before {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9aa4ae;
}

.gate-status--ok::before  { background: #2f7d4f; }
.gate-status--err::before { background: #b3261e; }

/* notifikace */
.notification-error   { font-weight: 600; color: #8c1d18; }
.notification-success { font-weight: 600; color: #1e5b3c; }

/* ---------- pohyb: jediná choreografie při načtení + výměna kroku ---------- */

@keyframes gate-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.gate-logo  { animation: gate-rise 0.5s ease-out both; }
.plate      { animation: gate-rise 0.6s ease-out 0.12s both; }
.gate-form  { animation: gate-rise 0.55s ease-out 0.05s both; }
.step-enter { animation: gate-rise 0.4s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .gate-logo, .plate, .gate-form, .step-enter { animation: none; }
}

/* ---------- mobil ---------- */

@media (max-width: 959px) {
  .gate-shell {
    grid-template-columns: 1fr;
  }
  .gate-identity {
    padding: 28px 22px;
  }
  .gate-logo {
    width: 210px;
  }
  .plate {
    margin: 1.4rem 0 0;
  }
  .plate-quote {
    font-size: 1.3rem;
  }
  .gate-action {
    align-items: flex-start;
    padding: 32px 22px 48px;
  }
}
