:root {
  --ink: #14161B;
  --ink-2: #1D2028;
  --ink-3: #262A35;
  --paper: #F1ECE1;
  --paper-dim: #C9C2B3;
  --ember: #E3A857;
  --ember-dim: #B8863F;
  --slate: #7C8494;
  --line: rgba(241, 236, 225, 0.1);

  --pentecost-maroon: #3D1220;
  --pentecost-gold: #C6A15B;
  --safekaba-navy: #0A2463;

  --display: "Newsreader", Georgia, serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.75rem;
}
.container.narrow { max-width: 680px; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ---------------------------------------------------------- Ambient field */
.ember-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 420px at 50% -8%, rgba(227, 168, 87, 0.16), transparent 65%),
    radial-gradient(900px 700px at 85% 40%, rgba(227, 168, 87, 0.05), transparent 60%);
  pointer-events: none;
}

/* ---------------------------------------------------------- Header/Footer */
header.site, footer.site { padding: 1.5rem 0; }
header.site .container, footer.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand .mark { width: 24px; height: 24px; flex-shrink: 0; }
.brand.small { font-size: 0.95rem; opacity: 0.8; }
.brand.small .mark { width: 18px; height: 18px; }

nav.tabs { display: flex; gap: 0.4rem; }
nav.tabs a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.86rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
nav.tabs a:hover { color: var(--paper); background: var(--ink-2); }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}
.footer-meta {
  margin: 0;
  color: var(--slate);
  font-size: 0.85rem;
}
.footer-meta a { color: var(--slate); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta a:hover { color: var(--ember); }

/* ---------------------------------------------------------- Hero */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-dim);
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--paper);
}
.hero-sub {
  max-width: 480px;
  margin: 0 auto;
  color: var(--paper-dim);
  font-size: 1.08rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------- Hero flame */
.hero-flame {
  position: relative;
  width: 96px;
  height: 130px;
  margin: 0 auto 1.75rem;
}
.flame-glow {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,168,87,0.35) 0%, rgba(227,168,87,0.12) 45%, transparent 72%);
  filter: blur(2px);
  animation: glow-pulse 3.6s ease-in-out infinite;
}
.flame-svg { position: relative; width: 100%; height: 100%; display: block; }

.flame-outer {
  fill: var(--ember);
  transform-origin: 50px 96px;
  animation: flicker-outer 2.8s ease-in-out infinite;
}
.flame-mid {
  fill: #F2C77E;
  transform-origin: 50px 83.5px;
  animation: flicker-mid 2.3s ease-in-out infinite;
}
.flame-inner {
  fill: #FDEBC8;
  transform-origin: 50px 75.5px;
  animation: flicker-inner 1.9s ease-in-out infinite;
}
.flame-base {
  stroke: var(--ember-dim);
  opacity: 0.7;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes flicker-outer {
  0%, 100% { transform: scaleY(1) scaleX(1) rotate(0deg); }
  25% { transform: scaleY(1.04) scaleX(0.97) rotate(-0.6deg); }
  50% { transform: scaleY(0.97) scaleX(1.02) rotate(0.4deg); }
  75% { transform: scaleY(1.02) scaleX(0.99) rotate(-0.3deg); }
}
@keyframes flicker-mid {
  0%, 100% { transform: scaleY(1) translateX(0); }
  30% { transform: scaleY(0.95) translateX(0.6px); }
  60% { transform: scaleY(1.05) translateX(-0.5px); }
}
@keyframes flicker-inner {
  0%, 100% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.08); opacity: 0.92; }
  70% { transform: scale(0.94); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .flame-glow, .flame-outer, .flame-mid, .flame-inner {
    animation: none;
  }
}

@media (max-width: 640px) {
  .hero-flame { width: 72px; height: 98px; margin-bottom: 1.25rem; }
}

/* ---------------------------------------------------------- About */
.about {
  padding: 3rem 0 5.5rem;
  border-top: 1px solid var(--line);
}
.lede {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--paper);
  margin: 0 0 1.4rem;
}
.about p:not(.lede) {
  color: var(--paper-dim);
  font-size: 1rem;
  margin: 0;
}

/* ---------------------------------------------------------- Work / Products */
.work {
  padding: 1rem 0 4rem;
  border-top: 1px solid var(--line);
}
.section-label { text-align: left; }

.product-card {
  display: flex;
  align-items: stretch;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover {
  border-color: rgba(241, 236, 225, 0.22);
  transform: translateY(-2px);
}

.product-flame {
  width: 6px;
  flex-shrink: 0;
}
.product-card.pentecost .product-flame {
  background: linear-gradient(180deg, var(--pentecost-gold), var(--pentecost-maroon));
}
.product-card.safekaba .product-flame {
  background: linear-gradient(180deg, #4C7BD9, var(--safekaba-navy));
}

.product-body {
  padding: 2rem 2.2rem;
  flex: 1;
}
.product-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.6rem;
}
.product-card.pentecost .product-eyebrow { color: var(--pentecost-gold); }
.product-card.safekaba .product-eyebrow { color: #6E93D6; }

.product-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 0.65rem;
}
.product-body p:not(.product-eyebrow) {
  color: var(--paper-dim);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.1rem;
  max-width: 560px;
}
.product-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ember);
}
.product-card.safekaba .product-link { color: #6E93D6; }

/* ---------------------------------------------------------- Closing */
.closing {
  padding: 3rem 0 6rem;
  text-align: center;
}
.closing-line {
  font-family: var(--display);
  font-style: italic;
  color: var(--slate);
  font-size: 1.1rem;
  margin: 0;
}

/* ---------------------------------------------------------- Responsive */
@media (max-width: 640px) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .about, .work { padding-top: 2.5rem; padding-bottom: 3rem; }
  .product-body { padding: 1.5rem 1.5rem; }
  .product-body h2 { font-size: 1.4rem; }
  nav.tabs a { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
}

/* ---------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-in { opacity: 1; transform: translateY(0); }
