/* ─── VARIABLES ─────────────────────────────────────── */
:root {
  --black: #0D0D0D;
  --white: #FFFFFF;
  --gray: #E8E8E8;
  --midgray: #999;
  --font-display: "futura-pt", sans-serif;
  --font-body: 'DM Sans', sans-serif;  /* keep for nav/body */
}

/* ─── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  background: inherit;
  color: inherit;
  min-height: 100vh;
}

html { transition: background 0.3s, color 0.3s; }
[data-theme="light"] { background: var(--white); color: var(--black); }
[data-theme="dark"]  { background: var(--black); color: var(--white); }

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

/* ─── NAV ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  z-index: 100;
  border-bottom: 1px solid currentColor;
  background: inherit;
}

[data-theme="light"] nav { background: var(--white); }
[data-theme="dark"]  nav { background: var(--black); }

nav .logo img { height: 28px; width: auto; }
[data-theme="dark"] nav .logo img { filter: invert(1); }

nav ul { list-style: none; display: flex; gap: 2rem; }
nav ul li a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.5;
  transition: opacity 0.2s;
}
nav ul li a:hover { opacity: 1; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: inherit;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 61px; left: 0; right: 0;
  background: inherit;
  padding: 1.5rem 2.5rem;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 99;
  border-bottom: 1px solid currentColor;
}

[data-theme="light"] .mobile-menu { background: var(--white); }
[data-theme="dark"]  .mobile-menu { background: var(--black); }

.mobile-menu a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  opacity: 0.6;
}
.mobile-menu.open { display: flex; }

/* ─── HERO ──────────────────────────────────────────── */
main { padding-top: 61px; }

.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2.5rem 4rem;
  border-bottom: 1px solid currentColor;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
}

.hero-sub {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.6;
  max-width: 520px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.cta {
  display: inline-block;
  border: 1.5px solid currentColor;
  padding: 0.85rem 2.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  align-self: flex-start;
}


/* ─── MARQUEE ───────────────────────────────────────── */
.marquee-bar {
  overflow: hidden;
  border-bottom: 1px solid currentColor;
  padding: 1rem 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  font-weight: 500;
  opacity: 0.4;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── INTRO GRID ────────────────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 6rem 2.5rem;
  border-bottom: 1px solid currentColor;
}

.intro-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.intro-right p {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.7;
  margin-bottom: 1.4rem;
  line-height: 1.8;
}

.text-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.text-link:hover { opacity: 1; }

/* ─── SERVICES PREVIEW ──────────────────────────────── */
.services-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid currentColor;
}

.service-item {
  padding: 3.5rem 2rem;
  border-right: 1px solid currentColor;
}
.service-item:last-child { border-right: none; }

.service-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  opacity: 0.18;
  margin-bottom: 1rem;
  line-height: 1;
}

.service-item h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.service-item p {
  font-size: 0.9rem;
  font-weight: 300;
  opacity: 0.6;
  line-height: 1.7;
}

/* ─── BOTTOM CTA ────────────────────────────────────── */
.bottom-cta {
  padding: 8rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

.bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-top: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 300;
  opacity: 0.4;
  letter-spacing: 0.06em;
}

/* ─── INNER PAGE HERO ───────────────────────────────── */
.page-hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 2.5rem 4rem;
  border-bottom: 1px solid currentColor;
}

.page-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 1.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
}

/* ─── CONTENT SECTIONS ──────────────────────────────── */
.content-section {
  padding: 5rem 2.5rem;
  border-bottom: 1px solid currentColor;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 500;
  opacity: 0.4;
  padding-top: 0.4rem;
}

.content-body h3 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.content-body p {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.7;
  line-height: 1.85;
  margin-bottom: 1.2rem;
  max-width: 640px;
}

/* ─── SERVICES LIST ─────────────────────────────────── */
.services-list { padding: 0 2.5rem; }

.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid currentColor;
  align-items: start;
}

.service-row:first-child { border-top: 1px solid currentColor; }

.service-row .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  opacity: 0.15;
  line-height: 1;
}

.service-row h3 {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding-top: 0.3rem;
}

.service-row p {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.65;
  line-height: 1.75;
}

/* ─── CASE STUDY CARDS ──────────────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.case-card {
  padding: 4rem 2.5rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.case-card:nth-child(even) { border-right: none; }

.case-tag {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  opacity: 0.4;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.case-card h3 {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.case-card p {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.65;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.case-results {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.case-results span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  opacity: 0.5;
}

.case-results span::before { content: "→ "; }

/* ─── CONTACT FORM ──────────────────────────────────── */
.contact-form {
  padding: 5rem 2.5rem;
  max-width: 720px;
}

.form-group {
  margin-bottom: 2.5rem;
}

.form-group label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 500;
  opacity: 0.45;
  margin-bottom: 0.75rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-group select option { background: var(--white); color: var(--black); }
[data-theme="dark"] .form-group select option { background: var(--black); color: var(--white); }

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-bottom-color: currentColor; opacity: 1; }

.form-submit {
  background: none;
  border: 1.5px solid currentColor;
  padding: 0.85rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  color: inherit;
}

[data-theme="light"] .form-submit:hover { background: var(--black); color: var(--white); }
[data-theme="dark"]  .form-submit:hover { background: var(--white); color: var(--black); }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  nav ul { display: none; }
  .menu-toggle { display: block; }
  .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .services-preview { grid-template-columns: 1fr 1fr; }
  .service-item { border-right: none; border-bottom: 1px solid currentColor; }
  .content-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-row p { grid-column: 2; }
  .case-grid { grid-template-columns: 1fr; }
  .case-card { border-right: none; }
}

@media (max-width: 600px) {
  nav { padding: 1rem 1.5rem; }
  .hero { padding: 3rem 1.5rem 3rem; min-height: 70vh; }
  .intro-grid, .content-section, .services-list, .contact-form, .bottom-cta { padding-left: 1.5rem; padding-right: 1.5rem; }
  .services-preview { grid-template-columns: 1fr; }
  .case-card { padding: 3rem 1.5rem; }
}


/* ─── CIRCLE CURSOR (desktop) ───────────────────────────── */
@media (hover: hover) {
  * { cursor: none; }

  #cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease, opacity 0.18s ease;
  }

  #cursor-dot { background: #ffffff; mix-blend-mode: difference; }

  #cursor-dot.cursor-grow {
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    opacity: 0.10;
  }
}

/* ─── TAP RIPPLE (mobile) ────────────────────────────────── */
.tap-ripple {
  position: fixed;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: scale(0);
  animation: ripple-out 0.5s ease-out forwards;
}

[data-theme="light"] .tap-ripple { background: var(--black); }
[data-theme="dark"]  .tap-ripple { background: var(--white); }

@keyframes ripple-out {
  0%   { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(18); opacity: 0; }
}

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
.reveal-ready {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-ready.revealed {
  opacity: 1;
  transform: translateY(0);
}

.service-item.reveal-ready { transition-delay: calc(var(--i, 0) * 0.08s); }
.case-card.reveal-ready    { transition-delay: calc(var(--i, 0) * 0.1s); }

/* ─── ABOUT PHOTO ────────────────────────────────────────── */
.about-photo-section {
  padding: 0 2.5rem;
  border-bottom: 1px solid currentColor;
}

.about-photo {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: grayscale(100%) contrast(1.1);
}

@media (max-width: 600px) {
  .about-photo-section { padding: 0 1.5rem; }
  .about-photo { max-width: 100%; }
}

/* ─── HERO SIZE FIX ──────────────────────────────────────── */
.hero-title {
  font-size: clamp(2.8rem, 7.5vw, 7.5rem) !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
}

.page-title {
  font-size: clamp(2.8rem, 7vw, 7rem) !important;
  letter-spacing: 0.04em !important;
}

/* ─── ABOUT SPLIT LAYOUT ────────────────────────────────── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid currentColor;
}

.about-image {
  border-right: 1px solid currentColor;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: grayscale(100%) contrast(1.1);
  max-height: 600px;
}

.about-text {
  padding: 4rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ─── FOOTER LINKS ───────────────────────────────────────── */
footer {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.72rem;
  font-weight: 300;
  opacity: 0.4;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 0.8; }

/* ─── SERVICES GRID MOBILE FIX ───────────────────────────── */
@media (max-width: 900px) {
  .about-split { grid-template-columns: 1fr; }
  .about-image { border-right: none; border-bottom: 1px solid currentColor; }
  .about-photo { max-height: 400px; }
  .about-text { padding: 3rem 1.5rem; }
  .services-preview { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2rem, 8.5vw, 4rem) !important; }
  .page-title { font-size: clamp(2.2rem, 9vw, 3.5rem) !important; }
  .services-preview { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 0.5rem; }
}

/* ─── SERVICES DETAIL PAGE ───────────────────────────────── */
.services-detail {
  border-top: 1px solid currentColor;
}

.svc-block {
  display: grid;
  grid-template-columns: 320px 1fr;
  border-bottom: 1px solid currentColor;
}

.svc-left {
  padding: 4rem 2.5rem;
  border-right: 1px solid currentColor;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.svc-num {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.1;
  display: block;
  margin-bottom: 2rem;
}

.svc-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.svc-right {
  padding: 4rem 2.5rem;
}

.svc-problem {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  opacity: 0.5;
  font-style: italic;
}

.svc-right p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.svc-includes {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  border-top: 1px solid currentColor;
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}

.svc-includes li {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  opacity: 0.5;
  text-transform: uppercase;
}

.svc-includes li::before {
  content: '— ';
  opacity: 0.5;
}

@media (max-width: 900px) {
  .svc-block {
    grid-template-columns: 1fr;
  }
  .svc-left {
    border-right: none;
    border-bottom: 1px solid currentColor;
    padding: 3rem 1.5rem 2rem;
    flex-direction: row;
    align-items: flex-end;
    gap: 1.5rem;
  }
  .svc-num {
    font-size: 3.5rem;
    margin-bottom: 0;
    opacity: 0.12;
  }
  .svc-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
  .svc-right {
    padding: 2rem 1.5rem 3rem;
  }
  .svc-includes {
    grid-template-columns: 1fr;
  }
}

/* ─── MINIMAL SERVICE ITEMS (homepage) ───────────────────── */
.service-item--minimal {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.2s;
}

.service-item--minimal h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.service-item--minimal:hover { opacity: 0.5; }

.service-item--minimal p { display: none; }


/* ─── CASE STUDY SECTIONS ────────────────────────────────── */
.case-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid currentColor;
  opacity: 0.9;
}

.case-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.case-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.4;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.case-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.case-section p:last-child { margin-bottom: 0; }

/* ─── PROBLEMS SECTION ───────────────────────────────────── */
.problems-section {
  padding: 4rem 2.5rem;
  border-bottom: 1px solid currentColor;
}

.problems-header {
  margin-bottom: 2rem;
}

.problems-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.problems-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 1.25rem 0;
  border-bottom: 1px solid currentColor;
  opacity: 0.7;
  padding-right: 2rem;
}

.problems-list li:nth-last-child(-n+2) {
  border-bottom: none;
}

.problems-list li::before {
  content: '— ';
  opacity: 0.4;
}

/* ─── WHO I WORK WITH ────────────────────────────────────── */
.fit-section {
  padding: 4rem 2.5rem;
  border-bottom: 1px solid currentColor;
}

.fit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 3rem;
}

.fit-list span {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* ─── FEATURED SERVICE ROW ───────────────────────────────── */
.service-row--featured {
  background: transparent;
  border-left: 3px solid currentColor;
  padding-left: calc(2.5rem - 3px);
}

.service-row--featured h3 {
  opacity: 1;
}

/* ─── CONTACT INTRO ──────────────────────────────────────── */
.contact-intro {
  padding: 2.5rem 2.5rem 0;
  max-width: 640px;
}

.contact-intro p {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.6;
}

/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .problems-section { padding: 3rem 1.5rem; }
  .problems-list { grid-template-columns: 1fr; }
  .problems-list li:nth-last-child(-n+2) { border-bottom: 1px solid currentColor; }
  .problems-list li:last-child { border-bottom: none; }
  .fit-section { padding: 3rem 1.5rem; }
  .fit-list { grid-template-columns: 1fr; }
  .contact-intro { padding: 2rem 1.5rem 0; }
}

/* ─── HERO ASIDE ─────────────────────────────────────────── */
.hero-aside {
  font-size: 0.85rem;
  font-weight: 300;
  opacity: 0.45;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* ─── BEFORE / AFTER ─────────────────────────────────────── */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid currentColor;
}

.ba-col {
  padding: 4rem 2.5rem;
}

.ba-before {
  border-right: 1px solid currentColor;
}

.ba-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.ba-list li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0.75rem 0;
  border-bottom: 1px solid currentColor;
  opacity: 0.6;
}

.ba-before .ba-list li { opacity: 0.45; }
.ba-after .ba-list li  { opacity: 0.75; }

.ba-list li:last-child { border-bottom: none; }

.ba-before .ba-list li::before { content: '— '; opacity: 0.4; }
.ba-after  .ba-list li::before { content: '+ '; opacity: 0.6; }

/* ─── SERVICE TIERS ──────────────────────────────────────── */
.service-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid currentColor;
}

.tier {
  padding: 3rem 2.5rem;
  border-right: 1px solid currentColor;
}

.tier:last-child { border-right: none; }

.tier-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.tier p {
  font-size: 0.85rem;
  line-height: 1.75;
  opacity: 0.55;
}

/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .before-after { grid-template-columns: 1fr; }
  .ba-before { border-right: none; border-bottom: 1px solid currentColor; }
  .service-tiers { grid-template-columns: 1fr; }
  .tier { border-right: none; border-bottom: 1px solid currentColor; }
  .tier:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  .ba-col { padding: 3rem 1.5rem; }
  .tier { padding: 2.5rem 1.5rem; }
}

/* ─── GSAP HERO INIT (prevent flash) ────────────────────── */
.hero-title .word,
.page-title .word {
  display: inline-block;
  will-change: transform, opacity;
}

/* ─── GRAIN OVERLAY ──────────────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  background-image: url("assets/grain.webp");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.04;
}

/* ─── NAV UNDERLINE DRAW ─────────────────────────────────── */
nav ul li a {
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

/* ─── CTA BUTTON FILL (left to right) ───────────────────── */
.cta {
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: color 0.35s ease;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}

[data-theme="light"] .cta::before { background: var(--black); }
[data-theme="dark"]  .cta::before { background: var(--white); }

.cta:hover::before { transform: translateX(0); }

[data-theme="light"] .cta:hover { background: transparent; color: var(--white); }
[data-theme="dark"]  .cta:hover { background: transparent; color: var(--black); }

/* ─── SCROLL PROGRESS LINE ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  z-index: 99999;
  transition: width 0.05s linear;
}

[data-theme="light"] #scroll-progress { background: var(--black); }
[data-theme="dark"]  #scroll-progress { background: var(--white); }

/* ─── MARQUEE PAUSE/REVERSE ON HOVER ─────────────────────── */
.marquee-bar:hover .marquee-track {
  animation-play-state: paused;
}

/* ─── WORK SIGNALS (homepage) ────────────────────────────── */
.work-signals {
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  padding: 4rem 2.5rem;
}
.work-signals-header {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 2.5rem;
}
.signal-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  padding: 2rem 0;
  border-top: 1px solid currentColor;
}
.signal-item:first-of-type { border-top: none; }
.signal-sector {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.5;
  padding-top: 0.2rem;
  line-height: 1.8;
}
.signal-desc {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 640px;
}
.signal-desc strong {
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ─── AT A GLANCE (case study) ───────────────────────────── */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid currentColor;
  margin-bottom: 4rem;
}
.glance-item {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.glance-item:nth-child(2n) { border-right: none; }
.glance-item:nth-last-child(-n+2) { border-bottom: none; }
.glance-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  opacity: 0.45;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}
.glance-value {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.55;
}

/* ─── OWNERSHIP DIAGRAM (case study) ────────────────────── */
.ownership-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid currentColor;
  margin: 2.5rem 0 0 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
}
.od-col { padding: 2rem 2rem; }
.od-col:first-child { border-right: 1px solid currentColor; }
.od-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  opacity: 0.45;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.od-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2.1;
}
.od-tree ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.od-indent {
  padding-left: 1.2rem;
  opacity: 0.7;
  display: block;
}
.od-indent::before {
  content: "└ ";
  opacity: 0.4;
  font-size: 0.75em;
}

/* ─── NEED THIS (services) ───────────────────────────────── */
.need-this {
  padding: 4rem 2.5rem;
  border-bottom: 1px solid currentColor;
}
.need-this-header {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 2rem;
}
.need-this-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 640px;
}
.need-this-list li {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  padding: 0.9rem 0;
  border-top: 1px solid currentColor;
  opacity: 0.8;
}
.need-this-list li:first-child { border-top: none; }

/* ─── DELIVERABLES (services) ────────────────────────────── */
.deliverables {
  padding: 4rem 2.5rem;
  border-bottom: 1px solid currentColor;
}
.deliverables-header {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 2.5rem;
}
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 820px;
}
.deliverable-item {
  padding: 1.2rem 2rem 1.2rem 0;
  border-top: 1px solid currentColor;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0.85;
}

/* ─── RESPONSIVE: new sections ───────────────────────────── */
@media (max-width: 900px) {
  .signal-item { grid-template-columns: 160px 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .work-signals { padding: 3rem 1.5rem; }
  .signal-item { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.75rem 0; }
  .at-a-glance { grid-template-columns: 1fr; }
  .glance-item { border-right: none !important; }
  .glance-item:nth-last-child(-n+2) { border-bottom: 1px solid currentColor; }
  .glance-item:last-child { border-bottom: none !important; }
  .ownership-diagram { grid-template-columns: 1fr; }
  .od-col:first-child { border-right: none; border-bottom: 1px solid currentColor; }
  .need-this { padding: 3rem 1.5rem; }
  .deliverables { padding: 3rem 1.5rem; }
  .deliverables-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── SYSTEM MAP ─────────────────────────────────────────── */
.sysmap {
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  padding: 5rem 2.5rem;
}

.sysmap-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 3.5rem;
}

.sysmap-grid {
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  gap: 0 2rem;
  max-width: 860px;
  position: relative;
}

/* Horizontal scan line — sweeps top to bottom of the grid */
.sm-scanline {
  position: absolute;
  left: -8px;
  right: -8px;
  top: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* Soft halo trailing the scan line — gives it presence without harshness */
.sm-scanline::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -40px;
  height: 80px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    currentColor 50%,
    transparent 100%
  );
  opacity: 0.08;
  pointer-events: none;
}

/* Bright accent dot at each end of the line for a precise instrument feel */
.sm-scanline::after {
  content: '';
  position: absolute;
  left: -3px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 0 8px currentColor,
    calc(100vw) 0 0 currentColor;
  /* second dot at right end via box-shadow */
}



.sysmap-col-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.35;
  margin-bottom: 1.75rem;
}

/* ── BEFORE column: fragmented, slightly loose ── */
.sysmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sysmap-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-top: 1px solid currentColor;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.5;
  /* Hard-lock: row can never grow taller than one line */
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.sm-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.sysmap-item:last-child { border-bottom: 1px solid currentColor; }

.sm-status {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 14px;
  opacity: 0.5;
}

/* before column items: desaturated, offset, fragmented feel */
.sysmap-before .sysmap-item {
  opacity: 0.32;
  border-color: currentColor;
}

/* BEFORE items kept aligned — opacity + ? marker convey unresolved state */

/* ── AFTER column: hidden initially, assembles on scroll ── */
.sysmap-after .sysmap-item {
  opacity: 0;
  /* GSAP handles animation */
}

.sysmap-after .sm-text {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

/* Mono-ish vibe during scramble for cleaner glyph transitions */
.sysmap-after .sm-status {
  transition: opacity 0.3s ease;
}

.sm-check {
  opacity: 0.7;
}

/* No-JS fallback: items stay visible if GSAP/JS fails to load */
.no-js .sysmap-after .sysmap-item {
  opacity: 0.92;
  transform: none;
}

/* ── Divider ── */
.sysmap-divider {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding-top: 2.8rem; /* align with list start */
}

.sysmap-arrow {
  width: 1px;
  height: 100%;
  min-height: 200px;
  overflow: visible;
}

/* SVG line draws in on trigger */
.sm-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.76, 0, 0.24, 1) 0.1s;
  opacity: 0.18;
}

.sysmap.sm-active .sm-line {
  stroke-dashoffset: 0;
}

/* when section triggers: before column fades further */
.sysmap.sm-active .sysmap-before .sysmap-item {
  opacity: 0.18;
  transition: opacity 0.6s ease;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .sysmap { padding: 3rem 1.5rem; }
  .sysmap-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .sysmap-divider { display: none; }
  .sysmap-before { margin-bottom: 3rem; }
  /* on mobile, before stays at its opacity, after still animates in */
}

/* ─── AUDIENCE MARQUEE (bottom) ──────────────────────── */
.marquee-bar--audience {
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  padding: 2.4rem 0 1.6rem;
  margin-top: 1rem;
}

.marquee-bar--audience .marquee-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  padding: 0 2.5rem 1.4rem;
}

.marquee-bar--audience .marquee-track span {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 500;
  opacity: 0.55;
}

.audience-section {
  padding: 4rem 2.5rem 3rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.audience-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.45;
  margin-bottom: 2.4rem;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem 3rem;
  max-width: 1100px;
}

.audience-item {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  opacity: 0.85;
  padding: 0.5rem 0;
  border-top: 1px solid currentColor;
}

@media (max-width: 800px) {
  .audience-section { padding: 2.5rem 1.5rem 2rem; }
  .audience-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .audience-item { font-size: 0.9rem; }
}

/* ─── AUDIENCE CAPTION (homepage, between services tiles and sysmap) ─── */
/* Treated as an editorial pull quote — no borders, no grid lines, just type. */
.audience-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  padding: 5.5rem 2.5rem 5.5rem;
  /* No top/bottom borders — whitespace does the separating */
}

.audience-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.4;
  padding-top: 0.35rem;
}

.audience-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  opacity: 0.78;
  max-width: 62ch;
}

@media (max-width: 800px) {
  .audience-section {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 3.5rem 1.5rem;
  }
  .audience-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

/* ─── PAGE TRANSITION: TILE FLIP ───────────────────────── */
/* Charcoal tiles with ivory hairlines. Fixed colors avoid the invisible-flash
   problem of using currentColor against pages with similar palettes. */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
}

#page-transition.pt-active {
  visibility: visible;
}

.pt-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(var(--pt-cols), 1fr);
  grid-template-rows: repeat(var(--pt-rows), 1fr);
}

.pt-tile {
  background: #151515;
  border-right: 1px solid rgba(245, 241, 232, 0.18);
  border-bottom: 1px solid rgba(245, 241, 232, 0.18);
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}

/* Outgoing: tiles drop in from top, left-to-right column stagger */
#page-transition.pt-active .pt-tile {
  transition: transform 380ms cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: calc(var(--pt-col) * 22ms);
}

#page-transition.pt-cover .pt-tile {
  transform: scaleY(1);
}

/* THEME-AWARE TILE COLORS
   Outgoing (cover): tiles = destination page bg (inverse of current).
   Incoming (uncover): tiles = own page bg (so only the borders show the motion).
   These line up so the tile color stays continuous across the navigation boundary. */

/* Light page outgoing → going to a dark page → tiles fill dark */
[data-theme="light"] #page-transition.pt-active:not(.pt-incoming) .pt-tile {
  background: #1A1A1A;
  border-right-color: rgba(255, 255, 255, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

/* Dark page outgoing → going to a light page → tiles fill light */
[data-theme="dark"] #page-transition.pt-active:not(.pt-incoming) .pt-tile {
  background: #F5F5F5;
  border-right-color: rgba(13, 13, 13, 0.22);
  border-bottom-color: rgba(13, 13, 13, 0.22);
}

/* Just landed on a light page → tiles match own light bg */
[data-theme="light"] #page-transition.pt-incoming .pt-tile {
  background: #F5F5F5;
  border-right-color: rgba(13, 13, 13, 0.22);
  border-bottom-color: rgba(13, 13, 13, 0.22);
}

/* Just landed on a dark page → tiles match own dark bg */
[data-theme="dark"] #page-transition.pt-incoming .pt-tile {
  background: #1A1A1A;
  border-right-color: rgba(255, 255, 255, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

/* Incoming: tiles start covered (origin bottom), then exit downward */
#page-transition.pt-incoming .pt-tile {
  transform: scaleY(1);
  transform-origin: bottom;
  transition: none;
}

#page-transition.pt-incoming.pt-uncover .pt-tile {
  transform: scaleY(0);
  transition: transform 380ms cubic-bezier(0.76, 0, 0.24, 1);
  transition-delay: calc((var(--pt-cols) - 1 - var(--pt-col)) * 22ms);
}

@media (prefers-reduced-motion: reduce) {
  #page-transition { display: none !important; }
}
