/* ==========================================================================
   Casino Estrela — styles.css
   Design archetype: Azulejo Observatory (azulejo tile + night observatory)
   Order: 1 vars → 2 reset → 3 typography → 4 layout → 5 components
          → 6 page-specific → 7 @media (always last)
   ========================================================================== */

/* 1. CSS Custom Properties ------------------------------------------------ */

:root {
  --c-midnight:   #0B1628;
  --c-deep:       #0F1F3D;
  --c-card:       #152544;
  --c-border:     #1E3260;
  --c-azulejo:    #2261A5;
  --c-azulejo-lt: #3A7EC8;
  --c-gold:       #C9A84C;
  --c-gold-lt:    #E8C96E;
  --c-text:       #E8EDF5;
  --c-text-muted: #8A9BB8;
  --c-cream:      #F3EFE6;
  --c-danger:     #E05555;
  --font-head:    'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius-card:  8px;
  --radius-btn:   4px;
  --shadow-card:  0 2px 12px rgba(0,0,0,0.4);
  --container:    1100px;
}

/* 2. Base Reset ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-midnight);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-azulejo-lt); text-decoration: none; }
a:hover, a:focus-visible { color: var(--c-gold); text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }

/* Utility */
.text-center { text-align: center; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-gold); color: var(--c-midnight);
  padding: 0.6rem 1rem; font-weight: 600; z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Body lock when modal/age gate open */
body.ce-modal-open { overflow: hidden; }

/* 3. Typography ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-cream);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.75rem, 3.4vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.4vw + 1rem, 1.9rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-gold); }
p { margin: 0 0 1rem; }
small { color: var(--c-text-muted); font-size: 0.85rem; }
strong { color: var(--c-cream); }

/* 4. Layout -------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { display: block; }
section { padding: 3rem 0; }

/* Azulejo decorative band — repeating geometric pattern, CSS-only */
.azulejo-band {
  height: 10px;
  background: #333;
  opacity: 0.6;
}
.azulejo-band--strong { opacity: 0.85; height: 12px; }

/* Star decoration */
.hero-stars { display: block; text-align: center; margin-bottom: 1.5rem; }
.hero-stars::before {
  content: '✦  ·  ✦    ·    ✦  ·  ✦';
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--c-gold);
  opacity: 0.7;
}

/* HEADER ---------------------------------------------------------------- */

.site-header {
  background: var(--c-midnight);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--c-cream);
  text-decoration: none;
}
.brand:hover { color: var(--c-gold); text-decoration: none; }
.brand-star {
  display: inline-block; width: 26px; height: 26px;
  color: var(--c-gold);
  font-size: 1.4rem; line-height: 1;
  text-align: center;
}
.brand-logo {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-mark-18 {
  font-size: 0.7rem;
  border: 1px solid var(--c-gold);
  color: var(--c-gold);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 0.4rem;
  letter-spacing: 0.05em;
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  color: var(--c-text);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.site-nav a:hover { color: var(--c-gold); text-decoration: none; }

.op-dropdown { position: relative; }
.op-dropdown-trigger {
  background: transparent; border: 1px solid var(--c-border);
  color: var(--c-text); padding: 0.45rem 0.9rem;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.op-dropdown-trigger::after { content: '▾'; font-size: 0.8rem; color: var(--c-gold); }
.op-dropdown-trigger:hover { border-color: var(--c-azulejo); }
.op-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 0.4rem 0;
  min-width: 220px;
  display: none;
  box-shadow: var(--shadow-card);
}
.op-dropdown-menu.is-open { display: block; }
.op-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--c-text);
  font-size: 0.92rem;
}
.op-dropdown-menu a:hover { background: var(--c-deep); color: var(--c-gold); text-decoration: none; }

.hamburger {
  display: none;
  background: transparent; border: 1px solid var(--c-border);
  color: var(--c-text); width: 40px; height: 40px;
  border-radius: var(--radius-btn);
  align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1;
}

/* HERO ------------------------------------------------------------------ */

.hero {
  text-align: center;
  padding: 4rem 0 3.5rem;
}
.hero h1 {
  margin-bottom: 0.6rem;
}
.hero-sub {
  color: var(--c-text-muted);
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto 1.6rem;
}
.badge-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin-top: 1.2rem;
}
.badge {
  background: rgba(34, 97, 165, 0.12);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.badge--gold { border-color: rgba(201, 168, 76, 0.4); color: var(--c-gold); }

/* HERO BANNER (image block, not background) ---------------------------- */
.hero-banner {
  padding: 1rem 0 3rem;
}
.hero-banner-frame {
  position: relative;
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-card);
  aspect-ratio: 12 / 5;
  background: var(--c-deep);
}
.hero-banner-frame::before,
.hero-banner-frame::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 6px; z-index: 2;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-azulejo) 0 6px,
    var(--c-gold)    6px 8px,
    var(--c-azulejo) 8px 14px,
    transparent      14px 16px
  );
  opacity: 0.85;
}
.hero-banner-frame::before { top: 0; }
.hero-banner-frame::after  { bottom: 0; }
.hero-banner-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}
.hero-banner-cap {
  position: absolute;
  left: 1rem; bottom: 1rem;
  z-index: 3;
}
.hero-banner-tag {
  display: inline-block;
  background: rgba(11, 22, 40, 0.78);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: var(--c-gold);
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 500;
}

/* OPERATOR CARDS GRID --------------------------------------------------- */

.op-grid-section { padding: 3rem 0; }
.op-grid-section h2 { text-align: center; }
.op-grid-note {
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
#opGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.op-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-azulejo);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.op-card:hover { transform: translateY(-2px); border-top-color: var(--c-gold); }
.op-card-logo {
  background: var(--c-cream);
  border-radius: 4px;
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
}
.op-card-logo img {
  max-height: 84px; width: auto; object-fit: contain;
}
.op-card h3 {
  margin: 0 0 0.3rem;
  color: var(--c-cream);
}
.op-card-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin-bottom: 0.7rem;
}
.op-card-desc {
  color: var(--c-text);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}
.op-card-licence {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(34, 97, 165, 0.18);
  color: var(--c-azulejo-lt);
  border: 1px solid rgba(58, 126, 200, 0.35);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.op-card-actions {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.op-card-actions .btn-gold { flex: 1 1 auto; text-align: center; }
.op-card-actions .btn-link {
  flex: 0 0 auto; align-self: center;
  font-size: 0.9rem;
}

/* BUTTONS --------------------------------------------------------------- */

.btn-gold,
.btn-ghost,
.btn-gold-sm,
.btn-ghost-sm,
.btn-link {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-gold {
  background: var(--c-gold);
  color: var(--c-midnight);
  padding: 0.7rem 1.2rem;
}
.btn-gold:hover { background: var(--c-gold-lt); color: var(--c-midnight); text-decoration: none; }
.btn-gold:disabled { background: #5a5a5a; color: #999; cursor: not-allowed; }
.btn-gold-sm {
  background: var(--c-gold);
  color: var(--c-midnight);
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}
.btn-gold-sm:hover { background: var(--c-gold-lt); }
.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
  padding: 0.7rem 1.2rem;
}
.btn-ghost:hover { border-color: var(--c-gold); color: var(--c-gold); text-decoration: none; }
.btn-ghost-sm {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}
.btn-ghost-sm:hover { border-color: var(--c-gold); color: var(--c-gold); }
.btn-link {
  color: var(--c-azulejo-lt);
  background: transparent;
  padding: 0.5rem 0;
  border: 0;
}
.btn-link:hover { color: var(--c-gold); text-decoration: underline; }

/* FOOTER ---------------------------------------------------------------- */

.site-footer {
  background: var(--c-deep);
  color: var(--c-text);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: var(--c-gold);
  margin-bottom: 0.8rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--c-text); font-size: 0.92rem; }
.footer-col a:hover { color: var(--c-gold); }
.footer-info p { font-size: 0.92rem; color: var(--c-text-muted); margin-bottom: 0.4rem; }
.footer-rg-icons {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem;
}
.footer-rg-icons span {
  display: inline-block;
  background: rgba(34, 97, 165, 0.15);
  border: 1px solid var(--c-border);
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 4px;
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
}
.footer-disclaimer {
  border-top: 1px solid var(--c-border);
  padding-top: 1.2rem;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.55;
}

/* 5. Components --------------------------------------------------------- */

/* Generic content blocks */
.content-block {
  background: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.8rem;
  margin: 1.5rem 0;
}
.content-block--callout {
  border-left: 3px solid var(--c-gold);
}

.editorial {
  max-width: 760px;
  margin: 0 auto;
}
.editorial p { font-size: 1.02rem; }

/* Methodology grid */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.method-tile {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.3rem;
  text-align: left;
}
.method-tile-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--c-gold);
}
.method-tile h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-cream);
  margin-bottom: 0.45rem;
}
.method-tile p { font-size: 0.9rem; color: var(--c-text-muted); margin: 0; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  padding: 1rem 0 0.5rem;
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-gold); }
.breadcrumb-sep { margin: 0 0.4rem; color: var(--c-border); }

/* Operator review hero */
.review-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.review-logo {
  background: var(--c-cream);
  border-radius: 6px;
  display: inline-block;
  padding: 1rem 1.6rem;
  margin: 0 auto 1.4rem;
}
.review-logo img { max-height: 100px; width: auto; }
.review-bonus {
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-left: 3px solid var(--c-gold);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-card);
  max-width: 720px;
  margin: 1.4rem auto;
  font-size: 0.95rem;
  text-align: left;
  color: var(--c-cream);
}

/* Licence info table on review pages */
.licence-info {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.6rem;
}
.licence-info dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.6rem 1.2rem;
  margin: 0;
}
.licence-info dt { color: var(--c-text-muted); font-size: 0.9rem; }
.licence-info dd { margin: 0; color: var(--c-cream); font-size: 0.95rem; }

/* Final CTA block */
.final-cta {
  background: var(--c-deep);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}
.final-cta .btn-gold {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 1rem auto 0.6rem;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
}
.final-cta-fine {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 0.5rem;
}

/* Tables */
.licence-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.licence-table th, .licence-table td {
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--c-border);
}
.licence-table th {
  background: var(--c-deep);
  color: var(--c-gold);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.licence-table tr:hover td { background: rgba(34, 97, 165, 0.05); }

/* FAQ list */
.faq-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.faq-list details {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
}
.faq-list details[open] { border-color: var(--c-azulejo); }
.faq-list summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-cream);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  color: var(--c-gold);
  font-size: 1.4rem;
  font-weight: 400;
  margin-left: 1rem;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { content: '×'; }
.faq-list details > p { margin-top: 0.7rem; color: var(--c-text); }

/* Forms */
.contact-form {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.8rem;
  max-width: 600px;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: var(--c-midnight);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-btn);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--c-azulejo-lt);
}
.form-row textarea { min-height: 130px; resize: vertical; }

.contact-meta { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--c-border); }
.contact-meta p { margin-bottom: 0.4rem; }
.contact-meta strong { color: var(--c-gold); }

/* AGE GATE ------------------------------------------------------------- */

.age-gate {
  position: fixed; inset: 0;
  background: rgba(7, 13, 26, 0.92);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.age-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  max-width: 520px;
  width: 100%;
  padding: 2rem 1.8rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  max-height: 92vh;
  overflow-y: auto;
}
.age-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; margin-bottom: 1rem;
}
.age-star { color: var(--c-gold); font-size: 1.4rem; }
.age-brandname {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--c-cream);
  font-weight: 700;
}
.age-band {
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-azulejo) 0 6px,
    var(--c-gold) 6px 8px,
    var(--c-azulejo) 8px 14px,
    transparent 14px 16px
  );
  opacity: 0.7;
  margin: 0.6rem 0 1rem;
}
.age-eighteen {
  text-align: center;
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--c-gold);
  border: 2px solid var(--c-gold);
  width: 78px; height: 78px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0.4rem auto 1rem;
}
.age-title { text-align: center; margin-bottom: 0.3rem; }
.age-lead { text-align: center; color: var(--c-text-muted); font-size: 0.95rem; }
.age-list {
  list-style: none; padding: 0; margin: 1rem 0;
  font-size: 0.9rem;
}
.age-list li {
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  position: relative;
}
.age-list li::before {
  content: '✦'; position: absolute; left: 0;
  color: var(--c-gold); font-size: 0.8rem; top: 4px;
}
.age-check {
  display: flex; gap: 0.6rem;
  background: var(--c-deep);
  padding: 0.8rem;
  border-radius: var(--radius-btn);
  font-size: 0.88rem;
  margin: 1rem 0;
  align-items: flex-start;
}
.age-check input { margin-top: 4px; flex-shrink: 0; }
.age-btns { display: flex; gap: 0.7rem; margin-top: 0.6rem; }
.age-btns .btn-gold,
.age-btns .btn-ghost { flex: 1; }
.age-foot {
  font-size: 0.78rem; color: var(--c-text-muted);
  text-align: center; margin: 0.6rem 0 0;
}

/* COOKIE BANNER -------------------------------------------------------- */

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--c-deep);
  border-top: 2px solid var(--c-azulejo);
  padding: 1rem 1.5rem;
  z-index: 8500;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.cookie-text { margin: 0; font-size: 0.9rem; flex: 1 1 320px; }
.cookie-btns { display: flex; gap: 0.6rem; }

/* COMPLIANCE MODAL ----------------------------------------------------- */

.cmodal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 13, 26, 0.85);
  backdrop-filter: blur(3px);
  z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.cmodal-overlay[hidden] { display: none; }
.cmodal-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  max-width: 480px;
  width: 100%;
  padding: 1.8rem 1.6rem;
  box-shadow: 0 10px 36px rgba(0,0,0,0.6);
  max-height: 92vh;
  overflow-y: auto;
}
.cmodal-band {
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-azulejo) 0 6px,
    var(--c-gold) 6px 8px,
    var(--c-azulejo) 8px 14px,
    transparent 14px 16px
  );
  margin-bottom: 1rem;
  opacity: 0.85;
}
.cmodal-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-cream);
  margin: 0 0 0.6rem;
  border-left: 3px solid var(--c-azulejo);
  padding-left: 0.7rem;
}
.cmodal-body {
  font-size: 0.95rem;
  color: var(--c-text);
  margin-bottom: 0.8rem;
}
.cmodal-licence {
  font-size: 0.82rem;
  color: var(--c-gold);
  margin-bottom: 0.6rem;
  background: rgba(201, 168, 76, 0.08);
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
}
.cmodal-links {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-bottom: 1.2rem;
}
.cmodal-btns {
  display: flex; gap: 0.7rem;
}
.cmodal-btns .btn-gold,
.cmodal-btns .btn-ghost { flex: 1; }

/* 6. Page-specific scopes ---------------------------------------------- */

body[data-page="home"] .hero {
  padding-bottom: 2rem;
}
body[data-page="error-403"] {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  text-align: center;
}
body[data-page="error-403"] .err-card {
  max-width: 480px;
  padding: 2rem;
}
body[data-page="error-403"] .brand-name {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 1rem;
  color: var(--c-cream);
}
body[data-page="error-403"] .err-msg {
  margin: 1.2rem 0;
  color: var(--c-text);
}
body[data-page="error-403"] .err-rg {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 1.4rem;
}

body[data-page="error-404"] main {
  padding: 4rem 0;
  text-align: center;
}
body[data-page="error-404"] .btn-gold { margin-top: 1rem; }

/* Legal pages — readable column */
body[data-page="legal"] main { padding: 2rem 0 4rem; }
body[data-page="legal"] .legal-content {
  max-width: 760px;
}
body[data-page="legal"] h2 { margin-top: 2rem; }

/* RG page */
body[data-page="rg"] .rg-block {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.6rem;
  margin: 1.4rem 0;
}
body[data-page="rg"] .rg-block h3 {
  color: var(--c-gold);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

/* 7. @media — ALWAYS LAST --------------------------------------------- */

@media (max-width: 880px) {
  .site-nav { display: none; }
  .site-nav.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--c-deep);
    border-top: 1px solid var(--c-border);
    padding: 0.8rem 1.5rem 1.2rem;
  }
  .site-nav.mobile-open a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--c-border);
  }
  .site-nav.mobile-open .op-dropdown { width: 100%; }
  .site-nav.mobile-open .op-dropdown-trigger { width: 100%; justify-content: space-between; }
  .site-nav.mobile-open .op-dropdown-menu { position: static; width: 100%; }

  .hamburger { display: inline-flex; }
  .site-header { position: relative; }
  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  section { padding: 2rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-sub { font-size: 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .container { padding: 0 1rem; }
  #opGrid { grid-template-columns: 1fr; }
  .licence-info dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .licence-info dt { color: var(--c-gold); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.6rem; }
  .licence-table { font-size: 0.85rem; display: block; overflow-x: auto; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-btns { justify-content: stretch; }
  .cookie-btns button { flex: 1; }
  .cmodal-btns { flex-direction: column; }
  .age-btns { flex-direction: column; }
}
