/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --color-bg:        #FAF8F4;
  --color-bg-tint:   #EDE8E0;
  --color-text:      #1C1917;
  --color-text-mute: #6B6560;
  --color-accent:    #C1614F;
  --color-accent-dk: #A3503E;
  --color-accent-lt: #F2D5D0;
  --color-white:     #ffffff;
  --color-border:    #DDD8D2;
  --color-nav-bg:    #1C1917;
  --color-nav-text:  #FAF8F4;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(28,25,23,.08), 0 1px 2px rgba(28,25,23,.06);
  --shadow-md: 0 4px 16px rgba(28,25,23,.10), 0 2px 6px rgba(28,25,23,.06);
  --shadow-lg: 0 12px 40px rgba(28,25,23,.12);

  --max-w: 1100px;
  --nav-h: 68px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--tinted { background: var(--color-bg-tint); }

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--color-text-mute);
  max-width: 600px;
  margin-top: 12px;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.hidden { display: none !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  border-radius: 50px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(193,97,79,.35);
}
.btn--primary:hover {
  background: var(--color-accent-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(193,97,79,.40);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid rgba(28,25,23,.35);
}
.btn--ghost:hover {
  background: rgba(28,25,23,.06);
  border-color: rgba(28,25,23,.65);
}

.btn--large {
  font-size: 1.05rem;
  padding: 16px 40px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--nav-h);
  background: var(--color-nav-bg);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(28,25,23,.97);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-nav-text);
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(250,248,244,.75);
  transition: color 0.2s ease;
}

.nav__links a:hover { color: var(--color-nav-text); }

.nav__cta {
  background: var(--color-accent);
  color: var(--color-white) !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: background 0.2s ease, transform 0.15s ease !important;
}

.nav__cta:hover {
  background: var(--color-accent-dk) !important;
  transform: translateY(-1px);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-nav-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}


.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero__text {
  flex: 1;
}

.hero__photo {
  flex-shrink: 0;
}

.hero__headshot {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 2px solid var(--color-accent);
  display: block;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 24px;
}

.hero__headline-accent {
  color: var(--color-accent);
  display: block;
}

.hero__tagline {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--color-text-mute);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.65;
  margin-bottom: 44px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.hero__scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-mute);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-text-mute), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--color-accent-lt) 0%, #EDD9D4 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.portrait-placeholder__initials {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  color: var(--color-accent);
  opacity: 0.7;
}

.about__content h2 { margin-bottom: 20px; }
.about__content p { color: var(--color-text-mute); margin-bottom: 16px; }

.about__traits {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about__traits li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--color-bg-tint);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.about__traits li strong {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.about__traits li span {
  font-size: 0.9rem;
  color: var(--color-text-mute);
}

/* ============================================================
   DEMOS
   ============================================================ */
.demos h2 { margin-bottom: 0; }

.demos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.demo-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.demo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.demo-card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.demo-card__icon svg { width: 100%; height: 100%; }

.demo-card__info h3 { margin-bottom: 4px; }
.demo-card__info p { font-size: 0.9rem; color: var(--color-text-mute); margin-bottom: 20px; }

/* Player */
.demo-card__player {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-bg-tint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.player__btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(193,97,79,.3);
}

.player__btn:hover {
  background: var(--color-accent-dk);
  transform: scale(1.08);
}

.player__btn svg { width: 18px; height: 18px; }

.player__track { flex: 1; min-width: 0; }

.player__waveform {
  position: relative;
  margin-bottom: 6px;
  border-radius: 4px;
  overflow: hidden;
}

.waveform-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
}

.waveform-bars span {
  flex: 1;
  border-radius: 2px;
  background: var(--color-border);
  transition: background 0.2s ease;
}

/* Randomized bar heights via nth-child */
.waveform-bars span:nth-child(1)  { height: 35%; }
.waveform-bars span:nth-child(2)  { height: 60%; }
.waveform-bars span:nth-child(3)  { height: 80%; }
.waveform-bars span:nth-child(4)  { height: 55%; }
.waveform-bars span:nth-child(5)  { height: 90%; }
.waveform-bars span:nth-child(6)  { height: 65%; }
.waveform-bars span:nth-child(7)  { height: 45%; }
.waveform-bars span:nth-child(8)  { height: 75%; }
.waveform-bars span:nth-child(9)  { height: 50%; }
.waveform-bars span:nth-child(10) { height: 85%; }
.waveform-bars span:nth-child(11) { height: 70%; }
.waveform-bars span:nth-child(12) { height: 40%; }
.waveform-bars span:nth-child(13) { height: 95%; }
.waveform-bars span:nth-child(14) { height: 60%; }
.waveform-bars span:nth-child(15) { height: 75%; }
.waveform-bars span:nth-child(16) { height: 50%; }
.waveform-bars span:nth-child(17) { height: 80%; }
.waveform-bars span:nth-child(18) { height: 35%; }
.waveform-bars span:nth-child(19) { height: 65%; }
.waveform-bars span:nth-child(20) { height: 45%; }

.demo-card__player.playing .waveform-bars span {
  animation: pulse 0.6s ease-in-out infinite alternate;
}

.demo-card__player.playing .waveform-bars span:nth-child(even) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

.player__time {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-mute);
  font-variant-numeric: tabular-nums;
}

.demo-card__placeholder-note {
  font-size: 0.78rem;
  color: var(--color-text-mute);
  margin-top: 14px;
  font-style: italic;
  opacity: 0.75;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services h2 { margin-bottom: 0; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.service-card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-lt);
}

.service-card__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  line-height: 1;
}

.service-card h3 { margin-bottom: 8px; }

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-mute);
  line-height: 1.6;
}

/* ============================================================
   WRITING CALLOUT
   ============================================================ */
.writing__inner {
  max-width: 680px;
}

.writing__badge {
  display: inline-block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-mute);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.writing__inner h2 { margin-bottom: 16px; }
.writing__inner > p { color: var(--color-text-mute); margin-bottom: 24px; }

.writing__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.writing__list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--color-text-mute);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; }
.contact h2 { margin-bottom: 16px; }

.contact__intro {
  color: var(--color-text-mute);
  max-width: 480px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

.contact__note {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--color-text-mute);
}

.contact__note a {
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-lt);
  transition: border-color 0.2s ease;
}
.contact__note a:hover { border-color: var(--color-accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,.6);
  padding: 48px 0;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-white);
}

.footer__nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__nav a {
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.footer__nav a:hover { color: var(--color-accent-lt); }

.footer__copy { font-size: 0.8rem; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .portrait-placeholder {
    max-width: 260px;
    margin: 0 auto;
  }

  .about__traits {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  :root { --nav-h: 60px; }

  .nav {
    padding: 0 20px;
    flex-wrap: wrap;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    border-bottom: 1px solid rgba(250,248,244,.12);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    width: 100%;
    padding: 12px 24px;
    color: rgba(250,248,244,.75) !important;
    font-size: 0.95rem;
  }

  .nav__links a:hover { color: var(--color-nav-text) !important; }

  .nav__cta {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 12px 24px !important;
    border-bottom: 2px solid var(--color-accent) !important;
    font-weight: 600 !important;
    color: var(--color-accent) !important;
    box-shadow: none !important;
  }

  .section { padding: 64px 0; }

  .about__traits { grid-template-columns: 1fr; }

  .hero__inner {
    flex-direction: column-reverse;
    gap: 32px;
  }

  .hero__text {
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .services__grid,
  .demos__grid { grid-template-columns: 1fr; }

  .footer__nav { gap: 16px; }
}

@media (max-width: 400px) {
  .hero__headline { font-size: 2.4rem; }
  .about__traits { grid-template-columns: 1fr; }
}
