/* ============================================
   ACCD - Concept D "Kinetic"
   Dark editorial + electric coral, motion-first
   ============================================ */

:root {
  --ink: #111015;
  --ink-2: #17161c;
  --cream: #EFE9DF;
  --cream-dim: #b9b3a8;
  --coral: #FF5C43;
  --line: rgba(239,233,223,0.14);
  --display: "Clash Display", "General Sans", sans-serif;
  --body: "General Sans", -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; background: var(--ink); }
html.has-lenis { scroll-behavior: auto; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: default;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.accent-text { color: var(--coral); font-style: normal; }
em { font-style: normal; color: var(--coral); }

/* film grain texture */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* progress rail */
.progress-rail {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 999;
  background: rgba(239,233,223,0.08);
}
.progress-fill {
  height: 100%; width: 0%; background: var(--coral);
  transition: width 0.1s linear;
}

/* custom cursor (desktop only) */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998;
  border-radius: 50%; transform: translate(-50%, -50%);
  display: none;
}
.cursor-dot { width: 6px; height: 6px; background: var(--coral); }
.cursor-ring {
  width: 40px; height: 40px; border: 1px solid rgba(255,92,67,0.5);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.cursor-ring.is-link { width: 64px; height: 64px; background: rgba(255,92,67,0.08); }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
}

/* ===== NAV ===== */
.site-nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.site-nav.is-scrolled {
  background: rgba(17,16,21,0.85);
  backdrop-filter: blur(10px);
  padding: 14px 40px;
  border-bottom: 1px solid var(--line);
}
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; letter-spacing: 0.02em; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--coral); transition: width 0.3s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--coral); color: var(--ink); padding: 10px 20px;
  border-radius: 100px; font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-cta:hover { transform: scale(1.05); background: #ff7259; }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer; z-index: 501;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--cream);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 480; background: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 20px; padding: 40px;
  transform: translateY(-100%); transition: transform 0.4s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a { font-family: var(--display); font-size: 32px; font-weight: 500; }
.mobile-menu .mm-cta {
  margin-top: 16px; background: var(--coral); color: var(--ink);
  padding: 14px 28px; border-radius: 100px; font-size: 18px;
}

/* ===== EYEBROW ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-dim); font-weight: 500; margin-bottom: 20px;
}
.eyebrow-light { color: rgba(239,233,223,0.7); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); display: inline-block; }

.section-title {
  font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.02; letter-spacing: -0.02em; color: var(--cream);
}

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden; padding: 120px 40px 60px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,16,21,0.55) 0%, rgba(17,16,21,0.35) 35%, rgba(17,16,21,0.92) 100%);
}
.hero-grid { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; width: 100%; }
.hero-eyebrow-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-dim);
  margin-bottom: 24px;
}
.hero-scroll-cue { display: flex; align-items: center; gap: 8px; }
.hero-scroll-cue i {
  display: inline-block; width: 1px; height: 24px; background: var(--coral);
  animation: scrollpulse 1.8s ease-in-out infinite;
}
@keyframes scrollpulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

.hero-headline {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(38px, 7vw, 96px); line-height: 0.98; letter-spacing: -0.03em;
  color: var(--cream); margin-bottom: 32px;
}
.hero-headline .mask { display: block; overflow: hidden; }
.hero-headline .line { display: block; transform: translateY(110%); }

.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
  flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px;
}
.hero-subhead { max-width: 440px; font-size: 17px; color: var(--cream-dim); line-height: 1.55; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-num {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: clamp(120px, 18vw, 280px); font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(239,233,223,0.14);
  z-index: 1; pointer-events: none; line-height: 1;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px; border-radius: 100px; font-size: 15px; font-weight: 500;
  letter-spacing: 0.01em; transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { transform: scale(1.05); background: #ff7259; }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); transform: scale(1.05); }
.btn-outline { border: 1px solid var(--coral); color: var(--coral); }
.btn-outline:hover { background: var(--coral); color: var(--ink); }
.btn-lg { padding: 19px 38px; font-size: 17px; }

/* ===== MICRO MARQUEE (divider) ===== */
.micro-marquee {
  overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; background: var(--ink-2);
}
.micro-track {
  display: inline-flex; gap: 20px; animation: microscroll 26s linear infinite;
  font-family: var(--display); font-size: 15px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.micro-track span:nth-child(odd) { color: var(--coral); }
@keyframes microscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== STICKY STACK (before/after) ===== */
.stack-section { position: relative; padding: 140px 40px 40px; }
.stack-intro { max-width: 1280px; margin: 0 auto 60px; }
.section-note { color: var(--cream-dim); font-size: 16px; margin-top: 16px; max-width: 420px; }

.stack-track { position: relative; max-width: 900px; margin: 0 auto; }
.stack-card {
  position: sticky; top: 100px; height: 78vh; max-height: 640px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.stack-card-inner {
  position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.stack-media { position: relative; width: 100%; height: 100%; }
.stack-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.img-before { opacity: 1; }
.img-after { opacity: 0; }
.stack-label {
  position: absolute; left: 20px; bottom: 20px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.stack-tag {
  font-family: var(--display); font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 8px 16px; border-radius: 100px;
  background: rgba(17,16,21,0.7); backdrop-filter: blur(6px); color: var(--cream-dim);
  border: 1px solid var(--line);
}
.stack-tag-after { background: var(--coral); color: var(--ink); border-color: var(--coral); opacity: 0.35; }
.stack-case {
  margin-left: auto; font-family: var(--display); font-size: 13px; color: var(--cream-dim);
  background: rgba(17,16,21,0.7); padding: 8px 16px; border-radius: 100px; backdrop-filter: blur(6px);
}
.stack-cta-row { max-width: 1280px; margin: 60px auto 0; text-align: center; }

/* ===== BENTO ===== */
.bento-section { padding: 140px 40px; max-width: 1280px; margin: 0 auto; }
.bento-intro { margin-bottom: 48px; }
.bento-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; grid-auto-rows: 160px;
}
.bento-tile {
  position: relative; background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px; overflow: hidden; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.bento-tile:hover { border-color: rgba(255,92,67,0.4); transform: translateY(-4px); }
.bento-tile h3 { font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 10px; position: relative; z-index: 2; }
.bento-tile p { color: var(--cream-dim); font-size: 15px; line-height: 1.5; position: relative; z-index: 2; max-width: 90%; }
.bento-num {
  position: absolute; top: 18px; right: 22px; font-family: var(--display); font-size: 13px;
  color: var(--coral); font-weight: 600;
}
.bento-tile-lg { grid-column: span 3; grid-row: span 2; }
.bento-tile-tall { grid-column: span 2; grid-row: span 3; }
.bento-tile:not(.bento-tile-lg):not(.bento-tile-tall):not(.bento-tile-awards):not(.bento-tile-team) { grid-column: span 1; grid-row: span 2; }
.bento-tile-awards { grid-column: span 3; grid-row: span 2; }
.bento-tile-team { grid-column: span 3; grid-row: span 2; }

.bento-portrait {
  position: absolute; right: -20px; bottom: -20px; width: 55%; height: 70%;
  object-fit: cover; border-radius: 16px 0 0 0; opacity: 0.9;
  mask-image: linear-gradient(to left, black 60%, transparent 100%);
}
.bento-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.28; z-index: 1;
}
.bento-tile-tall h3, .bento-tile-tall p { position: relative; z-index: 2; }
.bento-tile-tall::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,16,21,0.4) 0%, rgba(17,16,21,0.92) 75%); z-index: 1;
}
.bento-tile-tall h3, .bento-tile-tall p { z-index: 2; }
.bento-tile-team::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(17,16,21,0.9) 0%, rgba(17,16,21,0.15) 60%); z-index: 1;
}
.bento-tile-team h3 { position: absolute; left: 32px; bottom: 24px; z-index: 2; margin: 0; max-width: 70%; }
.award-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 12px 0; position: relative; z-index: 2; }
.award-row img { height: 34px; width: auto; filter: brightness(0) invert(1) opacity(0.85); }

/* ===== HORIZONTAL SCROLL SERVICES ===== */
.hscroll-section { position: relative; height: 420vh; }
.hscroll-pin {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  justify-content: center; overflow: hidden; padding: 0 40px;
}
.hscroll-intro { max-width: 1280px; margin: 0 auto 40px; width: 100%; }
.hscroll-track { display: flex; gap: 28px; width: max-content; padding-left: calc(50vw - 620px); }
.hscroll-panel {
  width: min(78vw, 620px); min-height: 380px; flex-shrink: 0;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px;
  padding: 48px; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden;
}
.hscroll-panel-lead { background: linear-gradient(150deg, #201c22, var(--ink-2)); border-color: rgba(255,92,67,0.35); }
.hscroll-panel-supporting { opacity: 0.85; }
.hscroll-num {
  position: absolute; top: 32px; right: 40px; font-family: var(--display); font-size: 15px; color: var(--coral); font-weight: 600;
}
.hscroll-panel h3 { font-family: var(--display); font-size: 32px; font-weight: 600; margin-bottom: 14px; }
.hscroll-panel p { color: var(--cream-dim); font-size: 16px; line-height: 1.6; max-width: 90%; }

/* ===== SMILE SIMULATOR ===== */
.sim-section {
  position: relative; padding: 160px 40px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at center, #1c1720 0%, var(--ink) 65%);
}
.sim-inner { max-width: 680px; margin: 0 auto; }
.sim-title {
  font-family: var(--display); font-weight: 600; font-size: clamp(38px, 7vw, 76px); line-height: 1.0;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.sim-body { color: var(--cream-dim); font-size: 18px; margin-bottom: 36px; }
.sim-disclaimer { color: rgba(239,233,223,0.45); font-size: 13px; margin-top: 20px; max-width: 480px; margin-left: auto; margin-right: auto; }
.sim-num {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--display); font-size: clamp(200px, 35vw, 420px); font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(255,92,67,0.08); z-index: 0; pointer-events: none;
}

/* ===== SOCIAL PROOF ===== */
.proof-section { padding: 140px 0 100px; }
.proof-intro { max-width: 1280px; margin: 0 auto 40px; padding: 0 40px; }
.proof-stats {
  max-width: 1280px; margin: 0 auto 60px; padding: 0 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.proof-stat { border-top: 1px solid var(--line); padding-top: 20px; }
.proof-n { display: block; font-family: var(--display); font-size: clamp(28px, 3vw, 42px); font-weight: 600; color: var(--coral); margin-bottom: 8px; }
.proof-l { color: var(--cream-dim); font-size: 14px; line-height: 1.4; }

.marquee-wrap { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.marquee-track {
  display: inline-flex; gap: 60px; animation: marqueescroll 42s linear infinite;
  font-family: var(--display); font-size: clamp(20px, 2.6vw, 32px); font-weight: 500;
}
.marquee-track span:nth-child(4n+2) { color: var(--coral); }
@keyframes marqueescroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== CTA ===== */
.cta-section {
  position: relative; min-height: 90vh; display: flex; align-items: flex-end;
  padding: 100px 40px 80px; overflow: hidden;
}
.cta-media { position: absolute; inset: 0; z-index: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.cta-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,16,21,0.5) 0%, rgba(17,16,21,0.55) 30%, rgba(17,16,21,0.96) 90%);
}
.cta-content { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; text-align: left; }
.cta-title {
  font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 24px;
}
.cta-title .mask { display: block; overflow: hidden; }
.cta-title .line { display: block; transform: translateY(110%); }
.cta-body { color: var(--cream-dim); font-size: 17px; line-height: 1.6; max-width: 520px; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-num {
  position: absolute; right: 40px; top: 40px; z-index: 2;
  font-family: var(--display); font-size: 15px; color: rgba(239,233,223,0.5);
}

/* ===== FOOTER ===== */
.site-footer { padding: 70px 40px 30px; border-top: 1px solid var(--line); }
.footer-top {
  max-width: 1280px; margin: 0 auto 40px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer-logo { height: 28px; width: auto; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--cream-dim); }
.footer-links a:hover { color: var(--coral); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; color: rgba(239,233,223,0.4); font-size: 13px; line-height: 1.7;
}

/* ===================================================
   MOBILE / TABLET DEGRADATION (Rule 13, ≤760px hard rule)
   =================================================== */
@media (max-width: 760px) {
  .site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-logo img { height: 24px; }

  .hero { padding: 100px 20px 40px; }
  .hero-headline { font-size: clamp(30px, 10vw, 48px); }
  .hero-num { display: none; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1; }

  .micro-track { font-size: 13px; animation-duration: 18s; }

  .stack-section { padding: 80px 20px 20px; }
  .stack-card { height: 60vh; top: 80px; }
  .stack-card-inner { border-radius: 16px; }
  .stack-tag, .stack-case { font-size: 11px; padding: 6px 12px; }

  .bento-section { padding: 80px 20px; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-tile, .bento-tile-lg, .bento-tile-tall, .bento-tile-awards, .bento-tile-team {
    grid-column: span 1; min-height: 220px; padding: 24px;
  }
  .bento-portrait { width: 45%; height: 55%; }
  .award-row img { height: 26px; }

  /* horizontal-scroll degrades to a vertical stack, no pin/scrub, no parallax */
  .hscroll-section { height: auto; }
  .hscroll-pin { position: static; height: auto; padding: 80px 20px; overflow: visible; }
  .hscroll-track { flex-direction: column; width: 100%; padding-left: 0; gap: 16px; transform: none !important; }
  .hscroll-panel { width: 100%; min-height: 260px; padding: 28px; }

  .sim-section { padding: 90px 20px; }
  .sim-num { display: none; }

  .proof-section { padding: 80px 0 60px; }
  .proof-stats { grid-template-columns: 1fr 1fr; padding: 0 20px; gap: 16px; }
  .marquee-track { font-size: 18px; gap: 32px; animation-duration: 28s; }

  .cta-section { min-height: auto; padding: 80px 20px 60px; }
  .cta-title { font-size: clamp(28px, 8vw, 40px); }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .cta-num { display: none; }

  .site-footer { padding: 50px 20px 24px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* reduced motion: degrade to simple fades, no transforms/parallax */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
  .hero-headline .line, .cta-title .line { transform: none !important; }
  .micro-track, .marquee-track { animation: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
