/* ═══════════════════════════════════════════════════
   安心僱傭中心 — On Sam Domestic Helper Agency
   Design System | Navy · White · Coral · Gold
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --navy: #0a1628;
  --navy-light: #132440;
  --navy-mid: #1a3054;
  --white: #fafafa;
  --white-dim: #f0ece8;
  --coral: #e8734a;
  --coral-dark: #d15f36;
  --coral-soft: rgba(232, 115, 74, 0.10);
  --gold: #c9983e;
  --gold-soft: rgba(201, 152, 62, 0.12);
  --text: #0a1628;
  --text-muted: #5a6377;
  --text-light: #8b93a5;
  --border: #dce0e8;
  --border-light: #eaecf2;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
  --shadow: 0 4px 16px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 20px 60px rgba(10, 22, 40, 0.16);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 128px;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--coral-dark);
}

ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', 'Noto Serif TC', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
}

h4 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-label {
  display: inline-block;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--space-sm);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

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

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

section + section {
  padding-top: 0;
}

.section--alt {
  background: var(--white-dim);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3,
.section--navy .section-label {
  color: var(--white);
}

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

.site-header.scrolled {
  background: rgba(250, 250, 250, 0.98);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'DM Serif Display', 'Noto Serif TC', serif;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

.nav-links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

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

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

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--coral);
  color: var(--white) !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 0.875rem;
  transition: background var(--transition), transform var(--transition);
}

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

.nav-cta:hover {
  background: var(--coral-dark);
  color: var(--white) !important;
}

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

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1;
}

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

.btn--primary {
  background: var(--coral);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--coral-dark);
  box-shadow: var(--shadow);
}

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

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

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

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.82) 0%,
    rgba(10, 22, 40, 0.55) 50%,
    rgba(10, 22, 40, 0.45) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  color: var(--white);
  padding: var(--space-2xl) 0;
}

.hero__content h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.hero__content p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero__trust {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero__trust-item strong {
  display: block;
  font-size: 1.35rem;
  font-family: 'DM Serif Display', serif;
  color: var(--white);
  font-weight: 400;
}

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

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

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

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

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

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

.card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

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

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

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

.why-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.why-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: var(--coral-soft);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coral);
  font-size: 1.5rem;
}

.why-card h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.why-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Mission ── */
.mission__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

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

.mission__content h2 {
  margin-bottom: var(--space-md);
}

.mission__content p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.mission__content p:last-of-type {
  margin-bottom: var(--space-lg);
}

/* ── Services Preview ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.service-preview {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.service-preview__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  background: var(--coral-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.service-preview h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.service-preview p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Service Detail Cards (services.html) ── */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-lg) 0;
}

.service-detail:nth-child(even) .service-detail__image {
  order: 2;
}

.service-detail:nth-child(even) .service-detail__body {
  order: 1;
}

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

.service-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail__body h3 {
  margin-bottom: var(--space-sm);
}

.service-detail__body p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.service-detail__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.service-detail__feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--navy);
  background: var(--coral-soft);
  padding: 6px 14px;
  border-radius: 100px;
}

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

.partner-logo {
  opacity: 0.5;
  transition: opacity var(--transition);
}

.partner-logo:hover {
  opacity: 0.85;
}

.partner-logo svg {
  width: 100%;
  max-width: 120px;
  height: auto;
}

/* ── About Page ── */
.about-hero {
  background: var(--navy);
  color: var(--white);
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  text-align: center;
}

.about-hero h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.about-hero p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

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

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

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

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

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

.team-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.cert-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.cert-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.cert-card h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.cert-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.blog-card {
  cursor: pointer;
}

.blog-card__image {
  aspect-ratio: 16 / 10;
}

.blog-card__meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

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

/* Blog Post Expansion */
.blog-post-expanded {
  display: none;
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border-light);
  animation: fadeUp 0.4s ease;
}

.blog-post-expanded.active {
  display: block;
}

.blog-post-expanded__content {
  max-width: 720px;
  margin: 0 auto;
}

.blog-post-expanded__content h2 {
  margin-bottom: var(--space-md);
}

.blog-post-expanded__content p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.85;
}

.blog-post-expanded__content blockquote {
  border-left: 3px solid var(--coral);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-style: italic;
}

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

.pagination button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.pagination button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.pagination button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Contact Page ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

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

.form-submit-success {
  display: none;
  text-align: center;
  padding: var(--space-xl);
}

.form-submit-success.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.form-submit-success__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.form-submit-success h3 {
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

.form-submit-success p {
  color: var(--text-muted);
}

/* Contact Info Sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-info__card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.contact-info__card h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.contact-info__card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-info__card a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.95rem;
  color: var(--text);
  transition: color var(--transition);
}

.contact-info__card a:hover {
  color: var(--coral);
}

.contact-info__card .icon {
  width: 20px;
  text-align: center;
  color: var(--coral);
  flex-shrink: 0;
}

/* Map */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  aspect-ratio: 16 / 9;
}

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

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.65);
  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 p {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--coral);
}

.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.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.55);
}

/* ── Inline Contact Form (index.html) ── */
.contact-embed {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--border-light);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 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; }

/* Hero staggered reveal */
.hero__content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero__content > *:nth-child(1) { animation-delay: 0.2s; }
.hero__content > *:nth-child(2) { animation-delay: 0.35s; }
.hero__content > *:nth-child(3) { animation-delay: 0.5s; }
.hero__content > *:nth-child(4) { animation-delay: 0.65s; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--coral);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4,
  .why-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
    --space-2xl: 64px;
    --space-xl: 48px;
  }

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

  .grid-3,
  .grid-2,
  .contact-layout,
  .service-detail,
  .team-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .why-grid,
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .hero__content {
    text-align: center;
  }

  .hero__content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__trust {
    justify-content: center;
    flex-wrap: wrap;
  }

  .mission__image {
    order: -1;
  }

  .service-detail:nth-child(even) .service-detail__image {
    order: -1;
  }

  .service-detail:nth-child(even) .service-detail__body {
    order: 1;
  }

  /* Mobile nav */
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-slow);
    z-index: 100;
    align-items: flex-start;
    gap: var(--space-md);
  }

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

  .nav-links a {
    font-size: 1.05rem;
  }

  .nav-cta {
    margin-top: var(--space-sm);
    width: 100%;
    justify-content: center;
  }

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

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .grid-4,
  .why-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
  }

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

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

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