﻿:root {
  --greige: #E8E3DB;
  --paper: #F1EDE7;
  --jewel: #294236;
  --sage: #8A9A83;
  --brass: #B4935A;
  --walnut: #5A3E2E;
  --serif: 'Source Serif 4', Georgia, serif;
  --gotham: 'Montserrat', sans-serif;
  --type: 'Courier Prime', monospace;
  --script: 'Pinyon Script', cursive;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 3vw, 40px);
  --rail-w: 220px;
  --band: 0px;
}

* { box-sizing: border-box; }
html { background: var(--greige); scrollbar-width: thin; scrollbar-color: var(--jewel) var(--greige); }
body {
  margin: 0;
  background: var(--greige);
  color: var(--jewel);
  font: 400 1.1rem/1.6 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--sage); color: var(--jewel); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--greige); }
::-webkit-scrollbar-thumb { background: var(--jewel); border-radius: 6px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 5px; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: rgba(138, 154, 131, .35); }
button:active, .cta:active { transform: scale(.97); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -80px; z-index: 50;
  padding: 12px 18px; border-radius: 8px;
  background: var(--paper); color: var(--jewel);
  font: 700 .8rem/1.4 var(--gotham);
  transition: top 160ms var(--ease-out);
}
.skip:focus { top: 16px; }

/* Fixed signature and contact. */
.topbar {
  position: fixed; z-index: 7;
  top: var(--gutter); left: var(--gutter); right: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  pointer-events: none;
}
.topbar > a { pointer-events: auto; }
.signature { color: var(--jewel); font: 400 1.9rem/1.2 var(--script); text-decoration: none; white-space: nowrap; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--jewel);
  font: 600 .85rem/1.2 var(--gotham); text-decoration: none;
  transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.cta__inner { display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; white-space: nowrap; }
.cta .icon { width: 19px; height: 19px; flex: none; }
.cta--big { padding: 20px 34px; background: var(--brass); color: #14231B; font-weight: 700; font-size: clamp(.85rem, 1.4vw, 1.05rem); }

/* Liquid glass stays inside its paper surface. */
.glass {
  position: relative; isolation: isolate; overflow: hidden;
  background: rgba(241, 237, 231, .7);
  box-shadow: 0 10px 30px -18px rgba(41, 66, 54, .35);
  transform-origin: center;
}
.glass__warp {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none;
}
.glass:not(#ctaTop):not(#ctaBig) {
  background: rgba(241, 237, 231, .86);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
#ctaTop .glass__warp { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.glass__edge {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px;
  pointer-events: none;
  -webkit-mask: linear-gradient(var(--jewel) 0 0) content-box, linear-gradient(var(--jewel) 0 0);
  mask: linear-gradient(var(--jewel) 0 0) content-box, linear-gradient(var(--jewel) 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass__edge--screen { opacity: .5; background: linear-gradient(var(--edge-angle, 135deg), transparent, var(--paper), transparent); }
.glass__edge--overlay { opacity: .35; background: linear-gradient(var(--edge-angle, 135deg), transparent 20%, var(--sage) 70%, transparent); }
.glass > :not(.glass__warp):not(.glass__edge) { position: relative; z-index: 1; }

/* The original letter choreography measures this untransformed word. */
.brand {
  position: fixed; left: 0; top: 0; z-index: 6; margin: 0;
  font: 800 clamp(2.1rem, 7.4vw, 8.5rem)/.92 var(--gotham);
  letter-spacing: -.03em; white-space: nowrap; color: var(--jewel); pointer-events: none;
}
.brand__l { display: inline-block; transform-origin: 0 0; will-change: transform; }
@keyframes brand-in {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: blur(0); }
}
.brand.is-entering .brand__l {
  opacity: 0;
  animation: brand-in 420ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: calc(var(--i) * 55ms + 250ms);
}
.brand__caret {
  position: absolute; top: 12%; height: 76%; width: .09em; background: var(--brass);
  animation: blink 1s steps(1) infinite;
  transition: opacity 300ms;
}

/* Chapter dock and scroll ruler. */
.rail {
  position: fixed; z-index: 6;
  top: calc(var(--gutter) + 70px); right: calc(var(--gutter) + var(--band) + 22px); bottom: var(--gutter);
  width: var(--rail-w); display: flex; flex-direction: column; align-items: flex-end; pointer-events: none;
}
.rail__chapter {
  margin: calc(var(--dock-h, 0px) + 12px) 0 0;
  font: 700 1.35rem/1.2 var(--gotham); letter-spacing: -.02em; text-align: right; color: var(--jewel);
  opacity: 0; transition: opacity 300ms var(--ease-out);
}
.rail.is-docked .rail__chapter { opacity: 1; }
.rail__nav {
  margin-top: auto; border-radius: 22px; pointer-events: none; visibility: hidden; opacity: 0;
  transition: opacity 300ms var(--ease-out), visibility 300ms;
}
.rail.is-docked .rail__nav { pointer-events: auto; visibility: visible; opacity: 1; }
.rail__nav ol { list-style: none; margin: 0; padding: 12px; display: grid; gap: 2px; }
.rail__nav button {
  display: block; width: 100%; border: 0; padding: 9px 14px; border-radius: 12px;
  background: transparent; color: var(--walnut); font: 500 .74rem/1.3 var(--gotham);
  letter-spacing: .04em; text-transform: uppercase; text-align: right; cursor: pointer;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.rail__nav button[aria-current='true'] { color: var(--jewel); background: rgba(138, 154, 131, .35); }
.ruler {
  position: fixed; z-index: 6; right: calc(var(--gutter) + var(--band) + 4px);
  top: calc(var(--gutter) + 150px); bottom: calc(var(--gutter) + 300px); width: 14px; pointer-events: none;
}
.ruler__ticks {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(to bottom, var(--sage) 0 1px, transparent 1px 50px) right / 14px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(138, 154, 131, .35) 0 1px, transparent 1px 10px) right / 6px 100% no-repeat;
}
.ruler__needle { position: absolute; right: 0; top: 0; width: 22px; height: 1.5px; background: var(--jewel); will-change: transform; }
.ruler__pct { position: absolute; right: 30px; top: -.6em; font: 400 .7rem/1 var(--type); font-variant-numeric: tabular-nums; color: var(--walnut); }

/* Text streams reserve their final size to keep the page still. */
.chapter { position: relative; scroll-margin-top: 110px; }
.chapter--band:not(#inicio):not(#contacto), .chapter--about:not(#inicio):not(#contacto) {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
.chapter--hero { position: relative; min-height: 100svh; padding: 58svh var(--gutter) 48px; overflow: hidden; }
.chapter--hero .stream { position: relative; z-index: 1; }
.stream { margin-inline: auto; text-align: center; }
.prompt { margin: 0 0 22px; color: var(--walnut); font: 400 .95rem/1.5 var(--type); }
.lead { max-width: 34ch; margin: 0 auto; color: var(--jewel); font: 400 clamp(1.25rem, 2.2vw, 1.7rem)/1.5 var(--serif); text-wrap: pretty; }
h2 { margin: 0 0 26px; color: var(--jewel); font: 500 clamp(2rem, 4vw, 3.4rem)/1.05 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
.body { max-width: 42ch; margin: 0; color: var(--walnut); font: 400 1.1rem/1.65 var(--serif); text-wrap: pretty; }
.hl {
  padding: 0 .06em; color: var(--jewel); font-style: italic; font-weight: 400;
  background: linear-gradient(transparent 78%, rgba(138, 154, 131, .55) 78%, rgba(138, 154, 131, .55) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.script { font: 400 1.25em/1 var(--script); font-style: normal; color: var(--walnut); }
.note { margin: 26px 0 0; color: var(--walnut); font: 400 .78rem/1.5 var(--type); }
.is-typing { display: grid; }
.type__visual, .type__reserve { grid-area: 1 / 1; min-width: 0; }
.type__reserve { visibility: hidden; pointer-events: none; }
.type__visual .hl:empty, .type__visual .script:empty { display: none; }
.caret { display: inline-block; width: .55em; height: 1em; margin-left: .06em; vertical-align: -.12em; background: var(--brass); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.scroll-cue { display: block; width: 1px; height: 56px; margin: 34px auto 0; background: var(--sage); transform-origin: top; animation: cue 2.4s var(--ease-out) infinite; }
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  65% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Four quiet spreads; the card clips independently of its caption. */
.chapter--work { padding: 18vh var(--gutter); }
.chapter__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 4vw; align-items: center; max-width: 1240px; margin-inline: auto; }
.chapter__copy { grid-column: 1 / span 5; grid-row: 1; min-width: 0; }
.media { position: relative; grid-column: 6 / span 7; grid-row: 1; min-width: 0; margin: 0 0 48px; border-radius: 22px; aspect-ratio: 1500 / 1000; }
.media--portrait { aspect-ratio: 900 / 1125; }
.media--square { aspect-ratio: 1000 / 1000; }
.media--four-five { aspect-ratio: 4 / 5; width: min(100%, calc(80svh * 4 / 5)); justify-self: center; }
.media--tall { aspect-ratio: 1601 / 2400; width: min(100%, calc(80svh * 1601 / 2400)); justify-self: center; }
.media__frame { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; contain: paint; background: var(--jewel); box-shadow: 0 30px 60px -30px rgba(41, 66, 54, .45); }
.media__letters { position: absolute; inset: 0; width: 100%; height: 100%; }
.media__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms var(--ease-out); }
.media.is-developed .media__photo { opacity: 1; }
.media figcaption { position: absolute; top: calc(100% + 14px); left: 0; right: 0; color: var(--walnut); font: 400 1.4rem/1.2 var(--script); text-align: center; }
.chapter--reverse .media { grid-column: 1 / span 7; }
.media-stack { display: grid; grid-column: 6 / span 7; grid-row: 1; min-width: 0; }
.media-stack .media { grid-column: auto; grid-row: auto; }
.media-stack .media + .media { width: 82%; justify-self: end; }
.chapter--reverse .media-stack { grid-column: 1 / span 7; }
.chapter--reverse .chapter__copy { grid-column: 8 / span 5; }

/* About and the final invitation. */
.chapter--about { padding: 12vh var(--gutter) 18vh; }
.about { max-width: 1000px; margin-inline: auto; padding: clamp(30px, 6vw, 88px); border-radius: 28px; background: var(--paper); }
.about h2 { max-width: 23ch; }
.about .body { max-width: 58ch; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; list-style: none; margin: 48px 0 0; padding: 0; }
.roles li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--sage); }
.roles strong { color: var(--jewel); font: 700 .8rem/1.5 var(--gotham); }
.roles span { color: var(--walnut); font: 400 1rem/1.5 var(--serif); }
.roles--skills { margin-top: 30px; }
.roles--skills li { border-top-color: var(--brass); }
.chapter--contact { padding: 16vh var(--gutter); border-radius: 32px 32px 0 0; background: var(--jewel); color: var(--greige); text-align: center; }
.contact__inner { max-width: 1000px; margin-inline: auto; }
.contact__title { margin: 0 0 30px; color: var(--brass); font: 400 clamp(4rem, 12vw, 9rem)/1.15 var(--script); letter-spacing: 0; }
.contact__lead { max-width: 38ch; margin: 0 auto 34px; color: var(--greige); font: 400 clamp(1.2rem, 2vw, 1.5rem)/1.6 var(--serif); text-wrap: balance; }
.contact__phone { margin: 26px 0 0; color: var(--greige); font: 400 1rem/1.5 var(--type); }
.contact__phone a { display: inline-block; padding: 8px; text-decoration: none; }
.foot { padding: 28px var(--gutter); font: 400 .78rem/1.5 var(--type); color: var(--walnut); }

@media (hover: hover) and (pointer: fine) {
  .signature:hover { color: var(--walnut); }
  .cta:hover { background: var(--brass); }
  .cta--big:hover { background: var(--greige); }
  .rail__nav button:hover { color: var(--jewel); background: rgba(138, 154, 131, .35); }
  .contact__phone a:hover { color: var(--greige); text-decoration: underline; text-underline-offset: 4px; }
}
@media (min-width: 1100px) {
  .chapter--work, .chapter--about, .chapter--contact { padding-right: 260px; }
}
@media (max-width: 1099px) {
  .rail__nav, .ruler { display: none; }
}
@media (max-width: 759px) {
  .topbar { gap: 10px; }
  .signature { font-size: 1.9rem; }
  .cta__inner { gap: 7px; padding: 13px 16px; }
  .cta { font-size: .75rem; }
  .rail { top: calc(var(--gutter) + 43px); left: var(--gutter); right: auto; bottom: auto; width: auto; align-items: flex-start; }
  .rail__chapter { margin: 0; color: var(--walnut); font: 400 .75rem/1.4 var(--type); text-align: left; letter-spacing: 0; opacity: 1; }
  .chapter { scroll-margin-top: 126px; }
  .chapter--hero { padding-bottom: 56px; }
  .prompt { font-size: .85rem; }
  .chapter--work { padding-block: 10vh; }
  .chapter__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .chapter__grid .media, .chapter__grid .media-stack { grid-column: 1; grid-row: 1; }
  .media-stack .media { grid-column: auto; grid-row: auto; }
  .chapter__grid .chapter__copy { grid-column: 1; grid-row: 2; }
  .chapter__copy { padding-inline: 6px; }
  .media--portrait, .media--tall, .media--four-five { max-width: 480px; width: 100%; justify-self: center; }
  .note { margin-top: 20px; }
  .chapter--about { padding-block: 10vh 14vh; }
  .roles { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 34px; }
  .chapter--contact { padding-block: 14vh; }
  .cta--big { font-size: .85rem; padding: 20px 28px; }
}
@media (max-width: 359px) {
  .signature { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .brand__l { will-change: auto; }
}

/* fixed chrome over the dark contact panel */
.brand, .signature, .rail__chapter, .ruler__pct { transition: color 240ms ease; }
.ruler__needle { transition: background-color 240ms ease; }
.is-on-dark .brand, .is-on-dark .signature, .is-on-dark .rail__chapter, .is-on-dark .ruler__pct { color: var(--greige); }
.is-on-dark .ruler__needle { background: var(--greige); }
.contact__title .caret { width: .06em; height: .62em; margin-left: .08em; }

/* soft fade under the fixed header so scrolling content never collides with it */
body::before {
  content: ''; position: fixed; inset: 0 0 auto; z-index: 4; height: 168px; pointer-events: none;
  background: linear-gradient(var(--fade, var(--greige)) 72%, transparent);
  transition: opacity 240ms ease;
}
@media (max-width: 760px) { body::before { height: 128px; } }

/* Photo bands: every work chapter wears the palette of its own photo */
.chapter--band {
  margin: 8vh clamp(8px, 1.5vw, 20px); border-radius: 32px;
  background: var(--band-bg); color: var(--band-text);
}
.chapter--band .prompt { color: var(--band-accent); }
.chapter--band h2 { color: var(--band-ink); }
.chapter--band .body { color: var(--band-text); }
.chapter--band .hl { color: var(--band-ink); background: linear-gradient(transparent 78%, var(--band-mark) 78%, var(--band-mark) 92%, transparent 92%); }
.chapter--band .caret { background: var(--band-accent); }
.chapter--band figcaption { color: var(--band-soft); }
.chapter--band .media__frame { background: var(--band-card); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); }
.chapter--band ::selection { background: var(--band-accent); color: var(--band-bg); }

/* night ballroom: navy, ivory gown, blush */
#quince { --band-bg: #14212E; --band-ink: #F1E6DF; --band-text: #C9CED6; --band-accent: #E9B7A2; --band-mark: rgba(233, 183, 162, .55); --band-soft: #93A6BD; --band-card: #14212E; }
/* skin, beige, mauve nails (light band) */
#ninos { --band-bg: #EADBCE; --band-ink: #3B2717; --band-text: #5E4535; --band-accent: #7E5560; --band-mark: rgba(184, 154, 160, .6); --band-soft: #6E5240; --band-card: #2A1E15; }
/* night foliage, bougainvillea violet */
#retrato { --band-bg: #0F191D; --band-ink: #EDE4F0; --band-text: #BFC6CC; --band-accent: #B486D8; --band-mark: rgba(180, 134, 216, .5); --band-soft: #8E9AA6; --band-card: #0F191D; }
/* honey wood, cream labels, chocolate (light band) */
#producto { --band-bg: #F0E2CC; --band-ink: #3A2716; --band-text: #5B4330; --band-accent: #8A5524; --band-mark: rgba(221, 160, 88, .55); --band-soft: #7A5A3C; --band-card: #1E1811; }
/* bus at night: slate, teal, steel, mustard handles */
#paisajes { --band-bg: #121012; --band-ink: #E3E9E6; --band-text: #C2CCC6; --band-accent: #C2B86A; --band-mark: rgba(194, 184, 106, .6); --band-soft: #8A9C92; --band-card: #121012; }
/* stage flash on dark olive */
#conciertos { --band-bg: #0E1815; --band-ink: #E4E7C9; --band-text: #B9BF9C; --band-accent: #D2D77A; --band-mark: rgba(210, 215, 122, .5); --band-soft: #8C9670; --band-card: #0E1815; }
/* sunset wedding: periwinkle mist, navy suit, gold rings (light band) */
#bodas { --band-bg: #DCDDE8; --band-ink: #23273B; --band-text: #3B405B; --band-accent: #6E5420; --band-mark: rgba(201, 163, 92, .6); --band-soft: #4C5170; --band-card: #24212B; }
/* entrada at night: coral pollera, turquoise lace (drenched band) */
#eventos { --band-bg: #EF6A4C; --band-ink: #1A0E0C; --band-text: #2E120D; --band-accent: #062A2D; --band-mark: rgba(43, 179, 184, .75); --band-soft: #3A1510; --band-card: #050B0B; }

/* cover stays clean: header and its fade arrive with the first photo chapter */
.topbar { transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
html:not(.is-past-cover) .topbar { opacity: 0; transform: translateY(-10px); pointer-events: none; }
html:not(.is-past-cover) .topbar > a { pointer-events: none; }
html:not(.is-past-cover) body::before { opacity: 0; }
html:not(.is-past-cover) .rail__chapter { opacity: 0; }
