/* ==========================================================================
   ComparaMaiss Portugal — Design System & Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Commissioner:wght@400;500;600;700&family=Yeseva+One&display=swap');

:root {
  --bg-base: #3B0A22;
  --surface-1: #4A1230;
  --surface-2: #5A1A3C;
  --footer-bg: #2A0818;
  --text-primary: #F2FFF8;
  --text-secondary: #CFEFE0;
  --accent-mint: #7CF5C8;
  --accent-mint-text: #0B2A20;
  --accent-coral: #FF8A73;
  --border-line: #8A3A62;

  --font-display: 'Yeseva One', Georgia, serif;
  --font-body: 'Commissioner', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1160px;
  --measure-max: 680px;
  --section-gap: 60px;
  --card-radius: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Mesh Gradient Background (Non-vertical, 4 blurred drifting spots + 6% grain)
   ========================================================================== */
.mesh-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #3B0A22;
  overflow: hidden;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  width: 56vw;
  height: 56vw;
  min-width: 480px;
  min-height: 480px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.72;
  will-change: transform;
}

.blob-tl {
  top: -14%;
  left: -12%;
  background: radial-gradient(circle, #8E1B4A 0%, transparent 72%);
  animation: driftOne 24s ease-in-out infinite alternate;
}

.blob-tr {
  top: -10%;
  right: -14%;
  background: radial-gradient(circle, #5C1257 0%, transparent 72%);
  animation: driftTwo 28s ease-in-out infinite alternate;
}

.blob-br {
  bottom: -16%;
  right: -10%;
  background: radial-gradient(circle, #B23A3A 0%, transparent 72%);
  animation: driftThree 26s ease-in-out infinite alternate;
}

.blob-bl {
  bottom: -14%;
  left: -14%;
  background: radial-gradient(circle, #2A1038 0%, transparent 72%);
  animation: driftFour 30s ease-in-out infinite alternate;
}

@keyframes driftOne {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6vw, 5vh) scale(1.08); }
}
@keyframes driftTwo {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-7vw, 6vh) scale(1.06); }
}
@keyframes driftThree {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6vw, -5vh) scale(1.09); }
}
@keyframes driftFour {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5vw, -6vh) scale(1.05); }
}

/* 6% subtle noise grain generated procedurally via CSS / Canvas data URI in JS */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-repeat: repeat;
}

/* ==========================================================================
   Navigation: Two semicircular "ears" at top edge, open center
   ========================================================================== */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  pointer-events: none;
}

.nav-ears-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.nav-ear {
  pointer-events: auto;
  background-color: var(--footer-bg);
  border-bottom: 1px solid var(--border-line);
  padding: 14px 32px 16px;
  box-shadow: 0 10px 30px rgba(15, 2, 9, 0.45);
}

.nav-ear-left {
  border-right: 1px solid var(--border-line);
  border-bottom-right-radius: 44px;
  display: flex;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-ear-right {
  border-left: 1px solid var(--border-line);
  border-bottom-left-radius: 44px;
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background-color: var(--surface-2);
  color: var(--accent-mint);
}

.nav-link.active {
  background-color: var(--accent-mint);
  color: var(--accent-mint-text);
  font-weight: 700;
}

.mobile-menu-btn {
  display: none;
  background-color: var(--accent-mint);
  color: var(--accent-mint-text);
  border: none;
  border-radius: 999px;
  height: 42px;
  padding: 0 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

/* ==========================================================================
   Typography & Spacing Rules
   ========================================================================== */
main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.section-block {
  margin-bottom: var(--section-gap);
}

.section-block:last-child {
  margin-bottom: 0;
}

.label-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-mint);
  margin-bottom: 12px;
}

.label-coral {
  color: var(--accent-coral);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}

h1 .mint, .h1 .mint, h2 .mint {
  color: var(--accent-mint);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 10px;
}

p {
  font-size: 17px;
  line-height: 1.65;
  max-width: var(--measure-max);
  color: var(--text-primary);
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-small {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.lead-paragraph {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  max-width: var(--measure-max);
  color: var(--text-primary);
  padding-left: 20px;
  border-left: 4px solid var(--accent-mint);
  margin-bottom: 24px;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.05;
  color: var(--accent-mint);
  display: block;
  margin-bottom: 8px;
}

/* Heading mask reveal */
.reveal-mask {
  overflow: hidden;
  display: block;
}

.reveal-heading {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.reveal-heading.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Solid Surface Containers & Cards (Strictly solid #4A1230 / #5A1A3C under text)
   ========================================================================== */
.solid-panel {
  background-color: var(--surface-1);
  border: 1px solid var(--border-line);
  border-radius: var(--card-radius);
  padding: 36px;
  position: relative;
}

.solid-panel-alt {
  background-color: var(--surface-2);
  border: 1px solid var(--border-line);
  border-radius: var(--card-radius);
  padding: 32px;
  position: relative;
}

/* Card Component */
.card {
  background-color: var(--surface-1);
  border: 1px solid var(--border-line);
  border-radius: var(--card-radius);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--accent-mint);
}

.card:hover {
  border-color: var(--accent-mint);
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(10, 2, 6, 0.42);
}

.card-alt {
  background-color: var(--surface-2);
}

/* Staggered wave entrance for cards */
.wave-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.wave-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wave-card.is-visible:hover {
  transform: translateY(-4px);
}

/* ==========================================================================
   Grids (Closed rows, equal height, no sidebars)
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* ==========================================================================
   Operator Cards (4 licensed Portuguese entities)
   ========================================================================== */
.operator-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.operator-logo-box {
  background-color: var(--footer-bg);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
}

.operator-logo-box img {
  max-height: 54px;
  width: auto;
  max-width: 100%;
  display: block;
}

.operator-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-2);
  border: 1px solid var(--accent-mint);
  color: var(--accent-mint);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 999px;
}

.license-badge {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--footer-bg);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-line);
}

.operator-summary {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.operator-highlights {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.operator-highlights li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.operator-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-coral);
}

.operator-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   Buttons (Mint fill, #0B2A20 text, radius 999px, height 46px)
   ========================================================================== */
.btn-mint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--accent-mint);
  color: var(--accent-mint-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.btn-mint:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 245, 200, 0.25);
}

.btn-mint-inline {
  width: auto;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--accent-mint);
  background-color: var(--surface-2);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  background-color: var(--accent-mint);
  color: var(--accent-mint-text);
}

/* ==========================================================================
   Responsible Compliance Strip (Gordon Moody, 18+, ICAD, SSL, GamCare, SRIJ)
   ========================================================================== */
.compliance-strip {
  background-color: var(--surface-2);
  border: 1px solid var(--border-line);
  border-radius: var(--card-radius);
  padding: 24px 28px;
}

.compliance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.compliance-badges-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.trust-pill {
  background-color: var(--footer-bg);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.trust-pill:hover {
  border-color: var(--accent-mint);
}

.trust-pill-code {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--accent-mint);
  line-height: 1.1;
}

.trust-pill-code.coral {
  color: var(--accent-coral);
}

.trust-pill-sub {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   Editorial Lists & Structured Content
   ========================================================================== */
.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--measure-max);
  margin: 18px 0;
}

.styled-list li {
  background-color: var(--surface-2);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 16px 20px 16px 42px;
  position: relative;
  font-size: 17px;
  line-height: 1.6;
}

.styled-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-mint);
}

.inline-link {
  color: var(--accent-mint);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.inline-link:hover {
  color: var(--accent-coral);
}

/* ==========================================================================
   Footer (#2A0818, three equal columns, unique .pt support links, license statement)
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-line);
  padding: 56px 24px 40px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-mint);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-mint);
  text-decoration: underline;
}

.footer-statement {
  background-color: var(--surface-1);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
}

.footer-statement p {
  max-width: 100%;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.footer-statement p:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-line);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Cookie Consent Banner (Static bar without form inputs)
   ========================================================================== */
.cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 1080px;
  margin: 0 auto;
  background-color: var(--footer-bg);
  border: 1px solid var(--accent-mint);
  border-radius: 20px;
  padding: 20px 26px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Reduced Motion Support (Mandatory)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mesh-blob {
    animation: none !important;
  }
  .reveal-heading,
  .wave-card,
  .card,
  .btn-mint {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .compliance-badges-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-ears-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-ear-left {
    border-radius: 0;
    border-right: none;
    justify-content: space-between;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
  }
  .nav-ear-right {
    border-radius: 0 0 28px 28px;
    border-left: none;
    display: none;
    padding: 16px 24px 22px;
  }
  .nav-ear-right.open {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-link {
    width: 100%;
  }
  .grid-2, .grid-3, .footer-grid {
    grid-template-columns: 1fr;
  }
  h1, .h1 {
    font-size: 36px;
  }
  .cookie-notice {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .compliance-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
