/* FurnaceLog — landing page styles. Colors mirror tailwind.config.js (primary)
   and app.json (splash cream); the flame orange comes from the app icon. */
:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --flame: #e8940c;
  --flame-soft: #fbf4e2;
  --overdue: #dc2626;

  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-alt: var(--flame-soft);
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --link: var(--primary-700);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px rgb(17 24 39 / 0.08);

  --radius: 16px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-alt: #1a1a14;
    --text: #f3f4f6;
    --muted: #b6bdc9;
    --border: #243049;
    --link: #93c5fd;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary-600);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: none; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }
@media (min-width: 860px) { .site-nav { display: block; } }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
}
.lang-switch a, .lang-switch span {
  padding: 0.3rem 0.7rem;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch [aria-current="true"] { background: var(--primary-600); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s, transform 0.15s;
}
.btn-primary { background: var(--primary-600); color: #fff; }
.btn-primary:hover { background: var(--primary-700); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary-500); }

/* Hero */
.hero { padding: 3rem 0 2.5rem; overflow: hidden; }
.hero .container { display: grid; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: #9a5b00;
  font-size: 0.85rem;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: #f5c26b; } }
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--primary-600); }
@media (prefers-color-scheme: dark) { .hero h1 .accent { color: var(--primary-500); } }
.hero .lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 5% auto;
  height: 80%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--flame) 30%, transparent), transparent);
  z-index: 0;
}
@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

.phone {
  position: relative;
  z-index: 1;
  width: min(300px, 78vw);
  padding: 10px;
  border-radius: 42px;
  background: #0f172a;
  box-shadow: var(--shadow), 0 30px 60px rgb(15 23 42 / 0.25);
}
.phone img { border-radius: 32px; width: 100%; }

/* Sections */
section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* Problem */
.problem-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .problem-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.section-alt .card { background: var(--bg); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
}
@media (prefers-color-scheme: dark) { .card .icon { background: #1e2a4a; color: #93c5fd; } }
.card .icon svg { width: 22px; height: 22px; }

/* Features */
.feature {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: 2rem 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature h3 { margin: 0 0 0.6rem; font-size: 1.45rem; line-height: 1.25; }
.feature p { margin: 0 0 0.9rem; color: var(--muted); }
.feature ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.feature li { margin-bottom: 0.3rem; }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { width: min(260px, 70vw); }
.feature-tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-600);
}
@media (prefers-color-scheme: dark) { .feature-tag { color: #93c5fd; } }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .feature:nth-of-type(even) .feature-media { order: -1; }
}
.feature-noshot {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

/* Steps */
.steps { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--flame);
  color: #1f1300;
  font-weight: 800;
}

/* Gallery */
.gallery-group + .gallery-group { margin-top: 2.25rem; }
.gallery-group h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.gallery { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.gallery-desktop { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-mobile { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  text-align: left;
  color: inherit;
  font: inherit;
}
.gallery button:hover img { transform: scale(1.03); }
.gallery figure { margin: 0; }
.gallery img { transition: transform 0.25s; width: 100%; }
.gallery figcaption { padding: 0.5rem 0.75rem; font-size: 0.85rem; color: var(--muted); }

.lightbox {
  max-width: min(96vw, 1440px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.5);
}
.lightbox::backdrop { background: rgb(3 7 18 / 0.8); }
.lightbox img { max-height: calc(94vh - 3.5rem); width: auto; margin: 0 auto; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  font-size: 0.9rem;
}
.lightbox-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.6rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--border); }

/* Tech */
.tech-grid { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .tech-grid { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.chips li {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
}
pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:not(pre) > code {
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--primary-50);
  font-size: 0.9em;
}
@media (prefers-color-scheme: dark) { :not(pre) > code { background: #1e2a4a; } }

/* Footer */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
