/*
  TELA: web de demostración para una marca de ropa.
  Estilo "Dala": negro puro, titulares grandes y finos (Hanken Grotesk 400, tracking cerrado),
  párrafos muy ligeros, un único botón relleno en violeta y ámbar para acentos y enlaces.
  Sin tarjetas, bordes ni sombras: el aire separa las cosas.
  Portada: una constelación de triangulitos de colores que dibuja cada prenda (tela.js).
*/
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9a9a9a;          /* 7,4:1 sobre negro */
  --soft: #bdbdbd;
  --violet: #8052ff;         /* único botón relleno */
  --violet-hi: #9471ff;
  --amber: #ffb829;          /* acentos y enlaces */
  --green: #2bb596;
  --faint: rgba(255, 255, 255, 0.08);
  --radius: 24px;
  --max: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: #333 #000; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 18px; font-weight: 200; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure, fieldset { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 5px; }
address { font-style: normal; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.h2 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.5rem); }

/* Etiquetas en mayúsculas */
.product__meta, .sizes legend, .filter, .strip, .sky__label, .closeup__n, .hours dt, .nav__links a, .sizes__one {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- Botones y enlaces ---------- */
.btn-pill, .btn-order {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--violet); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn-pill:hover, .btn-order:hover { background: var(--violet-hi); }
.btn-pill:active, .btn-order:active { transform: scale(0.97); }
.btn-order.is-done { background: var(--green); }
.link { color: var(--amber); font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: background-size 300ms var(--ease-out); }
.link:hover { background-size: 100% 1px; }

/* ---------- Barra de demo y CTA ---------- */
.demo-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; padding: 8px var(--gutter); background: #0d0d0d; color: var(--muted); font-size: 12px; font-weight: 400; text-align: center; }
.demo-bar p { margin: 0; }
.demo-bar a { color: var(--amber); }
.demo-cta { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 2px; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 16px; background: rgba(20, 20, 20, 0.88); backdrop-filter: blur(12px); color: var(--soft); font-size: 13px; line-height: 1.3; text-decoration: none; }
.demo-cta strong { color: var(--amber); font-size: 14px; }
.demo-cta:hover strong { text-decoration: underline; }
.is-embed .demo-cta { display: none; }

/* ---------- Navegación (transparente y fija; se oscurece al bajar) ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding-block: 18px; background: transparent; transition: background-color 300ms var(--ease-out); }
.nav.is-scrolled { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px); }
.nav__inner { display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: 0.12em; text-decoration: none; }
.logo__mark { width: 22px; height: 22px; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { color: var(--soft); text-decoration: none; transition: color 200ms; }
.nav__links a:hover { color: var(--amber); }
.nav__cta { min-height: 40px; padding: 0 20px; font-size: 14px; }

/* ---------- Portada ---------- */
.hero { padding-top: clamp(120px, 16vh, 180px); padding-bottom: 48px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(72vh, 720px); }
.hero__title { font-size: clamp(3rem, 1.2rem + 6.4vw, 6rem); line-height: 0.98; }
.hero__text { margin-top: 28px; max-width: 30em; color: var(--soft); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 40px; }
.sky { position: relative; aspect-ratio: 1; width: 100%; max-width: 680px; justify-self: end; }
.sky::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(128, 82, 255, 0.22), rgba(255, 184, 41, 0.06) 60%, transparent); filter: blur(30px); pointer-events: none; }
.sky__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky__label { position: absolute; left: 50%; bottom: 1%; transform: translateX(-50%); white-space: nowrap; color: var(--soft); }
.sky__label a { text-decoration: none; }
.sky__label b { margin-left: 10px; color: var(--amber); font-weight: 600; }
.sky__label a:hover [data-sky-name] { color: #fff; }
.strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: clamp(48px, 8vh, 96px); color: var(--muted); }
.strip li { display: flex; align-items: center; gap: 10px; }
.strip li::before { content: ""; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--green); }

/* ---------- Colección: zigzag de foto y texto ---------- */
.collection { padding-block: clamp(96px, 14vw, 180px); }
.collection__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.collection__text { color: var(--soft); max-width: 28em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.filter { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--faint); color: var(--soft); cursor: pointer; transition: background-color 200ms, color 200ms; }
.filter span { margin-left: 6px; color: var(--muted); }
.filter:hover { color: #fff; }
.filter[aria-pressed="true"] { background: #fff; color: #000; }
.filter[aria-pressed="true"] span { color: #555; }

/* Rejilla de 5 prendas por fila; con ratón, la foto gira y enseña la espalda */
.products { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 64px 20px; margin-top: clamp(48px, 6vw, 80px); }
.product { display: flex; flex-direction: column; min-width: 0; }
.product[hidden] { display: none; }
.product__media { position: relative; perspective: 1400px; }
.product__photo { position: relative; aspect-ratio: 700 / 1087; transform-style: preserve-3d; transition: transform 800ms var(--ease-out); }
.product__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: #111; backface-visibility: hidden; -webkit-backface-visibility: hidden; user-select: none; }
.product__back { transform: rotateY(180deg); }
.product.has-back.is-flipped .product__photo { transform: rotateY(180deg); }
@media (hover: hover) and (pointer: fine) {
  .product.has-back .product__media:hover .product__photo { transform: rotateY(180deg); }
  .product.has-back.is-flipped .product__media:hover .product__photo { transform: none; }
}
.product__flip { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(10px); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.product__flip:hover { background: rgba(0, 0, 0, 0.85); }
.product__flip[aria-pressed="true"] i { color: var(--amber); }
.product__info { display: flex; flex-direction: column; flex: 1; margin-top: 20px; }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: 12px; }
.product__color { display: inline-flex; align-items: center; gap: 6px; }
.product__color i { width: 10px; height: 10px; border-radius: 50%; }
.product__name { margin-top: 10px; font-size: 24px; letter-spacing: -0.03em; line-height: 1.15; }
.product__price { margin-top: 6px; color: var(--amber); font-size: 18px; font-weight: 400; }
.product__desc { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product__buy { margin-top: auto; padding-top: 20px; display: grid; gap: 14px; }
.sizes { padding: 0; border: 0; min-width: 0; }
.sizes legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.sizes__row { display: flex; flex-wrap: wrap; gap: 6px; }
.size { position: relative; cursor: pointer; }
.size input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.size span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px; background: var(--faint); color: var(--soft); font-size: 14px; font-weight: 500; transition: background-color 180ms, color 180ms; }
.size:hover span { color: #fff; background: rgba(255, 255, 255, 0.14); }
.size input:checked + span { background: #fff; color: #000; }
.size input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 3px; }
.sizes__msg { margin-top: 8px; color: var(--amber); font-size: 14px; font-weight: 500; }
.sizes__msg:empty { margin: 0; }
.sizes__one { color: var(--muted); font-size: 12px; }
.product .btn-order { width: 100%; padding: 0 14px; font-size: 14px; }
.collection__note { margin-top: clamp(96px, 12vw, 160px); max-width: 40em; color: var(--muted); font-size: 16px; }

/* ---------- De cerca ---------- */
.closeup { padding-block: clamp(96px, 12vw, 160px); }
.closeup__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 112px); align-items: center; }
.closeup__intro { margin-top: 24px; color: var(--soft); }
.closeup__list { margin-top: 48px; display: grid; gap: 4px; }
.closeup__item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 6px 0; border: 0; background: none; color: var(--soft); font-size: 22px; font-weight: 400; letter-spacing: -0.02em; text-align: left; cursor: pointer; transition: color 200ms; }
.closeup__item:hover, .closeup__item[aria-pressed="true"] { color: #fff; }
.closeup__n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--faint); color: var(--muted); letter-spacing: 0; transition: background-color 200ms, color 200ms; }
.closeup__item[aria-pressed="true"] .closeup__n { background: var(--violet); color: #fff; }
.closeup__text { max-height: 0; overflow: hidden; opacity: 0; padding-left: 48px; color: var(--muted); transition: max-height 500ms var(--ease-out), opacity 400ms var(--ease-out), padding 400ms var(--ease-out); }
.closeup__list li.is-on .closeup__text { max-height: 12em; opacity: 1; padding-bottom: 12px; }
.closeup__buy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-top: 40px; color: var(--soft); }
.closeup__buy b { color: var(--amber); font-weight: 400; }
.closeup__stage { position: relative; width: 100%; max-width: 480px; justify-self: center; }
.closeup__frame { aspect-ratio: 700 / 1087; overflow: hidden; border-radius: var(--radius); background: #111; }
.closeup__img { width: 100%; height: 100%; object-fit: cover; transform-origin: var(--ox, 50%) var(--oy, 50%); transition: transform 1.1s var(--ease-out); }
.closeup.is-zoom .closeup__img { transform: scale(2.6); }
.closeup__dot { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 200ms, opacity 300ms, transform 200ms var(--ease-out); }
.closeup__dot:hover { transform: scale(1.08); }
.closeup__dot[aria-pressed="true"] { background: var(--violet); }
.closeup.is-zoom .closeup__dot:not([aria-pressed="true"]) { opacity: 0; pointer-events: none; }
.closeup__back { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.closeup__back[hidden] { display: none; }

/* ---------- Taller ---------- */
.workshop { padding-block: clamp(96px, 12vw, 160px); }
.workshop__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 112px); align-items: center; }
.workshop__copy p { margin-top: 24px; color: var(--soft); max-width: 30em; }
.workshop__copy p:first-of-type { margin-top: 36px; }
.workshop__photo { width: 100%; height: auto; aspect-ratio: 1376 / 768; object-fit: cover; border-radius: var(--radius); }

/* ---------- Visítanos ---------- */
.visit { padding-block: clamp(96px, 12vw, 160px); }
.visit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.visit address { margin-top: 36px; }
.visit__big { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.2; }
.visit__how { margin-top: 12px; color: var(--muted); }
.visit__tel { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--amber); font-size: 22px; font-weight: 400; text-decoration: none; }
.visit__tel:hover { text-decoration: underline; }
.hours { margin-top: 36px; display: grid; gap: 16px; }
.hours div { display: grid; gap: 2px; }
.hours dt { color: var(--muted); }
.hours dd { color: var(--soft); }
.visit__map { aspect-ratio: 4 / 3.4; overflow: hidden; border-radius: var(--radius); background: #111; }
.visit__map iframe { width: 100%; height: 100%; border: 0; filter: invert(0.92) hue-rotate(180deg) grayscale(0.6) contrast(0.9) brightness(0.85); }

/* ---------- Pie ---------- */
.footer { padding-top: clamp(64px, 10vw, 140px); padding-bottom: 120px; overflow: hidden; }
.footer__word { font-size: clamp(6rem, 29vw, 30rem); font-weight: 400; letter-spacing: -0.06em; line-height: 0.78; text-align: center; background: linear-gradient(100deg, var(--violet), var(--amber) 55%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 48px; color: var(--muted); font-size: 15px; }
.footer__inner a { color: var(--amber); }

/* ---------- Aviso del pedido ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; width: min(560px, calc(100vw - 32px)); padding: 18px 22px; border-radius: 18px; background: #161616; color: var(--soft); font-size: 16px; line-height: 1.5; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }
.toast b { color: #fff; font-weight: 500; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.is-embed .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .collection__head, .closeup__grid, .workshop__grid, .visit__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__grid { min-height: 0; }
  .sky { justify-self: center; max-width: 520px; }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav nav { display: none; }
  .nav__cta { margin-left: auto; }
  .hero { padding-top: 112px; }
  .strip { justify-content: flex-start; }
  .closeup__item { font-size: 19px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 12px; }
  .product__name { font-size: 20px; }
  .product__flip { width: 44px; padding: 0; justify-content: center; }
  .product__flip span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .footer { padding-bottom: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
