/* =============================================================================
   CANNAMEDICAL BRITANNIA — global.css
   CSS Custom Properties + Reset + Typography + Utilities
   Version: 1.0.0 | 2026-05-15
   ============================================================================= */

/* --- Custom Properties --- */
:root {
  --green: #568e2f;
  --green-dark: #4a7a28;
  --green-light: #eaf3e0;
  --grey: #575756;
  --navy: #1a2e1a;
  --navy-dark: #142312;
  --navy-light: #eef5e8;
  --white: #ffffff;
  --off-white: #fff;
  --light-grey: #e9ecef;
  --text: #1a1a1a;
  --text-muted: #6c757d;
  --font: 'Raleway', sans-serif;
  --container: 1200px;
  --pad: 1.5rem;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.14);
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.section-lg {
  padding: 7rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  color: #1a2e1a;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

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

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font);
}

input, textarea, select {
  font-family: var(--font);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(86,142,47,0.35);
}

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

.btn-navy:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,64,95,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

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

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: transparent;
}

.btn-ghost:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-available {
  background: var(--green-light);
  color: var(--green);
}

.badge-coming {
  background: var(--navy-light);
  color: var(--navy);
}

.badge-gmp {
  background: #fff3cd;
  color: #856404;
}

.badge-new {
  background: #fde8e8;
  color: #c0392b;
}

/* --- Background Utilities --- */
.bg-navy {
  background: var(--navy);
  color: var(--white);
}

.bg-navy h1,
.bg-navy h2,
.bg-navy h3,
.bg-navy h4,
.bg-navy h5,
.bg-navy h6 {
  color: var(--white);
}

.bg-green {
  background: var(--green);
  color: var(--white);
}

.bg-green h1,
.bg-green h2,
.bg-green h3 {
  color: var(--white);
}

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

.bg-light-grey {
  background: var(--light-grey);
}

/* --- Text Utilities --- */
.text-green  { color: var(--green); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-900 { font-weight: 900; }

/* --- Section Eyebrow --- */
.section-eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

/* --- Dividers --- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: 1.25rem 0;
}

.divider-center {
  margin: 1.25rem auto;
}

/* --- Grid Utilities --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- Flex Utilities --- */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-sm       { gap: 0.75rem; }
.gap-md       { gap: 1.5rem; }
.gap-lg       { gap: 2rem; }

/* --- Spacing --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Visibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--green);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  z-index: 99999;
  transition: top 0.2s;
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--light-grey); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey); }

/* === Scroll Reveal === */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.js-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* === Announcement Bar === */
#cm-announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1001;
}
.cm-announce-bar {
  background: linear-gradient(90deg, #568e2f 0%, #4a7a28 100%);
  color: white; padding: 0.55rem 0; font-size: 0.8rem; position: relative; z-index: 200;
}
.cm-announce-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 0.85rem; flex-wrap: wrap;
}
.cm-announce-badge {
  background: white; color: #4a7a28; font-weight: 800; font-size: 0.68rem;
  padding: 0.2rem 0.65rem; border-radius: 100px; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.cm-announce-text { color: rgba(255,255,255,0.9); white-space: nowrap; }
.cm-announce-cta {
  color: white; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5); white-space: nowrap;
  transition: border-color 0.2s;
}
.cm-announce-cta:hover { border-color: white; }
.cm-announce-close {
  background: none; border: none; color: white; cursor: pointer;
  font-size: 1.1rem; line-height: 1; opacity: 0.7; padding: 0 0.25rem;
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
}
.cm-announce-close:hover { opacity: 1; }
@media (max-width: 768px) {
  .cm-announce-text { display: none; }
  .cm-announce-inner { gap: 0.6rem; }
}

/* Nav hiring badge styles moved to components.css */

/* === Section navy removed — content areas use light bg === */
.section.bg-navy {
  background: #f7f9fb !important;
  color: var(--text) !important;
}
.section.bg-navy h1,.section.bg-navy h2,.section.bg-navy h3 {
  color: var(--navy) !important;
}
.section.bg-navy p { color: var(--text-muted) !important; }

/* bg-navy-light page headers -> light */
.bg-navy-light {
  background: #f0f3f7 !important;
  color: var(--text) !important;
}
.bg-navy-light h1, .bg-navy-light h2 { color: var(--navy) !important; }

/* ================================================
   HERO REDESIGN: white/clean (cannamedical.de ref)
   ================================================ */
.page-hero,
.page-hero.bg-navy,
.page-hero.bg-navy-dark {
  background: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,0.07) !important;
}

/* All text in heroes -> dark forest green */
.page-hero h1,
.page-hero.bg-navy h1,
.page-hero.bg-navy-dark h1,
.page-hero .page-hero-content h1,
.page-hero .text-white h1 {
  color: #1a2e1a !important;
}
.page-hero p,
.page-hero.bg-navy p,
.page-hero .text-white p,
.page-hero-content p {
  color: var(--text-muted) !important;
}
.page-hero .section-label,
.page-hero.bg-navy .section-label { color: var(--green) !important; }

/* Hero meta items (location, type, etc.) */
.page-hero .hero-meta,
.page-hero .page-hero-meta,
.page-hero .hero-meta-item,
.page-hero-meta span,
.page-hero .meta-item {
  color: var(--text-muted) !important;
}
.page-hero .hero-meta-item svg,
.page-hero .meta-item svg { color: var(--green) !important; }

/* Outline/white buttons in hero -> green outline */
.page-hero .btn-outline.btn-white,
.page-hero .btn-white {
  background: transparent !important;
  color: var(--green) !important;
  border-color: var(--green) !important;
}
.page-hero .btn-outline.btn-white:hover,
.page-hero .btn-white:hover {
  background: var(--green) !important;
  color: white !important;
}

/* Stats/badges in hero that were white */
.page-hero .stat-badge,
.page-hero .stat-item,
.page-hero .badge-item { color: var(--text-muted) !important; }

/* Keep the home hero image visible */
.page-hero .hero-image img { filter: none !important; }

/* =============================================================
   CONDITION HERO EXCEPTION — high specificity to beat .page-hero !important
   ============================================================= */
.page-hero.condition-hero {
  background: linear-gradient(135deg, #2d5a1a 0%, #1e4012 55%, #1a2e1a 100%) !important;
  border-bottom: none !important;
}
.page-hero.condition-hero h1,
.page-hero.condition-hero .page-hero-content h1 {
  color: #fff !important;
}
.page-hero.condition-hero p,
.page-hero.condition-hero .page-hero-content p,
.page-hero.condition-hero .hero-sub {
  color: rgba(255,255,255,0.7) !important;
}
.page-hero.condition-hero .section-label {
  color: var(--green) !important;
  background: rgba(86,142,47,0.12) !important;
}
.page-hero.condition-hero .btn-primary {
  background: var(--green) !important;
  color: #fff !important;
}
.page-hero.condition-hero .btn-outline {
  border-color: rgba(255,255,255,0.4) !important;
  color: rgba(255,255,255,0.9) !important;
  background: transparent !important;
}
.page-hero.condition-hero nav a,
.page-hero.condition-hero nav span {
  color: rgba(255,255,255,0.6) !important;
}
.page-hero.condition-hero .hero-meta,
.page-hero.condition-hero .hero-meta-item,
.page-hero.condition-hero small {
  color: rgba(255,255,255,0.65) !important;
}
