/* ============================================================
   Creating Through Energy · "Candlelight" design system
   Ember #1E1712 · Parchment #F6F1E7 · Candle #C98F4E
   Clay #A65B3B · Sage #6B7A64 · Ink #5C5248
   ============================================================ */

:root {
  --ember: #1E1712;
  --parchment: #F6F1E7;
  --parchment-deep: #EFE7D8;
  --candle: #C98F4E;
  --clay: #A65B3B;
  --sage: #6B7A64;
  --ink: #5C5248;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Outfit', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --ease-magnetic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--parchment);
  color: var(--ember);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

em { font-style: italic; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Noise texture ---------- */
.noise-overlay {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.05;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 60;
}

/* ---------- Layout ---------- */
.wrap { max-width: 72rem; margin: 0 auto; }
.wrap-narrow { max-width: 46rem; }

.section { padding: 6.5rem 1.5rem; position: relative; }
.section-tinted { background: var(--parchment-deep); }
.section-dark { background: var(--ember); color: var(--parchment); overflow: hidden; }

@media (min-width: 640px) { .section { padding: 8.5rem 3rem; } }

/* ---------- Type ---------- */
.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.kicker-candle { color: var(--candle); }
.kicker-clay { color: var(--clay); }

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 2.2rem;
}
.accent { color: var(--clay); }
.accent-candle { color: var(--candle); }

.prose p { font-size: 1.15rem; line-height: 1.75; color: var(--ink); margin-bottom: 1.4rem; }
.prose strong { color: var(--ember); font-weight: 500; }
@media (min-width: 640px) { .prose p { font-size: 1.25rem; } }

.section-intro {
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.7;
  max-width: 40rem;
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  border-radius: 9999px;
  padding: 0.9rem 2rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s var(--ease-magnetic), box-shadow 0.3s, color 0.35s, border-color 0.3s;
}
.btn:hover { transform: scale(1.03); }
.btn:focus-visible { outline: 3px solid var(--candle); outline-offset: 3px; }
.btn-label { position: relative; z-index: 1; }
.btn-sm { padding: 0.55rem 1.35rem; font-size: 0.9rem; }

.btn-candle { background: var(--candle); color: var(--ember); }
.btn-candle .btn-slide {
  position: absolute; inset: 0;
  background: var(--clay);
  transform: translateY(101%);
  transition: transform 0.35s var(--ease-magnetic);
}
.btn-candle:hover .btn-slide { transform: translateY(0); }
.btn-candle:hover { color: var(--parchment); box-shadow: 0 10px 30px rgba(166, 91, 59, 0.35); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(246, 241, 231, 0.45);
  color: var(--parchment);
}
.btn-ghost:hover { border-color: var(--candle); color: var(--candle); }

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem 0.7rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  color: var(--parchment);
  max-width: calc(100vw - 2rem);
  transition: background 0.5s, color 0.5s, border-color 0.5s, box-shadow 0.5s;
}
#navbar.scrolled {
  background: rgba(246, 241, 231, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(30, 23, 18, 0.1);
  color: var(--ember);
  box-shadow: 0 8px 30px rgba(30, 23, 18, 0.08);
}
.nav-wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-right: 0.5rem;
}
@media (max-width: 520px) {
  #navbar { gap: 0.4rem; padding: 0.5rem 0.6rem 0.5rem 1rem; }
  .nav-wordmark { font-size: 0.88rem; margin-right: 0.15rem; }
  #navbar .btn-sm { padding: 0.45rem 0.9rem; font-size: 0.78rem; }
}
.nav-links { display: none; align-items: center; gap: 0.2rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  transition: transform 0.25s var(--ease-magnetic), color 0.25s;
}
.nav-link:hover { transform: translateY(-1px); color: var(--candle); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  background: var(--ember);
  color: var(--parchment);
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 10rem 1.5rem 5rem;
}
@media (min-width: 640px) { .hero-content { padding: 10rem 3rem 6rem; } }
@media (min-width: 1024px) { .hero-content { padding: 10rem 5rem 6.5rem; } }

.h1-sans {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.2vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 62rem;
}
.h1-serif {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--candle);
  font-size: clamp(2.9rem, 7.5vw, 6.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 0.8rem;
}
.hero-sub {
  max-width: 36rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(246, 241, 231, 0.8);
  margin-top: 2rem;
}
@media (min-width: 640px) { .hero-sub { font-size: 1.25rem; } }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-breath {
  position: absolute;
  top: 50%; left: 50%;
  width: 90vmax; height: 90vmax;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle at center,
    rgba(201, 143, 78, 0.34) 0%,
    rgba(166, 91, 59, 0.16) 32%,
    rgba(30, 23, 18, 0) 62%);
  animation: breathe 8s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 0.85; }
  50%      { transform: translate(-50%, -55%) scale(1.12); opacity: 1; }
}
.hero-vignette {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(30, 23, 18, 0.92) 0%,
    rgba(30, 23, 18, 0.25) 45%,
    rgba(30, 23, 18, 0.55) 100%);
}

/* ---------- Moment card ---------- */
.moment-card {
  position: relative;
  overflow: hidden;
  margin-top: 3rem;
  border-radius: 2rem;
  background: var(--ember);
  color: var(--parchment);
  padding: 2.5rem 2rem;
}
@media (min-width: 640px) { .moment-card { padding: 3rem; } }
.moment-card blockquote {
  position: relative; z-index: 1;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.35;
}
.moment-card figcaption {
  position: relative; z-index: 1;
  margin-top: 1.5rem;
  color: var(--candle);
  font-size: 1.1rem;
}
.card-glow {
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 140%;
  background: radial-gradient(circle at center, rgba(201, 143, 78, 0.22) 0%, rgba(30, 23, 18, 0) 65%);
}

/* ---------- Method ---------- */
.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}
@media (min-width: 900px) { .method-grid { grid-template-columns: repeat(3, 1fr); } }

.method-card {
  position: relative;
  background: var(--parchment);
  border: 1px solid rgba(30, 23, 18, 0.08);
  border-radius: 2rem;
  padding: 2.25rem;
  box-shadow: 0 12px 40px rgba(30, 23, 18, 0.06);
  transition: transform 0.35s var(--ease-magnetic), box-shadow 0.35s;
}
.method-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 55px rgba(30, 23, 18, 0.12);
}
.method-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3rem;
  line-height: 1;
  color: rgba(201, 143, 78, 0.6);
}
.method-card h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-top: 0.6rem;
}
.method-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--clay);
  margin: 0.3rem 0 1rem;
}
.method-body { color: var(--ink); line-height: 1.7; }
.method-spine {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(166, 91, 59, 0.35);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
  line-height: 1.9;
}

.outcome-band {
  margin-top: 3.5rem;
  border: 1px solid rgba(201, 143, 78, 0.4);
  border-radius: 2.5rem;
  background: var(--parchment);
  padding: 3rem 2rem;
  text-align: center;
}
@media (min-width: 640px) { .outcome-band { padding: 3.25rem 3.5rem; } }
.outcome-lead { font-size: 1.15rem; color: var(--ink); }
.outcome-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  margin-top: 0.4rem;
}
.outcome-body { font-size: 1.1rem; color: var(--ink); max-width: 34rem; margin: 1rem auto 0; }
.outcome-words {
  margin-top: 1.6rem;
  color: var(--candle);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---------- Intersection ---------- */
.section-dark .section-breath {
  position: absolute;
  top: 50%; left: 50%;
  width: 70vmax; height: 70vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center,
    rgba(201, 143, 78, 0.14) 0%,
    rgba(30, 23, 18, 0) 60%);
  animation: breathe 10s ease-in-out infinite;
}
.intersection-content { position: relative; z-index: 1; text-align: center; }
.intersection-lines p {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 300;
  color: rgba(246, 241, 231, 0.7);
  margin-bottom: 0.7rem;
}
.intersection-claim {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.1rem, 5.5vw, 3.8rem);
  line-height: 1.15;
  margin-top: 2.2rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 26rem; gap: 5rem; }
  .about-portrait { position: sticky; top: 7rem; }
}
.portrait-frame {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 35% 25%, #3a2a1d 0%, #1E1712 70%);
  border: 1px solid rgba(201, 143, 78, 0.5);
  box-shadow: 0 25px 60px rgba(30, 23, 18, 0.25), 0 0 0 10px rgba(201, 143, 78, 0.12);
  max-width: 21rem;
  margin: 0 auto;
  padding: 0.75rem;
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.portrait-frame img.missing { display: none; }
.portrait-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.portrait-fallback span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 7rem;
  color: rgba(201, 143, 78, 0.5);
}
.portrait-frame img { position: relative; z-index: 1; }
.about-portrait figcaption { margin-top: 1.4rem; text-align: center; }
.portrait-name {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
}
.portrait-title {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Connect ---------- */
.connect-content { text-align: center; }
.connect-content .kicker { margin-left: auto; margin-right: auto; }
.connect-content .section-intro { margin: 0 auto; }

#connect-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 34rem;
  margin: 2.5rem auto 0;
}
@media (min-width: 640px) { #connect-form { flex-direction: row; } }
#connect-form input {
  flex: 1;
  border: 1px solid rgba(30, 23, 18, 0.2);
  background: var(--parchment);
  border-radius: 9999px;
  padding: 1rem 1.5rem;
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--ember);
  outline: none;
  transition: box-shadow 0.25s, border-color 0.25s;
}
#connect-form input:focus {
  border-color: var(--candle);
  box-shadow: 0 0 0 3px rgba(201, 143, 78, 0.3);
}
.form-success {
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
}
.consent-note {
  margin: 1.6rem auto 0;
  max-width: 28rem;
  font-size: 0.85rem;
  color: rgba(92, 82, 72, 0.85);
  line-height: 1.6;
}

/* ---------- Footer ---------- */
footer {
  background: var(--ember);
  color: var(--parchment);
  border-radius: 4rem 4rem 0 0;
  margin-top: 1rem;
  padding: 4.5rem 1.5rem 2.5rem;
}
@media (min-width: 640px) { footer { padding: 5rem 3rem 2.5rem; } }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--candle);
  margin-top: 0.5rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-link {
  width: fit-content;
  color: rgba(246, 241, 231, 0.8);
  transition: transform 0.25s var(--ease-magnetic), color 0.25s;
}
.footer-link:hover { transform: translateY(-1px); color: var(--candle); }
.footer-base {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: space-between;
  border-top: 1px solid rgba(246, 241, 231, 0.15);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(246, 241, 231, 0.6);
}
@media (min-width: 640px) { .footer-base { flex-direction: row; } }

/* ---------- Reveal (pre-animation state, JS only) ---------- */
.js .reveal, .js .hero-line { opacity: 0; transform: translateY(28px); }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 46rem; margin: 0 auto; padding: 5rem 1.5rem 3rem; }
.legal-back { color: var(--clay); font-weight: 500; transition: color 0.25s; }
.legal-back:hover { color: var(--candle); }
.legal-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: -0.015em;
  margin: 2rem 0 0.4rem;
}
.legal-date { color: var(--ink); margin-bottom: 2.5rem; }
.legal-body h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  margin: 2.4rem 0 0.7rem;
}
.legal-body p, .legal-body li { color: var(--ink); line-height: 1.8; margin-bottom: 1rem; }
.legal-body ul { list-style: disc; padding-left: 1.5rem; }
.legal-body a { color: var(--clay); }
.legal-body strong { color: var(--ember); font-weight: 500; }
.legal-footer { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem 3rem; font-size: 0.85rem; color: var(--ink); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-breath, .section-dark .section-breath { animation: none; }
  .js .reveal, .js .hero-line { opacity: 1; transform: none; }
  .btn, .method-card, .nav-link, .footer-link { transition: none; }
}
