/* Kilnfriend marketing site
   Palette pulled from the app: bg #0F0F12, primary #FF6B35, accent #FFB347 */

:root {
  --bg: #0b0b0e;
  --bg-raised: #16161c;
  --surface: #1a1a21;
  --surface-high: #24242e;
  --border: #2e2e3a;
  --text: #f5f5f7;
  --text-dim: #9b9ba8;
  --primary: #ff6b35;
  --primary-dim: #cc4a1a;
  --accent: #ffb347;
  --success: #4ade80;
  --warn: #fbbf24;
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'SFMono-Regular', monospace;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* Atmospheric kiln-glow background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(80% 55% at 50% -10%, rgba(255, 107, 53, 0.28), transparent 60%),
    radial-gradient(60% 40% at 85% 15%, rgba(255, 179, 71, 0.14), transparent 60%),
    radial-gradient(70% 50% at 10% 105%, rgba(255, 69, 0, 0.16), transparent 60%),
    linear-gradient(180deg, #0b0b0e 0%, #0e0d10 45%, #0b0a0d 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}

.ember {
  position: fixed;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgba(255, 179, 71, 0.8);
  left: 18%;
  bottom: -10px;
  opacity: 0;
  animation: rise 9s ease-in infinite;
  z-index: 0;
  pointer-events: none;
}
.ember--two { left: 62%; animation-delay: 3s; animation-duration: 11s; }
.ember--three { left: 84%; animation-delay: 6s; animation-duration: 8s; }

@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(-90vh) translateX(30px); opacity: 0; }
}

a { color: inherit; text-decoration: none; }

.br-desktop { display: inline; }
@media (max-width: 640px) { .br-desktop { display: none; } }

/* Header */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand__flame { width: 26px; height: 26px; flex-shrink: 0; }
.brand--small { font-size: 1rem; opacity: 0.9; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #1a0d05;
  box-shadow: 0 8px 30px -8px rgba(255, 107, 53, 0.6);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -8px rgba(255, 107, 53, 0.75); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--primary); background: rgba(255, 107, 53, 0.08); }
.btn--small { padding: 9px 16px; font-size: 0.88rem; }
.btn--large { padding: 17px 30px; font-size: 1.08rem; }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 24px 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.35), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 18px;
}

.hero__title {
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(160deg, #ffffff 20%, #ffd9b3 65%, var(--primary) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 620px;
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text-dim);
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.hero__note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 90px 24px;
}

.section--band {
  max-width: none;
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.06), rgba(255, 107, 53, 0) 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--band > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }

.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  font-weight: 700;
}

/* Feature rows (asymmetric, not a card grid) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 88px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row--reverse .feature-row__text { order: 2; }
.feature-row--reverse .feature-row__figure { order: 1; }

.feature-row__text h3 {
  font-size: 1.5rem;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.feature-row__text p {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 42ch;
}

.feature-row__figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mock UI decorations */
.mock-readout { width: 100%; font-family: var(--font-mono); }
.mock-readout__label { display: block; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 10px; }
.mock-readout__temp { display: block; font-size: 3rem; font-weight: 500; color: var(--primary); }
.mock-readout__temp small { font-size: 1.4rem; color: var(--text-dim); }
.mock-readout__bar { height: 6px; border-radius: 999px; background: var(--surface-high); margin: 18px 0 12px; overflow: hidden; }
.mock-readout__bar span { display: block; height: 100%; width: 58%; background: linear-gradient(90deg, var(--primary-dim), var(--accent)); }
.mock-readout__meta { font-size: 0.78rem; color: var(--text-dim); }

.mock-chart { width: 100%; height: 140px; }
.mock-chart svg { width: 100%; height: 100%; }

.mock-log { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.mock-log__row {
  display: flex; justify-content: space-between; font-size: 0.92rem;
  padding: 12px 14px; background: var(--surface-high); border-radius: 10px;
  border: 1px solid var(--border);
}
.mock-log__row .ok { color: var(--success); font-family: var(--font-mono); font-size: 0.82rem; }
.mock-log__row .warn { color: var(--warn); font-family: var(--font-mono); font-size: 0.82rem; }

/* Split (BLE / cloud) */
.split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.split__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}
.split__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.split__card h3 { font-size: 1.4rem; margin: 10px 0 12px; }
.split__card p { color: var(--text-dim); margin: 0; }
.split__connector { display: flex; align-items: center; justify-content: center; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.steps__item {
  display: flex;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}
.steps__item:last-child { border-bottom: 1px solid var(--border); }
.steps__num {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary);
  min-width: 44px;
}
.steps__item h3 { margin: 0 0 8px; font-size: 1.3rem; }
.steps__item p { margin: 0; color: var(--text-dim); max-width: 52ch; }

/* CTA */
.section--cta { padding-top: 40px; padding-bottom: 120px; }
.cta {
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 107, 53, 0.14), rgba(255, 107, 53, 0.02));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 72px 32px;
}
.cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.cta p { color: var(--text-dim); margin: 0 0 32px; font-size: 1.05rem; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 860px) {
  .feature-row, .feature-row--reverse .feature-row__text, .feature-row--reverse .feature-row__figure {
    order: initial;
  }
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; }
  .split__connector { transform: rotate(90deg); margin: -8px 0; }
}

@media (max-width: 520px) {
  .site-header { padding: 22px 18px 0; }
  .hero { padding: 64px 18px 56px; }
  .section { padding: 64px 18px; }
  .cta { padding: 48px 22px; border-radius: 22px; }
}
