/* ========================
   STACKSTEP — BRAND STYLES
   ======================== */

:root {
  --bg: #F7F5F0;
  --bg-warm: #F2EFE8;
  --fg: #1A2E1F;
  --fg-light: #3D5A3F;
  --accent: #C9763A;
  --accent-muted: #E8B98A;
  --sage: #7D9E7B;
  --sage-light: #A8C4A2;
  --muted: #8B8680;
  --border: #DDD8CF;
  --white: #FFFFFF;
  --training-bg: #1A2E1F;
  --rest-bg: #F0ECE4;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

/* ========================
   TYPOGRAPHY
   ======================== */

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ========================
   NAVIGATION
   ======================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-light);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--fg) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem !important;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--white) !important; }

/* ========================
   HERO
   ======================== */

.hero {
  padding: 5rem 2rem 4rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg-light);
  max-width: 44ch;
}

/* Stack Card */
.hero-stack-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(26, 46, 31, 0.1);
}

.stack-card-label {
  background: var(--bg-warm);
  padding: 0.7rem 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.stack-card-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stack-item {
  padding: 1rem 1.2rem;
}

.stack-item--training { background: var(--training-bg); }
.stack-item--rest { background: var(--rest-bg); }

.stack-item-day {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.stack-item--training .stack-item-day { color: var(--accent-muted); }
.stack-item--rest .stack-item-day { color: var(--muted); }

.stack-item-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.stack-item-time {
  font-size: 0.68rem;
  font-weight: 500;
  font-family: 'DM Sans', monospace;
  min-width: 80px;
}

.stack-item--training .stack-item-time { color: rgba(255,255,255,0.6); }
.stack-item--rest .stack-item-time { color: var(--muted); }

.stack-item-compound {
  font-size: 0.82rem;
  font-weight: 600;
  flex: 1;
}

.stack-item--training .stack-item-compound { color: var(--white); }
.stack-item--rest .stack-item-compound { color: var(--fg); }

.stack-item-dose {
  font-size: 0.72rem;
  font-family: 'DM Sans', monospace;
}

.stack-item--training .stack-item-dose { color: var(--accent-muted); }
.stack-item--rest .stack-item-dose { color: var(--sage); }

.stack-card-footer {
  padding: 0.65rem 1.2rem;
  font-size: 0.7rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg-warm);
}

/* ========================
   PHILOSOPHY
   ======================== */

.philosophy {
  background: var(--bg-warm);
  padding: 5rem 2rem;
}

.philosophy-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.philosophy-header {
  margin-bottom: 3rem;
}

.philosophy-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.5rem;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
  margin-bottom: 3rem;
}

.philosophy-block h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--fg);
}

.philosophy-block p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg-light);
}

.philosophy-statement {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.philosophy-statement p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--fg);
  max-width: 65ch;
}

.philosophy-statement em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}

/* ========================
   HOW IT WORKS
   ======================== */

.howitworks {
  padding: 5rem 2rem;
}

.howitworks-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.howitworks h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.5rem;
  margin-bottom: 3rem;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.step:last-child { border-bottom: 1px solid var(--border); }

.step-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.step-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.step-content p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--fg-light);
  max-width: 55ch;
}

/* ========================
   SAMPLE SCHEDULE
   ======================== */

.sample {
  background: var(--bg-warm);
  padding: 5rem 2rem;
}

.sample-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.sample h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.sample p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--fg-light);
  margin-bottom: 1.5rem;
}

.sample-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sample-features li {
  font-size: 0.9rem;
  color: var(--fg);
  padding-left: 1.5rem;
  position: relative;
}

.sample-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Schedule Widget */
.sample-schedule {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(26, 46, 31, 0.08);
}

.schedule-header {
  background: var(--fg);
  color: var(--white);
  padding: 0.8rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.schedule-days { display: flex; flex-direction: column; }

.schedule-day {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.schedule-day--active { background: rgba(26, 46, 31, 0.04); }

.schedule-day-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.schedule-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.25rem;
}

.schedule-row .time {
  font-size: 0.68rem;
  font-family: 'DM Sans', monospace;
  color: var(--muted);
  min-width: 72px;
}

.schedule-row .item {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg);
}

.schedule-export {
  padding: 0.75rem 1.2rem;
  background: var(--bg-warm);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--muted);
}

/* ========================
   CLOSING
   ======================== */

.closing {
  padding: 6rem 2rem;
  text-align: center;
}

.closing-inner { max-width: 700px; margin: 0 auto; }

.closing h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.closing p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg-light);
}

/* ========================
   FOOTER
   ======================== */

.footer {
  background: var(--fg);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--sage-light);
  margin-bottom: 1.5rem;
}

.footer-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  max-width: 50ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) {
  .hero-inner,
  .philosophy-grid,
  .sample-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .step { grid-template-columns: 60px 1fr; gap: 1.5rem; }
  .step-number { font-size: 2.5rem; }

  .nav-links { display: none; }

  .hero { padding: 3rem 1.5rem 3rem; }
  .philosophy, .howitworks, .sample, .closing { padding: 3.5rem 1.5rem; }
  .footer { padding: 2.5rem 1.5rem; }

  .hero-stack-card { order: -1; }
  .sample-schedule { order: -1; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 2.4rem; }
  .philosophy-statement p { font-size: 1.1rem; }
  .step-content p { font-size: 0.9rem; }
  .schedule-row .item { font-size: 0.76rem; }
}