/* ========================================
   YOYAGE Base Styles
   Purpose: CSS variables, reset, typography,
            buttons, containers, shared utilities
   Rules: All colors, radii, spacing, and
          font sizes must use CSS variables.
          No hard-coded values allowed.
   ======================================== */

/* ---------- 1. CSS Variables ---------- */
:root {
  /* Brand colors */
  --color-brand: #00647C;
  --color-brand-dark: #00495A;
  --color-title: #10182D;
  --color-text: #3D4A5C;
  --color-text-muted: #3D4A5C;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F4F6F8;
  --color-tag-bg: #EDF2F6;
  --color-border: #DEE5EB;
  --color-white: #FFFFFF;

  /* Exhibition identity (VALVE WORLD EXPO, sampled from valveworldexpo.com) */
  --color-expo-red: #ED1C24;
  --color-expo-red-dark: #C61017;
  --color-expo-gold: #8A6B32;

  /* Footer-specific colors */
  --color-footer-bg: #10182D;
  --color-footer-text: #A8B4C4;
  --color-footer-link: #C9D2DC;
  --color-footer-border: rgba(255, 255, 255, 0.1);
  --color-footer-accent: #00647C;

  /* Font sizes (desktop) */
  --fs-h1: 50px;
  --fs-h2: 36px;
  --fs-h3: 20px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-eyebrow: 13px;
  --fs-tag: 13px;

  /* Radii */
  --radius-card: 14px;
  --radius-button: 8px;
  --radius-tag: 6px;

  /* Transitions */
  --transition-fast: 0.2s ease;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(0, 100, 124, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 100, 124, 0.1);
  --shadow-lg: 0 12px 32px rgba(0, 100, 124, 0.12);
  --shadow-menu: 0 12px 40px rgba(0, 0, 0, 0.1);

  /* Overlay gradients */
  --overlay-hero: linear-gradient(90deg, rgba(10, 20, 40, 0.55) 0%, rgba(10, 20, 40, 0.25) 55%, rgba(10, 20, 40, 0.05) 100%);
  --overlay-card: linear-gradient(to top, rgba(0, 73, 90, 0.82) 0%, rgba(0, 73, 90, 0.35) 60%, rgba(0, 73, 90, 0.08) 100%);
  --overlay-wide: linear-gradient(90deg, rgba(0, 73, 90, 0.82) 0%, rgba(0, 73, 90, 0.35) 55%, rgba(0, 73, 90, 0.08) 100%);
  --overlay-process: linear-gradient(0deg, rgba(10, 20, 40, 0.7) 0%, rgba(10, 20, 40, 0.2) 100%);

  /* Layout */
  --container-max: 1400px;
  --container-padding: 24px;
  --section-gap: 96px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-title);
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--fs-h2);
  color: var(--color-title);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  max-width: 720px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 4. Container & Sections ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: calc(var(--section-gap) / 2);
  padding-bottom: calc(var(--section-gap) / 2);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: var(--fs-body);
  font-weight: 600;
  border-radius: var(--radius-button);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  line-height: 1.4;
}

.btn--lg {
  padding: 14px 28px;
}

.btn-primary {
  background-color: var(--color-brand);
  color: var(--color-white);
  border: 2px solid var(--color-brand);
}

/* Hover 保持与另一按钮的默认态可区分：
   primary 加深为 brand-dark（不反白，避免与 secondary 默认态相同） */
.btn-primary:hover {
  background-color: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: var(--color-white);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-brand);
  border: 2px solid var(--color-brand);
}

/* secondary hover 用浅品牌底色（不填满品牌色，避免与 primary 默认态相同） */
.btn-secondary:hover {
  background-color: rgba(0, 100, 124, 0.08);
  color: var(--color-brand);
}

/* ---------- 6. Shared Utilities ---------- */

/* Generic bordered card; module classes add layout/padding */
.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--color-brand);
}

/* Equal-width button group */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions-grid .btn {
  width: 100%;
}

/* Absolutely positioned cover image inside a relative parent */
.img-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ---------- 7. Responsive (variables & utilities) ---------- */
@media (max-width: 991px) {
  :root {
    --fs-h1: 38px;
    --fs-h2: 30px;
    --section-gap: 72px;
  }
}

@media (max-width: 767px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 26px;
    --section-gap: 48px;
    --container-padding: 20px;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-title {
    margin-bottom: 8px;
  }

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