/* Trasluz - estilos
   Paleta: papel (fondo), tinta violeta, violeta eléctrico, y los tres tonos del film: lila, menta y durazno */
:root {
  --papel: #F2F0F7;
  --papel2: #E4DEF2;
  --tinta: #1C1233;
  --violeta: #5B3DF5;
  --lila: #CFC4FF;
  --menta: #B8F0DE;
  --durazno: #FFC9B0;
  --muted: #4E4468;
  --ring: var(--papel);
  --display: 'Anybody', 'Arial Narrow', Arial, sans-serif;
  --body: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; color: var(--tinta); background: var(--papel); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -0.01em; font-variation-settings: 'wdth' 85; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
p { max-width: 58ch; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--violeta); outline-offset: 3px; }
.yield :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--tinta); color: var(--papel); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header { position: relative; z-index: 20; }
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.45rem; font-variation-settings: 'wdth' 100; letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; font-weight: 600; }
.nav a { text-decoration: none; padding-block: .25rem; background: linear-gradient(var(--violeta), var(--violeta)) 0 100% / 0 3px no-repeat; transition: background-size .2s; }
.nav a:hover { background-size: 100% 3px; }
.menu-btn { display: none; }

/* Botones */
.btn { display: inline-block; font-family: var(--body); font-weight: 700; font-size: 1.02rem; text-decoration: none; color: var(--papel); background: var(--tinta); border: 2px solid var(--tinta); border-radius: 3px; padding: .8rem 1.4rem; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--violeta); border-color: var(--violeta); }
.btn-text { font-weight: 700; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; padding: .8rem .25rem; }
.btn-text:hover { color: var(--violeta); }

/* Hero */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.8rem); line-height: .98; font-variation-settings: 'wdth' 60; margin-bottom: 1.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.stage { --p: 0%; position: relative; aspect-ratio: 640 / 420; overflow: hidden; border-radius: 20px; background: var(--papel2); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.film {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--p)) 0 0);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .55), transparent 55%),
    repeating-linear-gradient(97deg, transparent 0 26px, rgba(255, 255, 255, .5) 26px 27.5px, transparent 27.5px 47px),
    repeating-linear-gradient(74deg, transparent 0 38px, rgba(255, 255, 255, .28) 38px 39px, transparent 39px 71px),
    linear-gradient(105deg, rgba(207, 196, 255, .5), rgba(184, 240, 222, .45) 38%, rgba(255, 201, 176, .45) 68%, rgba(207, 196, 255, .5));
  backdrop-filter: saturate(1.15) blur(.8px);
  -webkit-backdrop-filter: saturate(1.15) blur(.8px);
}
.edge { position: absolute; top: 0; bottom: 0; left: var(--p); width: 3px; transform: translateX(-50%); background: var(--tinta); }
.grip { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--papel); border: 3px solid var(--tinta); transition: transform .15s; }
.grip::before, .grip::after { content: ''; position: absolute; top: 50%; margin-top: -6px; border: 6px solid transparent; }
.grip::before { left: 7px; border-left-width: 0; border-right: 7px solid var(--tinta); }
.grip::after { right: 7px; border-right-width: 0; border-left: 7px solid var(--tinta); }
.stage.is-drag .grip { transform: scale(1.12); }
.stage.is-done .edge { display: none; }
.peek { position: absolute; left: -50px; top: 50%; width: 118px; height: 118px; margin-top: -59px; }

.pull { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; margin-top: 1rem; }
.pull label { font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 90; font-size: 1.15rem; }
.pull output { min-width: 7.5rem; text-align: right; font-weight: 600; }

/* Rango */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--lila), var(--menta), var(--durazno)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--tinta); border: 4px solid var(--ring); box-shadow: 0 0 0 1px var(--tinta); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--lila), var(--menta), var(--durazno)); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--tinta); border: 4px solid var(--ring); box-shadow: 0 0 0 1px var(--tinta); }

/* Linea de corte */
.perf { position: relative; height: 0; margin-inline: clamp(1rem, 4vw, 3rem); border-top: 3px dotted rgba(28, 18, 51, .4); color: var(--tinta); }
.perf svg { position: absolute; left: 1rem; top: -14px; width: 38px; height: 28px; padding-inline: 4px; background: var(--papel); }

/* Rollos */
.rolls { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.rolls-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.rolls-list .sub { color: var(--muted); margin: 1rem 0 2rem; }
.picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.pick { position: relative; display: block; cursor: pointer; border-top: 2px solid var(--tinta); }
.pick:last-child { border-bottom: 2px solid var(--tinta); }
.pick input { position: absolute; opacity: 0; }
.pick-body { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "use use"; align-items: baseline; gap: .2rem 1rem; padding: 1.4rem .75rem 1.4rem 1rem; border-left: 8px solid transparent; transition: border-color .25s, background .25s; }
.pick-name { grid-area: name; font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5.4vw, 3.8rem); line-height: 1; font-variation-settings: 'wdth' 65; transition: font-variation-settings .35s; }
.pick-price { grid-area: price; font-family: var(--display); font-weight: 700; font-size: 1.5rem; font-variation-settings: 'wdth' 90; }
.pick-use { grid-area: use; color: var(--muted); }
.pick:hover .pick-body { background: rgba(228, 222, 242, .5); }
.pick input:checked + .pick-body { border-left-color: var(--violeta); background: var(--papel2); }
.pick input:checked + .pick-body .pick-name { font-variation-settings: 'wdth' 130; }
.pick input:focus-visible + .pick-body { outline: 3px solid var(--violeta); outline-offset: -3px; }

.roll-stage { position: sticky; top: 1.5rem; display: grid; gap: 1.25rem; justify-items: stretch; }
#rollSvg { width: min(100%, 400px); height: auto; margin-inline: auto; overflow: visible; }
.specs { display: grid; gap: .5rem; }
.specs div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .45rem; border-bottom: 1px solid rgba(28, 18, 51, .25); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 700; text-align: right; }
.roll-stage .btn { justify-self: start; }

/* Rinde mas */
.yield { --ring: var(--violeta); background: var(--violeta); color: #fff; padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.yield-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.yield h2 { margin-bottom: 1rem; }
.yield-copy > p { color: #EDE8FF; margin-bottom: 2rem; }
.ctl { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .25rem 1rem; margin-bottom: 2rem; }
.ctl label { font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 90; font-size: 1.15rem; }
.ctl output { font-family: var(--display); font-weight: 800; font-size: 1.6rem; }
.ctl input { grid-column: 1 / -1; }
.reads { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.reads div { display: flex; flex-direction: column-reverse; gap: .35rem; }
.reads dd { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; font-variation-settings: 'wdth' 90; }
.reads dd small { font-size: .42em; font-weight: 700; margin-left: .3em; font-variation-settings: 'wdth' 100; }
.reads dt { color: #EDE8FF; font-size: .98rem; }
.yield .fine { font-size: .9rem; color: #EDE8FF; }
#strip { width: 100%; height: auto; overflow: visible; }
.s-lbl { font: 600 15px var(--body); fill: #fff; }

/* Preguntas */
.faq { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.faq h2 { max-width: 8ch; }
.faq details { border-top: 2px solid var(--tinta); padding-block: 1.2rem; }
.faq details:last-child { border-bottom: 2px solid var(--tinta); }
.faq summary { font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 90; font-size: 1.35rem; line-height: 1.15; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-size: 2rem; line-height: 1; color: var(--violeta); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .8rem; color: var(--muted); }

/* Muestra */
.sample { background: var(--papel2); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sample-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); }
.sample h2 { margin-bottom: 1rem; max-width: 9ch; }
.sample-grid > div p { color: var(--muted); }
form { display: grid; gap: 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .1rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--tinta); background: transparent; border: 0; border-bottom: 2px solid var(--tinta); border-radius: 0; padding: .7rem .1rem; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { background: rgba(255, 255, 255, .5); }
.field [aria-invalid="true"] { border-bottom-color: #9A1B3A; }
.err { color: #9A1B3A; font-weight: 700; font-size: .92rem; margin-top: .35rem; }
form .btn { justify-self: start; }
.sent { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 90; font-size: 1.4rem; padding: 1.25rem 0 1.25rem 1.25rem; border-left: 8px solid var(--violeta); }

/* Footer */
.site-footer { background: var(--tinta); color: var(--papel); padding-block: 2.5rem; }
.foot { display: grid; gap: .6rem; }
.foot p { font-size: .92rem; color: #C9C0E0; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .rolls-grid, .yield-grid, .faq-grid, .sample-grid { grid-template-columns: 1fr; }
  .roll-stage { position: static; }
  .rolls-grid { gap: 1.5rem; }
  .rolls-list { display: contents; }
  .rolls-list h2 { order: 0; }
  .rolls-list .sub { order: 1; margin: 0; }
  .roll-stage { order: 2; }
  .picker { order: 3; }
  #rollSvg { width: min(100%, 260px); }
  .faq h2, .sample h2 { max-width: none; }
  .nav :focus-visible { outline-color: #fff; }
  .menu-btn { display: inline-block; margin-left: auto; font: 700 .95rem var(--body); background: transparent; color: var(--tinta); border: 2px solid var(--tinta); border-radius: 3px; padding: .45rem .9rem; cursor: pointer; }
  .nav { display: none; position: absolute; top: 100%; left: 1.25rem; right: 1.25rem; flex-direction: column; gap: 0; margin: 0; background: var(--tinta); color: var(--papel); border-radius: 6px; padding: .5rem 1.25rem; }
  .nav.is-open { display: flex; }
  .nav a { padding-block: .8rem; }
}
@media (max-width: 560px) {
  .pull { grid-template-columns: 1fr auto; }
  .pull input { grid-column: 1 / -1; grid-row: 2; }
  .reads { grid-template-columns: 1fr; }
  .s-lbl { font-size: 22px; }
  .peek { width: 90px; height: 90px; margin-top: -45px; left: -38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
