/* El Café de los Corazones Rotos — public site.
   Same family as sebastianfuego.com (Playfair Display + Lato, burgundy/gold), but warmer. */

:root {
  --espresso: #2a1c17;
  --espresso-2: #3a2820;
  --cream: #f6efe6;
  --burgundy: #8b1a1a;
  --gold: #c9a84c;

  --bg: #faf6f0;
  --bg-alt: #f3ebe0;
  --card: #ffffff;
  --heading: #2a1c17;
  --text: #4a3a32;
  --muted: #8a776b;
  --accent: #8b1a1a;
  --accent-hover: #6f1414;
  --accent-text: #8b1a1a;
  --border: rgba(59, 42, 34, 0.12);
  --shadow: 0 6px 28px rgba(42, 28, 23, 0.1);

  --display: 'Playfair Display', Georgia, serif;
  --body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16100d;
    --bg-alt: #1c1410;
    --card: #221813;
    --heading: #f3e9dc;
    --text: #d3c6b8;
    --muted: #8f8073;
    --accent: #b32a2a;
    --accent-hover: #c93a3a;
    --accent-text: #e0786b;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); line-height: 1.2; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--cream); color: var(--espresso); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--espresso) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(246, 239, 230, 0.08);
  color: var(--cream);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.15;
  color: var(--cream);
}
.brand .cup { color: var(--gold); flex: 0 0 auto; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  text-decoration: none; font-size: 0.82rem; letter-spacing: 0.4px;
  padding: 8px 12px; border-radius: 8px; color: rgba(246, 239, 230, 0.78);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--cream); background: rgba(246, 239, 230, 0.08); }
.main-nav .to-main { border: 1px solid rgba(246, 239, 230, 0.25); border-radius: 50px; padding: 7px 14px; margin-left: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--body); font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 14px 30px; border-radius: 50px; border: 1.5px solid transparent;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border); color: var(--heading); background: transparent; }
.btn-secondary:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--cream);
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 38%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 36%),
    linear-gradient(160deg, var(--espresso-2), var(--espresso));
  padding: clamp(72px, 14vw, 150px) 0;
}
.blk.hero-md { padding: clamp(44px, 8vw, 84px) 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(42, 28, 23, 0.55), rgba(42, 28, 23, 0.82)); }
.hero-inner { text-align: center; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.hero h1 { color: var(--cream); font-weight: 900; font-size: clamp(2.2rem, 6.2vw, 4.2rem); max-width: 900px; margin: 0 auto 18px; }
.hero .tagline { font-size: clamp(1.02rem, 2.2vw, 1.28rem); max-width: 640px; margin: 0 auto 34px; color: rgba(246, 239, 230, 0.86); font-weight: 300; }

/* ---------- Blocks ---------- */
.blk { position: relative; padding: clamp(52px, 8vw, 92px) 0; }
.blk.hero { padding: clamp(72px, 14vw, 150px) 0; }
.blk.hero.hero-md { padding: clamp(44px, 8vw, 84px) 0; }
.blk.bg-alt { background: var(--bg-alt); }
.blk.bg-dark { background: linear-gradient(160deg, var(--espresso-2), var(--espresso)); color: rgba(246, 239, 230, 0.86); }
.blk.bg-dark h2, .blk.bg-dark h3, .blk.bg-dark .card-title { color: var(--cream); }
.blk.bg-dark .prose a, .blk.bg-dark .more, .blk.bg-dark .empty { color: var(--gold); }
.blk h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 18px; }
.blk .center, .blk .center .prose { text-align: center; }
.blk .center .prose ul, .blk .center .prose ol { display: inline-block; text-align: left; }
.narrow-wide { max-width: 940px; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature-solo .feature-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }
.feature-left .block-media { order: -1; }
.block-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.block-text .btn { margin-top: 22px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.more { color: var(--accent-text); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.more:hover { text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* Gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.4s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, .caption { margin-top: 8px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Cards grid sizes (the posts grid keeps three) */
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Video */
.video-wrap video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); max-height: 640px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Quote */
.big-quote { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 3.2vw, 2.1rem); line-height: 1.4; color: var(--heading); }
.big-quote p::before { content: '“'; color: var(--gold); }
.big-quote p::after { content: '”'; color: var(--gold); }
.big-quote footer { margin-top: 14px; font: 700 0.85rem var(--body); letter-spacing: 2px; text-transform: uppercase; font-style: normal; color: var(--muted); }
.blk.bg-dark .big-quote { color: var(--cream); }

/* Call to action */
.cta-box { text-align: center; padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 56px); border-radius: calc(var(--radius) + 6px); color: #fff; box-shadow: var(--shadow); }
.cta-box.tone-accent { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); }
.cta-box.tone-dark { background: linear-gradient(160deg, var(--espresso-2), var(--espresso)); }
.cta-box h2 { color: #fff; margin-bottom: 10px; }
.cta-box p { max-width: 560px; margin: 0 auto 26px; color: rgba(255, 255, 255, 0.88); }
.btn-light { background: #fff; color: #2a1c17; }
.btn-light:hover { background: var(--cream); }

/* Divider / spacer */
.blk-spacer { padding: 8px 0; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
.gap { height: clamp(28px, 6vw, 72px); }

/* Header: optional logo, signed-in pill */
.brand-logo { height: 36px; width: auto; max-width: 140px; border-radius: 6px; object-fit: contain; }
.admin-pill {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; text-decoration: none;
  font: 700 0.78rem var(--body); letter-spacing: 0.5px; padding: 10px 16px; border-radius: 50px;
  background: var(--espresso); color: var(--cream); border: 1.5px solid var(--gold); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}
.admin-pill:hover { background: var(--espresso-2); }
.main-nav a[aria-current="page"] { color: var(--cream); background: rgba(246, 239, 230, 0.12); }

/* ---------- Prose (rich text) ---------- */
.prose { font-size: 1.04rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; margin-bottom: 0; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6em; margin-bottom: 0; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; margin-bottom: 0; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--gold); padding: 4px 0 4px 20px;
  font-family: var(--display); font-style: italic; font-size: 1.15em; color: var(--heading);
}
.prose img { margin-inline: auto; border-radius: var(--radius); height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose .ql-indent-1 { padding-left: 3em; }
.prose .ql-indent-2 { padding-left: 6em; }
.prose .ql-indent-3 { padding-left: 9em; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.25s; }
.card:hover { transform: translateY(-4px); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-media { aspect-ratio: 16 / 10; background: linear-gradient(150deg, var(--espresso-2), var(--espresso)); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; height: 100%; color: var(--gold); }
.card-placeholder .cup { width: 54px; height: 54px; opacity: 0.8; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag {
  align-self: flex-start; display: inline-block; text-decoration: none;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-text);
}
.card-title { font-size: 1.25rem; }
.card-excerpt { font-size: 0.95rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 8px; font-size: 0.8rem; color: var(--muted); }

/* ---------- Listing ---------- */
.page-head { background: linear-gradient(160deg, var(--espresso-2), var(--espresso)); color: var(--cream); text-align: center; padding: clamp(52px, 9vw, 96px) 0; }
.page-head h1 { color: var(--cream); font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head .tagline-dark { color: rgba(246, 239, 230, 0.8); margin: 14px 0 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.chip { text-decoration: none; font-size: 0.8rem; padding: 7px 16px; border-radius: 50px; border: 1px solid var(--border); color: var(--text); }
.chip:hover { border-color: var(--accent-text); color: var(--accent-text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; font-size: 0.9rem; color: var(--muted); }
.pager a { color: var(--accent-text); font-weight: 700; text-decoration: none; }

/* ---------- Post ---------- */
.preview-note { background: var(--gold); color: var(--espresso); text-align: center; padding: 10px 16px; font-weight: 700; font-size: 0.9rem; }
.post-head { padding: clamp(40px, 7vw, 76px) 0 28px; text-align: center; }
.post-head h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: 10px 0 14px; }
.post-meta { color: var(--muted); font-size: 0.9rem; }
.post-cover { max-width: 980px; margin-bottom: 40px; }
.post-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-video { max-width: 980px; margin-bottom: 40px; }
.post-video video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); max-height: 640px; }
.post-body { padding-bottom: 8px; }
.share { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 44px 0 30px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.share a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.share a:hover { text-decoration: underline; }
.back { padding-bottom: 72px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso); color: rgba(246, 239, 230, 0.75); text-align: center; padding: 48px 0 40px; font-size: 0.88rem; }
.footer-text { font-family: var(--display); font-size: 1.05rem; color: var(--cream); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 18px; }
.footer-links a, .footer-back a { color: var(--gold); text-decoration: none; }
.footer-links a:hover, .footer-back a:hover { text-decoration: underline; }
.footer-back { margin-bottom: 12px; }
.copy { font-size: 0.78rem; opacity: 0.6; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery, .gallery.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-left .block-media { order: 0; }
  .feature-grid .block-text { order: -1; }
}
@media (max-width: 600px) {
  html { font-size: 16px; }
  .grid, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
  .gallery, .gallery.cols-2, .gallery.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .header-row { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 0.95rem; }
  .main-nav { width: 100%; justify-content: flex-start; }
  .main-nav .to-main { margin-left: auto; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

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