/* palette: ocean-rose */
:root {
  --primary-color: #0A3245;
  --secondary-color: #174E66;
  --accent-color: #B83050;
  --background-color: #F0F7FB;
  --dark-color: #111111;
  --text-color: #333333;
  --border-color: rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.16);
  --radius-sm: 6px; 
  --radius-md: 12px; 
  --radius-lg: 20px; 
  --radius-xl: 32px;
  --main-font: 'Playfair Display', Georgia, serif;
  --alt-font: 'DM Sans', sans-serif;
}

/* Base Styles & Typography */
body {
  font-family: var(--alt-font);
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-x: hidden;
  margin: 0;
}

p {
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.7;
}

/* RETRO-CLASSIC Preset Rules (Copied Literally) */
section{padding:72px 16px} 
@media(min-width:1024px){section{padding:80px 24px}} 
h1,h2,h3{font-family:"Playfair Display","Cormorant Garamond",Georgia,serif} 
.card{border:2px solid var(--primary-color);border-radius:8px;box-shadow:4px 4px 0 rgba(0,0,0,0.1)} 
.btn{border:2px solid var(--primary-color);border-radius:8px;background:transparent;color:var(--primary-color)} 
hr{border:none;text-align:center} 
hr::before{content:"— * —";display:block;font-size:1.2rem;color:var(--accent-color)}

/* Header & Mobile Burger (CSS-only) */
.site-header {
  background: #fff;
  border-bottom: 2px solid var(--primary-color);
  position: relative;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 2px solid var(--primary-color);
  padding: 16px;
  z-index: 999;
}
.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-nav a {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover {
  color: var(--accent-color);
}
#menu-toggle:checked ~ .site-nav {
  display: block;
}
.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}
.burger-btn .bar {
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  transition: transform 0.3s, opacity 0.3s;
}
#menu-toggle:checked ~ .burger-btn .bar:first-child {
  transform: translateY(9px) rotate(45deg);
}
#menu-toggle:checked ~ .burger-btn .bar:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked ~ .burger-btn .bar:last-child {
  transform: translateY(-9px) rotate(-45deg);
}

@media(min-width:768px) {
  .burger-btn {
    display: none;
  }
  .site-nav {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
  }
  .site-nav ul {
    flex-direction: row;
    gap: 24px;
  }
}

/* HERO: stats-anchored variant */
.hero-section {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: linear-gradient(rgba(10, 50, 69, 0.75), rgba(10, 50, 69, 0.75)), url('./img/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
}
.hero-top {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
}
.hero-content h1 {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
}
.hero-stats-bar {
  background: var(--primary-color);
  width: 100%;
  padding: 24px 16px;
}

/* CSS-only Counter Animation (@property) */
@property --count {
  syntax: '<integer>';
  initial-value: 0;
  inherits: false;
}
.stat-num {
  --target: 100;
  animation: count-up 2s ease-out forwards;
  animation-timeline: view();
  animation-range: entry 0% entry 60%;
  counter-reset: n var(--count);
  font-size: clamp(32px, 5vw, 48px);
  font-family: var(--main-font);
}
.stat-num::after {
  content: counter(n);
}
@keyframes count-up {
  from { --count: 0; }
  to { --count: var(--target); }
}

/* Buttons */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-hero-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}
.btn-hero-primary:hover {
  background-color: #9c2541;
}
.btn-hero-outline {
  border-color: white;
}
.btn-hero-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Animations: Scroll Reveal & Hover Cascade */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  animation: reveal-up linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

.card {
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.15);
}

/* CSS Tabs Styling */
.tabs-container {
  display: flex;
  flex-direction: column;
}
.tab-label {
  border-bottom: 3px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
#tab-rule:checked ~ .tabs-nav label[for="tab-rule"],
#tab-blink:checked ~ .tabs-nav label[for="tab-blink"],
#tab-light:checked ~ .tabs-nav label[for="tab-light"] {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.tab-panel {
  display: none;
}
#tab-rule:checked ~ .tabs-content .tab-panel-rule,
#tab-blink:checked ~ .tabs-content .tab-panel-blink,
#tab-light:checked ~ .tabs-content .tab-panel-light {
  display: block;
}
.tab-image {
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

/* Dense Icon Grid Styling */
.dense-card {
  transition: transform 0.2s;
}
.dense-card:hover {
  transform: scale(1.03);
}

/* Quiz Styling */
.quiz-option-label {
  border: 1px solid var(--border-color);
  transition: background-color 0.2s, border-color 0.2s;
}
.quiz-option-label:hover {
  background-color: var(--background-color);
}
.quiz-feedback {
  display: none;
}
#q1-a1:checked ~ .feedback-wrong,
#q1-a2:checked ~ .feedback-correct,
#q2-a1:checked ~ .feedback-correct,
#q2-a2:checked ~ .feedback-wrong {
  display: block;
}
#q1-a1:checked + label,
#q2-a2:checked + label {
  background-color: #fee2e2;
  border-color: #fca5a5;
}
#q1-a2:checked + label,
#q2-a1:checked + label {
  background-color: #dcfce7;
  border-color: #86efac;
}

/* How It Works Steps Connector */
.steps-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
  display: none;
}
@media(min-width: 768px) {
  .steps-container::after {
    display: block;
  }
}

/* Footer & Logo inverted */
.site-footer img[alt="logo"] {
  filter: brightness(0) invert(1);
}

/* General Layout helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
}
