/* ============================================================
   Globe-Eco — global stylesheet
   Section order: tokens, reset, utility, hero, placeholder.
   Timing tokens on :root are tunable live in DevTools.
   ============================================================ */

/* --- 1. Design tokens --- */

:root {
  --color-bg-primary: #0E0F0C;
  --color-bg-secondary: #161810;
  --color-bg-tertiary: #1F211A;
  --color-accent-primary: #C8922A;
  --color-accent-secondary: #E8B84B;
  --color-accent-warm: #A67420;
  --color-text-primary: #F2EDE4;
  --color-text-secondary: #B8B0A0;
  --color-text-tertiary: #6E6860;
  --color-border-subtle: #2A2C24;
  --color-border-medium: #3D3F35;

  --font-display: 'Lora', 'Georgia', serif;
  --font-body: 'Inter', 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-data: 'DM Mono', 'JetBrains Mono', 'Courier New', monospace;

  --text-display-hero: clamp(2rem, 3.6vw, 3.4rem);
  --text-display-section: clamp(2rem, 4vw, 3.5rem);
  --text-display-card: clamp(1.5rem, 2.5vw, 2rem);
  --text-body-lead: clamp(1.15rem, 1.5vw, 1.4rem);
  --text-hero-reveal: clamp(1.6rem, 2.6vw, 2.4rem);
  --text-hero-proof: clamp(1.15rem, 1.6vw, 1.5rem);
  --text-body-regular: 1rem;
  --text-body-small: 0.875rem;

  /* Hero cycling-list timing. Tune live in DevTools. */
  --hero-beat-duration: 1.8s;
  --hero-finale-duration: 2.8s;
  --hero-fade-duration: 0.45s;

  --content-max-width: 64rem;
  --content-gutter: clamp(1.25rem, 4vw, 3rem);
}

/* --- 2. Reset & global defaults --- */

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

html {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-body-regular);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.section__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-gutter);
}

/* --- 3. Hero --- */

.hero {
  position: relative;
  /* Hero is at least one viewport tall on most screens, but can
     grow taller if its content needs the room. No content overflow
     on small viewports or zoomed-in text. */
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: clamp(4rem, 12vh, 8rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* "The resource, as the market sees it." */
  filter: saturate(0.35) brightness(0.55);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Strong floor — words sit on bright dappled foliage in the
     bottom third, so the gradient does most of the contrast work
     and the text-shadow below picks up the rest. */
  background: linear-gradient(
    to bottom,
    rgba(14, 15, 12, 0.55) 0%,
    rgba(14, 15, 12, 0.30) 22%,
    rgba(14, 15, 12, 0.70) 55%,
    rgba(14, 15, 12, 0.95) 100%
  );
}

.hero__content {
  position: relative;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-gutter) clamp(3rem, 8vh, 6rem);
  width: 100%;
  /* Subtle text shadow lifts words off bright dappled foliage
     without making the page feel like there's a dark panel
     pasted on. Invisible where the gradient already provides
     contrast; kicks in only where it's needed. */
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.hero__eyebrow {
  font-family: var(--font-data);
  font-size: var(--text-body-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-display-hero);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  max-width: 40ch;
}

.hero__lead {
  display: block;
  margin-bottom: 0.35em;
}

/* --- Cycling list ---
   Items are absolutely positioned so they overlay each other
   without layout shift. Container reserves ~2 lines of headline
   vertical space. */

.hero__cycle {
  position: relative;
  display: block;
  /* Tighter reservation — tall beats grow the container naturally
     for a moment; short beats no longer leave a chasm above the
     scarcity reveal. */
  min-height: 2em;
}

.hero__cycle-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--hero-fade-duration) ease-in-out;
  pointer-events: none;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.hero__cycle-item em {
  font-style: italic;
  color: var(--color-accent-secondary);
}

.hero__cycle-item.is-active { opacity: 1; }

.hero__cycle-item--finale {
  font-style: normal;
  color: var(--color-accent-primary);
}

/* No-JS / reduced-motion fallback: render items inline,
   middot-separated, all visible at once. */
html:not(.js-ready) .hero__cycle,
.hero__cycle.is-static {
  min-height: 0;
  display: inline;
}

html:not(.js-ready) .hero__cycle-item,
.hero__cycle.is-static .hero__cycle-item {
  position: static;
  display: inline;
  opacity: 1;
  transition: none;
}

html:not(.js-ready) .hero__cycle-item + .hero__cycle-item::before,
.hero__cycle.is-static .hero__cycle-item + .hero__cycle-item::before {
  content: " · ";
  color: var(--color-text-tertiary);
  font-style: normal;
}

/* --- Reveal, proof, CTA --- */

.hero__reveal {
  /* The scarcity reveal — needs to read as a beat, not a caption.
     Larger than body copy, off-white, slight letter-spacing for
     gravitas. The dissonance with the beautiful image is the hook. */
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-hero-reveal);
  color: var(--color-text-primary);
  letter-spacing: 0.005em;
  margin-bottom: 1.5rem;
  max-width: 44ch;
}

.hero__proof {
  font-family: var(--font-body);
  font-size: var(--text-hero-proof);
  color: var(--color-text-primary);
  max-width: 58ch;
  margin-bottom: 2.5rem;
  line-height: 1.45;
}

.hero__proof em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent-primary);
  font-size: 1.05em;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: var(--text-body-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-secondary);
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--color-accent-primary);
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  transform: translateY(-1px);
}

.hero__cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hero__cta:hover .hero__cta-arrow,
.hero__cta:focus-visible .hero__cta-arrow {
  transform: translateY(2px);
}

/* --- 4. Placeholder sections (temporary) --- */

.section--placeholder {
  min-height: 60svh;
  display: grid;
  place-items: center;
  padding: 4rem 0;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
}

.section--placeholder .section__inner { text-align: center; }

.section__placeholder-eyebrow {
  font-family: var(--font-data);
  font-size: var(--text-body-small);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: 1rem;
}

.section__placeholder-headline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-display-section);
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.section__placeholder-sub {
  font-family: var(--font-body);
  color: var(--color-text-secondary);
}
