:root {
  --bg: #0c0906;
  --bg-alt: #150d05;
  --panel: rgba(255, 248, 235, 0.06);
  --panel-strong: rgba(255, 248, 235, 0.08);
  --line: rgba(245, 166, 35, 0.16);
  --brand: #f5a623;
  --brand-deep: #a94c08;
  --text: #f7efe3;
  --muted: rgba(245, 237, 220, 0.76);
  --quiet: rgba(245, 237, 220, 0.56);
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  --radius: 26px;
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #fff1c9;
  --bg-alt: #fff7e6;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(96, 54, 8, 0.16);
  --text: #1b0c03;
  --muted: rgba(27, 12, 3, 0.78);
  --quiet: rgba(27, 12, 3, 0.6);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top, rgba(245, 166, 35, 0.14), transparent 36%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  color: var(--text);
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 120;
  backdrop-filter: blur(16px);
  background: rgba(12, 9, 6, 0.92);
  border-bottom: 1px solid rgba(245, 166, 35, 0.14);
}

body[data-theme="light"] .nav {
  background: rgba(255, 241, 201, 0.92);
  border-bottom-color: rgba(96, 54, 8, 0.16);
}

.nav-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo img {
  width: clamp(150px, 16vw, 230px);
  height: auto;
}

.nav-links,
.nav-actions,
.hero-actions,
.related-grid,
.footer-links,
.footer-social-icons,
.btn-row,
.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links {
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.nav-links a:hover { color: var(--brand); }

.nav-actions {
  align-items: center;
  justify-content: flex-end;
}

.btn,
.theme-toggle {
  min-height: 48px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(245, 166, 35, 0.5);
  background: var(--brand);
  color: #160c05;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.btn:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(245, 166, 35, 0.18);
}

.btn.ghost {
  background: rgba(255, 248, 235, 0.06);
  color: var(--text);
  border-color: rgba(255, 248, 235, 0.12);
}

.btn.outline {
  background: transparent;
  color: var(--brand);
}

.btn.small,
.theme-toggle {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 11px;
}

body[data-theme="light"] .btn,
body[data-theme="light"] .theme-toggle {
  background: #1b0c03;
  color: #f5a623;
  border-color: rgba(27, 12, 3, 0.72);
}

body[data-theme="light"] .btn.ghost {
  background: rgba(27, 12, 3, 0.06);
  color: #1b0c03;
  border-color: rgba(27, 12, 3, 0.16);
}

.theme-toggle {
  background: rgba(255, 248, 235, 0.08);
  color: var(--text);
}

.theme-toggle .toggle-track {
  width: 36px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  position: relative;
}

.theme-toggle .toggle-orb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 180ms ease;
}

.theme-toggle[data-theme="light"] .toggle-orb {
  transform: translateX(18px);
}

.blog-hero {
  padding: 78px 0 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.18);
  color: var(--brand);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-hero h1,
.related-section h2,
.modal-card h2 {
  margin: 0;
  line-height: 1.08;
}

.blog-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  max-width: 860px;
}

.blog-meta {
  margin: 16px 0 0;
  color: var(--quiet);
  font-size: 14px;
  font-weight: 700;
}

.blog-shell {
  padding: 0 0 52px;
}

.blog-body,
.related-section,
.modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.blog-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px;
  border-radius: var(--radius);
}

.blog-banner {
  margin: 0 0 28px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.14);
}

.blog-banner img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.blog-content {
  display: grid;
  gap: 18px;
}

.blog-content h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.blog-content p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.82;
}

.blog-content a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.related-section {
  max-width: 1120px;
  margin: 0 auto 56px;
  padding: 28px;
  border-radius: 24px;
}

.related-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.related-copy {
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 15px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.related-card {
  min-height: 100%;
  padding: 18px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(245, 166, 35, 0.14);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 166, 35, 0.34);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.related-card .eyebrow {
  margin-bottom: 12px;
}

.related-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.related-card p {
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.6;
}

footer {
  background: #0c0906;
  padding: 48px 0 28px;
  border-top: 1px solid rgba(245, 166, 35, 0.12);
}

.footer-top {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 28px;
}

.footer-tagline {
  color: rgba(245, 237, 220, 0.52);
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  justify-content: flex-end;
}

.footer-social-label {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 237, 220, 0.36);
}

.footer-social-icon {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(245, 237, 220, 0.06);
  border: 1px solid rgba(245, 237, 220, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(245, 237, 220, 0.62);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.footer-social-icon:hover {
  background: rgba(245, 166, 35, 0.14);
  color: var(--brand);
  border-color: rgba(245, 166, 35, 0.28);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 237, 220, 0.06);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a,
.footer-links button {
  color: rgba(245, 237, 220, 0.46);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 160ms ease;
}

.footer-links a:hover,
.footer-links button:hover { color: var(--brand); }

.footer-copy {
  margin: 0;
  font-size: 11px;
  color: rgba(245, 237, 220, 0.28);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 160;
}

.modal.active { display: grid; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 2, 0.76);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 26px;
  border-radius: 30px;
  background: var(--panel-strong);
  color: var(--text);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #000;
  font-weight: 1000;
  font-size: 22px;
  cursor: pointer;
}

.muted { color: var(--muted); }

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

.field-full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(180, 100, 10, 0.18);
  border-radius: 15px;
  background: rgba(255, 248, 232, 0.96);
  color: #1b0c03;
  padding: 12px 13px;
  outline: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.anti-hike {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(180, 100, 10, 0.18);
  background: rgba(245, 166, 35, 0.08);
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.block { width: 100%; }

.install-app-btn {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 146;
}

@media (max-width: 980px) {
  .nav-inner {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100%, calc(100% - 24px));
  }

  .blog-hero {
    padding-top: 42px;
  }

  .blog-body,
  .related-section,
  .modal-card {
    padding: 22px;
    border-radius: 22px;
  }

  .blog-content p {
    font-size: 16px;
    line-height: 1.74;
  }

  .related-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-social,
  .footer-social-icons,
  .footer-links,
  .footer-bottom,
  .footer-top {
    justify-content: flex-start;
  }

  .nav-actions .btn.outline {
    display: none;
  }
}

@media (max-width: 768px) {
  .install-app-btn {
    top: calc(env(safe-area-inset-top, 0px) + 86px);
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100vw - 32px);
    min-height: 32px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }
}
