/*!
 * SEOWebChecker — English to Emoji Translator
 * Design tokens: Navy/Cyan/Violet base system + warm Amber/Coral accent reserved for emoji elements.
 * Type: Outfit (display) + Inter (body).
 */

/* ============ TOKENS ============ */
:root {
  /* Brand base (dark, default) */
  --bg: #070b16;
  --bg-elevated: #0d1326;
  --bg-card: #101936;
  --bg-card-hover: #131f42;
  --border: #1f2c52;
  --border-strong: #2c3d6e;

  --text-primary: #eef1fb;
  --text-secondary: #a7b1d4;
  --text-muted: #6c769c;

  --cyan: #34e0ff;
  --cyan-soft: #34e0ff1a;
  --violet: #9b7bff;
  --violet-soft: #9b7bff1a;

  /* Emoji-only warm accent — the signature element */
  --amber: #ffb454;
  --coral: #ff7a6b;
  --amber-soft: #ffb45422;

  --success: #4ee2a0;
  --danger: #ff6b6b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 12px 32px rgba(5, 8, 20, 0.45);
  --shadow-glow-cyan: 0 0 0 1px rgba(52,224,255,0.25), 0 8px 28px rgba(52,224,255,0.12);
  --shadow-glow-amber: 0 8px 28px rgba(255,180,84,0.18);

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1180px;
  --header-h: 72px;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f6f7fc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3fb;
  --border: #e1e5f2;
  --border-strong: #cbd2ec;

  --text-primary: #131a30;
  --text-secondary: #4b5475;
  --text-muted: #818aac;

  --cyan-soft: #0ea5c91a;
  --violet-soft: #6d4dff1a;
  --amber-soft: #ff8f1a1f;

  --shadow-sm: 0 2px 10px rgba(20,30,60,0.06);
  --shadow-md: 0 16px 36px rgba(20,30,60,0.10);
  --shadow-glow-cyan: 0 0 0 1px rgba(14,165,201,0.18), 0 8px 24px rgba(14,165,201,0.10);
  --shadow-glow-amber: 0 8px 24px rgba(255,143,26,0.14);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #04131a;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #04131a;
  box-shadow: var(--shadow-glow-cyan);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(52,224,255,0.4), 0 10px 32px rgba(52,224,255,0.22); }

.btn--amber {
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: #261405;
  box-shadow: var(--shadow-glow-amber);
}
.btn--amber:hover { box-shadow: 0 0 0 1px rgba(255,180,84,0.4), 0 10px 28px rgba(255,180,84,0.25); }

.btn--ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--bg-card-hover); border-color: var(--cyan); }

.btn--sm { padding: 9px 16px; font-size: 0.85rem; }
.btn--flash { background: var(--success) !important; color: #07241a !important; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 150;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 320ms ease, opacity 320ms ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner p { font-size: 0.88rem; color: var(--text-secondary); flex: 1 1 240px; }
.cookie-banner a { color: var(--cyan); font-weight: 600; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle__bar { display: block; width: 18px; height: 2px; background: var(--text-primary); position: relative; }
.nav-toggle__bar::before, .nav-toggle__bar::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text-primary); transition: transform var(--transition);
}
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.has-dropdown { position: relative; }
.dropdown-caret { font-size: 0.65rem; transition: transform var(--transition); }
.has-dropdown:hover .dropdown-caret { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0 8px;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 50;
  list-style: none;
  margin: 0;
}
.has-dropdown:hover .dropdown-panel,
.has-dropdown:focus-within .dropdown-panel {
  max-height: 70vh;
  opacity: 1;
  padding: 8px;
  overflow-y: auto;
}
.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.dropdown-panel a:hover { background: var(--cyan-soft); color: var(--text-primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: border-color var(--transition), transform var(--transition);
}
.theme-toggle:hover { border-color: var(--cyan); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

#navOverlay {
  position: fixed; inset: 0;
  background: rgba(2,4,12,0.55);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  border: none;
  padding: 0;
}
#navOverlay.is-open { opacity: 1; pointer-events: auto; }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb__sep { margin: 0 6px; color: var(--border-strong); }
.breadcrumb__current { color: var(--text-primary); font-weight: 500; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 56px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--violet-soft), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -100px; left: -100px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--cyan-soft), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 28px;
}
.hero__cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero__stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero__stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.hero__stat-label { font-size: 0.8rem; color: var(--text-muted); }

.hero__demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.hero__demo-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.hero__demo-line {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--text-secondary);
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.hero__demo-arrow { text-align: center; color: var(--text-muted); margin: 4px 0; font-size: 1rem; }
.hero__demo-output {
  font-size: 1.7rem;
  padding: 16px 14px;
  background: linear-gradient(135deg, var(--amber-soft), transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  min-height: 1.6em;
}

/* ============ SECTION SHELL ============ */
.section { padding: 72px 0; }
.section--tight { padding: 56px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow { display: inline-flex; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 1.02rem; }
.section--alt { background: var(--bg-elevated); }

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.feature-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: var(--cyan-soft);
}
.feature-card:nth-child(3n+2) .feature-card__icon { background: var(--violet-soft); }
.feature-card:nth-child(3n+3) .feature-card__icon { background: var(--amber-soft); }
.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ============ HOW IT WORKS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
}
.step__num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; color: var(--text-secondary); }

/* ============ TRANSLATOR TOOL ============ */
.tool-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.tool-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tool-toolbar__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.option-pill input { accent-color: var(--cyan); width: 16px; height: 16px; cursor: pointer; }

.input-field { position: relative; }
.input-field textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 16px 16px 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}
.input-field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}
.char-count {
  position: absolute;
  bottom: 12px; right: 14px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.char-count--warn { color: var(--danger); }
.field-error {
  min-height: 20px;
  font-size: 0.84rem;
  color: var(--danger);
  margin-top: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}
.field-error.is-visible { opacity: 1; }

.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.tool-actions__random { margin-left: auto; }

/* Result */
.result-shell {
  scroll-margin-top: 96px;
  border-top: 1px dashed var(--border);
  padding-top: 24px;
  margin-top: 8px;
}
.result-shell__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.result-shell__head h3 { font-size: 1.05rem; font-family: var(--font-display); }
.match-stat { font-size: 0.84rem; color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.empty-state__icon { font-size: 2rem; margin-bottom: 10px; }

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-height: 60px;
}
.has-result .empty-state { display: none; }

.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: chipPop 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.chip--matched { border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.chip--unmatched { opacity: 0.55; }
.chip__emoji { font-size: 1.4rem; line-height: 1; }
.chip__word { font-size: 0.66rem; color: var(--text-muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes chipPop {
  from { opacity: 0; transform: scale(0.5) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.result-plain-wrap {
  margin-top: 16px;
  padding: 18px;
  background: linear-gradient(135deg, var(--amber-soft), transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent);
  border-radius: var(--radius-md);
}
.result-plain-wrap__label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
#resultPlain { font-size: 1.45rem; line-height: 1.6; word-break: break-word; }

.result-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* History */
.history-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.history-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-block__head h3 { font-size: 0.95rem; font-family: var(--font-display); }
.history-list { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.history-item__btn {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.86rem;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
  font-family: var(--font-body);
}
.history-item__btn:hover { border-color: var(--cyan); background: var(--bg-card-hover); }
.history-item__text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item__emoji { flex-shrink: 0; }
.history-empty { font-size: 0.85rem; color: var(--text-muted); }

/* ============ DICTIONARY BROWSER ============ */
.dict-search-bar { margin-bottom: 22px; }
.dict-search-bar input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.98rem;
}
.dict-search-bar input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}
.dict-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.dict-row__emoji { font-size: 1.6rem; }
.dict-row__word { font-size: 0.78rem; color: var(--text-secondary); text-transform: capitalize; }
.dict-no-results { display: none; text-align: center; color: var(--text-muted); padding: 24px; }
.dict-footnote { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 0.85rem; }

/* ============ ARTICLE / SEO CONTENT ============ */
.article-block { max-width: 760px; margin: 0 auto; }
.article-block p { color: var(--text-secondary); margin-bottom: 18px; font-size: 1rem; }
.article-block p:last-child { margin-bottom: 0; }
.article-block strong { color: var(--text-primary); }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.faq-caret { transition: transform var(--transition); color: var(--text-muted); flex-shrink: 0; }
.faq-item.is-open .faq-caret { transform: rotate(45deg); color: var(--cyan); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease;
  padding: 0 20px;
}
.faq-item.is-open .faq-answer { max-height: 320px; padding: 0 20px 20px; }
.faq-answer p { color: var(--text-secondary); font-size: 0.94rem; }

/* ============ CTA ============ */
.cta {
  background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 18%, var(--bg-card)), color-mix(in srgb, var(--cyan) 12%, var(--bg-card)));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
}
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.cta p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 26px; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ FOOTER ============ */
.site-footer { background: var(--bg-elevated); border-top: 1px solid var(--border); padding: 56px 0 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; max-width: 280px; }
.footer-col h4 { font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.88rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--cyan); }
.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-bottom__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom__links a:hover { color: var(--cyan); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 95;
    border-top: 1px solid var(--border);
  }
  .primary-nav.is-open { transform: translateX(0); }
  .nav-link { width: 100%; padding: 13px 14px; }
  .has-dropdown { width: 100%; }
  .dropdown-panel {
    position: static;
    max-height: 0;
    min-width: 0;
    box-shadow: none;
    border: none;
    background: var(--bg-card);
    margin-top: 4px;
    width: 100%;
  }
  .has-dropdown.dropdown-open .dropdown-panel { max-height: 1000px; opacity: 1; padding: 6px; }
  .has-dropdown:hover .dropdown-panel { max-height: 0; opacity: 0; padding: 0 8px; }
  .has-dropdown.dropdown-open:hover .dropdown-panel { max-height: 1000px; opacity: 1; padding: 6px; }
  body.nav-open { overflow: hidden; }

  .hero__inner { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 44px; }
  .hero__cta-row { flex-direction: column; align-items: stretch; }
  .hero__cta-row .btn { width: 100%; }
  .hero__stats { gap: 18px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .tool-shell { padding: 20px; }
  .tool-actions { flex-direction: column; align-items: stretch; }
  .tool-actions .btn { width: 100%; }
  .tool-actions__random { margin-left: 0; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .result-actions .btn { width: 100%; }
  .cta { padding: 36px 20px; }
  .cta__actions { flex-direction: column; align-items: stretch; }
  .cta__actions .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner__actions { justify-content: center; }
  #resultPlain { font-size: 1.2rem; }
  .dict-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 420px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero__stats { justify-content: space-between; }
}
