/* Optica Royale — Chamartín shopfront poster */
html { overflow-x: hidden; }
body {
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-x: hidden;
}

h1, h2, h3, .display, .head, .hero-shout, .wordmark, .contact-row, .foot-mark {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.88;
}

.page {
  background: var(--bg);
  color: var(--ink);
  position: relative;
}


/* ---------- nav ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.1rem;
  position: relative;
  z-index: 5;
  background: var(--field-1);
  color: var(--field-1-ink);
}

.wordmark {
  font-size: var(--step-body);
  text-decoration: none;
  font-weight: 900;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  justify-content: flex-end;
  font-weight: 700;
  font-size: var(--step-body);
}

.nav nav a { text-decoration: none; }
.nav nav a:hover { color: var(--bg); }

.nav-cart span {
  font-variant-numeric: tabular-nums;
  margin-left: 0.25em;
}

/* ---------- hero: flush-left shout, seam photograph ---------- */
.hero {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  position: relative;
  overflow: hidden;
  background: var(--field-1);
  color: var(--field-1-ink);
}

.hero-field {
  padding: 0 0 12vh;
  position: relative;
  min-height: 78svh;
}

.hero-shout {
  font-size: clamp(4.4rem, 12vw, 11.875rem);
  line-height: 0.84;
  letter-spacing: -0.05em;
  max-width: 12ch;
  font-weight: 900;
  text-transform: uppercase;
  margin-inline: var(--margin);
  margin-top: 8vh;
}

.hero-shout span { display: block; }

.hero-photo {
  position: absolute;
  right: 4%;
  top: 18%;
  width: min(28vw, 400px);
  aspect-ratio: 3 / 4;
  clip-path: inset(0 round 50% 50% 0 0);
  transform: rotate(5deg);
  z-index: 1;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo.photo-siesta,
.hero-photo.photo-noche { display: none; }

.hero-band {
  background: var(--bg);
  color: var(--ink);
  min-height: 18svh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.2rem var(--margin);
  position: relative;
  z-index: 2;
}

.hero-band p {
  max-width: 40ch;
  font-size: var(--step-body);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-transform: none;
  color: var(--ink);
}

.hero-band .button {
  background: var(--field-1);
  color: var(--field-1-ink);
}

.hora {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  margin-inline: var(--margin);
  position: relative;
  z-index: 3;
}

.hora label {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0 0.9rem;
  background: color-mix(in srgb, var(--bg) 28%, transparent);
  color: var(--field-1-ink);
  cursor: pointer;
  font-weight: 700;
}

.hora input { position: absolute; opacity: 0; pointer-events: none; }

.hora:has(#hora-manana:checked) label[for="hora-manana"],
.hora:has(#hora-siesta:checked) label[for="hora-siesta"],
.hora:has(#hora-noche:checked) label[for="hora-noche"] {
  background: var(--bg);
  color: var(--ink);
}

.hero:has(#hora-manana:checked) .photo-manana,
.hero:has(#hora-siesta:checked) .photo-siesta,
.hero:has(#hora-noche:checked) .photo-noche { display: block; }

.hero:has(#hora-manana:checked) .photo-siesta,
.hero:has(#hora-manana:checked) .photo-noche,
.hero:has(#hora-siesta:checked) .photo-manana,
.hero:has(#hora-siesta:checked) .photo-noche,
.hero:has(#hora-noche:checked) .photo-manana,
.hero:has(#hora-noche:checked) .photo-siesta { display: none; }

@media (max-width: 47.99em) {
  .hero-field {
    min-height: 88svh;
    padding-bottom: 72vw;
  }
  .hero-shout { font-size: 19vw; max-width: none; margin-top: 4vh; }
  .hero-photo {
    width: 58%;
    right: 0;
    top: auto;
    bottom: 0;
    transform: rotate(4deg);
  }
  .hero-band { flex-direction: column; align-items: stretch; }
  .hero-band .button { width: 100%; }
}

/* ---------- intro staircase ---------- */
.stair {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr minmax(0, 22vw);
  gap: var(--gutter);
  align-items: center;
  padding-block: 12vh;
}

.stair p {
  max-width: none;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.stair p span {
  display: block;
  padding-left: calc(var(--i, 0) * 6vw);
}

.stair-photos {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.stair-photos img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.stair-note {
  grid-column: 1;
  font-size: var(--step-body) !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  color: var(--ink);
  max-width: 42ch;
}

@media (max-width: 47.99em) {
  .stair {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .stair p { font-size: 1.5rem; }
  .stair p span { padding-left: calc(var(--i, 0) * 5vw); }
  .stair-photos { grid-template-columns: 1fr 1fr; }
}

/* ---------- gallery tiles ---------- */
.tiles-head {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  margin-bottom: 2.5rem;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 12px;
}

.tile { display: block; color: inherit; text-decoration: none; }

.tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.tile-tag {
  min-height: 5.4rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.2rem;
  font-size: var(--step-small);
  font-weight: 700;
}

.tile:nth-child(4n + 1) .tile-tag { background: var(--surface); color: var(--ink); }
.tile:nth-child(4n + 2) .tile-tag { background: var(--field-1); color: var(--field-1-ink); }
.tile:nth-child(4n + 3) .tile-tag { background: var(--surface); color: var(--ink); }
.tile:nth-child(4n + 4) .tile-tag { background: var(--field-1); color: var(--field-1-ink); }

.tile-row {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.tile-name { font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em; }

@media (max-width: 64em) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- printed menu sheet ---------- */
.carta {
  background: var(--field-1);
  color: var(--field-1-ink);
  padding-block: var(--section);
}

.sheet {
  width: min(40rem, 100%);
  margin-inline: auto;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 4rem 2.5rem 3rem;
  clip-path: polygon(
    4% 0, 8% 1.2%, 12% 0, 16% 1.2%, 20% 0, 24% 1.2%, 28% 0, 32% 1.2%,
    36% 0, 40% 1.2%, 44% 0, 48% 1.2%, 52% 0, 56% 1.2%, 60% 0, 64% 1.2%,
    68% 0, 72% 1.2%, 76% 0, 80% 1.2%, 84% 0, 88% 1.2%, 92% 0, 96% 1.2%, 100% 0,
    100% 100%, 96% 98.8%, 92% 100%, 88% 98.8%, 84% 100%, 80% 98.8%, 76% 100%,
    72% 98.8%, 68% 100%, 64% 98.8%, 60% 100%, 56% 98.8%, 52% 100%, 48% 98.8%,
    44% 100%, 40% 98.8%, 36% 100%, 32% 98.8%, 28% 100%, 24% 98.8%, 20% 100%,
    16% 98.8%, 12% 100%, 8% 98.8%, 4% 100%, 0 98.8%, 0 0
  );
  text-align: center;
}

.sheet h2,
.sheet h3,
.sheet p,
.sheet a,
.sheet span,
.sheet small {
  color: var(--paper-ink);
}
.sheet h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.6rem;
}

.sheet .lead-note {
  font-size: var(--step-small);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 2.4rem;
  max-width: none;
}

.sheet h3 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.9rem;
}

.sheet-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 1.05rem;
  margin-top: 1rem;
  font-variant-numeric: tabular-nums;
}

.sheet-item a { text-decoration: none; }
.sheet-item small {
  display: block;
  font-size: var(--step-small);
  color: var(--muted);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  max-width: 36ch;
}

.sheet-hours {
  margin-top: 2.4rem;
  font-size: var(--step-small);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
}

/* ---------- stacking colour sheets ---------- */
.stack-wrap {
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 12vh;
}

.stack-wrap h2 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 3rem;
}

.sheet-card {
  min-height: 86svh;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  padding: 1.6rem var(--margin) 0;
  overflow: hidden;
}

.sheet-card:nth-child(2) { background: var(--field-1); color: var(--field-1-ink); }
.sheet-card:nth-child(3) { background: var(--surface); color: var(--ink); }
.sheet-card:nth-child(4) { background: var(--field-1); color: var(--field-1-ink); }

.sheet-card h3,
.sheet-card p {
  color: inherit;
}

.sheet-card h3 {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
}

.sheet-card p {
  align-self: end;
  margin-bottom: 2.5rem;
  font-size: 1.125rem;
  max-width: 40ch;
}

.sheet-card img {
  width: 100%;
  height: 100%;
  min-height: 70svh;
  object-fit: cover;
}

@media (max-width: 47.99em) {
  .sheet-card {
    grid-template-columns: 1fr;
    min-height: 70svh;
    padding-top: 0.8rem;
  }
  .sheet-card img { min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- how it works ---------- */
.how h2 {
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  max-width: 8ch;
  margin-bottom: 0.8rem;
}

.how-lead { margin-bottom: 2.5rem; }

.how-svg { width: 100%; height: auto; margin-block: 1.5rem; }

.how-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gutter);
}

.how-cols h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.how-cols p { max-width: none; }

@media (max-width: 47.99em) {
  .how-cols { grid-template-columns: 1fr; }
}

/* ---------- about panel ---------- */
.about-panel {
  margin: 1.25rem;
  background: var(--invert);
  color: var(--invert-ink);
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  padding: 3.5rem;
  gap: 2rem;
}

.about-panel h2 {
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  max-width: 8ch;
  color: inherit;
}

.about-panel h3,
.about-panel p {
  color: inherit;
}

.about-panel img {
  width: min(38vw, 28rem);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  clip-path: inset(0 round 50% 50% 0 0);
  margin-top: 2rem;
  justify-self: start;
  align-self: end;
  margin-bottom: 0;
}

.about-copy {
  padding-top: 0.2rem;
  display: grid;
  gap: 2.5rem;
  align-content: start;
}

.about-copy h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.about-copy p { max-width: 32ch; }

@media (max-width: 47.99em) {
  .about-panel {
    grid-template-columns: 1fr;
    margin: 0.6rem;
    min-height: auto;
    padding: 1.6rem 1.2rem 0;
  }
  .about-panel img {
    width: 86vw;
    margin-inline: auto;
    margin-bottom: -18%;
  }
}

/* ---------- prices like a menu ---------- */
.menu-prices {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 3rem;
  align-items: start;
}

.menu-prices h2 { font-size: clamp(2rem, 3vw, 2.5rem); }

.menu-col { display: grid; gap: 0.2rem; }

.menu-group {
  font-size: 1.5rem;
  margin: 2rem 0 0.8rem;
}

.menu-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: inherit;
}

.menu-row + .menu-desc { margin-bottom: 1.1rem; }

.menu-desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36ch;
}

.menu-prices img {
  width: min(100%, 16rem);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-top: 1.5rem;
}

@media (max-width: 47.99em) {
  .menu-prices { grid-template-columns: 1fr; }
}

/* ---------- contact rows ---------- */
.contact-block { padding-top: 9.25rem; }

.contact-row {
  display: flex;
  align-items: flex-end;
  min-height: 7.5rem;
  padding: 0 var(--margin) 1.4rem;
  font-size: clamp(1.8rem, 6vw, 5.5rem);
  text-decoration: none;
  line-height: 1;
}

.contact-row:nth-child(odd) { background: var(--surface); color: var(--ink); }
.contact-row:nth-child(even) { background: var(--bg); }

.contact-mail {
  background: var(--accent) !important;
  color: var(--accent-ink);
  gap: 1.5rem;
}

.mail-btn {
  width: 0.9em;
  height: 0.9em;
  background: var(--bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45em;
  flex: none;
}

@media (max-width: 47.99em) {
  .contact-row {
    min-height: 5.2rem;
    font-size: 9.6vw;
    padding-bottom: 0.8rem;
  }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--invert);
  color: var(--invert-ink);
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 4rem;
  padding: 2.5rem var(--margin) 1.25rem;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  font-size: 1rem;
}

.foot-cols p, .foot-cols a, .foot-cols li {
  max-width: none;
  color: var(--invert-muted);
}

.foot-cols strong, .foot-cols a:first-child, .foot-cols .ink {
  color: var(--invert-ink);
  font-weight: 700;
}

.foot-cols a { text-decoration: none; display: block; }
.foot-cols a:hover { color: var(--invert-ink); }
.foot-cols ul { list-style: none; padding: 0; }

.foot-mark {
  font-size: 10.6vw;
  line-height: 0.8;
  letter-spacing: -0.06em;
  width: 100%;
  display: block;
}

.foot-legal {
  font-size: var(--step-small);
  color: var(--invert-muted);
  max-width: none;
  margin-top: 0.8rem;
}

.credits {
  font-size: var(--step-small);
  color: var(--invert-muted);
  max-width: 70ch;
  margin-top: 0.5rem;
}

@media (max-width: 47.99em) {
  .foot-cols { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .foot-mark { font-size: 14vw; }
}

/* ---------- product page ---------- */
.pdp {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--gutter);
  align-items: start;
  padding-top: 1rem;
  padding-bottom: var(--section);
}

.pdp-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.pdp-gallery img:first-child { aspect-ratio: 4 / 5; }

.pdp h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  margin-bottom: 0.6rem;
}

.price {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.price s {
  color: var(--muted);
  font-weight: 400;
  margin-right: 0.5rem;
  text-decoration-thickness: 0.08em;
}

.pdp-copy { margin: 1.2rem 0 1.6rem; }

.qty-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 1.2rem 0;
}

.qty-row input {
  width: 4.5rem;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  min-height: 3rem;
  font-variant-numeric: tabular-nums;
}

.specs {
  margin-top: 2rem;
  display: grid;
  gap: 0.6rem;
}

.specs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0.85rem 1rem;
  font-variant-numeric: tabular-nums;
}

.warn {
  margin-top: 2rem;
  font-size: var(--step-small);
  color: var(--muted);
  max-width: 52ch;
}

@media (max-width: 47.99em) {
  .pdp { grid-template-columns: 1fr; }
}

/* ---------- cart / checkout ---------- */
.cart-line {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  color: var(--ink);
  padding: 0.8rem;
  margin-bottom: 0.5rem;
}

.cart-line img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
}

.cart-line h2 { font-size: 1.35rem; }
.cart-line input { width: 3.6rem; text-align: center; background: var(--bg); color: var(--ink); border: 0; min-height: 2.6rem; }
.cart-remove { font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; }

.totals {
  margin-top: 1.5rem;
  max-width: 28rem;
  margin-left: auto;
}

.totals p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
  font-variant-numeric: tabular-nums;
  margin-top: 0.4rem;
}

.totals .grand {
  background: var(--invert);
  color: var(--invert-ink);
  padding: 0.9rem 1rem;
  font-weight: 900;
  font-size: 1.25rem;
}

.empty { min-height: 40vh; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
  max-width: 48rem;
}

.form .full { grid-column: 1 / -1; }

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.form .hint, .form .err {
  font-size: var(--step-small);
  font-weight: 400;
  min-height: 1.2em;
}

.form .err { color: var(--ink); }

.field.is-bad { background: var(--ink); color: var(--accent-ink); }

.pay {
  background: var(--surface);
  color: var(--ink);
  padding: 1.1rem 1.2rem;
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 400;
}

.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--accent); }

.order-id {
  font-size: clamp(2rem, 6vw, 4.5rem);
  margin: 0.4rem 0 1.2rem;
}

@media (max-width: 47.99em) {
  .form { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 4.5rem 1fr; }
}

/* ---------- legal / prose ---------- */
.prose { padding-bottom: var(--section); }
.prose h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 1.2rem; max-width: 12ch; }
.prose h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); margin: 2rem 0 0.6rem; }
.prose p, .prose li { max-width: 62ch; }
.prose ul { padding-left: 1.2rem; margin: 0.6rem 0; }
.page-head { padding-top: 1rem; padding-bottom: 2rem; }

.toast {
  position: fixed;
  right: var(--margin);
  bottom: var(--margin);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.8rem 1.1rem;
  z-index: 9;
  font-weight: 700;
}

.toast[hidden] { display: none; }
