:root {
  --ink: #0F0F10;
  --char: #2A2B2D;
  --steel: #5A5B5C;
  --alu: #B9BAB8;
  --alu-2: #CBCCCA;
  --mist: #DCDDDA;
  --paper: #F2F2F0;
  --white: #FFFFFF;
  --red: #D7263D;
  --red-press: #B01E31;
  --display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* five type steps */
  --t-display: clamp(96px, 10vw, 160px);
  --t-head: clamp(40px, 4.4vw, 68px);
  --t-state: clamp(22px, 2.1vw, 30px);
  --t-body: 17px;
  --t-small: 14px;
  --m: clamp(16px, 3.2vw, 40px);
  --gap: clamp(88px, 9vw, 128px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--ink); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: .95; letter-spacing: -.02em; text-wrap: balance; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.mark { width: 24px; height: 24px; flex: none; }

/* ---------- buttons: square, one fill, tab-cut top corners ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border: 0; font: 600 var(--t-body)/1 var(--text); text-decoration: none; cursor: pointer;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px); transition: background-color .2s var(--ease), transform .2s var(--ease); }
.btn:active { transform: translateY(2px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-press); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--char); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--white); }
.btn-full { width: 100%; }
.btn-ghost-dk { background: var(--mist); color: var(--ink); }
.btn-ghost-dk:hover { background: var(--alu); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- hero: tabbed folder stack ---------- */
.hero { position: relative; min-height: calc(100svh - 64px); background: var(--ink); color: var(--paper); overflow: hidden; display: flex; flex-direction: column; }
/* plain sticky bar: wordmark, four links, one action */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 var(--m); background: var(--ink); color: var(--paper); }
.toplinks { display: flex; gap: 26px; margin-left: auto; }
.toplinks a { color: var(--paper); text-decoration: none; font-size: var(--t-body); padding: 8px 0; }
.toplinks a:hover { text-decoration: underline; text-underline-offset: 6px; }
.btn-top { min-height: 42px; padding: 0 20px; }
.word { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); font: 800 var(--t-body)/1 var(--display); letter-spacing: .3em; margin-right: -.3em; }
.word .mark { color: var(--alu); }
.hero-text { text-align: center; padding: 0 var(--m); margin-top: clamp(28px, 6vh, 64px); }
.hero h1 { font-size: var(--t-display); text-transform: uppercase; letter-spacing: -.01em; line-height: .86; color: var(--paper); }
.hero-sub { font-size: var(--t-state); line-height: 1.3; max-width: 34ch; margin: 36px auto 0; color: var(--paper); text-wrap: balance; }

.folders { position: relative; flex: 1; margin-top: clamp(40px, 7vh, 80px); }
section[id], header[id] { scroll-margin-top: 64px; }
.folder { position: absolute; left: 7%; right: 7%; top: calc(var(--i) * 64px + 40px); bottom: -40px; display: block; text-decoration: none; color: var(--ink); transition: transform .45s var(--ease); }
.folder .tab { position: absolute; bottom: 100%; left: var(--tx); height: 44px; padding: 0 30px; display: flex; align-items: center; font: 600 17px/1 var(--text); background: inherit; color: inherit; text-decoration: none;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); white-space: nowrap; }
.f1 { --i: 0; --tx: 74%; background: var(--char); color: var(--paper); }
.f2 { --i: 1; --tx: 54%; background: var(--steel); color: var(--paper); }
.f3 { --i: 2; --tx: 33%; background: var(--alu); }
.f4 { --i: 3; --tx: 14%; background: var(--mist); }
/* the open front folder sits in the flow so the hero grows to show everything in it */
.f5 { --i: 4; --tx: 0%; background: var(--paper); position: relative; top: auto; bottom: auto; left: auto; right: auto; margin: calc(4 * 64px + 40px) 7% 0; }
a.folder:hover, a.folder:focus-visible { transform: translateY(-10px); }
.f5-in { padding: 36px 32px 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.f5-note { font-size: var(--t-body); max-width: 40ch; }
.f5-row { flex-basis: 100%; list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.f5-row a { display: grid; gap: 8px; text-decoration: none; font-size: var(--t-small); font-weight: 600; }
.f5-row img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--white); padding: 10%; mix-blend-mode: multiply; transition: transform .45s var(--ease); }
.f5-row a:hover img { transform: translateY(-6px); }

/* ---------- perfiles: billets photograph with order slips ---------- */
.perfiles { position: relative; height: 96svh; min-height: 720px; overflow: hidden; background: var(--paper); color: var(--paper); }
.pf-photo { position: absolute; inset: 0; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pf-text { position: absolute; left: 18%; top: 9%; width: min(600px, 64vw); padding: 28px 32px; background: rgba(15, 15, 16, .72); display: grid; gap: 18px; }
.statement { font-size: var(--t-state); line-height: 1.3; }
.statement h2 { display: inline; font: inherit; font-weight: 700; letter-spacing: 0; }
.slips { position: absolute; left: var(--m); right: var(--m); bottom: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.slip { background: var(--paper); color: var(--ink); padding: 20px 18px; height: var(--h); font-size: var(--t-small); line-height: 1.45; transform: rotate(var(--r, 0deg)); transform-origin: bottom center; }
.slip:nth-child(1) { --h: 34svh; }
.slip:nth-child(2) { --h: 42svh; --r: -1.5deg; }
.slip:nth-child(3) { --h: 28svh; }
.slip:nth-child(4) { --h: 38svh; --r: 1.2deg; }
.slip:nth-child(5) { --h: 44svh; }
.slip:nth-child(6) { --h: 31svh; --r: -1deg; }
.slip-head { font-weight: 700; }
.slip-cut { color: var(--steel); letter-spacing: .05em; overflow: hidden; white-space: nowrap; }
.slip ul { list-style: none; }
.slip li { display: flex; justify-content: space-between; gap: 8px; }
.slip li:last-child { font-weight: 600; }
.slip-foot { color: var(--steel); margin-top: 8px; font-size: var(--t-small); }

/* ---------- index with preview ---------- */
.index { background: var(--paper); padding: var(--gap) var(--m); display: grid; gap: 48px; }
.ix-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; }
.index h2, .corte h2, .card h2, .sheet h2 { font-size: var(--t-head); }
.ix-head p { max-width: 44ch; }
.ix-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.ix-list { list-style: none; }
.ix-row { display: grid; grid-template-columns: 6em 1fr auto; gap: 16px; align-items: baseline; padding: 12px 16px; text-decoration: none; font-size: var(--t-body); line-height: 1.2; transition: background-color .24s var(--ease), color .24s var(--ease), opacity .24s; }
.ix-code { font-weight: 600; }
.ix-size { font-weight: 600; font-size: var(--t-state); }
.ix-slot { color: var(--char); }
.ix-list:hover .ix-row { opacity: .45; }
.ix-list .ix-row:hover, .ix-row:focus-visible { opacity: 1; background: var(--white); }
.ix-inline { display: none; }
.ix-frame { position: sticky; top: 32px; aspect-ratio: 1; background: var(--white); margin: 0; }
.ix-frame img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8%; object-fit: contain; mix-blend-mode: multiply; transition: opacity .24s var(--ease); }
.ix-frame img.swap { opacity: 0; }

/* ---------- corte a medida: the live cut order ---------- */
.corte { background: var(--mist); padding: var(--gap) var(--m); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
.ct-left { grid-column: 1 / 6; display: grid; gap: 22px; }
.ct-left > p { max-width: 34ch; }
.ct-right { grid-column: 7 / 13; display: grid; gap: 16px; justify-items: end; }
.ct-photo-l { margin: 18px 0 0; background: var(--ink); aspect-ratio: 4 / 3; overflow: hidden; }
.ct-photo-l img { width: 100%; height: 100%; object-fit: cover; }
.ct-form { display: grid; gap: 14px; margin-top: 8px; }
.fld { display: grid; gap: 6px; }
.fld > span { font-size: var(--t-small); font-weight: 600; }
select, input { font: 400 17px/1.2 var(--text); color: var(--ink); background: var(--white); border: 0; border-radius: 0; height: 52px; padding: 0 14px; width: 100%; }
select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F0F10' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
input:focus, select:focus { outline: 3px solid var(--ink); outline-offset: 0; }
input[aria-invalid=true] { outline: 3px solid var(--red); }
.cuts { display: grid; gap: 10px; }
.cut { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 52px; gap: 10px; align-items: end; }
.cut .x { height: 52px; border: 0; background: var(--alu-2); cursor: pointer; display: grid; place-items: center; transition: background-color .2s; }
.cut .x:hover { background: var(--alu); }
.cut .x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; fill: none; }
.cut-err { grid-column: 1 / -1; color: var(--red-press); font-size: var(--t-small); font-weight: 600; }
.cut-err:empty { display: none; }
.fine { font-size: var(--t-small); color: var(--char); }
.order { width: min(470px, 100%); background: var(--white); padding: 30px 28px 52px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px)); font-size: 16px; }
.order-title { font: 800 var(--t-state)/1 var(--display); text-transform: uppercase; }
.order-sub { margin-top: 6px; color: var(--char); }
.order-h { font-weight: 700; margin-top: 28px; }
.dots { list-style: none; margin-top: 6px; }
.dots li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.dots li::after { content: none; }
.dots span { order: 1; }
.dots b { order: 3; font-weight: 600; white-space: nowrap; }
.dots li::before { content: ""; order: 2; flex: 1; min-width: 16px; border-bottom: 4px dotted var(--alu); transform: translateY(-4px); }
.order-total { margin: 30px -28px 0; padding: 0 28px; min-height: 48px; display: flex; align-items: center; background: var(--ink); color: var(--paper); font-weight: 600; }
.ct-msg { font-weight: 600; min-height: 1.5em; }
.ct-msg a { color: var(--ink); }

/* ---------- accesorios: giant word, filled bar rows ---------- */
.acc { background: var(--alu); padding: var(--gap) var(--m); }
.acc-col { width: min(640px, 100%); margin: 0 auto; container-type: inline-size; }
.giant { font-size: 17.4cqw; line-height: .8; text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; }
.acc-intro { margin: 24px 0 20px; max-width: 40ch; }
.bars { display: grid; gap: 6px; }
.bar { background: var(--alu-2); }
.bar summary { list-style: none; cursor: pointer; min-height: 56px; padding: 0 18px; display: flex; align-items: center; gap: 12px; font-weight: 500; transition: background-color .2s; }
.bar summary::-webkit-details-marker { display: none; }
.bar:not([open]) > ul { display: none; }
.bar summary::after { content: "+"; margin-left: 12px; font-size: var(--t-state); font-weight: 400; line-height: 1; transition: transform .3s var(--ease); }
.bar[open] summary::after { transform: rotate(45deg); }
.bar summary:hover { background: var(--mist); }
.bar-n { margin-left: auto; color: var(--char); font-size: var(--t-small); }
.bar ul { list-style: none; padding: 6px 20px 20px; display: grid; gap: 2px; }
.bar li a { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; text-decoration: none; }
.bar li a:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.bar .tab { color: var(--char); font-size: var(--t-small); align-self: center; text-align: right; max-width: 45%; overflow-wrap: anywhere; }

/* ---------- quiénes somos: the letter on a sheet ---------- */
.nos { background: var(--steel); padding: var(--gap) var(--m); }
.sheet { position: relative; width: min(640px, 100%); margin: 0 auto 24px; background: var(--paper); padding: 60px 60px 0; display: grid; gap: 18px; }
.sheet-edge { position: absolute; left: 0; top: 100%; width: 100%; height: 22px; color: var(--paper); display: block; }
.sheet-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.seal { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--alu); display: grid; place-items: center; flex: none; }
.sheet p { font-size: 17px; line-height: 1.55; }
.sign { font-style: italic; font-size: var(--t-state) !important; margin-top: 10px; }
.role { font-size: var(--t-small) !important; color: var(--char); margin-top: -12px; }
.stub { margin: 24px -60px 0; padding: 26px 60px 40px; border-top: 5px dotted var(--alu); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.stub a:first-child { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.stub a:first-child:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- contacto: visit card on the bridge ---------- */
.contacto { position: relative; min-height: 100svh; background: var(--ink); }
.ct-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.card { position: absolute; top: 60px; right: var(--m); width: 400px; background: var(--paper); padding: 32px 32px 0; display: grid; gap: 16px; }
.card h2 { font-size: var(--t-state); }
.card dl { display: grid; gap: 10px; }
.card dl div { display: flex; justify-content: space-between; gap: 16px; }
.card dt { font-weight: 600; }
.card dd { text-align: right; overflow-wrap: anywhere; }
.card dd a { text-decoration: none; }
.card dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card .btn { margin: 8px -32px 0; width: calc(100% + 64px); clip-path: none; }

/* ---------- footer: the back of the card ---------- */
.foot { background: var(--ink); color: var(--ink); padding: var(--gap) var(--m) 40px; }
.postcard { position: relative; width: min(1100px, 100%); margin: 0 auto; background: var(--paper); padding: 56px 56px 28px; }
.scallops { position: absolute; left: 0; right: 0; bottom: 100%; width: 100%; height: 40px; color: var(--paper); display: block; }
.pc-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; min-height: 300px; }
.pc-sign { font: 800 var(--t-head)/1 var(--display); margin-bottom: 18px; }
.pc-msg p:not(.pc-sign) { max-width: 36ch; }
.pc-addr { position: relative; display: grid; align-content: end; gap: 12px; padding-top: 140px; }
.pc-addr a { text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.pc-addr a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stamp { position: absolute; top: 0; right: 0; width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border: 6px solid var(--white); transform: rotate(3deg); }
.imprint { text-align: center; font-size: var(--t-small); margin-top: 40px; }
.credits { width: min(1100px, 100%); margin: 28px auto 0; color: var(--alu); font-size: var(--t-small); }
.credits a { color: var(--paper); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; width: fit-content; max-width: 480px; background: var(--ink); color: var(--paper); padding: 14px 18px; font-weight: 500; transform: translateY(160%); transition: transform .45s var(--ease); z-index: 30; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); } /* taste-skill-ignore: the toast floats over the page */
.toast.on { transform: none; }
.toast a { color: var(--white); margin-left: 12px; font-weight: 700; }

/* ---------- motion: entrances, the drifting photograph ---------- */
.js .rise > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--k, 0) * 80ms); }
.js .rise.in > * { opacity: 1; transform: none; }
.js .slips .slip { opacity: 0; translate: 0 40px; transition: opacity .8s var(--ease), translate .8s var(--ease); transition-delay: calc(var(--k, 0) * 70ms); }
.js .slips.in .slip { opacity: 1; translate: 0 0; }
.js .folders .folder { translate: 0 60px; opacity: 0; transition: translate .9s var(--ease), opacity .9s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--i) * 70ms + 150ms); }
.js .folders.in .folder { translate: 0 0; opacity: 1; }
.drift { animation: drift 26s ease-in-out infinite alternate; transform-origin: 40% 50%; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-1.5%); } }
.order .dots li { animation: print .35s var(--ease) both; animation-delay: calc(var(--k, 0) * 40ms); }
@keyframes print { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drift, .order .dots li { animation: none; }
  .js .rise > *, .js .slips .slip, .js .folders .folder { opacity: 1; transform: none; translate: 0 0; transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .pf-text { left: var(--m); }
  .slips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slip:nth-child(n+4) { display: none; }
  .ix-body { grid-template-columns: minmax(0, 1fr); }
  .ix-frame { display: none; }
  .ix-row { grid-template-columns: 6.5em 1fr 64px; }
  .ix-slot { display: none; }
  .ix-inline { display: block; width: 64px; height: 64px; object-fit: contain; background: var(--white); mix-blend-mode: multiply; }
  .corte { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .ct-left, .ct-right { grid-column: 1 / -1; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --t-body: 16px; }
  .topbar { gap: 14px; height: 60px; }
  .toplinks { gap: 14px; }
  .toplinks a:not(.pdf) { display: none; }
  .toplinks .pdf { font-size: 15px; }
  .btn-top { min-height: 40px; padding: 0 14px; font-size: 15px; }
  .hero-text { margin-top: 24px; }
  .actions .btn { width: 100%; }
  .hero h1 { font-size: 26vw; }
  .hero-sub { font-size: 18px; margin-top: 24px; }
  .folders { min-height: 380px; }
  .folder { left: 0; right: 0; top: calc(var(--i) * 52px + 32px); }
  .folder .tab { height: 34px; padding: 0 18px; font-size: 15px; }
  .f1 { --tx: 58%; } .f2 { --tx: 34%; } .f3 { --tx: 52%; } .f4 { --tx: 6%; } .f5 { --tx: 0%; }
  .folders .f5 { top: auto; margin: calc(4 * 52px + 32px) 0 0; }
  .f5-in { padding: 24px 16px 48px; }
  .f5-in .btn { width: 100%; }
  .f5-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .f5-row li:nth-child(n+4) { display: none; }
  .perfiles { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .pf-photo { position: relative; height: 60svh; }
  .pf-text { position: relative; left: 0; top: 0; width: 100%; padding: 28px var(--m); background: var(--ink); }
  .slips { position: relative; left: 0; right: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px var(--m) 0; background: var(--ink); }
  .slip { height: auto; min-height: 200px; }
  .slip:nth-child(4) { display: block; }
  .ix-head { grid-template-columns: minmax(0, 1fr); }
  .ix-row { padding: 12px 8px; grid-template-columns: 5.5em 1fr 56px; }
  .ix-inline { width: 56px; height: 56px; }
  .cut { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px; }
  .sheet { padding: 40px 24px 0; }
  .stub { margin: 24px -24px 0; padding: 22px 24px 36px; }
  .stub .btn { width: 100%; }
  .contacto { min-height: 0; padding-bottom: 32px; }
  .ct-photo { position: relative; height: 70svh; }
  .card { position: relative; top: auto; right: auto; width: auto; margin: -80px var(--m) 0; }
  .postcard { padding: 40px 24px 24px; }
  .pc-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pc-addr { padding-top: 0; padding-right: 88px; }
  .stamp { width: 68px; }
}
