/* =================================================================
   VeraPeach — Core styles (base structure & components)
   -----------------------------------------------------------------
   This is the base stylesheet. It pairs with two siblings, loaded
   after it (order matters for the cascade):
     • animations.css   — keyframes + reveal-on-scroll utilities
     • responsive.css   — breakpoints + reduced-motion fallbacks

   Sections in THIS file:
     1. Design tokens (light + dark themes)
     2. Base / reset
     3. Typography helpers
     4. Header / nav / theme toggle
     5. Hero (scroll-driven spiral banners)
     6. About
     7. Contact
     8. Footer
   ================================================================= */

/* ------------------------------------------------------------------
   1. DESIGN TOKENS
------------------------------------------------------------------ */
:root {
  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radii — rounded corners throughout */
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 40px;
  --radius-pill: 999px;

  /* Spacing scale (generous) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --space-7: 9rem;

  /* Motion */
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swift: cubic-bezier(0.4, 0, 0.2, 1);

  --maxw: 1240px;
}

/* LIGHT MODE — soft white with subtle pink/peach gradients */
[data-theme="light"] {
  --bg: #fdf7f5;
  --bg-grad-1: #ffffff;
  --bg-grad-2: #ffeef0;
  --bg-grad-3: #fff2e9;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-border: rgba(255, 255, 255, 0.9);
  --text: #2b2226;
  --text-soft: #6f6068;
  --text-faint: #a99aa1;

  --banner-tops: linear-gradient(150deg, #ffe4e2 0%, #ffd9c7 45%, #fbc7d4 100%);
  --banner-bottoms: linear-gradient(150deg, #f5e1ff 0%, #ffe0ec 50%, #ffd9c2 100%);

  --shadow-card: 0 30px 60px -25px rgba(210, 120, 140, 0.45),
                 0 10px 25px -15px rgba(180, 100, 120, 0.3);
  --shadow-soft: 0 20px 45px -25px rgba(190, 120, 140, 0.35);
  --glow: rgba(255, 214, 224, 0.9);
  --accent: #d76a86;
}

/* DARK MODE — black mixed with dark purple gradients + subtle glow */
[data-theme="dark"] {
  --bg: #08060c;
  --bg-grad-1: #0d0a16;
  --bg-grad-2: #150e24;
  --bg-grad-3: #1a0f1e;
  --surface: rgba(28, 20, 40, 0.55);
  --surface-border: rgba(160, 130, 200, 0.16);
  --text: #f3edf5;
  --text-soft: #b3a6c0;
  --text-faint: #7a6e88;

  --banner-tops: linear-gradient(150deg, #3a2350 0%, #5a2b4a 55%, #7a3550 100%);
  --banner-bottoms: linear-gradient(150deg, #241a3e 0%, #3d2350 50%, #5a2f52 100%);

  --shadow-card: 0 30px 70px -25px rgba(120, 60, 160, 0.55),
                 0 0 40px -10px rgba(150, 90, 200, 0.25);
  --shadow-soft: 0 20px 50px -25px rgba(100, 60, 160, 0.45);
  --glow: rgba(160, 90, 220, 0.5);
  --accent: #d98bb5;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.6s var(--ease-soft), color 0.6s var(--ease-soft);
}

/* Layered ambient background gradients (fixed, very soft) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 15% 0%, var(--bg-grad-2) 0%, transparent 55%),
    radial-gradient(120% 90% at 85% 15%, var(--bg-grad-3) 0%, transparent 50%),
    radial-gradient(140% 120% at 50% 100%, var(--bg-grad-1) 0%, transparent 60%),
    var(--bg);
  transition: background 0.6s var(--ease-soft);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ------------------------------------------------------------------
   3. TYPOGRAPHY HELPERS
------------------------------------------------------------------ */
.section-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

/* ------------------------------------------------------------------
   4. HEADER / NAV / THEME TOGGLE
------------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: transform 0.5s var(--ease-soft), background-color 0.5s var(--ease-soft);
}

/* Glass panel appears once scrolled */
.site-header.is-scrolled {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--surface-border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.6rem) clamp(1.25rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-left: auto;
  margin-right: clamp(1rem, 3vw, 2rem);
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.35s var(--ease-soft);
}

/* Animated underline */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-soft);
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft),
    background-color 0.3s var(--ease-soft);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.theme-toggle__icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffd9c7, #d76a86);
  box-shadow: inset -3px -3px 0 0 var(--bg);
  transition: background 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}

[data-theme="dark"] .theme-toggle__icon {
  background: linear-gradient(140deg, #b98bff, #d98bb5);
  box-shadow: none;
}

/* ------------------------------------------------------------------
   5. HERO — scroll-driven spiral banners
   The section is tall (creates scroll room); the stage is sticky so it
   stays pinned in the viewport while the spiral plays out.
------------------------------------------------------------------ */
.hero {
  position: relative;
  /* Tall track: the extra height is the "scroll runway" for the animation */
  height: 260vh;
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Establish the 3D viewing frustum. Depth comes from this perspective,
     not from opacity — the banners genuinely move toward / away from you. */
  perspective: 1800px;
  perspective-origin: 50% 46%;
}

.hero__eyebrow {
  position: absolute;
  top: clamp(5rem, 11vh, 7rem);
  z-index: 4; /* always readable, above the banners */
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
  opacity: 0.95;
}

.hero__banners {
  position: relative;
  width: min(74vw, 700px);
  /* Guarantee equal left/right margins at every viewport size. The flex
     parent already centers this, but margin-inline:auto keeps the card ring
     dead-centered even if the stage padding ever changes — so the spiral
     always originates from and returns to the exact horizontal center. */
  margin-inline: auto;
  /* ~65% of viewport height */
  height: 62vh;
  max-height: 660px;
  /* Radius of the 3D orbit. JS overrides translateZ per-banner while
     animating; this value is used for the very first paint (no-JS / FOUC). */
  --r: clamp(200px, 32vw, 380px);
  /* Ferris-wheel tilt is driven by JS via --arc, which is 0 at rest and
     peaks mid-transition. So when idle the ring is perfectly flat and the
     front banner sits dead straight; it only tilts WHILE scrolling. */
  --arc: 0;
  /* Nudge down so the eyebrow stays visible. preserve-3d keeps the child
     banners living in real 3D space. */
  transform: translateY(clamp(2rem, 6vh, 4.5rem))
    rotateX(calc(var(--arc) * 10deg))
    rotateZ(calc(var(--arc) * -3deg));
  transform-style: preserve-3d;
}

/* Both banners are stacked in the same spot; JS transforms them. */
.banner {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.75rem, 4vw, 3rem);
  /* GPU-friendly: JS only touches transform & opacity */
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-origin: center center;
}

/* The card has NO background, gradient, or tint of its own — the <img>
   below is the only visible surface. Each banner rule just sets its first-
   paint position on the 3D orbit (JS overrides transform while scrolling). */
.banner--tops {
  /* First paint: at the FRONT of the orbit, facing the viewer (+Z). */
  transform: rotateY(0deg) translateZ(var(--r));
}

.banner--bottoms {
  /* First paint: directly BEHIND, facing away — hidden by
     backface-visibility until it orbits around toward the viewer. */
  transform: rotateY(180deg) translateZ(var(--r));
}

/* The card image. It fills the whole card and defines its entire look.
   object-fit: cover lets you drop in ANY image — portrait, landscape,
   square, high- or low-res — and it always fills the card cleanly without
   distortion or letterboxing. Swap the file in images/ to change a card. */
.banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  /* No overlay, no tint — the photo is shown exactly as-is. */
}

.banner__content {
  position: relative;
  z-index: 2;
  color: #fff;
  /* No overlay behind the text now, so the label carries its own soft,
     layered shadow — enough to stay legible over light OR dark photos
     without tinting the image itself. */
  text-shadow: 0 1px 2px rgba(10, 4, 8, 0.55), 0 2px 22px rgba(10, 4, 8, 0.45);
}

/* Same treatment in both themes — the photo defines the card, the text
   just needs to read cleanly on top of it. */
[data-theme="light"] .banner__content {
  color: #fff;
  text-shadow: 0 1px 2px rgba(10, 4, 8, 0.55), 0 2px 22px rgba(10, 4, 8, 0.45);
}

/* Least-prominent element: a small "01 / 02" index above the label. */
.banner__index {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  opacity: 0.55;
  display: block;
  margin-bottom: 0.3rem;
}

/* Secondary element: the "Tops / Bottoms" label — a subtle corner tag,
   deliberately small so the photo stays the hero. */
.banner__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

/* Minimal luxury-campaign look: the photo is the hero, so the descriptive
   sub-line and the Explore button are hidden to keep the label clean.
   To bring either back, delete its display:none. */
.banner__sub,
.banner__cta {
  display: none;
}

.banner__sub {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  max-width: 26ch;
  opacity: 0.9;
  margin-bottom: var(--space-3);
}

.banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #2b2226;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  /* Clear, tactile button — lifts off the banner sheet */
  box-shadow: 0 10px 24px -12px rgba(40, 15, 30, 0.55);
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft),
    background-color 0.35s var(--ease-soft);
}

.banner__cta::after {
  content: "→";
  transition: transform 0.35s var(--ease-soft);
}

.banner__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.4);
}

.banner__cta:hover::after {
  transform: translateX(4px);
}

/* Scroll hint */
.hero__hint {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: opacity 0.5s var(--ease-soft);
}

.hero__hint-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--text-faint), transparent);
  /* @keyframes hintPulse is defined in animations.css */
  animation: hintPulse 2.2s var(--ease-soft) infinite;
}

/* ------------------------------------------------------------------
   6. ABOUT
------------------------------------------------------------------ */
.about {
  padding: var(--space-7) 0;
  position: relative;
}

.about__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: var(--space-5);
}

.about__grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.about__lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  font-weight: 300;
  color: var(--text);
  max-width: 24ch;
}

.about__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 760px;
  margin-left: auto;
}

.about__pillars {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.pillar {
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
}

.pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.pillar__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
}

.pillar__text {
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ------------------------------------------------------------------
   7. CONTACT
------------------------------------------------------------------ */
.contact {
  padding: var(--space-7) 0 var(--space-6);
  text-align: center;
}

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

.contact__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.contact__text {
  color: var(--text-soft);
  max-width: 40ch;
  margin-bottom: var(--space-4);
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  color: var(--accent);
  position: relative;
  padding-bottom: 0.25rem;
  transition: transform 0.4s var(--ease-soft);
}

.contact__email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-soft);
}

.contact__email:hover {
  transform: translateY(-2px);
}

.contact__email:hover::after {
  transform: scaleX(1);
}

/* ------------------------------------------------------------------
   8. FOOTER
------------------------------------------------------------------ */
.site-footer {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--surface-border);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.brand--footer {
  font-size: 1.3rem;
}

.site-footer__note {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* Reveal-on-scroll utilities live in animations.css.
   Responsive breakpoints and reduced-motion fallbacks live in responsive.css.
   (Load order in index.html: styles.css → animations.css → responsive.css) */
