/* ==========================================================================
   Jera — Landing Page Styles
   Design tokens carried from the Jera brand guide.
   ========================================================================== */

:root {
  /* Color */
  --charcoal:   #0E1013;
  --panel:      #15171B;
  --surface:    #22262C;
  --border:     #2A2E34;
  --bronze:     #B08B4F;
  --bronze-dim: #8f7140;
  --ember:      #9C3428;
  --parchment:  #E7E1D2;
  --muted:      #8B909A;
  --hot-gold:   #F4C430;

  /* Type */
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1120px;
  --max-width-narrow: 680px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--parchment); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

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

/* ---------- Accessibility utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bronze);
  color: var(--charcoal);
  padding: 12px 20px;
  font-weight: 600;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--hot-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section-inner.narrow {
  max-width: var(--max-width-narrow);
  text-align: center;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  margin: 0 0 12px;
}
.eyebrow.center { text-align: center; }
.section-sub {
  color: var(--muted);
  font-size: 17px;
  margin-top: 12px;
  max-width: 480px;
}
.section-sub.center { margin-left: auto; margin-right: auto; text-align: center; }

section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; }
.pillars h2, .segments h2, .how-it-works h2, .final-cta h2 { text-align: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,16,19,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-mark { width: 28px; height: 29px; }
.nav-word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 18px;
}
.nav-cta {
  border: 1px solid var(--bronze);
  color: var(--bronze);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--bronze); color: var(--charcoal); }

/* ---------- Hero ---------- */
.hero { padding-top: 64px; padding-bottom: 80px; }
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  margin: 14px 0 20px;
}
.hero-sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 480px;
  margin-bottom: 32px;
}

.waitlist-form { max-width: 460px; }
.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-row input[type="email"] {
  flex: 1 1 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--parchment);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.form-row input[type="email"]::placeholder { color: var(--muted); }
.form-row input[type="email"].input-error { border-color: var(--ember); }

.btn-primary {
  background: var(--bronze);
  color: var(--charcoal);
  border: none;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover { background: #c39a5c; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.65; cursor: default; }

.form-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 14px;
}
.form-status.success { color: var(--bronze); }
.form-status.error { color: #d97f6d; }

.form-microcopy {
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}

/* ---------- Phone mockup ---------- */
.hero-phone { display: flex; justify-content: center; }
.phone-frame {
  width: 300px;
  height: 560px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  width: 90px;
  height: 18px;
  background: var(--charcoal);
  border-radius: 0 0 14px 14px;
  margin: 0 auto 10px;
}
.phone-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.phone-header-mark { width: 18px; height: 19px; }
.phone-header span {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.phone-thread {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px;
}
.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  animation: msg-in 0.35s ease forwards;
}
@keyframes msg-in {
  to { opacity: 1; transform: translateY(0); }
}
.msg-coach {
  align-self: flex-start;
  background: var(--surface);
  color: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
}
.msg-user {
  align-self: flex-end;
  background: var(--bronze);
  color: var(--charcoal);
  border-radius: 16px 16px 4px 16px;
  font-weight: 500;
}
.msg-typing {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  display: inline-flex;
  gap: 4px;
}
.msg-typing span {
  width: 5px; height: 5px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing-dot 1.1s infinite;
}
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .msg { animation: none; opacity: 1; transform: none; }
  .msg-typing { display: none; }
}

/* ---------- Pillars ---------- */
.pillar-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  text-align: center;
}
.pillar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--bronze);
  color: var(--bronze);
  font-size: 20px;
  margin-bottom: 18px;
}
.pillar-card h3 { font-size: 19px; margin-bottom: 10px; }
.pillar-card p { color: var(--muted); font-size: 15px; }

/* ---------- Segments ---------- */
.segments { background: var(--panel); }
.segment-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.segment-card {
  padding: 26px;
  border-left: 2px solid var(--bronze);
  background: var(--charcoal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.segment-card h3 { font-size: 17px; margin-bottom: 8px; }
.segment-card p { color: var(--muted); font-size: 14.5px; }

/* ---------- How it works ---------- */
.steps {
  margin-top: 48px;
  display: grid;
  gap: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.steps li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--bronze);
  border: 1px solid var(--bronze);
  border-radius: 50%;
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 15px; }

/* ---------- Founder note ---------- */
.founder-note { background: var(--panel); }
.founder-note blockquote {
  margin: 0;
  padding: 0;
}
.founder-note p {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.5;
  color: var(--parchment);
  font-weight: 600;
}

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-mark { margin: 0 auto 24px; opacity: 0.92; }
.final-cta h2 { margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; }
.footer-inner { text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.footer-brand span {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 15px;
  color: var(--muted);
}
.footer-tag { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.footer-copy { color: #565b62; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-phone { order: -1; margin-bottom: 8px; }
  .phone-frame { width: 260px; height: 480px; }
  .pillar-grid, .segment-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .nav-word { display: none; }
  .form-row { flex-direction: column; }
  .form-row .btn-primary { width: 100%; }
  .phone-frame { width: 100%; max-width: 300px; height: 460px; }
}
