/* ============================================================
   GLOBAL RESET & VARIABLES
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colours */
  --powder-blue: #e0f7fa;
  --powder-blue-soft: #f3fbfd;
  --dark-grey: #424242;
  --mid-grey: #757575;
  --light-grey: #e0e0e0;
  --accent: #007b8f;
  --accent-soft: rgba(0, 123, 143, 0.1);
  --white: #ffffff;

  /* Typography */
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Merriweather", serif;

  /* Layout */
  --container-width: 1100px;
  --gutter: 1.5rem;

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
}

/* Dark Theme */
body.dark-theme {
  --powder-blue: #161b22;
  --powder-blue-soft: #0d1117;
  --dark-grey: #f5f5f5;
  --mid-grey: #c2c2c2;
  --light-grey: #30363d;
  --accent: #39c5db;
  --accent-soft: rgba(57, 197, 219, 0.15);
}

/* ============================================================
   GLOBAL ELEMENT STYLES
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-grey);
  background: var(--powder-blue-soft);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: #005c68;
  text-decoration: underline;
}

/* Utility container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Headings */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  color: var(--dark-grey);
}

/* Buttons */
button,
.btn {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: #005c68;
  transform: translateY(-1px);
}

/* ============================================================
   HEADER + NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--powder-blue);
  border-bottom: 1px solid var(--light-grey);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

/* Logo */
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-grey);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.logo-mark {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--white);
  border-radius: 0.4rem;
}

/* Navigation */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid var(--light-grey);
  background: var(--white);
}

.nav-toggle-bar {
  width: 1.3rem;
  height: 2px;
  background: var(--dark-grey);
}

.nav-list {
  list-style: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--powder-blue);
  border-radius: 0.8rem;
  padding: 0.5rem 0;
  display: none;
}

/* Desktop nav */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-list {
    position: static;
    display: flex;
    gap: 1rem;
    background: transparent;
    box-shadow: none;
  }
}

/* ============================================================
   HERO / TOP BANNER
   ============================================================ */

.hero {
  padding: 2.5rem 0 1.8rem;
}

.hero-home {
  background: linear-gradient(
    135deg,
    var(--powder-blue) 0%,
    var(--powder-blue-soft) 50%,
    #ffffff 100%
  );
  border-bottom: 1px solid var(--light-grey);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

.hero-content {
  max-width: 40rem;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--mid-grey);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.hero-content h1 {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--mid-grey);
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .hero {
    padding: 3.2rem 0 2.4rem;
  }
  .hero-content h1 {
    font-size: 2.4rem;
  }
}

/* ============================================================
   FEATURED CATEGORIES (QUICK ACCESS)
   ============================================================ */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.featured-tile {
  padding: 1rem;
  background: var(--white);
  border-radius: 0.9rem;
  border: 1px solid rgba(224, 224, 224, 0.9);
  transition: var(--transition-fast);
}

.featured-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

@media (min-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   MAIN CONTENT SPLIT (70% / 30%)
   ============================================================ */

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.main-content {
  flex: 1;
}

.sidebar {
  flex: 0 0 auto;
}

.sidebar-block {
  background: var(--white);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(224, 224, 224, 0.9);
  margin-bottom: 1rem;
}

/* Desktop layout */
@media (min-width: 900px) {
  .main-layout {
    flex-direction: row;
    gap: 2rem;
  }

  .main-content {
    flex: 0 0 70%;
  }

  .sidebar {
    flex: 0 0 30%;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 1rem 0;
  background: var(--powder-blue);
  border-top: 1px solid var(--light-grey);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
