/* ============================================================
   DESIGN TOKENS
   All colours, fonts, and spacing in one place.
   Change a value here and it updates everywhere.
   ============================================================ */

:root {
  /* Colours */
  --navy:       #1a2e44;
  --teal:       #2a7f7f;
  --teal-light: #3da8a8;
  --sand:       #f5f0e8;
  --cream:      #fffdf9;
  --mist:       #e8f4f4;
  --slate:      #4a5568;
  --light:      #718096;

  /* Fonts */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(26, 46, 68, 0.08);

  /* Max content width */
  --max-width: 860px;
}

/* ============================================================
   BASE & RESET
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate);
  background: var(--cream);
}

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

a {
  color: var(--teal);
  text-decoration: underline;
}

a:hover {
  color: var(--navy);
}

ul, ol {
  padding-left: 1.5rem;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem);  margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin-bottom: var(--space-xs); }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-xl) var(--space-sm);
}

section:nth-child(even) {
  background: var(--sand);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-sm);
}

.site-nav__logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__logo:hover {
  color: var(--teal-light);
}

.site-nav__links {
  display: none;
  list-style: none;
  padding: 0;
  gap: var(--space-md);
}

.site-nav__links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav__links a:hover {
  color: white;
}

.site-nav__hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: white;
  line-height: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile nav open state */
.site-nav.is-open .site-nav__links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--navy);
  padding: var(--space-md);
  gap: var(--space-sm);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-nav.is-open .site-nav__links a {
  font-size: 1.1rem;
  padding: var(--space-xs) 0;
}

@media (min-width: 768px) {
  .site-nav__hamburger { display: none; }
  .site-nav__links { display: flex; }
}

/* Language switcher */
.site-nav__lang {
  position: relative;
  margin-left: auto;
}

.nav-lang-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.15s;
}

.nav-lang-btn:hover,
.nav-lang-btn.is-active {
  background: var(--teal);
  border-color: var(--teal);
}

.nav-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 200px;
  padding: var(--space-xs);
  z-index: 200;
}

.nav-lang-dropdown__heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light);
  padding: 0.5rem 0.75rem 0.25rem;
  margin-bottom: 0;
}

.nav-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  cursor: pointer;
  border-radius: var(--radius-sm);
  min-height: 44px;
  text-align: left;
}

.nav-lang-option:hover:not([disabled]) {
  background: var(--mist);
  color: var(--teal);
}

.nav-lang-option.is-active {
  font-weight: 700;
  color: var(--teal);
}

.nav-lang-option[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-lang-soon {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--mist);
  color: var(--light);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-height: 44px;
  line-height: 1.4;
}

.button--primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.button--primary:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.button--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

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

/* ============================================================
   ICONS  (Lucide — loaded via CDN script in base.njk)
   To change an icon, update the data-lucide="name" attribute.
   Icon names: lucide.dev/icons
   ============================================================ */

/* Prevents flash of unstyled <i> before Lucide replaces them */
i[data-lucide] { display: inline-flex; }

.card__icon svg       { width: 28px; height: 28px; }
.warning-box__icon svg { width: 20px; height: 20px; }
.accordion__arrow      { width: 20px; height: 20px; color: var(--teal); flex-shrink: 0; transition: transform 0.2s; }
.video-card__thumb svg { width: 40px; height: 40px; }
.surgery-hero__icon svg { width: 80px; height: 80px; opacity: 0.35; }

/* Hamburger shows menu icon normally, X icon when nav is open */
.site-nav__hamburger .icon-close { display: none; }
.site-nav.is-open .site-nav__hamburger .icon-menu  { display: none; }
.site-nav.is-open .site-nav__hamburger .icon-close { display: inline-flex; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  border-left: 4px solid var(--teal);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: 1fr 1fr; }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--mist);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--teal);
}

/* ============================================================
   INFO CHIPS
   ============================================================ */

.chip {
  display: inline-block;
  background: var(--mist);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ============================================================
   WARNING BOX
   ============================================================ */

.warning-box {
  background: #fffbeb;
  border-left: 4px solid #d97706;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.warning-box__icon {
  color: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   ACCORDION
   ============================================================ */

.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.accordion__item {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.accordion__trigger {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
}

.accordion__trigger:hover {
  background: var(--mist);
}

.accordion__arrow {
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.accordion__item.is-open .accordion__arrow {
  transform: rotate(180deg);
}

.accordion__body {
  display: none;
  padding: 0 var(--space-md) var(--space-md);
  color: var(--slate);
}

.accordion__item.is-open .accordion__body {
  display: block;
}

/* ============================================================
   TABS
   ============================================================ */

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.tabs__tab {
  background: none;
  border: 2px solid var(--teal);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
}

.tabs__tab:hover,
.tabs__tab[aria-selected="true"] {
  background: var(--teal);
  color: white;
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
}

/* ============================================================
   TIMELINE  (Your Journey + Fasting)
   ============================================================ */

.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--teal);
  opacity: 0.3;
}

.timeline__stage {
  position: relative;
  padding-left: 44px;
  margin-bottom: var(--space-lg);
}

.timeline__stage:last-child {
  margin-bottom: 0;
}

.timeline__stage::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
}

.timeline__stage h3 {
  color: var(--teal);
  margin-bottom: var(--space-xs);
}

/* ============================================================
   VIDEO CARDS
   ============================================================ */

.video-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
}

.video-card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  position: relative;
}

.video-card__thumb:hover {
  background: var(--navy);
  color: white;
}

.video-card__label {
  padding: var(--space-sm);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

/* ============================================================
   SURGERY HERO
   ============================================================ */

.surgery-hero {
  background: var(--navy);
  color: white;
  padding: var(--space-xl) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.surgery-hero h1 {
  color: white;
}

.surgery-hero__description {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin-bottom: 0;
}

.surgery-hero .chip {
  background: rgba(255,255,255,0.12);
  color: white;
}

.surgery-hero__icon {
  color: var(--teal-light);
  opacity: 0.6;
}

@media (min-width: 768px) {
  .surgery-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-lg);
  }
}

/* ============================================================
   JOURNEY SECTION
   ============================================================ */

.journey-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================================
   SECTION HEADINGS  (shared sections)
   ============================================================ */

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-xs);
}

/* ============================================================
   PRE-ASSESSMENT CTA
   ============================================================ */

.pre-assessment-cta {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: var(--space-xl) var(--space-sm);
}

.pre-assessment-cta h2 {
  color: white;
}

.pre-assessment-cta p {
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin: 0 auto var(--space-md);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: var(--space-lg) var(--space-sm);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 100%;
}

.site-footer a {
  color: var(--teal-light);
}

.site-footer strong {
  color: white;
}

.site-footer__disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.site-footer__meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

@media (min-width: 768px) {
  .site-footer {
    padding: var(--space-lg) var(--space-xl);
  }
}

/* ============================================================
   HOMEPAGE
   ============================================================ */

.homepage {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-sm);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.homepage__hero {
  text-align: center;
}

.homepage__intro {
  font-size: 1.1rem;
  color: var(--light);
  max-width: 480px;
  margin: 0 auto;
}

.homepage__search,
.homepage__language {
  width: 100%;
}

.search-question {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

.search-input-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light);
  pointer-events: none;
}

.search-icon svg { width: 20px; height: 20px; }

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border: 2px solid #d1d9e0;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: white;
  transition: border-color 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--teal);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d9e0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  list-style: none;
  padding: var(--space-xs) 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
}

.search-suggestions li {
  padding: 0.7rem 1rem;
  cursor: pointer;
  color: var(--navy);
  font-size: 1rem;
}

.search-suggestions li:hover {
  background: var(--mist);
  color: var(--teal);
}

.search-no-match {
  margin-top: var(--space-sm);
  color: var(--light);
  font-size: 0.95rem;
}

/* Language buttons */
.lang-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.lang-btn {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 2px solid #d1d9e0;
  background: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.lang-btn.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.lang-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.coming-soon {
  font-size: 0.75rem;
  font-weight: 400;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* Confirmation card */
.confirm-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--teal);
  padding: var(--space-md);
  width: 100%;
}

.confirm-text {
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.homepage h1 {
  margin-bottom: var(--space-sm);
}
