:root {
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;

  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Colors — light */
  --color-primary: #013d4f;
  --color-text: rgba(0, 0, 0, 0.88);
  --color-text-muted: rgba(0, 0, 0, 0.55);
  --color-text-faint: rgba(0, 0, 0, 0.45);
  --color-bg: #fff;
  --color-surface: rgba(0, 0, 0, 0.025);
  --color-border: rgba(0, 0, 0, 0.06);

  /* Easing */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.2, 0, 0, 1);
  --ease-title: cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
[data-theme="dark"] {
  --color-text: rgba(255, 255, 255, 0.92);
  --color-text-muted: rgba(255, 255, 255, 0.55);
  --color-text-faint: rgba(255, 255, 255, 0.55);
  --color-bg: #0f0f10;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
}

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

/* ============================================================
   BASE
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  transition:
    background 280ms var(--ease-smooth),
    color 280ms var(--ease-smooth);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.main-content {
  padding: calc(80px + var(--space-8)) var(--space-4) var(--space-8);
  min-height: 100vh;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.section-header h1 {
  font-family: "Satoshi", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 1;
  cursor: pointer;
  transition:
    transform 200ms var(--ease-spring),
    box-shadow 200ms var(--ease-spring);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(5) {
  grid-column: span 2;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 300ms ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
  color: #fff;
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
@keyframes hero-content-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-banner {
  position: relative;
  margin: calc(60px + var(--space-4) * 2) var(--space-4) 0;
  border-radius: 20px;
  height: clamp(280px, 38vw, 600px);
  overflow: hidden;
  background: var(--color-surface);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 800ms var(--ease-smooth);
}

.hero-banner:hover .hero-banner-img {
  transform: scale(1.025);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.44) 100%
  );
}

[data-theme="dark"] .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.24) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  text-align: center;
  padding: var(--space-6);
  animation: hero-content-in 700ms var(--ease-title) 220ms both;
}

.hero-title {
  font-family: "Satoshi", sans-serif;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.32);
  letter-spacing: -0.015em;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  max-width: 440px;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.25rem;
  background: rgba(255, 255, 255, 0.95);
  color: rgba(0, 0, 0, 0.88);
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.18);
  transition:
    background 160ms ease,
    transform 200ms var(--ease-spring),
    box-shadow 200ms ease;
}

.hero-cta-btn:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.hero-cta-btn:active {
  transform: scale(0.97);
}

.hero-cta-btn:focus-visible {
  outline: 2px solid rgba(0, 100, 120, 0.6);
  outline-offset: 2px;
}

/* ============================================================
   HOME — SHARED ANIMATIONS
   ============================================================ */
.home-content {
  padding: var(--space-8) var(--space-4);
}

.home-feature,
.home-section,
.home-about {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 640ms var(--ease-smooth),
    transform 640ms var(--ease-title);
}

.home-feature.is-visible,
.home-section.is-visible,
.home-about.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HOME — FEATURE BLOCK
   ============================================================ */
.home-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-6) 0 var(--space-8);
}

.home-feature-img-col {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.home-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease-smooth);
}

.home-feature-img-col:hover .home-feature-img {
  transform: scale(1.05);
}

.home-feature-text-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.home-feature-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.home-feature-title {
  font-family: "Satoshi", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

.home-feature-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.72;
  margin: 0;
}

/* ============================================================
   HOME — SECTION BLOCK
   ============================================================ */
.home-section {
  padding: var(--space-6) 0 var(--space-8);
}

.home-section-header {
  margin-bottom: var(--space-6);
}

.home-section-title {
  font-family: "Satoshi", sans-serif;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

.home-section-footer {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
}

/* ============================================================
   FEATURED GRID
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

/* ============================================================
   NEWS GRID & CARDS
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition:
    box-shadow 200ms ease,
    transform 220ms var(--ease-spring);
}

.news-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
  transform: translateY(-3px) scale(1.01);
}

.news-card-date {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}

.news-card-title {
  font-family: "Satoshi", sans-serif;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  margin: 0;
}

.news-card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

.news-card-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  align-self: flex-start;
  transition: opacity 160ms ease;
}

.news-card-link:hover {
  opacity: 0.72;
}

.news-card-image-wrap {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-3);
  background: var(--color-surface);
}

.news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   HOME — ABOUT BLOCK
   ============================================================ */
.home-about {
  padding: var(--space-8) 0;
  display: flex;
  justify-content: center;
}

.home-about-inner {
  max-width: 640px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

/* ============================================================
   NEWS PAGE
   ============================================================ */
.news-page-intro {
  max-width: 640px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.news-page-intro p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.news-page-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.news-page-layout .news-grid {
  margin-top: var(--space-2);
}

/* ============================================================
   ARTICLE
   ============================================================ */
.article-layout {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.article-breadcrumb {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.article-breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.article-kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0;
}

.article-title {
  font-family: "Satoshi", sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--color-text);
}

.article-meta {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.article-hero {
  border-radius: 20px;
  overflow: hidden;
  margin-top: var(--space-2);
}

.article-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.article-body {
  font-size: var(--text-base);
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.78);
}

.article-body p {
  margin-bottom: var(--space-4);
}

.article-body h2,
.article-body h3 {
  font-family: "Satoshi", sans-serif;
  margin: var(--space-5) 0 var(--space-3);
  color: rgba(0, 0, 0, 0.9);
}

.article-body ul {
  padding-left: 1.2rem;
  margin-bottom: var(--space-4);
}

.article-footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

[data-theme="dark"] .article-body {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .article-body h2,
[data-theme="dark"] .article-body h3 {
  color: rgba(255, 255, 255, 0.92);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-copy p {
  font-size: var(--text-base);
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.8;
}

[data-theme="dark"] .about-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.about-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.about-pill {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.about-stat {
  padding: var(--space-4);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.about-stat-value {
  display: block;
  font-family: "Satoshi", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.about-stat-label {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.about-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */

/* --- ≤960px --- */
@media (max-width: 960px) {
  .section-header h1 {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) {
    grid-column: span 1;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-portrait {
    aspect-ratio: 2 / 3;
    width: 100%;
    margin: 0;
  }
}

/* --- ≤768px --- */
@media (max-width: 768px) {
  .main-content {
    padding: calc(70px + var(--space-6)) var(--space-3) var(--space-6);
  }

  .section-header h1 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: var(--text-base);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    margin: calc(60px + var(--space-4) * 2) var(--space-4) 0;
    border-radius: 16px;
    height: clamp(240px, 55vw, 360px);
  }

  .home-feature {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  #home-featured-articles .news-card:not(:first-child) {
    display: none;
  }

  .news-mobile-footer {
    display: flex;
    justify-content: center;
    margin-top: var(--space-5);
  }

  .featured-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    padding-bottom: var(--space-2);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .featured-grid::-webkit-scrollbar {
    display: none;
  }

  .featured-grid .product-card {
    flex: 0 0 68vw;
    max-width: 260px;
    scroll-snap-align: start;
  }

  .article-layout {
    padding: 0 var(--space-1);
  }

  .about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: none;
  }
}

/* --- ≥769px (hide mobile-only element) --- */
@media (min-width: 769px) {
  .news-mobile-footer {
    display: none;
  }
}

/* --- ≤480px --- */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-cta-btn {
    width: 100%;
    max-width: 280px;
  }

  .featured-grid .product-card {
    flex: 0 0 78vw;
  }
}
