/* ============================================================
   Landing page. Depends on tokens.css + base.css.
   Sections follow the document order: field → header → hero →
   memoria → historia → ritual → colección → descargar → footer.
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  background: var(--dark-bg);
  color: var(--dark-fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--dark-fg); text-decoration: none; }
a:hover { color: rgba(255, 255, 255, .72); }
::selection { background: var(--dark-fg); color: var(--dark-bg); }

main { position: relative; z-index: 10; }
.inner { max-width: var(--measure); margin: 0 auto; width: 100%; }

/* ---- Animated colour field -------------------------------- */
.field,
.field-fallback {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* Shown when three.js or WebGL is unavailable, so the page never
   degrades to a flat dark rectangle. The blobs track the same
   per-section palette as the shader. */
.field-fallback {
  overflow: hidden;
  background: var(--dark-bg);
}

.field-fallback span {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: var(--radius-pill);
  filter: blur(90px);
  opacity: .62;
  transition: background-color 1200ms var(--ease);
}

.field-fallback span:nth-child(1) { top: -30vmax; left: -20vmax; background-color: var(--c-coral); }
.field-fallback span:nth-child(2) { top: 10vmax; right: -30vmax; background-color: var(--c-orchid); }
.field-fallback span:nth-child(3) { bottom: -40vmax; left: 15vmax; background-color: var(--c-blue); }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(0, 0, 0, 0) 40%, rgba(10, 6, 14, .55) 100%);
}

/* ---- Shared primitives ------------------------------------ */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--dark-fg-muted);
  margin: 0;
}

.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-md);
}

.pill {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 16px 30px;
  font-size: 14px;
  font-weight: 500;
}

.pill--solid { background: var(--dark-fg); color: var(--dark-bg); }
.pill--solid:hover { color: rgba(27, 18, 32, .66); }

.pill--ghost {
  border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ---- Header ----------------------------------------------- */
.hdr {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter-sm);
}

.brand,
.nav {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  backdrop-filter: var(--glass-blur-sm);
  border: 1px solid var(--glass-line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: .16em;
}

/* Tinted by scroll-palette.js to the current section's lead colour. */
.brand i {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--dark-fg);
  display: inline-block;
  transition: background 600ms var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 18px;
  font-size: 11px;
  letter-spacing: .14em;
}

.nav a { padding: 9px 12px; color: rgba(255, 255, 255, .82); }

.nav .cta {
  margin-left: 6px;
  background: var(--dark-fg);
  color: var(--dark-bg);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
}

.nav .cta:hover { color: rgba(27, 18, 32, .66); }

/* ---- Hero -------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--gutter) 40px;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, .75);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero .eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--dark-fg);
  animation: fc-pulse 3s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 10.5vw, 190px);
  line-height: .86;
  letter-spacing: -.03em;
  margin: 0;
  max-width: 16ch;
  text-shadow: var(--shadow-title);
}

.hero h1 em { font-style: italic; opacity: .94; }

.hero .foot {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 52px;
}

.hero .foot .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero .foot p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 38ch;
  color: rgba(255, 255, 255, .86);
  margin: 0;
  text-wrap: pretty;
}

/* ---- 01 Memoria -------------------------------------------- */
.memoria {
  min-height: 110vh;
  display: flex;
  align-items: center;
  padding: 120px var(--gutter);
}

.memoria h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 30px 0 0;
  max-width: 20ch;
  text-wrap: balance;
}

.memoria h2 em { font-style: italic; }

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

.trio .glass { padding: 30px 28px; }

.trio p {
  font-size: 16px;
  line-height: 1.62;
  margin: 0;
  color: var(--dark-fg-strong);
  text-wrap: pretty;
}

/* ---- 02 Historia ------------------------------------------
   A sticky stage pinned over five full-height scroll tracks;
   each track swaps the copy via history-stepper.js. */
.historia { position: relative; }

.historia .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  pointer-events: none;
  padding: 0 var(--gutter);
}

.historia h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 8.6vw, 150px);
  line-height: .9;
  letter-spacing: -.03em;
  margin: 26px 0 0;
  transition: opacity var(--dur-swap) var(--ease), transform var(--dur-swap) var(--ease);
}

.historia .row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-end;
  margin-top: 34px;
}

.historia .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .8);
  margin: 0;
  transition: opacity var(--dur-swap) var(--ease);
}

.historia .text {
  font-size: 18px;
  line-height: 1.58;
  max-width: 46ch;
  margin: 0;
  color: var(--dark-fg-strong);
  transition: opacity var(--dur-swap) var(--ease), transform var(--dur-swap) var(--ease);
  text-wrap: pretty;
}

.pips { display: flex; gap: 8px; margin-top: 52px; }

.pips span {
  width: 52px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--glass-line-strong);
  transition: background 400ms;
}

.pips span[data-on] { background: var(--dark-fg); }

.historia .track { height: 100vh; }
/* Pulls the first track up under the sticky stage so the stage and
   track 0 share the same scroll range. */
.historia .track:first-of-type { margin-top: -100vh; }

/* ---- 03 Ritual --------------------------------------------- */
.ritual { padding: 130px var(--gutter); }

.ritual h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 18px 0 0;
  max-width: 18ch;
}

.ritual h2 em { font-style: italic; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 16px;
  margin-top: 58px;
}

.steps article {
  padding: 28px 26px 34px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.steps .n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .65);
}

.steps h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  margin: 0;
}

.steps p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--dark-fg-body);
  margin: 10px 0 0;
}

.verdict {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 34px;
  margin-top: 22px;
}

.verdict .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .65);
  margin: 0;
}

.verdict h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.06;
  margin: 14px 0 0;
  max-width: 20ch;
}

.verdict h3 em { font-style: italic; }

.verdict > div > p:last-child {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-fg-body);
  margin: 14px 0 0;
  max-width: 50ch;
}

.swatches {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.swatches .chip {
  width: 132px;
  height: 132px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-chip);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
}

.swatches .score {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  line-height: 1.8;
  color: rgba(255, 255, 255, .9);
}

/* ---- 04 Colección ------------------------------------------ */
.coleccion { padding: 130px var(--gutter); }

.coleccion .head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

.coleccion h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 18px 0 0;
  max-width: 16ch;
}

.coleccion h2 em { font-style: italic; }

.coleccion .count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .75);
  margin: 0;
}

.specimens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.specimens figure { margin: 0; overflow: hidden; }

.specimens .shot {
  aspect-ratio: 4 / 5;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 7px, rgba(255, 255, 255, 0) 7px 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .72);
}

/* Each figure sets --hex inline; that is the specimen's own colour. */
.specimens .bar { height: 10px; background: var(--hex); }

.specimens figcaption { padding: 16px 16px 20px; }

.specimens figcaption .name {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0;
}

.specimens figcaption .where,
.specimens figcaption .when {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
}

.specimens figcaption .where { color: var(--dark-fg-muted); margin: 8px 0 0; }
.specimens figcaption .when { color: var(--dark-fg-faint); margin: 4px 0 0; }

.coleccion .note {
  font-size: 17px;
  line-height: 1.62;
  color: rgba(255, 255, 255, .88);
  max-width: 58ch;
  margin: 40px 0 0;
  text-wrap: pretty;
}

/* ---- 05 Descargar ------------------------------------------ */
.descargar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px var(--gutter);
}

.descargar .mono { color: rgba(255, 255, 255, .75); margin-bottom: 30px; }

.descargar h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 168px);
  line-height: .9;
  letter-spacing: -.03em;
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
}

.descargar h2 em { font-style: italic; }

.descargar .lede {
  font-size: 18px;
  line-height: 1.6;
  max-width: 44ch;
  color: rgba(255, 255, 255, .9);
  margin: 30px 0 0;
  text-wrap: pretty;
}

.descargar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 44px;
}

.descargar .actions .pill { padding: 17px 32px; }
.descargar .actions .pill--ghost { border-color: rgba(255, 255, 255, .5); }

.orbs {
  display: flex;
  gap: 10px;
  margin-top: 70px;
  flex-wrap: wrap;
  justify-content: center;
}

.orbs span {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  animation: fc-drift 7s ease-in-out infinite;
}

/* ---- Footer ------------------------------------------------ */
footer {
  padding: 0 var(--gutter) 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--dark-fg-muted);
  position: relative;
  z-index: 10;
}

footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .24);
  padding-top: 24px;
}

footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--dark-fg-muted); }

/* ---- Keyframes --------------------------------------------- */
@keyframes fc-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes fc-pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 860px) {
  .hdr { top: 12px; padding: 0 14px; gap: 10px; }
  .nav { padding: 5px 6px; }
  /* Five mono labels do not fit a phone; the CTA carries the header. */
  .nav a:not(.cta) { display: none; }
  .nav .cta { margin-left: 0; }

  .hero { padding: 120px var(--gutter-sm) 36px; }
  .memoria,
  .ritual,
  .coleccion,
  .descargar { padding-left: var(--gutter-sm); padding-right: var(--gutter-sm); }
  .historia .stage { padding: 0 var(--gutter-sm); }

  .hero .foot { gap: 28px; }
  .verdict { padding: 26px; }
  .swatches { justify-content: flex-start; }
  footer { padding: 0 var(--gutter-sm) 36px; }
}

@media (max-width: 560px) {
  .swatches .chip { width: 104px; height: 104px; }
  .historia .row { gap: 20px; }
  .historia .text { font-size: 16px; }
}
