/* ================================================================
   炼丹科技官网  ·  cream paper · brand blue accent
   ================================================================ */

:root {
  /* white + blue tonal system */
  --paper:       #ffffff;
  --paper-soft:  #f3f6fc;       /* very light blue tint */
  --paper-line:  #e1e7f0;
  --paper-line-strong: #c5cfdc;

  /* ink scale — slight blue lean */
  --ink:         #0f1a30;
  --ink-soft:    #2e3a52;
  --ink-mute:    #5d6878;
  --ink-faint:   #8e96a3;

  /* brand */
  --brand:       #1c3c8c;       /* navy from cauldron logo */
  --brand-deep:  #14306e;
  --brand-soft:  #e4ebf7;
  --brand-bright:#3361d6;

  /* dark zones (hero / footer) */
  --bg-dark:     #0a1430;       /* deep navy instead of pure black */
  --bg-dark-2:   #14213f;
  --ink-on-dark: #ffffff;
  --line-on-dark:rgba(255,255,255,0.12);

  --max:         1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ================================================================
   HEADER — auto-adapts dark/light via .scrolled
   ================================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 44px);
  color: #fff;
  transition: background .35s ease, backdrop-filter .35s ease,
              color .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom-color: var(--paper-line);
  color: var(--ink);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 46px;
}
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  transition: opacity .35s ease;
}
.brand-logo-color { opacity: 0; }
.brand-logo-white {
  position: absolute;
  left: 0;
  top: 50%;
  height: 30px;
  transform: translateY(-50%);
  opacity: 1;
}
.site-header.scrolled .brand-logo-color { opacity: 1; }
.site-header.scrolled .brand-logo-white { opacity: 0; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  color: inherit;
  opacity: 0.7;
  transition: opacity .2s ease, color .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  opacity: 1;
}
.site-nav a .num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.6;
}
.site-nav a .label {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s cubic-bezier(.65,.05,.36,1);
}
.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-header.scrolled .site-nav a.is-active { color: var(--brand); }

/* keep .nav-feature class but no special chip style anymore */
.site-nav .nav-feature { font-weight: 500; }
.site-nav .nav-feature .num { opacity: 0.6; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform .2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ================================================================
   HERO — only dark area in the whole site
   ================================================================ */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media .hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(0.95);
}
.hero-media .hero-video {
  opacity: 0;
  background: #000;
  transition: opacity 1.2s ease;
}
.hero-media .hero-video.is-active { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.7) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 30%, rgba(0,0,0,0.55) 100%);
}
.hero::after { display: none; }

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-bottom: 40px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  letter-spacing: 0.28em;
  font-weight: 500;
  text-transform: uppercase;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 12px; }
.hero-meta-item i {
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
}

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
}
.hero-title .line {
  display: inline-block;
  cursor: default;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), letter-spacing .5s ease;
  transform-origin: center;
}
.hero-title .line:hover {
  transform: scale(1.04);
  letter-spacing: 0.05em;
}

.hero-tagline {
  margin: 0 0 56px;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.85);
}

.hero-sub {
  margin: 0 auto 40px;
  color: rgba(255,255,255,0.85);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
}
.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 19px 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .2s ease, color .2s ease,
              border-color .2s ease, transform .2s ease;
  white-space: nowrap;
}
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.06);
}
.btn-block { width: 100%; justify-content: space-between; padding: 18px 26px; }

.hero-scroll {
  display: none;
}

/* ================================================================
   MARQUEE — hidden under hero on load; rises in on scroll
   ================================================================ */
.marquee {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: none;
  padding: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1),
              transform .9s cubic-bezier(.2,.7,.2,1);
}
.marquee.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.marquee::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--paper-line), transparent);
  pointer-events: none;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 36px 0 32px;
  white-space: nowrap;
  animation: marqueeMove 40s linear infinite;
  position: relative;
  z-index: 1;
}
.marquee-track span {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.marquee-track i {
  font-style: normal;
  color: var(--brand);
  font-size: 16px;
}
@keyframes marqueeMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ================================================================
   STATS — paper tone
   ================================================================ */
.stats {
  background: var(--paper);
  padding: clamp(72px, 9vw, 130px) 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1) .15s,
              transform .9s cubic-bezier(.2,.7,.2,1) .15s;
}
.stats.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.stat {
  padding: 8px 32px 8px 32px;
  border-left: 1px solid var(--paper-line);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat-num {
  display: flex;
  align-items: baseline;
  font-size: clamp(56px, 8.5vw, 120px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.stat-num em {
  font-style: normal;
  font-size: 0.4em;
  font-weight: 600;
  margin-left: 6px;
  color: var(--brand);
}
.stat-label {
  margin-top: 22px;
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

/* ================================================================
   SECTION SHELL — unified paper tone
   ================================================================ */
.section { padding: clamp(96px, 12vw, 160px) 0; }

.works    { background: var(--paper); }
.services { background: var(--paper-soft); }
.team     { background: var(--paper); }
.contact  { background: var(--paper-soft); }
.stats    { background: var(--paper); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: clamp(56px, 6vw, 88px);
  max-width: 100%;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  text-transform: uppercase;
}
.section-label i {
  width: 28px; height: 1px;
  background: var(--brand);
  display: inline-block;
}
.section-title {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 1100px;
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 36px);
  flex-wrap: wrap;
}
.section-title .title-sub {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  line-height: 1.6;
  max-width: 540px;
}
.section-desc {
  margin: 0;
  color: var(--ink-mute);
  font-size: 16px;
  line-height: 1.75;
  max-width: 760px;
}

/* ================================================================
   WORKS
   ================================================================ */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--paper-line);
}
.chip {
  padding: 10px 20px;
  border: 1px solid var(--paper-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 36px 24px;
}
.work {
  position: relative;
  grid-column: span 2;
  cursor: pointer;
  background: transparent;
  transition: transform .3s ease;
}
.work.is-hidden { display: none; }

.work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-soft);
  border-radius: 4px;
}
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.work:hover .work-media img { transform: scale(1.04); }

/* play overlay */
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}
.work:hover .work-media::after { opacity: 1; }

.work-info {
  padding: 20px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.work-spec {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.work-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand);
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--brand-soft);
  border-radius: 3px;
}
.work-info h3 {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.work-info p {
  margin: 0;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.65;
  max-width: 620px;
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.work-cta em {
  font-style: normal;
  transition: transform .25s ease;
}
.work:hover .work-cta em { transform: translateX(6px); }

/* ================================================================
   CAPABILITY LIST
   ================================================================ */
.capability-list {
  border-top: 1px solid var(--paper-line);
}
.cap-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1.1fr) minmax(0, 1.5fr);
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
  padding: clamp(30px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--paper-line);
  transition: padding .3s ease, background .3s ease;
}
.cap-row:hover {
  background: rgba(28, 60, 140, 0.04);
  padding-left: 16px;
  padding-right: 16px;
}
.cap-no {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cap-title h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.cap-tag {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.cap-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

/* ================================================================
   TEAM
   ================================================================ */
.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.founder { position: sticky; top: 110px; }
.founder-media {
  overflow: hidden;
  background: var(--paper-soft);
  border-radius: 4px;
}
.founder-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.founder-info {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--paper-line);
  display: grid;
  gap: 6px;
}
.founder-eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.founder-info h3 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.founder-info p {
  margin: 0;
  color: var(--ink-mute);
  font-size: 14px;
}

.team-copy p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
  max-width: 640px;
}
.team-copy .team-lead {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--paper-line);
  list-style: none;
}
.chips li {
  padding: 9px 14px;
  background: var(--paper-soft);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.team .chips li { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-deep); }

/* ================================================================
   CONTACT
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
}

.contact-card {
  padding: 40px clamp(28px, 3vw, 44px);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
.contact-card.alt {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.contact-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-line);
}
.contact-card.alt .contact-card-head {
  border-bottom-color: var(--line-on-dark);
}
.ckh-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact-card.alt .ckh-label { color: rgba(255,255,255,0.65); }

.contact-big {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px dashed var(--paper-line);
  transition: padding-left .25s ease;
}
.contact-big:last-child { border-bottom: none; }
.contact-big:hover { padding-left: 8px; }
.cb-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cb-value {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color .2s ease;
}
.contact-big:hover .cb-value { color: var(--brand); }

.contact-card.alt dl {
  margin: 0;
  display: grid;
  gap: 22px;
  flex: 1;
}
.contact-card.alt dl div { display: grid; gap: 4px; }

.contact-card.alt dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.contact-card.alt dd {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.55;
}
.contact-card.alt .btn {
  margin-top: 32px;
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
}
.contact-card.alt .btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  padding: 80px 0 32px;
  background: var(--bg-dark);
  color: rgba(255,255,255,0.65);
  border-top: 1px solid var(--paper-line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-dark);
}
.foot-brand img {
  height: 30px;
  width: auto;
  margin-bottom: 22px;
}
.foot-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.foot-cols h4 {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
}
.foot-cols a, .foot-cols span {
  display: block;
  font-size: 13px;
  padding: 4px 0;
  color: rgba(255,255,255,0.65);
  transition: color .2s ease;
}
.foot-cols a:hover { color: #fff; }
.foot-cols span { line-height: 1.6; }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}
.footer-base a {
  color: inherit;
  transition: color .2s ease;
}
.footer-base a:hover { color: #fff; }
.footer-sep {
  display: inline-block;
  margin: 0 8px;
  opacity: .55;
}

/* ================================================================
   VIDEO MODAL
   ================================================================ */
.video-modal[hidden] { display: none; }
.video-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
}
.video-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(8px);
}
.video-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: clamp(28px, 4vw, 40px);
  background: var(--paper);
  border-radius: 6px;
  color: var(--ink);
}
.video-dialog h2 {
  margin: 0 48px 22px 0;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
}
.video-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border: 1px solid var(--paper-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.video-close:hover { background: var(--paper-soft); }
.video-stage {
  overflow: hidden;
  background: var(--paper-soft);
  border-radius: 4px;
}
.video-stage video,
.video-stage iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}
.video-stage p {
  margin: 0;
  padding: 32px;
  color: var(--ink-mute);
  font-size: 14px;
}
.video-stage code {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  padding: 2px 6px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .cap-row { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.3fr); }
  .work { grid-column: span 3; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--paper-line); margin-top: 28px; padding-top: 36px; }
}

@media (max-width: 860px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }
  .site-header { padding: 14px 18px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 80vw);
    height: 100vh;
    padding: 90px 32px 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--paper);
    color: var(--ink);
    border-left: 1px solid var(--paper-line);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.6,.2,.2,1);
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid var(--paper-line);
    font-size: 18px;
    opacity: 1;
  }
  .site-nav a::after { display: none; }
  .site-nav a.is-active { color: var(--brand); }
  .site-nav .nav-feature { font-weight: 500; color: inherit; }

  .hero-stage { padding: 110px 0 80px; }
  .hero-title { font-size: clamp(72px, 22vw, 140px); }
  .hero-sub { white-space: normal; max-width: 480px; }
  .hero-actions { width: 100%; justify-content: center; }
  .hero-scroll { display: none; }

  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 56px; }

  .section-head { gap: 16px; }
  .section-title { font-size: clamp(34px, 8vw, 48px); }

  .work-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .work { grid-column: span 1; }
  .work.feat { grid-column: span 2; }

  .cap-row {
    grid-template-columns: auto 1fr;
    grid-template-areas: "no title" "desc desc";
    gap: 12px 18px;
    padding: 28px 0;
  }
  .cap-no { grid-area: no; }
  .cap-title { grid-area: title; }
  .cap-row p { grid-area: desc; }
  .cap-row:hover { padding-left: 0; padding-right: 0; }

  .team-grid { grid-template-columns: 1fr; }
  .founder { position: static; }
  .founder-media img { aspect-ratio: 3 / 4; }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-base { flex-direction: column; gap: 6px; }
}

@media (max-width: 520px) {
  .hero-title { font-size: clamp(56px, 19vw, 84px); }
  .hero-tagline { font-size: 14px; letter-spacing: 0.4em; }
  .work-grid { grid-template-columns: 1fr; }
  .work, .work.feat { grid-column: span 1; }
  .stat { padding-right: 12px; padding-left: 16px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--paper-line); }
  .contact-big { grid-template-columns: 1fr; gap: 6px; }
  .foot-cols { grid-template-columns: 1fr; }
}
