/* ═══════════════════════════════════════════════════════════════════════════════
 * Cookie AI — Homepage Styles (v5 Editorial Hero + Timeline)
 * ═══════════════════════════════════════════════════════════════════════════════
 * Full-width editorial hero photo with cream text overlay upper-left.
 * Terracotta page background matches DSC07971 photo backdrop.
 * Timeline value props with process flow diagram below hero.
 * Uses --color-* and --font-display tokens from tokens.css.
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Homepage Palette Override ──────────────────────────────────────────── */
body[data-page="home"] {
  --home-bg:         #80422D;
  --home-bg-dark:    #6B3625;
  --home-text:       #F5F0E8;
  --home-text-muted: rgba(245, 240, 232, 0.7);
  --home-accent:     #F5F0E8;
  --home-dot:        #F5F0E8;
  --home-line:       rgba(245, 240, 232, 0.3);
}

/* ─── Homepage Vertical Nav ──────────────────────────────────────────────── */
.home-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  padding: 32px 20px;
}

.home-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.home-nav__link {
  font-family: var(--font-display);
  font-size: var(--text-label);
  font-weight: 400;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-nav__link:hover {
  color: #F5F0E8;
  border-bottom-color: #F5F0E8;
}

.home-nav__link:focus-visible {
  outline: 1px solid #F5F0E8;
  outline-offset: 2px;
  color: #F5F0E8;
}

/* ─── Page-Level Overrides ───────────────────────────────────────────────── */
body[data-page="home"],
body[data-page="home"] main {
  background-color: var(--home-bg);
  color: var(--home-text);
  font-family: var(--font-display);
}

body[data-page="home"] main {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Hide desktop nav on homepage — editorial hero, no chrome */
@media (min-width: 769px) {
  body[data-page="home"] .nav {
    display: none;
  }
}

/* Mobile: homepage modal uses cream background, dark text */
@media (max-width: 768px) {
  /* Hamburger bars visible on terracotta hero */
  body[data-page="home"] .nav__toggle-bar {
    background: var(--text-cream);
  }

  /* Modal: cream background */
  body[data-page="home"] .nav-links {
    background: var(--bg-cream);
  }

  /* Close button: dark on cream */
  body[data-page="home"] .nav__close {
    color: var(--text-dark);
  }

  /* Links: dark on cream */
  body[data-page="home"] .nav__mobile-link {
    color: var(--text-dark);
  }

  body[data-page="home"] .nav__mobile-link:hover {
    color: var(--copper);
    opacity: 1;
  }

  body[data-page="home"] .nav__mobile-link--current {
    color: var(--copper);
  }
}

/* ─── Decorative Node-Network SVG Backgrounds ─────────────────────────────── */
.node-bg {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
  filter: brightness(10);
}

.node-bg--top-right {
  top: auto;
  bottom: 200px;
  right: -180px;
  width: 380px;
  height: 380px;
}

.node-bg--mid-left {
  top: auto;
  bottom: 500px;
  left: -40px;
  width: 160px;
  height: 500px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * HERO — Full-width photo with text overlay
 * ═══════════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.hero__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ─── Text Overlay ───────────────────────────────────────────────────────── */
.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 80px);
}

/* ─── Wordmark ───────────────────────────────────────────────────────────── */
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7rem);
  font-weight: 200;
  letter-spacing: var(--tracking-hero, 0.15em);
  line-height: var(--leading-display);
  text-transform: uppercase;
  color: var(--home-text);
  white-space: nowrap;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.wordmark__letter,
.wordmark__rest {
  display: inline;
}

/* SVG "O" replacement — sized to match cap height */
.wordmark__o {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.03em;
  position: relative;
}

.wordmark__o-svg,
.wordmark__o-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(10);
}

/* ─── Tagline ────────────────────────────────────────────────────────────── */
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  font-weight: 400;
  color: var(--home-text);
  margin-top: 20px;
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
  opacity: 0.9;
}

/* ─── CTA Button ─────────────────────────────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border: 1px solid var(--home-text);
  border-radius: 0;
  background-color: transparent;
  color: var(--home-text);
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 28px;
}

.btn-cta:hover {
  background-color: var(--home-text);
  color: var(--home-bg);
}

.btn-cta:focus,
.btn-cta:focus-visible {
  outline: 2px solid var(--home-text);
  outline-offset: 4px;
}

/* ─── "More about Cookie" link on hero image ─────────────────────────────── */
.hero__about-link {
  color: rgba(245, 240, 232, 0.5);
  position: absolute;
  z-index: 2;
  right: 4%;
  bottom: 17%;
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.hero__about-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #F5F0E8;
  transition: width 0.3s ease;
}

.hero__about-link:hover {
  color: #F5F0E8;
}

.hero__about-link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * ROADMAP — Editorial magazine-style step cards
 * ═══════════════════════════════════════════════════════════════════════════════ */
.roadmap-section {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 8vw, 100px) 4vw;
  border-top: none;
}

/* Divider removed per design feedback */

.roadmap {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  position: relative;
}

/* SVG pipeline diagram */
.roadmap__svg {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
}

/* Step cards grid — generous spacing for editorial feel */
.roadmap__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(40px, 4vw, 64px);
}

.roadmap__step {
  padding-top: 20px;
}

/* Stagger steps upward to follow the SVG trend line */
.roadmap__step:nth-child(2) {
  transform: translateY(clamp(-80px, -6vw, -20px));
}

.roadmap__step:nth-child(3) {
  transform: translateY(clamp(-130px, -10vw, -40px));
}

.roadmap__step:nth-child(4) {
  transform: translateY(clamp(-180px, -13vw, -60px));
}

/* Step number — oversized, editorial serif numeral */
.roadmap__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 400;
  color: var(--home-text);
  opacity: 0.15;
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
  margin-bottom: 20px;
}

/* Heading — serif for typographic contrast */
.roadmap__heading {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 600;
  color: var(--home-text);
  margin: 0 0 16px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.roadmap__body {
  font-family: var(--font-display);
  font-size: var(--text-small);
  color: var(--home-text);
  opacity: 0.65;
  line-height: 1.7;
  margin: 0;
}

/* Contextual explore link — centered below roadmap steps */
.roadmap__explore {
  text-align: center;
  margin: clamp(40px, 5vw, 64px) 0 0;
}

.roadmap__explore-link {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 500;
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  letter-spacing: 0.05rem;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.roadmap__explore-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #F5F0E8;
  transition: width 0.3s ease;
}

.roadmap__explore-link:hover {
  color: #F5F0E8;
}

.roadmap__explore-link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * BIO SECTION — Editorial profile block
 * ═══════════════════════════════════════════════════════════════════════════════ */
.bio-section {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 8vw, 100px) 4vw;
  border-top: none;
}

/* Divider removed per design feedback */

.bio-section__inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.bio-section__text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Name — editorial serif treatment */
.bio__name {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--home-text);
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.01em;
}

.bio__realname {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.7em;
  opacity: 0.5;
}

/* Location — small caps label style */
.bio__location {
  font-family: var(--font-display);
  font-size: var(--text-label);
  color: var(--home-text);
  opacity: 0.45;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.bio__body {
  font-family: var(--font-display);
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--home-text);
  opacity: 0.7;
  margin: 28px 0 0;
  max-width: 540px;
}

/* Bio actions — refined spacing */
.bio__actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}

/* "Hire Me" button — larger and more prominent */
.btn-hire {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border: 1px solid var(--home-text);
  background-color: transparent;
  color: var(--home-text);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: var(--text-nav);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hire:hover {
  background-color: var(--home-text);
  color: var(--home-bg);
  border-color: var(--home-text);
}

.btn-hire:focus-visible {
  outline: 2px solid var(--home-text);
  outline-offset: 2px;
}

.bio__link {
  font-family: var(--font-display);
  font-size: var(--text-small);
  color: rgba(245, 240, 232, 0.5);
  text-decoration: none;
  font-weight: 500;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.05rem;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.bio__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #F5F0E8;
  transition: width 0.3s ease;
}

.bio__link:hover {
  color: #F5F0E8;
}

.bio__link:hover::after {
  width: 100%;
}

.bio__link:focus-visible {
  outline: 2px solid var(--home-text);
  outline-offset: 2px;
}

.bio__link--secondary {
  display: inline-flex;
  margin-top: 16px;
  font-size: var(--text-small);
  color: rgba(245, 240, 232, 0.5);
}

/* ─── Utility: bg-dark override for homepage ─────────────────────────────── */
body[data-page="home"] .bg-dark {
  background-color: var(--home-bg);
}

/* ─── Footer override for homepage ───────────────────────────────────────── */
body[data-page="home"] .footer {
  background-color: var(--home-bg-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * RESPONSIVE: Tablet (max-width: 1024px)
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero {
    aspect-ratio: auto;
    min-height: 50vh;
  }

  .hero__photo {
    position: absolute;
    inset: 0;
  }

  .hero__overlay {
    position: relative;
    background: linear-gradient(
      to bottom,
      rgba(160, 90, 55, 0.6) 0%,
      transparent 100%
    );
    min-height: 50vh;
  }

  .wordmark {
    font-size: clamp(2.5rem, 8vw, 5rem);
  }

  /* Roadmap: 2-column on tablet, hide SVG diagram */
  .roadmap__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  /* Reset stagger — no SVG trend line to follow at this size */
  .roadmap__step:nth-child(n) {
    transform: none;
  }

  .roadmap__svg {
    display: none;
  }

  .node-bg--top-right {
    display: none;
  }

  .node-bg--mid-left {
    opacity: 0.05;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * RESPONSIVE: Mobile (max-width: 768px)
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero {
    aspect-ratio: auto;
    min-height: auto;
  }

  .hero__photo {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .hero__overlay {
    position: absolute;
    inset: 0;
    padding: 14px 20px;
    background: linear-gradient(
      to bottom,
      rgba(140, 80, 45, 0.7) 0%,
      transparent 60%
    );
  }

  .wordmark {
    font-size: clamp(1.6rem, 10vw, 3.2rem);
    white-space: normal;
  }

  .hero__tagline {
    margin-top: 8px;
    font-size: var(--text-nav);
    max-width: 50%;
  }

  .btn-cta {
    margin-top: 2px;
    padding: 9px 21px;
    font-size: clamp(0.6rem, 2.5vw, 0.7rem);
  }

  /* Roadmap: single column on mobile */
  .roadmap__steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .roadmap-section {
    padding: 60px 20px 80px;
  }

  .roadmap-section::before {
    margin-bottom: 48px;
  }

  .roadmap__step {
    border-top: none;
    padding-top: 0;
    position: relative;
  }

  .roadmap__number {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .bio-section {
    padding: 60px 20px 80px;
  }

  .bio-section::before {
    margin-bottom: 48px;
  }

  .bio__actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .hero__about-link {
    display: none;
  }

  .node-bg {
    display: none;
  }
}
