/* ============================================================
   reinbet.ca — independent Rainbet guide for Canada
   Custom design system: "Northern Ledger" editorial style
   ============================================================ */

:root {
  --midnight: #0f1420;
  --midnight-2: #151c2d;
  --card: #1a2236;
  --card-edge: rgba(148, 190, 233, 0.14);
  --paper: #f3f6fa;
  --paper-2: #e9eef5;
  --ink: #1c2434;
  --ink-soft: #46536b;
  --cloud: #c8d4e6;
  --cloud-soft: #93a3bd;
  --ice: #7fd0f0;
  --ice-deep: #3aa8d4;
  --teal: #2fc4ad;
  --teal-deep: #1e9e8b;
  --maple: #d64545;
  --focus: #ffd166;
  --radius: 10px;
  --radius-sm: 7px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", "Charter", serif;
  --shadow-card: 0 10px 30px rgba(6, 10, 20, 0.35);
  --maxw: 1120px;
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cloud);
  background: var(--midnight);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ice); }

a:hover { color: #a8e2f8; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: #f2f6fb;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }

li { margin-bottom: 0.45em; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: #08121f;
  padding: 0.6em 1.2em;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus { left: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-edge);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img { width: 104px; height: 47px; border-radius: 6px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 0.55em 0.85em;
  color: var(--cloud);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.18s, color 0.18s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(127, 208, 240, 0.12);
}

.nav-cta { margin-left: 8px; }

.btn {
  display: inline-block;
  padding: 0.7em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(120deg, var(--teal) 0%, var(--ice-deep) 100%);
  color: #08121f;
  box-shadow: 0 6px 18px rgba(47, 196, 173, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(47, 196, 173, 0.35);
  color: #08121f;
}

.btn-outline {
  background: transparent;
  color: var(--ice);
  border: 1.5px solid rgba(127, 208, 240, 0.5);
}

.btn-outline:hover {
  background: rgba(127, 208, 240, 0.1);
  color: #a8e2f8;
}

.btn-sm { padding: 0.5em 1.1em; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--card-edge);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  cursor: pointer;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cloud);
  transition: transform 0.2s, opacity 0.2s;
  position: relative;
}

.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }

.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 64px 0 72px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(58, 168, 212, 0.18), transparent 65%),
    radial-gradient(600px 400px at -10% 110%, rgba(47, 196, 173, 0.12), transparent 60%),
    var(--midnight);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 208, 240, 0.4), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}

.hero .eyebrow { margin-bottom: 14px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(47, 196, 173, 0.35);
  border-radius: 999px;
  padding: 0.3em 1em;
}

.eyebrow.red { color: #f08c8c; border-color: rgba(214, 69, 69, 0.45); }

.hero p.lead {
  font-size: 1.15rem;
  color: var(--cloud);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-note { font-size: 0.85rem; color: var(--cloud-soft); margin-top: 14px; }

/* ---------- Promo code card ---------- */

.code-card {
  background: linear-gradient(160deg, var(--card) 0%, #141b2c 100%);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.code-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--teal), var(--ice-deep) 70%, var(--maple));
}

.code-card h2, .code-card h3 { margin-top: 4px; }

.code-card .bonus-line {
  font-size: 1.05rem;
  color: var(--ice);
  font-weight: 600;
  margin-bottom: 18px;
}

.code-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: #0d1322;
  border: 1.5px dashed rgba(127, 208, 240, 0.55);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  font-family: inherit;
}

.code-chip:hover { border-color: var(--teal); background: #101a2e; }

.code-chip .code-text {
  font-family: "Courier New", monospace;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
}

.code-chip .code-action {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  border: 1px solid rgba(47, 196, 173, 0.4);
  border-radius: 5px;
  padding: 0.35em 0.9em;
  white-space: nowrap;
}

.code-toast {
  display: block;
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--teal);
  font-weight: 600;
}

.code-card .btn { width: 100%; margin-top: 14px; }

.code-card .fine { font-size: 0.8rem; color: var(--cloud-soft); margin: 12px 0 0; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }

.section-dark { background: var(--midnight); }

.section-deep {
  background: var(--midnight-2);
  border-top: 1px solid var(--card-edge);
  border-bottom: 1px solid var(--card-edge);
}

.section-light {
  background: var(--paper);
  color: var(--ink-soft);
}

.section-light h2, .section-light h3, .section-light h4 { color: var(--ink); }

.section-light a { color: #16708f; }

.section-light a:hover { color: #0d5069; }

.section-light .eyebrow { color: var(--teal-deep); border-color: rgba(30, 158, 139, 0.4); }

.section-head { max-width: 46em; margin-bottom: 34px; }

.section-head .eyebrow { margin-bottom: 12px; }

.divider {
  height: 42px;
  background: linear-gradient(175deg, var(--midnight) 49.6%, var(--paper) 50.2%);
}

.divider.flip { background: linear-gradient(175deg, var(--paper) 49.6%, var(--midnight) 50.2%); }

/* ---------- Cards & grids ---------- */

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

.grid-2.center { align-items: center; }

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}

.card h3 { margin-top: 0; }

.section-light .card {
  background: #fff;
  border-color: #dde5ef;
  box-shadow: 0 6px 18px rgba(28, 36, 52, 0.07);
}

.section-light .card p, .section-light .card li { color: var(--ink-soft); }

.card .card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--maple);
  margin-bottom: 10px;
}

/* ---------- Steps ---------- */

.steps { list-style: none; padding: 0; margin: 0 0 1.4em; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 58px;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--teal), var(--ice-deep));
  color: #08121f;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps li::after {
  content: "";
  position: absolute;
  left: 18.5px;
  top: 42px;
  bottom: 4px;
  width: 1.5px;
  background: rgba(127, 208, 240, 0.25);
}

.steps li:last-child::after { display: none; }

.steps li strong { color: #f2f6fb; }

.section-light .steps li strong { color: var(--ink); }

.section-light .steps li::after { background: rgba(30, 158, 139, 0.3); }

/* ---------- Figures / screenshots ---------- */

figure {
  margin: 0 0 1.4em;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow-card);
}

figure img { border-radius: var(--radius-sm); width: 100%; }

figcaption {
  font-size: 0.85rem;
  color: var(--cloud-soft);
  padding: 10px 6px 4px;
  text-align: center;
}

.section-light figure { background: #fff; border-color: #dde5ef; box-shadow: 0 6px 18px rgba(28, 36, 52, 0.08); }

.section-light figcaption { color: var(--ink-soft); }

a.zoom { display: block; cursor: zoom-in; }

.zoom-hint { font-size: 0.78rem; opacity: 0.8; }

/* Lightbox */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 19, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 30px;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tables ---------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.97rem;
}

.info-table th, .info-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-edge);
  vertical-align: top;
}

.info-table th { color: #f2f6fb; font-weight: 700; }

.section-light .info-table th { color: var(--ink); }
.section-light .info-table th, .section-light .info-table td { border-color: #dde5ef; }

.table-scroll { overflow-x: auto; }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 48px 18px 20px;
  font-weight: 600;
  color: #f2f6fb;
  position: relative;
  font-size: 1.02rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-size: 1.4rem;
  color: var(--teal);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq details.is-open summary::after { transform: translateY(-50%) rotate(45deg); }

.faq .faq-body { padding: 0 20px 18px; }

.section-light .faq details { background: #fff; border-color: #dde5ef; }
.section-light .faq summary { color: var(--ink); }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs { padding: 18px 0 0; font-size: 0.88rem; }

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--cloud-soft);
}

.breadcrumbs li { margin: 0; }

.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--cloud-soft); }

.breadcrumbs a { color: var(--ice); text-decoration: none; }

.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Callouts ---------- */

.callout {
  border-left: 4px solid var(--teal);
  background: rgba(47, 196, 173, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 0 0 1.4em;
}

.callout.warn { border-left-color: var(--maple); background: rgba(214, 69, 69, 0.08); }

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

.section-light .callout { background: rgba(30, 158, 139, 0.08); }
.section-light .callout.warn { background: rgba(214, 69, 69, 0.06); }

/* ---------- Inline CTA block ---------- */

.cta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(120deg, rgba(47, 196, 173, 0.09), rgba(58, 168, 212, 0.09));
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 34px;
}

.cta-inline .cta-inline-text { flex: 1 1 320px; min-width: 0; }

.cta-inline h3 { margin: 0 0 4px; font-size: 1.15rem; }

.cta-inline p { margin: 0; font-size: 0.97rem; }

.cta-inline .cta-inline-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-light .cta-inline {
  background: linear-gradient(120deg, rgba(30, 158, 139, 0.08), rgba(58, 168, 212, 0.08));
  border-color: #d3deea;
}

@media (max-width: 480px) {
  .cta-inline { padding: 20px 18px; }
  .cta-inline .cta-inline-actions { width: 100%; }
  .cta-inline .cta-inline-actions .btn { width: 100%; }
}

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(600px 300px at 20% 120%, rgba(214, 69, 69, 0.12), transparent 60%),
    linear-gradient(120deg, #142033, #10182a);
  border-top: 1px solid var(--card-edge);
  border-bottom: 1px solid var(--card-edge);
  text-align: center;
  padding: 58px 0;
}

.cta-band h2 { margin-bottom: 0.4em; }

.cta-band p { max-width: 40em; margin: 0 auto 1.6em; }

/* ---------- Footer ---------- */

.site-footer {
  background: #0b0f18;
  border-top: 1px solid var(--card-edge);
  padding: 48px 0 30px;
  font-size: 0.92rem;
  color: var(--cloud-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.6fr;
  gap: 36px;
  margin-bottom: 32px;
}

.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cloud);
  margin-bottom: 14px;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }

.site-footer li { margin-bottom: 8px; }

.site-footer a { color: var(--cloud-soft); text-decoration: none; }

.site-footer a:hover { color: var(--ice); text-decoration: underline; }

.footer-brand img { width: 96px; height: 43px; border-radius: 6px; margin-bottom: 14px; }

.age-badge {
  display: inline-block;
  border: 2px solid var(--maple);
  color: #f08c8c;
  font-weight: 800;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  line-height: 40px;
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-legal {
  border-top: 1px solid rgba(148, 190, 233, 0.1);
  padding-top: 22px;
  font-size: 0.83rem;
  line-height: 1.7;
}

.footer-legal p { margin-bottom: 0.8em; }

/* ---------- 404 ---------- */

.error-page { min-height: 55vh; display: flex; align-items: center; text-align: center; }

.error-page .code {
  font-family: var(--font-head);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.15em;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Keep the 7-item desktop nav on one line at narrower desktop widths */
@media (min-width: 941px) and (max-width: 1180px) {
  .main-nav ul { gap: 0; }
  .main-nav a { padding: 0.55em 0.55em; font-size: 0.92rem; }
  .nav-cta { margin-left: 4px; }
  .nav-cta .btn-sm { padding: 0.5em 0.8em; font-size: 0.85rem; }
  .brand img { width: 92px; height: 41px; }
}

@media (max-width: 940px) {
  .nav-toggle { display: block; }

  /* NOTE: the menu is positioned absolute (not fixed) on purpose.
     The sticky header uses backdrop-filter, which turns it into the
     containing block for fixed descendants and collapses their height. */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
    background: rgba(13, 18, 30, 0.98);
    padding: 26px 22px;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    overflow-y: auto;
    z-index: 90;
  }

  .nav-open .main-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease;
  }

  .main-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }

  .main-nav a { font-size: 1.15rem; padding: 0.8em 1em; }

  .nav-cta { margin: 14px 0 0; }

  .nav-cta .btn { display: block; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 44px 0 54px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .code-chip .code-text { font-size: 1.2rem; letter-spacing: 0.12em; }
  body { font-size: 1rem; }
}

@media (max-width: 375px) {
  .wrap { padding: 0 14px; }
  .brand img { width: 92px; height: 41px; }
}
