/* ===================================
   RHI — Real Human Intelligence
   Shared Stylesheet
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Raleway:wght@300;400;500;600&display=swap');

:root {
  --navy:       #2D2D5E;
  --teal:       #4BC8C8;
  --blue:       #3A7BD5;
  --white:      #FFFFFF;
  --off-white:  #F8F9FA;
  --light-grey: #E8EDF5;
  --text-light: #6B7280;
}

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

body {
  font-family: 'Raleway', sans-serif;
  background: var(--white);
  color: var(--navy);
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--light-grey);
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: flex-end;
  /* +10px vs right so the link groups stay even around the optically-shifted logo */
  padding-right: 58px;
}

.nav-right {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: flex-start;
  padding-left: 38px;
}

.nav-logo img {
  height: 46px;
  width: auto;
  display: block;
  /* Optical centre — nudge left so the R H I letters sit on the true centre,
     compensating for the visual weight of the arc on the left */
  transform: translateX(-10px);
}

nav a {
  text-decoration: none;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--teal);
}

/* Mobile menu toggle — hidden on desktop */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

/* ── PAGE WRAPPER ── */
.page {
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--light-grey);
  padding: 28px 48px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
}

.footer-logo img {
  height: 34px;
  width: auto;
  display: block;
  /* Optical centre — scaled to the smaller footer logo */
  transform: translateX(-7px);
}

.footer-text {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
}

footer a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--teal);
}

.footer-divider {
  width: 1px;
  height: 18px;
  background: var(--light-grey);
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 68px;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -1px;
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.2;
  color: var(--navy);
}

h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 30px;
  color: var(--navy);
}

p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
}

.section-label {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}

.teal-rule {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  margin: 20px 0 32px;
  border-radius: 2px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 15px 40px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}

.btn-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: var(--white);
  border: 2px solid transparent;
}

.btn-teal:hover {
  opacity: 0.88;
}

/* ── SECTIONS ── */
.section {
  padding: 96px 48px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-alt {
  background: var(--off-white);
}

.section-alt .section {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section-alt-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 28px;
}

label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
  font-weight: 600;
}

.optional-tag {
  color: var(--text-light);
  font-weight: 400;
  margin-left: 6px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="file"],
textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--light-grey);
  border-radius: 2px;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s;
  appearance: none;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── ACCENT TOP LINE ── */
.accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  width: 100%;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    padding: 0 20px;
    height: auto;
    min-height: 72px;
  }

  .nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 72px;
  }

  .nav-logo {
    order: 1;
  }

  .nav-burger {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .nav-left,
  .nav-right {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    display: none;
    padding: 0;
  }

  .nav-toggle:checked ~ .nav-left,
  .nav-toggle:checked ~ .nav-right {
    display: flex;
  }

  .nav-left a,
  .nav-right a {
    font-size: 12px;
    letter-spacing: 2px;
    padding: 18px 0;
    text-align: center;
    width: 100%;
    border-top: 1px solid var(--light-grey);
  }

  /* Burger morphs into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-logo img {
    height: 36px;
  }

  h1 { font-size: 42px; }
  h2 { font-size: 34px; }

  .section {
    padding: 64px 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .footer-left,
  .footer-right {
    justify-content: center;
  }

  .footer-right {
    flex-direction: column;
    gap: 8px;
  }

  .footer-divider {
    width: 32px;
    height: 1px;
  }

  footer a {
    word-break: break-all;
  }
}

/* ===================================
   DARK MODE  (toggled via html.dark)
   =================================== */
html.dark {
  --navy:       #EAEAF2;   /* now reads as light "ink" */
  --white:      #1E1E40;   /* base background */
  --off-white:  #26264D;   /* raised surfaces */
  --light-grey: #343466;   /* borders / dividers */
  --text-light: #A0A0C0;   /* muted text */
  /* --teal and --blue unchanged — they glow on dark */
}

html.dark body {
  background: var(--white);
  color: var(--navy);
}

/* Logo → white version */
html.dark .nav-logo img,
html.dark .footer-logo img,
html.dark .hero-logo img,
html.dark .hero-overlay-logo {
  filter: brightness(0) invert(1);
}

/* Blue becomes the primary action colour */
html.dark .btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
html.dark .btn-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
html.dark .btn-outline {
  color: var(--navy);
  border-color: var(--navy);
}
html.dark .btn-outline:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Keep placeholder icons legible */
html.dark .video-icon,
html.dark .hero-video-icon,
html.dark .empty-icon {
  color: var(--text-light);
}

/* Download intro: keep the "Light Version" swatch genuinely light,
   keep the dark swatch deep so the white mark reads */
html.dark .preview-light { background: #FFFFFF; }
html.dark .preview-light span { color: #6B7280; }
html.dark .preview-dark { background: #101030; border-color: #101030; }
html.dark .download-card-preview-dark { background: #101030; }

/* White-Version card blends with its siblings in dark mode */
html.dark .download-card-dark {
  background: var(--off-white);
  border-color: var(--light-grey);
}
html.dark .download-card-dark h3 { color: var(--navy); }
html.dark .download-card-dark p,
html.dark .download-card-dark .format-specs li { color: var(--text-light); }
html.dark .download-card-dark .format-label {
  color: var(--teal);
  border-color: var(--light-grey);
}
html.dark .download-card-dark .btn-outline-light {
  color: var(--navy);
  border-color: var(--blue);
}
html.dark .download-card-dark .btn-outline-light:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Supporters join strip → raised panel instead of solid navy */
html.dark .join-strip {
  background: var(--off-white);
  border: 1px solid var(--light-grey);
}
html.dark .join-strip h3 { color: var(--navy); }
html.dark .join-strip p { color: var(--text-light); }

/* Slightly stronger card glow on dark */
html.dark .download-card:hover {
  box-shadow: 0 8px 30px rgba(58, 123, 213, 0.18);
}

/* ── Theme toggle (pill switcher) ── */
.theme-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 0;
  background: var(--light-grey);
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
  transition: background 0.25s;
}

.theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  transition: transform 0.25s, background 0.25s;
}

.theme-icon-sun { color: #E0A93B; }
.theme-icon-moon { color: #FFFFFF; display: none; }

html.dark .theme-toggle { background: var(--blue); }
html.dark .theme-knob { transform: translateX(24px); background: #15152F; }
html.dark .theme-icon-sun { display: none; }
html.dark .theme-icon-moon { display: inline; }

@media (max-width: 768px) {
  .nav-right .theme-toggle {
    margin: 18px auto;
    display: block;
  }

  nav:has(.nav-toggle:checked) {
    height: 100dvh;
    overflow-y: auto;
  }
}

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1E1E40;
  border-top: 2px solid #4BC8C8;
  padding: 14px 48px;
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin: 0;
  line-height: 1.6;
}

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

.cookie-btn {
  padding: 9px 22px;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  font-family: 'Raleway', sans-serif;
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: #4BC8C8;
  color: #1E1E40;
}

.cookie-btn-accept:hover {
  background: #3A7BD5;
  color: #fff;
}

.cookie-btn-decline {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.2);
}

.cookie-btn-decline:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
  .cookie-banner { padding: 16px 20px; }
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}
