@property --o {
  syntax: '<length>';
  inherits: false;
  initial-value: 14px;
}

:root {
  --ink: #0a0610;
  --night: #140a21;
  --chrome: #cfc4ee;
  --text: #ece7f7;
  --paper: #e9e4f3;
  --tang: #ff8a1f;
  --line: rgba(207, 196, 238, .24);

  --font: 'Jost', system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 300 1.0625rem/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; flex: none; }
.wrap { width: min(74rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

:focus-visible { outline: 2px solid var(--tang); outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tang); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Signature: three parallel hairlines, taken from the logo's stroke */
.rule {
  display: block; width: 6rem; height: 7px;
  background: repeating-linear-gradient(to bottom, var(--tang) 0 1px, transparent 1px 3px);
}

/* Type */
.display {
  font: 300 clamp(1.9rem, 4.4vw, 3.4rem)/1.12 var(--font);
  letter-spacing: .16em; text-transform: uppercase;
  margin: 0; color: var(--text); text-wrap: balance; overflow-wrap: anywhere;
}
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.65; max-width: 54ch; margin: 0; color: var(--chrome); }
h3 { font: 500 .95rem/1.4 var(--font); letter-spacing: .18em; text-transform: uppercase; margin: 0; }

/* Buttons: square, tracked, quiet */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  min-height: 3.1rem; padding: .8rem 1.7rem;
  font: 500 .8rem/1 var(--font); letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-sm { min-height: 2.5rem; padding: .55rem 1.1rem; font-size: .72rem; }
.btn-tang { background: var(--tang); color: var(--ink); }
.btn-tang:hover { background: #ffa04a; }
.btn-ghost { border-color: var(--chrome); color: var(--chrome); }
.btn-ghost:hover { background: var(--chrome); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--text); }
.btn-ink:hover { background: var(--night); }
.btn-ink-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ink-ghost:hover { background: var(--ink); color: var(--paper); }

/* Header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .85rem var(--gutter);
  background: rgba(10, 6, 16, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .45s var(--ease);
}
/* scrolling down = reading, so the nav steps away; scrolling up = looking for a section, so it returns */
.top.away { transform: translateY(-100%); }
.top:focus-within { transform: none; }
.brand { font: 400 .95rem/1 var(--font); letter-spacing: .42em; text-decoration: none; color: var(--text); }
.menu { display: flex; gap: .25rem var(--sep, 2.2rem); flex-wrap: wrap; }
.menu a { text-decoration: none; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; padding: .6rem 0; border-bottom: 1px solid transparent; color: var(--chrome); }
.menu a:hover { color: var(--text); border-color: var(--tang); }
/* bolt between the links, centred in the gap */
.menu { --sep: 2.2rem; }
.menu a + a { position: relative; }
.menu a + a::before {
  content: ""; position: absolute; top: 50%; left: calc(var(--sep) / -2);
  width: .8rem; height: .8rem; transform: translate(-50%, -50%);
  background: url('../assets/rayo.png') center / contain no-repeat; pointer-events: none;
}
.top-end { display: flex; align-items: center; gap: 1.4rem; }
.lang { display: flex; gap: .15rem; }
.lang button {
  font: 500 .72rem/1 var(--font); letter-spacing: .18em; background: none; color: var(--chrome);
  border: 0; padding: .6rem .5rem; cursor: pointer; min-width: 2.5rem; opacity: .6;
}
.lang button[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 -1px var(--tang); }
@media (max-width: 52rem) {
  .menu { --sep: 1.6rem; order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 1.6rem; scrollbar-width: none; }
  .menu a { white-space: nowrap; }
  .top-end .btn { display: none; }
}

/* Hero: the logo reveal */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - 3.4rem);
  display: grid; place-items: center; text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(142, 63, 176, .2), transparent 70%),
    linear-gradient(to bottom, var(--ink), var(--night) 100%);
}
.hero-in { display: grid; justify-items: center; gap: clamp(1.4rem, 3vw, 2.2rem); width: min(74rem, 100%); }

.reveal {
  position: relative; margin: 0; width: min(62rem, 100%);
  filter: drop-shadow(0 0 40px rgba(142, 63, 176, .3));
}
.reveal img {
  width: 100%;
  -webkit-box-reflect: below .6rem linear-gradient(to bottom, transparent 62%, rgba(0, 0, 0, .28));
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0, #000 var(--o), transparent var(--o), transparent 14px);
  mask-image: repeating-linear-gradient(to bottom, #000 0, #000 var(--o), transparent var(--o), transparent 14px);
  animation: slats 1.7s cubic-bezier(.65, 0, .35, 1) .25s both, focus 1.7s var(--ease) .25s both;
}
/* chrome sheen that crosses the letters once, after the slats open */
.reveal::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: url('../assets/logo.png'); mask-image: url('../assets/logo.png');
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) no-repeat;
  background-size: 320% 100%; background-position: 160% 0;
  animation: sheen 1.5s cubic-bezier(.4, 0, .2, 1) 1.7s both;
}
@keyframes slats { from { --o: 0px; } to { --o: 14px; } }
@keyframes focus { from { filter: blur(7px); transform: scale(1.035); } to { filter: blur(0); transform: scale(1); } }
@keyframes sheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }

.hero .rule { transform-origin: left center; animation: draw 1s var(--ease) 2.5s both; }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-tag { margin: 0; font: 400 clamp(.85rem, 1.6vw, 1.05rem)/1.5 var(--font); letter-spacing: .38em; text-transform: uppercase; color: var(--text); animation: rise 1.1s var(--ease) 2.7s both; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: .6rem; animation: rise 1.1s var(--ease) 3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Galaxy loop behind the logo: black drops out with screen, so the stars sit on top of the purple halo */
.hero-sky { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 2.5s ease; mix-blend-mode: screen; pointer-events: none; }
.hero-sky.on { opacity: .85; }
.hero-sky video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-in { position: relative; z-index: 1; }

/* Sticky hero: the hero stays put and the next sections slide over it */
.hero { position: sticky; top: 0; z-index: 1; min-height: 100svh; padding-top: clamp(3rem, 8vw, 6rem); }
main > section:not(.hero) { position: relative; z-index: 2; }
@supports (animation-timeline: scroll()) {
  .hero-in { animation: recede linear both; animation-timeline: scroll(root); animation-range: 0 90svh; }
  @keyframes recede { to { opacity: .1; transform: scale(.94); } }
}

/* Sections */
section { padding: clamp(5rem, 11vw, 9rem) 0; }
.sec-head { display: grid; gap: 1.4rem; justify-items: start; margin-bottom: clamp(3rem, 7vw, 5rem); }

/* Shop */
.shop { background: var(--night); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.4vw, 2rem); }
.tile { display: grid; gap: 1.2rem; align-content: start; }
.tile-body { display: grid; gap: .5rem; }
.tile-body p { margin: 0; color: var(--chrome); font-size: .98rem; }
.more { display: inline-flex; align-items: center; gap: .5rem; margin-top: .6rem; font: 500 .72rem/1 var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--tang); text-decoration: none; width: fit-content; padding-bottom: .35rem; border-bottom: 1px solid currentColor; transition: gap .35s var(--ease); }
.more:hover { gap: .9rem; }
.shop-all { margin: clamp(3rem, 7vw, 5rem) 0 0; }
@media (max-width: 62rem) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .tiles { grid-template-columns: 1fr; } }
/* category without a photo: line field, bolt and the triple hairline */
.tile-mark {
  display: grid; place-content: center; justify-items: center; gap: 1.6rem; aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(to bottom, rgba(207, 196, 238, .07) 0 1px, transparent 1px 7px),
    radial-gradient(70% 55% at 50% 45%, rgba(142, 63, 176, .22), transparent 70%),
    linear-gradient(160deg, #24103b, #140a21);
}
.tile-mark img { width: 28%; height: auto; display: block; }
.tile-mark .rule { width: 3.5rem; }
/* link whose destination does not exist yet: looks live, does nothing until CONFIG has a value */
.soon { cursor: pointer; }

.tile-photo { aspect-ratio: 3 / 4; border: 1px solid var(--line); overflow: hidden; }
.tile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; }

/* Custom orders */
.custom { background: var(--paper); color: var(--ink); }
.custom .display { color: var(--ink); }
.custom .lead { color: #3b2a52; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.steps li { display: grid; gap: .8rem; align-content: start; padding-top: 1.6rem; border-top: 1px solid rgba(10, 6, 16, .35); }
.step-n { font: 200 clamp(3.2rem, 6vw, 5rem)/1 var(--font); color: var(--ink); }
.steps p { margin: 0; color: #3b2a52; }
.custom-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: clamp(3rem, 7vw, 5rem); }
.note { margin: 0 0 0 .8rem; color: #3b2a52; }
@media (max-width: 52rem) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 32rem) { .steps { grid-template-columns: 1fr; } .note { margin-left: 0; } }

/* About */
.about {
  position: relative; isolation: isolate;
  background: var(--ink);
}
.about > .wrap { position: relative; z-index: 1; }
/* galaxy behind the About section, desktop only */
.about-sky { display: none; }
@media (min-width: 52.01rem) {
  .about { background: radial-gradient(65% 75% at 50% 50%, rgba(142, 63, 176, .16), transparent 70%), var(--ink); }
  .about-sky { display: block; position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 2.5s ease; mix-blend-mode: screen; pointer-events: none; }
  .about-sky.on { opacity: .7; }
  .about-sky video { display: block; width: 100%; height: 100%; object-fit: cover; }
}
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.portrait { margin: 0; aspect-ratio: 4 / 5; border: 1px solid var(--line); overflow: hidden; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.about-text { display: grid; gap: 1.8rem; justify-items: start; }
.about-text p { margin: 0; max-width: 54ch; color: var(--chrome); }
.about-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .4rem; }
.about-body { display: grid; gap: 1.8rem; justify-items: start; }
.flip-btn { display: none; }
@media (max-width: 52rem) {
  .about-grid { grid-template-columns: 1fr; row-gap: 1.4rem; justify-items: start; perspective: 1400px; }
  .about-text { display: contents; }

  /* photo and story share one grid cell and turn like the two sides of a card */
  .portrait, .about-body {
    grid-area: 3 / 1; width: 100%; height: 100%;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    transition: transform .8s var(--ease), visibility 0s linear .4s;
  }
  .portrait { position: relative; transform: rotateY(0); }
  .about-body {
    transform: rotateY(-180deg); visibility: hidden; align-content: center; gap: 1.1rem;
    padding: 1.6rem 1.4rem; border: 1px solid var(--line);
    background:
      linear-gradient(rgba(10, 6, 16, .86), rgba(10, 6, 16, .86)),
      url('../assets/sobremi.jpg') 50% 20% / cover;
  }
  .about-body p { font-size: .95rem; line-height: 1.55; }
  .about-body .lead { font-size: 1.05rem; line-height: 1.5; color: var(--text); }
  .flipped .portrait { transform: rotateY(180deg); visibility: hidden; }
  .flipped .about-body { transform: rotateY(0); visibility: visible; }

  .flip-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font: 500 .72rem/1 var(--font); letter-spacing: .22em; text-transform: uppercase;
    color: var(--text); background: rgba(10, 6, 16, .72); border: 1px solid var(--chrome);
    padding: .9rem 1.2rem; min-height: 2.75rem; cursor: pointer;
    transition: background-color .35s var(--ease), color .35s var(--ease);
  }
  .flip-btn:hover { background: var(--chrome); color: var(--ink); }
  .portrait .flip-btn { position: absolute; left: 1rem; bottom: 1rem; }
  .flip-back { margin-top: .4rem; }
}
@media (max-width: 52rem) and (prefers-reduced-motion: reduce) {
  .portrait, .about-body { transition: none; }
}

/* FAQ */
.faq { background: var(--night); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.faq-list { display: grid; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; font: 400 1rem/1.5 var(--font); letter-spacing: .06em;
  padding: 1.4rem 3rem 1.4rem 0; position: relative; min-height: 3.2rem;
}
summary::-webkit-details-marker { display: none; }
summary::before, summary::after {
  content: ""; position: absolute; right: .3rem; top: 50%; width: 1rem; height: 1px; background: var(--tang);
  transition: transform .35s var(--ease);
}
summary::after { transform: rotate(90deg); }
details[open] summary::after { transform: rotate(0); }
summary:hover { color: var(--tang); }
details p { margin: 0 0 1.6rem; max-width: 60ch; color: var(--chrome); }
@media (max-width: 52rem) { .faq-grid { grid-template-columns: 1fr; } }

/* Footer */
/* sticky footer: it waits at the bottom of the screen and the last section lifts off it */
.foot {
  position: sticky; bottom: 0; z-index: 0; overflow: hidden; isolation: isolate;
  background: var(--ink); border-top: 1px solid var(--line);
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(9rem, 18vw, 13rem);
}
.foot-in { position: relative; z-index: 1; display: grid; gap: clamp(1.4rem, 3vw, 2rem); justify-items: center; text-align: center; }
.foot-thanks { margin: 0; font: 300 clamp(1.5rem, 3.6vw, 2.6rem)/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--text); text-wrap: balance; }
.foot-floor {
  position: absolute; z-index: 0; left: -20%; right: -20%; bottom: 0; height: 55%;
  background:
    repeating-linear-gradient(90deg, rgba(207, 196, 238, .55) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 138, 31, .65) 0 1px, transparent 1px 48px);
  transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  animation: floor 3s linear infinite;
}
@keyframes floor { to { background-position: 0 0, 0 48px; } }
.foot-logo { width: min(26rem, 100%); margin-block: .4rem; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2.4rem; }
.foot-sections { width: min(46rem, 100%); padding-top: 1.6rem; border-top: 1px solid var(--line); }
.foot-links a { font: 400 .72rem/1 var(--font); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; padding: .6rem 0; border-bottom: 1px solid transparent; color: var(--chrome); }
.foot-links a:hover { color: var(--text); border-color: var(--tang); }
.copy { margin: 0; color: var(--chrome); opacity: .7; font-size: .85rem; letter-spacing: .08em; }

/* Legal pages */
html:not([lang="en"]) .legal [data-lang="en"], html[lang="en"] .legal [data-lang="es"] { display: none; }
.legal { max-width: 46rem; padding-block: clamp(3rem, 8vw, 6rem); }
.legal h1 { margin-bottom: .6rem; }
.legal .updated { margin: 0 0 2.4rem; color: var(--chrome); opacity: .7; font-size: .85rem; letter-spacing: .08em; }
.legal section { margin-top: 2.2rem; padding: 0; }
.legal h2 { margin: 0 0 .8rem; font: 500 .85rem/1.4 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--text); }
.legal h3 { margin: 1.4rem 0 .5rem; font: 500 1rem/1.4 var(--font); color: var(--text); }
.legal p, .legal li { color: var(--chrome); max-width: 68ch; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .5rem; }
.legal a { color: var(--text); text-decoration-color: var(--tang); text-underline-offset: .2em; }
.legal a:hover { color: var(--tang); }
.legal strong { font-weight: 500; color: var(--text); }
.legal code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .92rem; }
.legal th, .legal td { text-align: left; padding: .7rem .8rem; border: 1px solid var(--line); vertical-align: top; color: var(--chrome); }
.legal th { font-weight: 500; color: var(--text); }
.fill { background: none; color: var(--tang); border-bottom: 1px dashed var(--tang); }
.legal-note { margin-top: 3rem; padding: 1rem 1.2rem; border: 1px dashed var(--line); font-size: .9rem; }
.legal-foot { display: grid; justify-items: center; gap: 1.2rem; padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); }
.foot-legal a { font-size: .66rem; }
@media (max-width: 40rem) { .legal table { font-size: .8rem; } .legal th, .legal td { padding: .5rem; } }

/* Scroll reveals. main.js adds .js-reveal only when motion is welcome, so without it everything is simply visible. */
.js-reveal .tile { opacity: 0; scale: .86; transition: opacity .9s var(--ease), scale .9s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js-reveal .tile.in { opacity: 1; scale: 1; }
.tile:nth-child(2) { --i: 1; } .tile:nth-child(3) { --i: 2; } .tile:nth-child(4) { --i: 3; }
@media (max-width: 62rem) { .tile:nth-child(3) { --i: 0; } .tile:nth-child(4) { --i: 1; } }
@media (max-width: 34rem) { .tile:nth-child(2), .tile:nth-child(4) { --i: 0; } }

.about { overflow-x: clip; }
.js-reveal .about-text > h2, .js-reveal .about-text > .rule, .js-reveal .about-text > .about-cta, .js-reveal .about-body > p {
  opacity: 0; translate: 4.5rem 0;
  transition: opacity 1s var(--ease), translate 1s var(--ease); transition-delay: calc(var(--j, 0) * 120ms);
}
.js-reveal .about-grid.in .about-text > h2, .js-reveal .about-grid.in .about-text > .rule, .js-reveal .about-grid.in .about-text > .about-cta, .js-reveal .about-grid.in .about-body > p { opacity: 1; translate: 0 0; }
.about-text > .rule { --j: 1; }
.about-text > .about-cta { --j: 6; }
.about-body > :nth-child(1) { --j: 2; } .about-body > :nth-child(2) { --j: 3; } .about-body > :nth-child(3) { --j: 4; } .about-body > :nth-child(4) { --j: 5; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal img, .reveal::after, .hero .rule, .hero-tag, .hero-sub, .hero-cta, .hero-in, .foot-floor { animation: none; }
  .top { transition: none; }
  .reveal::after { display: none; }
  .btn, .more, summary::before, summary::after { transition: none; }
}
