/* ==========================================================================
   HCETech — Design tokens
   ========================================================================== */
:root {
  --bg: #060a0d;
  --bg-alt: #090d12;
  --surface: #0e141b;
  --surface-2: #131a22;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eaf1f6;
  --text-muted: #97a5ae;
  --text-faint: #6b7680;

  --green: #34d67a;
  --green-soft: #22c55e;
  --teal: #2dd4bf;
  --cyan: #38bdf8;

  --gradient: linear-gradient(135deg, var(--green) 0%, var(--teal) 55%, var(--cyan) 100%);
  --gradient-text: linear-gradient(120deg, var(--green) 0%, var(--teal) 100%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(52, 214, 122, 0.15);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.55);

  --header-h: 84px;
  --container: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* subtle animated background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(680px 420px at 82% -6%, rgba(45, 212, 191, 0.14), transparent 60%),
    radial-gradient(600px 400px at -10% 30%, rgba(52, 214, 122, 0.10), transparent 60%),
    var(--bg);
  pointer-events: none;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin-top: 14px;
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--text-muted);
  margin-top: 14px;
  font-size: 16px;
}

section { position: relative; padding: 100px 0; }
section.tight { padding: 72px 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s var(--ease); width: 16px; height: 16px; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--gradient);
  color: #04140c;
  box-shadow: 0 8px 24px -8px rgba(52, 214, 122, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(52, 214, 122, 0.65); }

.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255,255,255,0.25); transform: translateY(-2px); }

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), height 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.site-header.scrolled {
  height: 68px;
  background: rgba(6, 10, 13, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 48px; width: auto; transition: height 0.35s var(--ease); }
.site-header.scrolled .brand img { height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.brand-text span { font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.02em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.02);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Out of flow by default; the mobile breakpoint below turns it into a real dropdown. */
.mobile-menu { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 90px;
  min-height: 92vh;
  display: flex;
  align-items: center;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.hero-copy p.lead {
  margin-top: 22px;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
}
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.hero-art .ring.r1 { inset: 6%; animation: spin 40s linear infinite; }
.hero-art .ring.r2 { inset: 20%; border-style: dashed; opacity: 0.5; animation: spin-rev 60s linear infinite; }
.hero-art img {
  width: 62%;
  filter: drop-shadow(0 0 46px rgba(45, 212, 191, 0.35));
  animation: float 6s ease-in-out infinite;
}
.hero-art .glow {
  position: absolute;
  inset: 18%;
  background: radial-gradient(circle, rgba(52, 214, 122, 0.25), transparent 70%);
  filter: blur(20px);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="fade"] { transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }

/* ==========================================================================
   Floating cards (generic)
   ========================================================================== */
.float-card {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
}
.float-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,0.6), 0 0 0 1px rgba(52,214,122,0.15);
}
.float-idle { animation: idle-float 5.5s ease-in-out infinite; }

@keyframes idle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.service-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.service-card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(52, 214, 122, 0.12);
  color: var(--green);
  margin-bottom: 18px;
}
.service-card .icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; }

/* ==========================================================================
   Portfolio
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.project-thumb {
  height: 168px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(45,212,191,0.22), transparent 60%),
    linear-gradient(135deg, #0c1520, #0a1118);
  border-bottom: 1px solid var(--border);
}
.project-thumb svg { width: 40%; opacity: 0.9; }
.project-thumb-icon img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6); }
.project-thumb-diagram img { width: 82%; opacity: 0.95; }
.project-body { padding: 22px; }
.project-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.project-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.project-body p { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green); font-weight: 600; font-size: 13.5px;
}
.project-link svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.project-link:hover svg { transform: translateX(3px); }

/* ==========================================================================
   About / Why choose us
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-copy .eyebrow { margin-bottom: 14px; }
.about-copy h2 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.about-copy > p { color: var(--text-muted); margin-bottom: 26px; }
.checklist { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.checklist li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.checklist .tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(52, 214, 122, 0.15);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.checklist .tick svg { width: 12px; height: 12px; }

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #0c131a, #090d12);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.code-window { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.code-window .bar {
  display: flex; gap: 6px;
  padding: 12px 14px;
  background: #0a0f14;
  border-bottom: 1px solid var(--border);
}
.code-window .bar span { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.code-window .bar span:nth-child(1) { background: #ff5f57; }
.code-window .bar span:nth-child(2) { background: #febc2e; }
.code-window .bar span:nth-child(3) { background: #28c840; }
.code-window pre {
  margin: 0;
  padding: 20px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  background: #080c10;
  overflow-x: auto;
}
.code-window .c-key { color: var(--teal); }
.code-window .c-str { color: var(--green); }
.code-window .c-com { color: var(--text-faint); }

.floating-chip {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,0.7);
  font-size: 13px;
  font-weight: 600;
}
.floating-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.chip-top { top: -18px; right: -16px; animation: idle-float 6s ease-in-out infinite; }
.chip-bottom { bottom: -18px; left: -16px; animation: idle-float 7s ease-in-out infinite 0.5s; }

/* ==========================================================================
   Stats + testimonial
   ========================================================================== */
.stats-testimonial {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.testimonial-card, .stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.testimonial-card .quote-mark { font-size: 46px; color: var(--green); line-height: 1; font-family: Georgia, serif; }
.testimonial-card p { font-size: 17px; margin: 12px 0 18px; }
.testimonial-card .author { color: var(--text-muted); font-size: 14px; }

.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stats-standalone { max-width: 720px; margin: 0 auto; padding: 40px 34px; }
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   CTA / Contact
   ========================================================================== */
.cta-band {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(52,214,122,0.08), rgba(45,212,191,0.06));
  padding: 56px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 26px; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  margin-top: 56px;
}
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.contact-info-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.contact-info-card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 24px; }
.contact-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.contact-row .icon-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 191, 0.1); color: var(--teal); flex-shrink: 0;
}
.contact-row .icon-badge svg { width: 18px; height: 18px; }
.contact-row strong { display: block; font-size: 14px; }
.contact-row span { color: var(--text-muted); font-size: 13.5px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 214, 122, 0.15);
}
.form-note { font-size: 13px; color: var(--text-faint); margin-top: 12px; text-align: center; }
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(52, 214, 122, 0.1);
  border: 1px solid rgba(52, 214, 122, 0.3);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
}
.form-success.show { display: flex; }
.form-success svg { width: 18px; height: 18px; flex-shrink: 0; }

.form-error {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
}
.form-error.show { display: flex; }
.form-error svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn[disabled] { opacity: 0.7; cursor: not-allowed; pointer-events: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 64px 0 28px; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.7fr 0.9fr;
  gap: 32px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 260px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; color: var(--text); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--green); }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.social-row a:hover { border-color: var(--green); background: rgba(52,214,122,0.08); transform: translateY(-2px); }
.social-row svg { width: 16px; height: 16px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #04140c;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -8px rgba(52,214,122,0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   Project detail pages
   ========================================================================== */
.project-detail-page {
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 90px;
}
.project-detail-page .content-wrap {
  max-width: 780px;
  margin: 0 auto;
}
.project-hero-thumb {
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(45,212,191,0.22), transparent 60%),
    linear-gradient(135deg, #0c1520, #0a1118);
  box-shadow: var(--shadow-card);
  margin-bottom: 36px;
}
.project-hero-thumb svg { width: 22%; opacity: 0.9; }
.project-hero-thumb-icon img { width: 168px; height: 168px; border-radius: 36px; box-shadow: 0 18px 44px -14px rgba(0,0,0,0.6); }
.project-hero-thumb-diagram img { width: 78%; opacity: 0.95; }
.project-detail-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 14px;
}
.project-detail-body { margin-top: 28px; }
.project-detail-body p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 18px;
}
.project-detail-body p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Legal / policy pages
   ========================================================================== */
.legal-page {
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 90px;
}
.legal-page .legal-header {
  max-width: 720px;
  margin: 0 auto 44px;
}
.legal-page .legal-header .eyebrow { margin-bottom: 14px; }
.legal-page .legal-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal-page .legal-header .updated {
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.legal-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.legal-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 10px;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 8px; }
.legal-card p + p { margin-top: 8px; }
.legal-back {
  max-width: 720px;
  margin: 0 auto 20px;
}
.legal-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.legal-back a:hover { color: var(--green); }
.legal-back svg { width: 15px; height: 15px; }

/* ==========================================================================
   Error page
   ========================================================================== */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.error-page h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.error-page p { color: var(--text-muted); max-width: 480px; }
.error-page .request-id { font-size: 13px; }
.error-page .btn { margin-top: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
  .hero-copy p.lead { max-width: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; max-width: 440px; margin: 0 auto; width: 100%; }
  .stats-testimonial { grid-template-columns: 1fr; }
  .stats-card { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 72px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }

  .mobile-menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(6,10,13,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    z-index: 99;
  }
  .mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .mobile-menu a { padding: 13px 4px; font-size: 15.5px; font-weight: 500; border-bottom: 1px solid var(--border); color: var(--text-muted); }
  .mobile-menu a:last-of-type { border-bottom: none; }
  .mobile-menu .btn { margin-top: 14px; }

  section { padding: 64px 0; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 36px); padding-bottom: 56px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { padding: 34px 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .stats-card { grid-template-columns: 1fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .float-idle, .hero-art img, .floating-chip, .hero-art .ring {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
