/* ══════════════════════════════════════════════════════════
   康泓中醫診所 — Hong Wang TCM Clinic
   Design: Editorial/Minimalist with TCM warmth
   Built with Jeff J Hunter Frontend Design methodology
   ══════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  /* Colors */
  --bg: #fafafa;
  --bg-surface: #ffffff;
  --bg-muted: #f3f2f0;
  --fg: #1a1a1a;
  --fg-muted: #5c5c5c;
  --fg-light: #8a8a8a;
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --accent-soft: rgba(45, 106, 79, 0.08);
  --accent-warm: #c45d3e;
  --border: #e5e2df;
  --border-light: #f0eeeb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Typography */
  --font-display: 'Playfair Display', 'Noto Serif TC', Georgia, serif;
  --font-body: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', monospace;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Container */
  --container-max: 1200px;
  --container-padding: clamp(1rem, 5vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

ul {
  list-style: none;
}

/* ── Focus ─────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

.container--narrow {
  max-width: 800px;
}

/* ── Section Spacing ───────────────────────────────────── */
section {
  padding: var(--space-2xl) 0;
}

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

.section--compact {
  padding: var(--space-xl) 0;
}

/* ── Section Headers ───────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--fg-muted);
  margin-top: var(--space-sm);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Navigation ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 72px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-brand .brand-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.55rem 1.35rem !important;
  border-radius: var(--radius-md);
  font-weight: 600 !important;
  transition: background 0.2s ease, transform 0.15s ease !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

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

.nav-cta::after {
  display: none !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.2s ease;
  border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(72px + var(--space-2xl)) var(--container-padding) var(--space-2xl);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.38);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.3) 0%,
    rgba(26, 26, 26, 0.5) 60%,
    rgba(26, 26, 26, 0.7) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: #fff;
}

.hero__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.hero__cta {
  display: inline-flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}

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

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn--outline-dark {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--border);
}

.btn--outline-dark:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

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

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: var(--space-lg);
}

.card__meta {
  font-size: 0.8rem;
  color: var(--fg-light);
  margin-bottom: var(--space-xs);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
  color: var(--fg);
}

.card__text {
  font-size: 0.925rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-md);
  transition: gap 0.2s ease;
}

.card__link:hover {
  gap: var(--space-sm);
}

/* ── Grid Layouts ──────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

/* ── Service Cards (with images) ───────────────────────── */
.service-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.service-card__body {
  padding: var(--space-lg);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  color: var(--accent);
  font-size: 1.1rem;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--fg);
}

.service-card__text {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Why Us / Values ───────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.value-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.value-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
}

.value-item__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.value-item__text {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Mission Block ─────────────────────────────────────── */
.mission-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.mission-block__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.mission-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mission-block__quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: var(--space-lg);
  border-left: 3px solid var(--accent);
}

.mission-block__text {
  color: var(--fg-muted);
  line-height: 1.8;
}

/* ── Team ──────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.team-card {
  text-align: center;
}

.team-card__image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 3px solid var(--border-light);
}

.team-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.team-card__role {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-sm);
}

.team-card__bio {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ── Blog Grid ─────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.blog-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.blog-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-card__body {
  padding: var(--space-lg);
}

.blog-card__date {
  font-size: 0.8rem;
  color: var(--fg-light);
  margin-bottom: var(--space-xs);
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  color: var(--fg);
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.blog-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-md);
}

/* Blog Post (Expanded) */
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}

.blog-post__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: var(--space-lg);
  cursor: pointer;
}

.blog-post__back:hover {
  color: var(--accent);
}

.blog-post__image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.blog-post__date {
  font-size: 0.85rem;
  color: var(--fg-light);
  margin-bottom: var(--space-sm);
}

.blog-post__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.blog-post__body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--fg-muted);
}

.blog-post__body p {
  margin-bottom: var(--space-md);
}

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.pagination__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination__btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Collaboration ─────────────────────────────────────── */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  align-items: center;
}

.collab-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0.55;
  filter: grayscale(100%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.collab-logo:hover {
  opacity: 0.85;
  filter: grayscale(0%);
}

.collab-logo svg {
  width: 100%;
  max-width: 140px;
  height: auto;
}

/* ── Contact Layout ────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info__item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.contact-info__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 1.1rem;
}

.contact-info__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-light);
  margin-bottom: var(--space-xs);
}

.contact-info__value {
  font-size: 0.95rem;
  color: var(--fg);
  line-height: 1.5;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-success {
  display: none;
  padding: var(--space-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  text-align: center;
  font-weight: 500;
  color: var(--accent);
}

.form-success.visible {
  display: block;
}

/* ── Opening Hours ─────────────────────────────────────── */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--border-light);
}

.hours-table tr:last-child {
  border-bottom: none;
}

.hours-table td {
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--fg);
}

.hours-table .closed {
  color: var(--accent-warm);
}

/* ── Map ───────────────────────────────────────────────── */
.map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--bg-muted);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--fg);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-about {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ── Page Header (inner pages) ─────────────────────────── */
.page-header {
  padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl);
  text-align: center;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-light);
}

.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--fg);
}

.page-header__subtitle {
  font-size: 1.05rem;
  color: var(--fg-muted);
  margin-top: var(--space-sm);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.1s; }
.reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal:nth-child(4) { animation-delay: 0.3s; }
.reveal:nth-child(5) { animation-delay: 0.4s; }
.reveal:nth-child(6) { animation-delay: 0.5s; }
.reveal:nth-child(7) { animation-delay: 0.6s; }
.reveal:nth-child(8) { animation-delay: 0.7s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered section reveal (on scroll via JS) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 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;
  }
}

/* ── Responsive: Tablet (≤1024px) ──────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .collab-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mission-block { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }

  section { padding: var(--space-xl) 0; }
}

/* ── Responsive: Mobile (≤768px) ───────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    padding: calc(72px + var(--space-lg)) var(--space-lg) var(--space-lg);
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    transition: right 0.35s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    margin-top: var(--space-sm);
  }

  .hero {
    min-height: 90vh;
    text-align: left;
  }

  .hero__cta {
    justify-content: flex-start;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .team-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .collab-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Responsive: Small Mobile (≤480px) ─────────────────── */
@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

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