/* Coffiel — tostado oscuro como base, crema como acento, hoja y cereza como estados.
   Layout: columnas editoriales anchas, datos de cata en mono como detalle propio del café. */
:root {
  --bg: #15110e;
  --surface: #1f1914;
  --surface-2: #2a221b;
  --line: #3b3129;
  --ink: #f3ebe1;
  --muted: #ab9b8c;
  --crema: #e8a54b;
  --crema-ink: #1b1209;
  --crema-soft: rgba(232, 165, 75, .14);
  --hoja: #84b98f;
  --hoja-soft: rgba(132, 185, 143, .14);
  --cereza: #e5735a;
  --cereza-soft: rgba(229, 115, 90, .14);
  --dot: #3a3029;
  --shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f0ec; --surface: #ffffff; --surface-2: #ebe5de; --line: #dcd2c7;
    --ink: #1c1611; --muted: #6c5f54; --crema: #a8600c; --crema-ink: #fff8ee;
    --crema-soft: rgba(168, 96, 12, .10); --hoja: #2f7a45; --hoja-soft: rgba(47, 122, 69, .10);
    --cereza: #b4442b; --cereza-soft: rgba(180, 68, 43, .10); --dot: #d6ccc0;
    --shadow: 0 24px 60px rgba(60, 40, 20, .16);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f0ec; --surface: #ffffff; --surface-2: #ebe5de; --line: #dcd2c7;
  --ink: #1c1611; --muted: #6c5f54; --crema: #a8600c; --crema-ink: #fff8ee;
  --crema-soft: rgba(168, 96, 12, .10); --hoja: #2f7a45; --hoja-soft: rgba(47, 122, 69, .10);
  --cereza: #b4442b; --cereza-soft: rgba(180, 68, 43, .10); --dot: #d6ccc0;
  --shadow: 0 24px 60px rgba(60, 40, 20, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.mono { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .02em; }
.eyebrow { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--crema); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
section { padding-block: clamp(56px, 9vw, 110px); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }

/* nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; text-decoration: none; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 880px) { .nav-links { display: none; } .nav .wrap > .btn:first-of-type { margin-left: auto; } }
@media (max-width: 480px) { .nav .wrap > .btn:first-of-type { display: none; } .nav .btn { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: 600 .95rem var(--f-body); text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--crema); color: var(--crema-ink); border-color: transparent; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* generic */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 .75rem var(--f-body); background: var(--surface-2); color: var(--muted); white-space: nowrap; justify-self: start; width: fit-content; max-width: 100%; }
.pill.ok { background: var(--hoja-soft); color: var(--hoja); }
.pill.warn { background: var(--cereza-soft); color: var(--cereza); }
.pill.accent { background: var(--crema-soft); color: var(--crema); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.check-list li::before { content: ""; width: 14px; height: 8px; margin-top: 6px; border-left: 2px solid var(--hoja); border-bottom: 2px solid var(--hoja); transform: rotate(-45deg); }
.check-list li.no::before { width: 12px; height: 2px; margin-top: 11px; border: 0; background: var(--muted); transform: none; }
.check-list li.no { color: var(--muted); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--surface); }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .78rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* phone frame */
.phone { width: 300px; max-width: 100%; border-radius: 44px; padding: 12px; background: #0b0807; box-shadow: var(--shadow), inset 0 0 0 2px #2b231d; margin: 0 auto; }
.phone-screen { border-radius: 34px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); position: relative; }
.phone-notch { width: 90px; height: 24px; background: #0b0807; border-radius: 0 0 14px 14px; margin: 0 auto; }

/* membership pass card */
.pass { border-radius: 20px; padding: 18px; color: #1b1209; background: linear-gradient(150deg, #f1b764 0%, #e39a3c 55%, #c9782a 100%); position: relative; overflow: hidden; }
.pass::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .13); }
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; position: relative; z-index: 1; }
.pass-name { font: 700 1.05rem var(--f-display); }
.pass-tier { font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.pass-qr { background: #fff; border-radius: 14px; padding: 10px; width: 150px; margin: 14px auto 10px; position: relative; z-index: 1; }
.pass-qr svg { display: block; width: 100%; height: auto; }
.pass-foot { text-align: center; font: 600 .78rem var(--f-body); position: relative; z-index: 1; }

/* stamps */
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line); display: grid; place-items: center; max-width: 100%; }
.stamp.on { border: 0; background: var(--crema-soft); color: var(--crema); }
.stamp svg { width: 55%; height: 55%; }

/* map */
.map svg { width: 100%; height: auto; display: block; }
.map .land { fill: var(--dot); }
.map .pin { stroke-width: .35; }
.map .pin.s-disponible { fill: var(--hoja); stroke: var(--hoja); }
.map .pin.s-pocas { fill: var(--crema); stroke: var(--crema); }
.map .pin.s-proximamente { fill: var(--surface); stroke: var(--crema); stroke-dasharray: .5 .4; }
.map .pin.s-agotado { fill: var(--surface); stroke: var(--muted); opacity: .7; }
.map .ring { fill: none; stroke: var(--ink); stroke-width: .22; opacity: .55; }
.map .halo { fill: none; stroke: var(--hoja); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: halo 2.2s ease-out infinite; }
@keyframes halo { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(2.4); } }
.map .belt { fill: var(--crema-soft); }
.map text { font: 600 7px var(--f-body); fill: var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { border-top: 1px solid var(--line); padding-block: 40px; color: var(--muted); font-size: .9rem; }

/* lista de stock */
.stock-list { display: grid; }
.stock-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stock-item:last-child { border-bottom: 0; }
.stock-item .sd { width: 10px; height: 10px; border-radius: 50%; }
.sd.s-disponible { background: var(--hoja); }
.sd.s-pocas { background: var(--crema); }
.sd.s-proximamente { border: 1.5px dashed var(--crema); }
.sd.s-agotado { border: 1.5px solid var(--muted); }
.stock-item .t { min-width: 0; display: grid; gap: 2px; }
.stock-item .t b { font-weight: 600; }
.stock-item .t small { color: var(--muted); font-size: .82rem; }
.stock-item.out .t b { color: var(--muted); }
.stock-item .alt { color: var(--hoja); font-size: .8rem; font-weight: 600; }
.bell { all: unset; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.bell[aria-pressed="true"] { color: var(--crema); border-color: var(--crema); background: var(--crema-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .75rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex-wrap: nowrap; }
.seg button { all: unset; cursor: pointer; padding: 6px 10px; font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"].s-disponible { background: var(--hoja-soft); color: var(--hoja); }
.seg button[aria-pressed="true"].s-pocas { background: var(--crema-soft); color: var(--crema); }
.seg button[aria-pressed="true"].s-agotado { background: var(--cereza-soft); color: var(--cereza); }
.seg button:focus-visible, .bell:focus-visible { outline: 2px solid var(--crema); outline-offset: 2px; }

select { font: 500 .92rem var(--f-body); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; max-width: 100%; }
