:root {
  --bg: #0C0C0E;
  --surface: #161618;
  --surface2: #1C1C1F;
  --text: #EDEDEA;
  --muted: #85868C;
  --subhead: #C9CAC6;
  --accent: #FF4D00;
  --accent-soft: #FF6B33;
  --accent-text: #FF6B33;
  --border: #26262A;
  --card-border: #26262A;
  --card-shadow: none;
  --card-hover-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  --tool-opacity: 0.6;
}

:root[data-theme="light"] {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface2: #F0EFEB;
  --text: #141416;
  --muted: #6B6C72;
  --subhead: #3E3F45;
  --accent-text: #C63A00;
  --border: #E4E3DD;
  --card-border: #E2E0DA;
  --card-shadow: 0 2px 16px rgba(20, 20, 22, 0.06);
  --card-hover-shadow: 0 12px 32px rgba(20, 20, 22, 0.10);
  --tool-opacity: 0.88;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-text); }
h1, h2, h3, p, form, fieldset { margin: 0; padding: 0; border: 0; }
button { font: inherit; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, .faq-q:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: rgba(255, 107, 51, 0.28); }

.dotgrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
}
.glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 0, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
  display: none;
  will-change: transform;
  transition: width .45s ease, height .45s ease, background .45s ease;
}

.page { position: relative; z-index: 1; min-height: 100vh; overflow-x: hidden; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 48px);
}
.container-narrow { max-width: 900px; }
.container-tight { max-width: 760px; }

.section { padding: clamp(56px, 8vw, 88px) 0; }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transform: translateY(0);
  transition: transform .2s ease-out, background .2s ease-out, border-color .2s ease-out, backdrop-filter .2s ease-out;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 13px clamp(18px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: padding .2s ease-out;
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links { display: flex; gap: clamp(14px, 2vw, 26px); align-items: center; }
.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 11px 2px;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 9px);
  transition: background-size .3s ease, color .25s ease;
}
.nav-link.is-active,
.nav-link:hover,
.nav-link:focus-visible {
  background-size: 100% 1px;
  color: var(--text);
}
.nav-dot {
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
}
.nav-link.is-active .nav-dot { opacity: 1; }

.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  width: 74px;
  height: 40px;
  transition: border-color .25s;
}
.theme-toggle:hover { border-color: var(--accent-text); }
.theme-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  z-index: 0;
  transition: transform .2s ease;
}
[data-theme="light"] .theme-thumb { transform: translateX(34px); }
.theme-icon {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color .2s ease;
}
[data-theme="light"] .theme-icon-sun { color: var(--text); }
[data-theme="light"] .theme-icon-moon { color: var(--muted); }
:root:not([data-theme="light"]) .theme-icon-moon { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 15px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease, border-color .25s ease;
}
.btn-primary { background: var(--accent); color: #0C0C0E; }
.btn-primary:hover, .btn-primary:focus-visible { transform: scale(1.02); filter: brightness(1.06); color: #0C0C0E; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover, .btn-secondary:focus-visible { transform: scale(1.02); border-color: var(--accent-text); color: var(--text); }
.btn-sm { font-size: 13.5px; padding: 11px 18px; }
.btn-lg { font-size: 16px; padding: 16px 30px; }

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 15px;
  padding: 11px 2px;
  background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 9px);
  transition: background-size .3s ease;
}
.link-underline:hover, .link-underline:focus-visible { background-size: 100% 1px; }

/* Reveal / hero animation */
[data-reveal], [data-hero] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
[data-reveal].is-visible, [data-hero].is-visible { opacity: 1; transform: none; }

/* Hero */
.hero { position: relative; padding: clamp(52px, 8vw, 110px) 0 clamp(56px, 8vw, 88px); }
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { flex: 1 1 480px; min-width: min(100%, 320px); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow-line { width: 22px; height: 1px; background: var(--accent-soft); display: inline-block; }
.section .eyebrow .eyebrow-line { width: 18px; }

.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 20px 0 0;
}
.accent { color: var(--accent); }
.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--subhead);
  margin: 24px 0 0;
  max-width: 60ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-media { flex: 1 1 360px; min-width: min(100%, 300px); display: flex; justify-content: center; }
.portrait { position: relative; width: min(100%, 430px); }
.portrait-accent {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 20px;
  transform: translate(10px, 10px);
  opacity: 0;
  transition: opacity .45s ease;
  z-index: 0;
  pointer-events: none;
}
.portrait-glow {
  position: absolute;
  inset: -10% -6% -4% -6%;
  background: radial-gradient(ellipse at 50% 38%, rgba(255, 107, 51, 0.2), transparent 68%);
  filter: blur(22px);
  z-index: 0;
  opacity: 1;
  transition: opacity .45s ease;
}
.portrait-img { border-radius: 20px; display: block; }
.portrait-img-dark {
  position: relative;
  z-index: 1;
  width: 100%;
  opacity: 1;
  transition: opacity .45s ease;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 42%, #000 56%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 90% at 50% 42%, #000 56%, transparent 100%);
}
.portrait-img-light {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 34px 70px -24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
[data-theme="light"] .portrait-accent { opacity: 1; }
[data-theme="light"] .portrait-glow { opacity: 0; }
[data-theme="light"] .portrait-img-dark { opacity: 0; }
[data-theme="light"] .portrait-img-light { opacity: 1; }

.portrait-about { width: 100%; }

/* Marquee */
.marquee-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.marquee-wrap { padding: 44px clamp(18px, 5vw, 48px); display: flex; flex-direction: column; gap: 26px; }
.marquee-label {
  margin: 0;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.marquee-view { position: relative; width: 100%; overflow: hidden; }
.marquee-fade { position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.marquee-fade-left { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.marquee-fade-right { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  justify-content: center;
  animation: jr-marquee 40s linear infinite;
}
.marquee-view:hover .marquee-track { animation-play-state: paused; }
@keyframes jr-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  opacity: var(--tool-opacity);
  transition: opacity .3s ease;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 15px;
}
.tool:hover { opacity: 1; }

/* Section titles */
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 16px 0 0;
  max-width: 20ch;
}
.section-title-lg { margin: 16px 0 64px; max-width: none; }
.section-title-sm { font-size: clamp(28px, 3.6vw, 46px); margin: 16px 0 24px; max-width: none; }
.section-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--subhead);
  margin: 24px 0 0;
  max-width: 62ch;
}

/* Grid & cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-spaced { margin-top: 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 28px;
  transition: transform .2s ease-out, border-color .2s ease-out, box-shadow .2s ease-out;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-text);
  box-shadow: var(--card-hover-shadow);
}
.card-icon { padding: 30px; }
.card-icon .icon { color: var(--text); opacity: 0.85; margin-bottom: 20px; }
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 10px;
}
.card-title-tall { font-size: 23px; line-height: 1.25; min-height: 2.5em; }
.card-text { font-size: 15.5px; line-height: 1.65; color: var(--muted); margin: 0; }

/* Case study */
.case-study {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: clamp(28px, 4vw, 56px);
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
  will-change: transform;
}
.case-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 16px 0 0;
  max-width: 22ch;
}
.case-cols { margin-top: 36px; gap: clamp(24px, 4vw, 48px); }
.label-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.case-text { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0; }
.case-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 20px;
  margin-top: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 44px);
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
}
.stat-label { font-size: 14px; color: var(--muted); margin-top: 10px; }
.case-close { font-size: 16.5px; line-height: 1.7; color: var(--text); margin: 32px 0 0; max-width: 70ch; }

/* Process steps */
.steps { display: flex; gap: 24px; position: relative; }
.timeline-track { position: absolute; background: var(--border); border-radius: 2px; pointer-events: none; z-index: 0; }
.timeline-fill { position: absolute; background: var(--accent-soft); border-radius: 2px; pointer-events: none; z-index: 0; width: 0; height: 0; }
.timeline-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
  z-index: 1;
  display: none;
  transform: translate(-50%, -50%);
}
.step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .2s ease-out;
}
.step-node {
  position: relative;
  z-index: 2;
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  outline: 2px solid transparent;
  outline-offset: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--muted);
  transition: border-color .4s ease, color .4s ease, box-shadow .4s ease, background .4s ease, transform .2s ease-out, outline-color .2s ease-out;
}
.step-content { margin-top: 36px; transition: transform .2s ease-out; }
.step-title {
  opacity: 0;
  transition: opacity .5s ease-out;
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 10px;
}
.step-desc { opacity: 0; transition: opacity .5s ease-out, color .2s ease-out; font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0; }

@media (max-width: 759px) {
  .steps { flex-direction: column; gap: 30px; }
  .step { flex-direction: row; align-items: flex-start; text-align: left; gap: 20px; width: 100%; }
  .step-content { margin-top: 0; padding-top: 9px; flex: 1 1 auto; }
}

/* About */
.about-inner { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.about-media { flex: 1 1 340px; min-width: min(100%, 300px); position: sticky; top: 100px; order: 2; }
.about-copy { flex: 1 1 460px; min-width: min(100%, 320px); order: 1; }
.about-text { font-size: 16.5px; line-height: 1.72; color: var(--muted); margin: 0 0 20px; max-width: 65ch; }
.about-meta { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.04em; color: var(--muted); margin: 0; }

/* Stats band */
.stats-section { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 36px 28px; padding: clamp(56px, 8vw, 88px) 0; }

/* Lead magnet */
.lead-box {
  background: var(--surface2);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: clamp(32px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  justify-content: space-between;
}
.lead-copy { flex: 1 1 380px; min-width: min(100%, 300px); }
.lead-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 16px;
}
.lead-text { font-size: 16.5px; line-height: 1.7; color: var(--muted); margin: 0; max-width: 56ch; }
.lead-form { flex: 1 1 320px; min-width: min(100%, 280px); display: flex; flex-wrap: wrap; gap: 12px; }
.lead-form input {
  flex: 1 1 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color .25s;
}
.lead-form input:focus { border-color: var(--accent-text); }
.lead-form button { white-space: nowrap; }

/* FAQ */
.faq-list { }
.faq-item { border-top: 1px solid var(--border); }
.faq-item-last { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 24px 0;
  text-align: left;
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
}
.faq-icon {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--accent-text);
  line-height: 1;
  transition: transform .3s ease;
}
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s ease, opacity .35s ease; }
.faq-a p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 24px; max-width: 65ch; }

/* Contact */
.contact-section {
  position: relative;
  padding: clamp(56px, 8vw, 88px) 0;
  border-top: 1px solid var(--border);
  background-image: radial-gradient(rgba(255, 107, 51, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  text-align: center;
}
.contact-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.contact-text { font-size: 17px; line-height: 1.7; color: var(--muted); margin: 24px auto 0; max-width: 60ch; }
.contact-cta { margin-top: 36px; }

/* Footer */
.footer { border-top: 1px solid var(--border); }
.footer-inner {
  padding: 32px clamp(18px, 5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { flex: 1 1 260px; min-width: min(100%, 240px); }
.footer-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; color: var(--text); }
.footer-tag { font-size: 14px; color: var(--muted); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--muted); transition: color .25s; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--accent-text); }
.footer-right { flex: 1 1 260px; min-width: min(100%, 240px); display: flex; gap: 16px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.footer-credit { font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; transform: none; justify-content: center; flex-wrap: wrap; }
  [data-reveal], [data-hero] { transition: none; }
}
