/* Xecs regal · direcció A «Carta de regal». Tipografia i colors de la portada (css/style.css). */
:root {
  --red: #e52b34;
  --red-button: #c51f28; /* same accessible red as the Gift Up checkout: 5.8:1 with white */
  --red-hover: #a81b22;
  --cream: #faf8f5;
  --sand: #d7cfc7;
  --paper: #fff;
  --ink: #231f1e;
  --ink-soft: #5f5753;
  --mute: #736a65;
  --night: #1b1817;
  --night-2: #262120;
  --night-text: #f4efe9;
  --night-mute: #b8afa9;
  --script: 'Dancing Script', cursive;
  --sans: 'Roboto', Arial, Helvetica, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-weight: 500; line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 12px 16px; background: var(--paper); color: var(--ink); }
.skip-link:focus { top: 8px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.script { display: block; font-family: var(--script); font-weight: 500; font-size: 28px; line-height: 1.1; color: var(--red); }

/* Capçalera i peu */
.site-header { border-bottom: 1px solid var(--sand); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.brand img { width: 40px; height: 40px; filter: brightness(0); }
.site-nav { display: flex; gap: 8px; font-size: 15px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; text-decoration: none; }
.site-nav a:hover { color: var(--red); }
.site-footer { background: var(--night); color: var(--night-mute); font-size: 14px; padding-block: 40px; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 40px; }
.site-footer a { color: var(--night-text); text-decoration: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* Botons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--red-button); color: #fff; font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn:hover:not(:disabled) { background: var(--red-hover); transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; background: #8d3a3e; color: #f1d9da; }
.btn-block { width: 100%; }
.link-btn { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.link-btn:hover { color: var(--red); }

/* Hero: introducció i carta a l'esquerra, compra a la dreta */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; align-items: start; padding-block: 56px 72px; }
.intro h1 { font-size: clamp(36px, 5vw, 60px); margin: 8px 0 18px; }
.lede { max-width: 48ch; font-size: 18px; color: var(--ink-soft); }

.carta { position: relative; margin-top: 40px; padding: 36px 40px; background: var(--paper); border: 1px solid var(--sand); }
.carta::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--sand); pointer-events: none; }
.carta .script { text-align: center; font-size: 30px; margin-bottom: 6px; }
.carta h2 { text-align: center; font-size: 14px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.carta ol { list-style: none; display: grid; gap: 14px; margin: 22px 0 0; padding: 0; }
.carta li { display: flex; align-items: baseline; gap: 10px; }
.carta li span:first-child { font-weight: 500; }
.carta li i { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--mute); transform: translateY(-4px); }
.carta li span:last-child { color: var(--ink-soft); text-align: right; }
.carta .fine { position: relative; margin-top: 22px; text-align: center; font-size: 14px; color: var(--mute); }

.buy { position: sticky; top: 24px; display: grid; gap: 22px; }
.buy-card { padding: 30px; background: var(--night-2); color: var(--night-text); border-top: 4px solid var(--red); }
.buy-card .label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--night-mute); }
.buy-card h2 { font-size: 26px; margin: 6px 0 18px; }
.price { font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price small { margin-left: 8px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--night-mute); }
.ticks { list-style: none; display: grid; gap: 8px; margin: 20px 0 24px; padding: 0; font-size: 15px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); transform: translateY(-1px); }
.status { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--night-mute); }
.buy-card[aria-busy="true"] .status { color: var(--night-text); }

.xec-thumb { display: flex; align-items: center; gap: 18px; }
.xec-thumb img { width: 96px; box-shadow: 0 10px 24px rgba(35, 31, 30, .22); transform: rotate(-3deg); transition: transform .3s; }
.xec-thumb:hover img { transform: rotate(0); }
.xec-thumb p { font-size: 15px; color: var(--ink-soft); }

/* Plats */
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 72px; }
.plates img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.plates figcaption { padding-top: 8px; font-size: 14px; color: var(--mute); }

/* Com funciona i dubtes */
.steps, .faq { padding-block: 56px; border-top: 1px solid var(--sand); }
.steps h2, .faq h2 { font-size: clamp(28px, 3vw, 36px); margin: 6px 0 28px; }
.steps ol { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 1px solid var(--ink); }
.steps li::before { content: counter(step); display: block; margin-bottom: 10px; font-family: var(--script); font-size: 30px; line-height: 1; color: var(--red); }
.steps h3 { margin-bottom: 6px; font-size: 17px; font-weight: 500; }
.steps p { font-size: 15px; color: var(--ink-soft); }
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; }
.faq-list details, .terms details { border-top: 1px solid var(--sand); }
.faq-list details:last-child { border-bottom: 1px solid var(--sand); }
.faq-list summary, .terms summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; cursor: pointer; font-weight: 500; list-style: none; }
.faq-list summary::-webkit-details-marker, .terms summary::-webkit-details-marker { display: none; }
.faq-list summary::after, .terms summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--red); }
.faq-list details[open] summary::after, .terms details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 62ch; padding-bottom: 16px; color: var(--ink-soft); }
.terms { padding-bottom: 56px; }
.terms details { border-bottom: 1px solid var(--sand); }
.terms p { max-width: 80ch; margin-bottom: 14px; font-size: 15px; color: var(--ink-soft); }

/* Barra de compra fixa en mòbil */
.buy-bar { display: none; }

dialog { max-width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; overflow: visible; }
dialog::backdrop { background: rgba(20, 16, 15, .82); }
dialog figure { max-height: calc(100dvh - 32px); overflow: auto; padding: 16px; background: var(--paper); border-radius: 6px; }
dialog figcaption { padding-top: 12px; font-size: 14px; color: var(--ink-soft); }
.dialog-close { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--night); color: #fff; font-size: 24px; line-height: 1; }
.noscript { margin: 0; padding: 16px 20px; background: var(--night-2); color: var(--night-text); text-align: center; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 32px 48px; }
  .hero-main { display: contents; }
  .intro { order: -2; }
  .buy { position: static; order: -1; }
  .carta { margin-top: 0; padding: 28px 20px; }
  .steps ol { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--paper); border-top: 1px solid var(--sand); box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
  }
  .buy-bar p { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
  .buy-bar b { display: block; font-size: 20px; font-weight: 500; color: var(--ink); }
  .buy-bar .btn { flex: 1; max-width: 220px; min-height: 48px; padding: 0 22px; }
}

@media (max-width: 560px) {
  .plates { grid-template-columns: 1fr 1fr; padding-bottom: 48px; }
  .plates figure:last-child { display: none; }
  .steps ol { grid-template-columns: 1fr; }
  .carta li { font-size: 15px; }
  .buy-card { padding: 24px 20px; }
}

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