/* ==========================================================================
   Peachy Media Group — base.css
   Shared foundation: reset, design tokens, site chrome (nav, footer,
   buttons, contact band), hero, and utilities.
   Loaded by every page *before* any page-level stylesheet.
   ========================================================================== */

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

:root {
  /* ---- Primitives ------------------------------------------------------ */
  --peach-500: #F4A87C;
  --peach-600: #EC9464;
  --peach-700: #D97B45;
  --peach-ink: #A34C22;          /* accent for text — ~5.4:1 on cream */
  --peach-100: #FDE8D8;
  --peach-50:  #FEF5EF;

  --ink-900: #2A2018;
  --ink-700: #4A3E33;
  --ink-600: #7A6A5A;
  --cream:   #FFFCF9;
  --white:   #FFFFFF;

  /* ---- Semantic -------------------------------------------------------- */
  --color-bg:            var(--cream);
  --color-surface:       var(--white);
  --color-text:          var(--ink-900);
  --color-text-muted:    var(--ink-600);
  --color-accent:        var(--peach-500);
  --color-accent-strong: var(--peach-600);
  --color-accent-deep:   var(--peach-ink);
  --color-accent-text:   var(--peach-ink);
  --color-accent-soft:   var(--peach-100);
  --color-accent-tint:   var(--peach-50);
  --color-inverse-bg:    var(--ink-900);
  --color-border:        rgba(42, 32, 24, 0.08);
  --color-border-strong: rgba(42, 32, 24, 0.22);
  --color-focus:         var(--peach-ink);

  /* ---- Type ------------------------------------------------------------ */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs:   0.72rem;
  --fs-sm:   0.84rem;
  --fs-base: 0.97rem;
  --fs-lg:   1.05rem;
  --fs-h2:   clamp(1.85rem, 3.4vw, 2.6rem);
  --fs-h1:   clamp(2.5rem, 6vw, 4.5rem);

  /* ---- Space ----------------------------------------------------------- */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 2.5rem;  --sp-8: 3rem;
  --sp-9: 4rem;    --sp-10: 5rem;

  /* ---- Radius ---------------------------------------------------------- */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* ---- Elevation ------------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(42,32,24,.05), 0 2px 8px rgba(42,32,24,.04);
  --shadow-md: 0 4px 16px rgba(42,32,24,.09);
  --shadow-lg: 0 16px 48px rgba(20,16,12,.20);

  /* ---- Motion ---------------------------------------------------------- */
  --dur-1: 150ms; --dur-2: 220ms; --dur-3: 400ms;
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* ---- Layout ---------------------------------------------------------- */
  --container:        1080px;
  --container-narrow: 720px;
  --nav-h:            69px;

  /* ---- Legacy aliases (kept so existing markup keeps working) ---------- */
  --peach: var(--peach-500);
  --peach-light: var(--peach-100);
  --peach-pale: var(--peach-50);
  --ink: var(--ink-900);
  --ink-light: var(--ink-600);
  --rule: var(--color-border);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

/* Focus visibility -------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 3px; }
.nav-contact:focus-visible,
.nav-resume:focus-visible,
.hero-cta:focus-visible,
.btn:focus-visible,
.download-btn:focus-visible { border-radius: var(--r-pill); }
.contact-band a.btn:focus-visible { outline-color: #fff; }

/* Inline icon system ------------------------------------------------------ */
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* Typography -------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-text); letter-spacing: -0.01em; }
h1 { font-weight: 300; font-size: var(--fs-h1); line-height: 1.08; }
h1 em { font-style: italic; color: var(--color-accent-text); }
h2 { font-weight: 400; font-size: var(--fs-h2); line-height: 1.15; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: var(--sp-4);
}
.section-body {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
  max-width: 580px;
  line-height: 1.8;
}

/* Section shell ----------------------------------------------------------- */
section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-9) var(--sp-6);
}

/* ==========================================================================
   NAV
   ========================================================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 1.1rem 2.5rem;
  min-height: var(--nav-h);
  background: rgba(255, 252, 249, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.nav-logo svg { width: 32px; height: 32px; }
.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  white-space: nowrap;
}
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-contact,
.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--r-pill);
  padding: 0.62rem 1.25rem;
  min-height: 40px;
  transition: background var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              color var(--dur-2) var(--ease),
              transform var(--dur-1) var(--ease);
}
.nav-contact:hover,
.nav-resume:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); color: #fff; transform: translateY(-1px); }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color var(--dur-2) var(--ease);
}
.nav-back:hover { color: var(--color-accent-text); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.hero-cta,
.contact-band a.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  min-height: 46px;
  border-radius: var(--r-pill);
  transition: background var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
  position: relative;
  z-index: 1;
}
.hero-cta { background: var(--color-inverse-bg); color: #fff; }
.hero-cta:hover { background: var(--color-accent-deep); transform: translateY(-2px); }
.contact-band a.btn { background: var(--color-accent); color: var(--ink-900); }
.contact-band a.btn:hover { background: var(--color-accent-strong); transform: translateY(-2px); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}
/* Warm gradient mesh */
.hero::before {
  content: '';
  position: absolute;
  inset: -25% -15%;
  background:
    radial-gradient(62% 48% at 50% 48%, rgba(255,252,249,0.88) 0%, rgba(255,252,249,0) 72%),
    radial-gradient(38% 42% at 22% 30%, rgba(244,168,124,0.55) 0%, rgba(244,168,124,0) 70%),
    radial-gradient(34% 38% at 80% 22%, rgba(123,174,110,0.30) 0%, rgba(123,174,110,0) 70%),
    radial-gradient(46% 46% at 64% 80%, rgba(217,123,69,0.34) 0%, rgba(217,123,69,0) 72%),
    radial-gradient(32% 36% at 12% 84%, rgba(255,226,196,0.70) 0%, rgba(255,226,196,0) 70%);
  filter: blur(30px) saturate(1.15);
  animation: mesh 20s ease-in-out infinite alternate;
  pointer-events: none;
}
/* Film grain */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: multiply;
  pointer-events: none;
}
@keyframes mesh {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}
.hero-peach {
  width: 100px; height: 100px;
  margin-bottom: var(--sp-5);
  animation: float 5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}
.hero h1 { max-width: 780px; margin-bottom: 1.2rem; position: relative; z-index: 1; }
.hero-sub {
  font-size: var(--fs-lg);
  color: var(--color-text);
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto 2.4rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   DARK BAND
   Full-bleed dark section wrapper — breaks up the cream page rhythm.
   ========================================================================== */
.band-dark { background: var(--color-inverse-bg); color: #fff; }
.band-dark .section-label { color: var(--color-accent-soft); }
.band-dark h2 { color: #fff; }
.band-dark .section-body { color: rgba(255,255,255,0.72); }

/* ==========================================================================
   CONTACT BAND
   ========================================================================== */
.contact-band {
  background: var(--color-inverse-bg);
  color: #fff;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
}
.contact-band .section-label { color: var(--color-accent-soft); }
.contact-band h2 { color: #fff; margin-bottom: var(--sp-4); }
.contact-band p { color: rgba(255,255,255,0.72); font-size: var(--fs-base); margin-bottom: var(--sp-6); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  text-align: center;
  padding: var(--sp-6) var(--sp-6);
  font-size: 0.73rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.2rem;
}
footer a { color: inherit; text-decoration: none; transition: color var(--dur-2) var(--ease); }
footer a:hover { color: var(--color-accent-text); }
.footer-sep { opacity: 0.35; }

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.fade-up { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.fade-up.will-animate { opacity: 0; transform: translateY(24px); }
.fade-up.will-animate.visible { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  nav { padding: 0.85rem 1.1rem; }
  .nav-wordmark { display: none; }
  .nav-actions { gap: 0.4rem; }
  .nav-contact,
  .nav-resume { padding: 0.55rem 0.85rem; font-size: 0.65rem; letter-spacing: 0.08em; }
  section { padding: var(--sp-8) var(--sp-5); }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@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;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up, .fade-up.will-animate { opacity: 1 !important; transform: none !important; }
  .hero-peach { animation: none; }
  .hero::before { animation: none !important; }
}
