/* Dalbertt · "Edición diaria"
   La casa como revista de pastelería de vanguardia: porcelana gris y líneas finas del logo,
   mármol negro de sus mesas, y un solo acento: frutos rojos (#7A1632), solo para lo que importa (el 0 de gluten, los énfasis).
   Motivo: el rectángulo desplazado del logo enmarca fotos y mapa. */

:root {
  --porcelain: #EBEBE8;
  --white: #F7F7F5;
  --marble: #121211;
  --marble-2: #1C1B1A;
  --grey: #A9A8A3;
  --grey-ink: #5B5954;
  --berry: #7A1632;
  --rose: #E9B7C5;
  --line: rgba(18, 18, 17, .2);
  --line-light: rgba(235, 235, 232, .2);

  --serif: 'Bodoni Moda', 'Didot', Georgia, serif;
  --sans: 'Jost', 'Futura', system-ui, sans-serif;
  --g: clamp(16px, 4vw, 60px);
  --nav: 66px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav); -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; background: var(--porcelain); color: var(--marble); font: 300 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
em { font-style: italic; }
h2 em, .cover__big em, .gente em { color: var(--berry); }
b, strong { font-weight: 500; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: -80px; left: 12px; z-index: 100; background: var(--marble); color: var(--porcelain); padding: 10px 16px; }
.skip:focus { top: 12px; }

.label { display: inline-flex; align-items: center; gap: 12px; font: 500 .72rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 26px; }
.label::before { content: ""; width: 14px; height: 10px; border: 1px solid currentColor; box-shadow: 4px -3px 0 -1px var(--grey); }

/* Botones: marco fino, como el logo */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  font: 500 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--marble); overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .4s var(--ease); opacity: 0; }
.btn--ink { background: var(--marble); color: var(--porcelain); }
.btn--ink:hover { background: var(--berry); border-color: var(--berry); }
.btn--line { color: var(--marble); }
.btn--line:hover { background: var(--marble); color: var(--porcelain); }
.btn--light { color: var(--porcelain); border-color: var(--porcelain); }
.btn--light:hover { background: var(--porcelain); color: var(--marble); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .7rem; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link:hover svg { transform: translateX(4px); }

/* NAV */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--g); transition: background .3s, box-shadow .3s; }
.nav.is-solid { background: rgba(235, 235, 232, .94); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav__brand { font: 400 1rem/1 var(--sans); letter-spacing: .42em; text-decoration: none; padding: 9px 4px 9px 12px; border: 1px solid var(--marble); }
.nav__links { display: flex; gap: 28px; font: 500 .7rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.nav__links a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav__links a:hover { border-color: currentColor; }
.nav:not(.is-solid) .nav__links { opacity: 0; visibility: hidden; }
.nav__links { transition: opacity .4s, visibility .4s; }

/* COVER · portada */
.cover {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(0, min(46vw, calc(100svh * .74))) 1fr;
  column-gap: clamp(20px, 2.6vw, 44px);
  padding: 0 var(--g);
  overflow: hidden;
}
.cover__photo { grid-column: 2; grid-row: 1; height: 100svh; min-height: 620px; overflow: hidden; }
.cover__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.masthead {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--nav) + 18px);
  width: min(86vw, 1240px); height: auto; transform: translateX(-50%);
  mix-blend-mode: difference; pointer-events: none; overflow: visible;
}
.masthead path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.masthead .masthead__grey { stroke: #9a9a9a; }
.cover__issue {
  position: absolute; z-index: 3; left: var(--g); right: var(--g); bottom: 18px;
  display: flex; justify-content: space-between; gap: 12px;
  font: 500 .66rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--grey-ink);
  pointer-events: none;
}
.cover__left, .cover__right { grid-row: 1; align-self: end; padding-bottom: 64px; position: relative; z-index: 3; }
.cover__left { grid-column: 1; }
.cover__right { grid-column: 3; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.cover__big { font: 400 clamp(2.4rem, 4.2vw, 4.4rem)/.95 var(--serif); letter-spacing: -.02em; margin-bottom: 14px; }
.cover__sub { font-size: 1rem; max-width: 26ch; color: var(--grey-ink); margin-bottom: 22px; }
.cover__lines li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font: italic 400 1.02rem/1.25 var(--serif); }
.cover__lines span { font: 500 .66rem/1 var(--sans); letter-spacing: .2em; font-style: normal; color: var(--grey-ink); flex: none; }
.cover__open, .visit__live { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; }
.cover__open i, .visit__live i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--marble); flex: none; }
.is-open .cover__open i, .is-open .visit__live i { background: var(--berry); border-color: var(--berry); box-shadow: 0 0 0 4px rgba(122, 22, 50, .15); }
.cover__open b, .visit__live b { font-weight: 500; }
.cover__addr { font: 400 clamp(1.4rem, 2vw, 1.9rem)/1.1 var(--serif); }
.cover__addr span { font: 300 .9rem/1.6 var(--sans); color: var(--grey-ink); }
.cover__ctas { display: flex; flex-direction: column; gap: 10px; width: min(100%, 260px); }

/* LA CASA */
.casa { background: var(--white); padding: clamp(96px, 16vh, 170px) var(--g); }
.casa__title { font-size: clamp(3rem, 7.6vw, 8rem); line-height: .92; max-width: 11em; margin-bottom: clamp(48px, 9vh, 96px); }
.casa__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.framed { position: relative; }
.framed::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--grey); transform: translate(18px, -18px); pointer-events: none; }
.framed__img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--porcelain); }
.framed__img img { width: 100%; height: 112%; object-fit: cover; }
.framed figcaption { margin-top: 14px; font: italic 400 .95rem/1.3 var(--serif); color: var(--grey-ink); }
.casa__text .lead { font: 400 clamp(1.2rem, 1.6vw, 1.45rem)/1.5 var(--serif); margin-bottom: 18px; }
.casa__text p:not(.lead) { color: var(--grey-ink); max-width: 44ch; }
.casa__line { margin-top: clamp(56px, 10vh, 110px); padding: 26px 0; border-top: 1px solid var(--marble); border-bottom: 1px solid var(--line); font-size: clamp(1rem, 1.3vw, 1.2rem); color: var(--grey-ink); line-height: 2; }
.casa__line b { font: 500 clamp(1.8rem, 2.6vw, 2.6rem)/1 var(--serif); color: var(--marble); margin-right: .2em; }

/* CARTA */
.carta { padding: clamp(96px, 16vh, 170px) var(--g); position: relative; }
.carta__head h2 { font-size: clamp(2.8rem, 6vw, 6.4rem); line-height: .95; margin-bottom: clamp(40px, 8vh, 80px); }
.moments { border-bottom: 1px solid var(--marble); }
.moment {
  display: grid; grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1fr) 110px; column-gap: clamp(16px, 3vw, 48px);
  align-items: center; padding: clamp(18px, 3vh, 30px) 0; border-top: 1px solid var(--marble);
}
.moment__n { font: 500 .74rem/1 var(--sans); letter-spacing: .2em; color: var(--grey-ink); }
.moment h3 { font-size: clamp(2.8rem, 7vw, 7.4rem); line-height: .9; transition: transform .5s var(--ease), color .3s; }
.moment:hover h3 { transform: translateX(18px); font-style: italic; color: var(--berry); }
.moment p { color: var(--grey-ink); max-width: 40ch; }
.moment .link { grid-column: 3; justify-self: start; margin-top: 12px; }
.moment__img { grid-column: 4; grid-row: 1 / span 2; aspect-ratio: 4 / 5; overflow: hidden; }
.moment__img img { width: 100%; height: 100%; object-fit: cover; }
.cursor-img { position: fixed; left: 0; top: 0; width: 260px; aspect-ratio: 4 / 5; pointer-events: none; z-index: 40; opacity: 0; overflow: hidden; transform: translate(-50%, -50%); }
.cursor-img img { width: 100%; height: 100%; object-fit: cover; }
.carta__note { margin-top: 40px; font: italic 400 1.2rem/1.5 var(--serif); }
.carta__note .link { font: 500 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-left: 8px; font-style: normal; }

/* SALA */
.sala { background: var(--marble); color: var(--porcelain); padding: clamp(96px, 16vh, 170px) var(--g) clamp(80px, 14vh, 150px); overflow: hidden; }
.sala .label::before { box-shadow: 4px -3px 0 -1px var(--grey-ink); }
.sala__head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px 6vw; align-items: end; margin-bottom: clamp(56px, 10vh, 110px); }
.sala__head .label { grid-column: 1 / -1; margin-bottom: 0; }
.sala__head h2 { font-size: clamp(3rem, 6.8vw, 7.2rem); line-height: .92; }
.sala__head h2 em { color: var(--rose); }
.sala__head p { color: #BDBBB5; max-width: 42ch; }
.sala__wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); row-gap: clamp(40px, 8vh, 90px); }
.work { position: relative; }
.work__img { overflow: hidden; aspect-ratio: 4 / 5; background: var(--marble-2); }
.work__img img { width: 100%; height: 100%; object-fit: cover; }
.work--a { grid-column: 1 / 6; }
.work--b { grid-column: 7 / 12; margin-top: 22vh; }
.work--b .work__img { aspect-ratio: 1; }
.work--c { grid-column: 2 / 6; }
.work--d { grid-column: 8 / 13; margin-top: 12vh; }
.work--e { grid-column: 4 / 8; }
.plaque {
  display: grid; gap: 4px; margin-top: 14px; max-width: 300px;
  background: var(--porcelain); color: var(--marble);
  padding: 14px 16px 16px; font-size: .86rem; line-height: 1.45;
}
.plaque__n { font: italic 400 .95rem/1 var(--serif); color: var(--grey-ink); }
.plaque b { font: 500 1.25rem/1.15 var(--serif); }
.plaque span { color: var(--grey-ink); }
.plaque .plaque__sg { margin-top: 6px; font: 500 .62rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--berry); }
.sala__cta { margin-top: clamp(56px, 10vh, 100px); display: flex; justify-content: center; }

/* LUPA */
.lupa { padding: clamp(96px, 16vh, 170px) var(--g); display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.lupa__text h2 { font-size: clamp(3.2rem, 7.4vw, 8rem); line-height: .9; margin-bottom: 22px; }
.lupa__text > p { max-width: 36ch; color: var(--grey-ink); }
.readout { display: grid; grid-template-columns: 1fr 1fr; margin-top: 36px; border-top: 1px solid var(--marble); }
.readout div { padding: 18px 0 0; }
.readout div + div { border-left: 1px solid var(--line); padding-left: 22px; }
.readout dt { font: 500 .68rem/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--grey-ink); }
.readout dd { font: 400 clamp(3.4rem, 6vw, 6rem)/1 var(--serif); margin-top: 8px; }
.readout__zero { color: var(--berry); }
.readout__msg { margin-top: 18px; font: italic 400 1.1rem/1.4 var(--serif); min-height: 1.5em; }
.lupa__stage { position: relative; aspect-ratio: 3 / 4; max-height: 86vh; justify-self: center; width: 100%; overflow: hidden; background: var(--marble); touch-action: pan-y; cursor: crosshair; }
.lupa__stage img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.lupa__grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(8, 1fr); pointer-events: none; }
.lupa__grid i { border: 1px solid transparent; transition: background .6s, border-color .6s; }
.lupa__grid i.seen { border-color: rgba(235, 235, 232, .35); background: rgba(235, 235, 232, .06); }
.lens {
  position: absolute; left: 0; top: 0; width: clamp(130px, 14vw, 210px); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--porcelain); box-shadow: 0 0 0 1px rgba(18, 18, 17, .5), 0 20px 40px -10px rgba(0, 0, 0, .6);
  background-repeat: no-repeat; pointer-events: none; transform: translate(-50%, -50%);
  will-change: transform;
}
.lens span { position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: var(--porcelain); color: var(--berry); font: 500 .66rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; padding: 7px 10px; }

/* GENTE */
.gente { background: var(--white); padding: clamp(80px, 14vh, 150px) var(--g); display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: clamp(20px, 4vw, 64px); align-items: center; }
.gente figure { aspect-ratio: 9 / 14; overflow: hidden; }
.gente figure img { width: 100%; height: 100%; object-fit: cover; }
.gente figure:last-child { margin-top: 18vh; }
.gente blockquote p { font: 400 clamp(2rem, 3.8vw, 3.8rem)/1.05 var(--serif); letter-spacing: -.015em; text-align: center; }
.gente blockquote footer { margin-top: 22px; text-align: center; color: var(--grey-ink); }

/* VISITANOS */
.visit { padding: clamp(96px, 16vh, 170px) var(--g); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.visit h2 { font-size: clamp(2.8rem, 5.6vw, 6rem); line-height: .94; margin-bottom: 24px; }
.visit__live { margin-bottom: 24px; }
.info { border-top: 1px solid var(--marble); margin-bottom: 30px; }
.info div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info dt { font: 500 .68rem/1.9 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--grey-ink); }
.info a { font-weight: 500; }
.visit__map .framed__img { aspect-ratio: 4 / 5; }
.visit__map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(1) contrast(1.05); }

/* FOOTER */
.foot { background: var(--marble); color: #CFCDC7; padding: clamp(64px, 10vh, 110px) var(--g) 40px; overflow: hidden; }
.foot__mark { font: 300 clamp(3rem, 15.6vw, 15rem)/.9 var(--sans); letter-spacing: .14em; color: var(--porcelain); white-space: nowrap; margin-bottom: 48px; }
.foot__grid { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 24px 48px; align-items: start; border-top: 1px solid var(--line-light); padding-top: 32px; font-size: .95rem; }
.foot__grid img { width: 72px; height: 72px; }
.foot a { color: var(--porcelain); }
.foot__demo { font-size: .8rem; color: #9C9A94; }

.dock { display: none; }

/* Estados iniciales (solo con JS) */
.js:not(.failsafe) [data-reveal] { opacity: 0; transform: translateY(30px); }
.js:not(.failsafe) .masthead path { stroke-dashoffset: 1; }
.js:not(.failsafe) .cover__left, .js:not(.failsafe) .cover__right, .js:not(.failsafe) .cover__issue { opacity: 0; }
.js:not(.failsafe) .cover__photo { clip-path: inset(100% 0 0 0); }
.failsafe [data-reveal], .failsafe .cover__left, .failsafe .cover__right, .failsafe .cover__issue { opacity: 1 !important; transform: none !important; }
.failsafe .masthead path { stroke-dashoffset: 0 !important; }
.failsafe .cover__photo, .failsafe .work__img { clip-path: none !important; }
.shot-mode .dock, .shot-mode .cursor-img { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .moment { grid-template-columns: 52px minmax(0, 1fr) 100px; }
  .moment p, .moment .link { grid-column: 2; }
  .moment__img { grid-column: 3; grid-row: 1 / span 3; }
}

@media (max-width: 860px) {
  :root { --nav: 58px; }
  .nav .btn { display: none; }
  .cover { display: flex; flex-direction: column; padding-top: calc(var(--nav) + 10px); padding-bottom: 56px; min-height: 0; }
  .masthead { position: relative; left: auto; top: auto; transform: none; width: 100%; order: -1; }
  .framed { margin-right: 10px; }
  .framed::before { transform: translate(10px, -10px); }
  .cover__photo { height: auto; min-height: 0; aspect-ratio: 4 / 4.4; margin: -15vw 0 0; }
  .cover__left, .cover__right { padding-bottom: 0; }
  .cover__left { margin-top: 26px; }
  .cover__right { text-align: left; align-items: flex-start; margin-top: 24px; }
  .cover__ctas { width: 100%; }
  .cover__issue { bottom: 18px; }

  .casa__grid, .lupa, .visit, .sala__head { grid-template-columns: 1fr; }
  .moment { grid-template-columns: 1fr 96px; row-gap: 10px; }
  .moment__n { grid-column: 1 / -1; }
  .moment h3 { grid-column: 1; }
  .moment p, .moment .link { grid-column: 1 / -1; }
  .moment__img { grid-column: 2; grid-row: 2; }
  .cursor-img { display: none; }

  .sala__wall { grid-template-columns: 1fr 1fr; }
  .work { grid-column: auto !important; margin-top: 0 !important; }
  .work--a, .work--d { grid-column: 1 / -1 !important; }
  .plaque { padding: 10px 12px 12px; font-size: .8rem; }
  .plaque b { font-size: 1.05rem; }

  .lupa__stage { order: 2; }
  .gente { grid-template-columns: 1fr 1fr; }
  .gente blockquote { grid-column: 1 / -1; grid-row: 1; margin-bottom: 12px; }
  .gente figure:last-child { margin-top: 10vh; }
  .info div { grid-template-columns: 100px 1fr; }
  .foot__grid { grid-template-columns: 1fr; padding-bottom: 70px; }
  .cover { padding-bottom: 80px; }
  .cover__issue { bottom: 70px; }

  .dock {
    display: grid; grid-template-columns: 1fr 64px 64px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--porcelain); border-top: 1px solid var(--marble);
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(110%); transition: transform .35s var(--ease);
  }
  .dock.is-shown { transform: none; }
  .dock a { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; border-left: 1px solid var(--line); font: 500 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
  .dock svg { width: 22px; height: 22px; }
  .dock .dock__wa { background: var(--marble); color: var(--porcelain); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
