:root {
  --paper: #fdfcf7;
  --ink: #191816;
  --muted: #64615a;
  --hairline: rgba(25, 24, 22, 0.11);
  --amber: #ffcf40;
  --gold: #ffe066;
  --apricot: #ff9c52;
  --coral: #ff766b;
  --periwinkle: #99a1ff;
  --hl-amber: rgba(255, 207, 64, 0.86);
  --radius-pill: 999px;
  --max-width: 70rem;
  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

/* Color utility tokens for LCARS accents */
.lcars-bg-amber { background: var(--amber); }
.lcars-bg-gold { background: var(--gold); }
.lcars-bg-apricot { background: var(--apricot); }
.lcars-bg-coral { background: var(--coral); }
.lcars-bg-periwinkle { background: var(--periwinkle); }

/* Accessibility */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Top LCARS Scroll Progress Beam */
.lcars-scroll-track,
.modal-progress-track {
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  z-index: 40;
  background: rgba(253, 252, 247, 0.85);
  pointer-events: none;
}

.lcars-scroll-fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--amber) 0%, var(--apricot) 40%, var(--coral) 72%, var(--periwinkle) 100%);
}

/* Page Layout */
.page-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 4.5rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}

.section + .section {
  margin-top: clamp(5.5rem, 11vw, 9.5rem);
}

/* Typography — Single unified sans-serif family */
.kicker,
.location {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.65rem, 5.8vw, 5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.15rem, 4.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 34rem;
  margin-bottom: 2rem;
  color: #363430;
  font-size: clamp(1.1rem, 1.65vw, 1.35rem);
  line-height: 1.52;
  letter-spacing: -0.01em;
}

/* Masked Headline Line Rise */
.line-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.line-inner {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.is-visible .line-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Warm Daylight Highlighter Draw-In */
.hl,
.hl-wash {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-repeat: no-repeat;
  transition: background-size 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hl {
  padding: 0.04em 0.28em 0.06em;
  margin: 0 -0.14em;
  border-radius: 0.32em;
  color: var(--ink);
  background-image: linear-gradient(98deg, transparent 0%, var(--hl-amber) 4%, var(--hl-amber) 96%, transparent 100%);
  background-size: 0% 50%;
  background-position: 0 88%;
}

.hl.is-drawn {
  background-size: 100% 50%;
}

.hl-wash {
  padding: 0.02em 0.34em 0.06em;
  margin: 0 -0.17em;
  border-radius: 0.4em 0.55em 0.42em 0.48em;
  background-image: linear-gradient(98deg, transparent 0%, var(--hl-amber) 4%, var(--hl-amber) 96%, transparent 100%);
  background-size: 0% 72%;
  background-position: 0 78%;
}

.hl-wash.is-drawn {
  background-size: 100% 72%;
}

/* LCARS Pill CTA Buttons */
.lcars-pill-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.lcars-pill-btn:hover,
.lcars-pill-btn:focus-visible {
  background: var(--apricot);
  transform: translateX(3px);
  outline: 2px solid transparent;
}

.lcars-pill-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Sweeping LCARS Structural Elbow Frame (open transparent interior) */
.lcars-frame {
  --elbow-top: var(--amber);
  --elbow-bottom: var(--periwinkle);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
}

.lcars-frame-contact {
  --elbow-top: var(--coral);
  --elbow-bottom: var(--amber);
}

.lcars-elbow-top {
  position: relative;
  height: 40px;
  border-top-left-radius: 24px;
  background: var(--elbow-top);
}

.lcars-elbow-top::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: 0;
  width: 16px;
  height: 20px;
  background: var(--elbow-top);
}

.lcars-top-beam {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  height: 40px;
}

.lcars-top-beam::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 16px;
  height: 20px;
  border-top-left-radius: 14px;
  background: var(--paper);
  z-index: 2;
}

.lcars-beam-main {
  flex: 1;
  height: 20px;
  background: var(--elbow-top);
}

.lcars-bottom-beam .lcars-beam-main {
  height: 16px;
  background: var(--elbow-bottom);
}

.lcars-beam-cap {
  width: 3rem;
  height: 20px;
  border-radius: 2px;
}

.lcars-bottom-beam .lcars-beam-cap {
  height: 16px;
}

.lcars-beam-end {
  width: 1.75rem;
  height: 20px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.lcars-bottom-beam .lcars-beam-end {
  height: 16px;
}

.lcars-beam-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 0.55rem;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lcars-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}

.rail-seg {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 5px 5px 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: filter 0.35s ease;
}

.rail-seg-sm { height: 2.75rem; }
.rail-seg-md { height: 4.75rem; }
.rail-seg-grow { flex: 1; min-height: 4rem; }

.rail-seg.is-ping {
  filter: brightness(1.14) saturate(1.18);
}

.lcars-elbow-bottom {
  position: relative;
  height: 32px;
  border-bottom-left-radius: 22px;
  background: var(--elbow-bottom);
}

.lcars-elbow-bottom::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--elbow-bottom);
}

.lcars-bottom-beam {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 32px;
}

.lcars-bottom-beam::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border-bottom-left-radius: 12px;
  background: var(--paper);
  z-index: 2;
}

.lcars-frame-body {
  padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.5rem, 4vw, 3.25rem);
}

/* Horizontal LCARS Section Dividers */
.lcars-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.div-cap-left {
  width: 1.75rem;
  height: 14px;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.div-seg {
  width: 3.5rem;
  height: 14px;
}

.div-line {
  flex: 1;
  height: 14px;
  opacity: 0.55;
}

.div-cap-right {
  width: 1.25rem;
  height: 14px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

/* Floating Magnetic Artwork (zero boxes, zero borders) */
.floating-art {
  width: 100%;
  height: auto;
  will-change: transform;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotate(var(--rot, 0deg)) scale(var(--sc, 1));
  transition: transform 0.24s ease-out;
}

/* 1. Intro */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.85fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.intro-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.intro-cta-label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.intro-visual {
  display: flex;
  justify-content: center;
}

.intro-art {
  max-width: 22rem;
}

/* 2. About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.about-lead {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 26rem;
  gap: 0.85rem;
}

.about-art {
  max-width: 26rem;
}

.hector-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.portrait-bg-arcs,
.portrait-character,
.portrait-layer,
.portrait-head-group {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.portrait-bg-arcs {
  opacity: 0.1;
}

.portrait-character {
  transform-origin: 54% 50%;
  transform: scaleX(var(--rig-flip, 1));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.portrait-arm {
  transform-origin: 47.3% 35.8%;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.portrait-head-group {
  transform-origin: 54% 29%;
  transition: transform 0.16s ease-out;
  will-change: transform;
}

.about-caption {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.about-copy {
  padding-left: clamp(1.5rem, 4vw, 3rem);
  border-left: 1px solid var(--hairline);
  color: #363430;
  font-size: clamp(1.02rem, 1.25vw, 1.12rem);
  line-height: 1.7;
}

.about-copy p + p {
  margin-top: 1.35rem;
}

/* 3. Process */
.section-heading {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.65;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-pill {
  width: 2.75rem;
  height: 7px;
  border-radius: var(--radius-pill);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.process-step.is-visible .step-pill {
  transform: scaleX(1);
}

.process-step h3 {
  margin: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* 4. Selected Work */
.project-list {
  display: grid;
  gap: clamp(2.5rem, 4.5vw, 3.75rem);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.project-reverse .project-media {
  order: 2;
}

.project-image-trigger {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.project .floating-art {
  width: auto;
  max-width: 100%;
  max-height: 14rem;
  margin: 0 auto;
}

.project-image-trigger:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 8px;
  border-radius: 12px;
}

.project-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.project-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.project-accent {
  width: 2.25rem;
  height: 7px;
  border-radius: var(--radius-pill);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.project:hover .project-accent {
  width: 3.25rem;
}

.project-category {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.project-title-text {
  padding: 0 0.14em;
  margin-left: -0.14em;
  border-radius: 0.25em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(to right, var(--hl-amber), var(--hl-amber));
  background-size: 0% 42%;
  background-position: 0 88%;
  background-repeat: no-repeat;
  transition: background-size 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.project:hover .project-title-text,
.compact-project-row:hover .project-title-text,
.compact-project-row:focus-visible .project-title-text {
  background-size: 100% 42%;
}

.project-result {
  margin: 0.2rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.project-open {
  margin-top: 0.25rem;
}

/* Compact "More work" list */
.more-work {
  margin-top: clamp(3rem, 6vw, 4.75rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--hairline);
}

.more-work-header {
  margin-bottom: 1.25rem;
}

.more-work-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compact-project-list {
  display: grid;
}

.compact-project-row {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.compact-project-row:first-child {
  border-top: 1px solid var(--hairline);
}

.compact-project-row:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
  border-radius: 6px;
}

.compact-project-accent {
  width: 2rem;
  height: 7px;
  border-radius: var(--radius-pill);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.compact-project-row:hover .compact-project-accent,
.compact-project-row:focus-visible .compact-project-accent {
  width: 2.85rem;
}

.compact-project-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.compact-project-title {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.compact-project-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-pill);
  background: rgba(25, 24, 22, 0.06);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.compact-project-row:hover .compact-project-cta,
.compact-project-row:focus-visible .compact-project-cta {
  background: var(--amber);
  transform: translateX(3px);
}

/* 5. Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(13rem, 0.8fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact-links .lcars-pill-btn:nth-child(even) {
  background: var(--periwinkle);
}

.contact-links .lcars-pill-btn:nth-child(even):hover,
.contact-links .lcars-pill-btn:nth-child(even):focus-visible {
  background: var(--coral);
}

.contact-copy .location {
  margin: 0;
}

.contact-signoff {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.signoff-pills {
  display: inline-flex;
  gap: 5px;
}

.signoff-pills span {
  height: 7px;
  border-radius: var(--radius-pill);
}

.signoff-pills span:nth-child(1) { width: 2.5rem; }
.signoff-pills span:nth-child(2) { width: 1.15rem; }
.signoff-pills span:nth-child(3) { width: 0.65rem; }

.signoff-text {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.contact-visual {
  display: flex;
  justify-content: center;
}

.contact-art {
  max-width: 19rem;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: center;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Enterprise-Style Starship Cursor Follower */
.starship-follower {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 36px;
  height: 24px;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.35s ease;
}

.starship-follower.is-active {
  opacity: 0.92;
}

.starship-follower .ship-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.starship-follower .ship-borg {
  opacity: 0;
  transform: scale(0.75);
}

.starship-follower.is-borg .ship-enterprise {
  opacity: 0;
  transform: scale(0.75);
}

.starship-follower.is-borg .ship-borg {
  opacity: 1;
  transform: scale(1.22);
}

.starship-trail {
  transform-origin: 12px 15px;
  transition: opacity 0.2s ease;
}

@media (hover: none), (pointer: coarse) {
  .starship-follower {
    display: none;
  }
}

/* Case Study Modal */
.case-study-modal {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

.case-study-modal::backdrop {
  background: var(--paper);
}

.case-study-shell {
  position: relative;
  height: 100dvh;
  overflow: auto;
}

.modal-control {
  position: fixed;
  z-index: 45;
  top: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(253, 252, 247, 0.94);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.modal-back {
  left: 1.25rem;
}

.modal-close {
  right: 1.25rem;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.modal-control:hover,
.modal-control:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  outline: none;
}

/* Password Gate */
.case-study-gate {
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(7rem, 15vh, 10rem) var(--gutter) 5rem;
}

.gate-accent {
  display: flex;
  gap: 6px;
  margin-bottom: 1.75rem;
}

.gate-accent span {
  height: 8px;
  border-radius: var(--radius-pill);
}

.gate-accent span:nth-child(1) { width: 3.5rem; }
.gate-accent span:nth-child(2) { width: 1.75rem; }
.gate-accent span:nth-child(3) { width: 0.9rem; }

.case-study-gate h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 5vw, 3.6rem);
}

.case-study-gate > p {
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.password-form {
  margin-top: 2rem;
}

.password-form label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.password-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.password-field {
  display: flex;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(25, 24, 22, 0.26);
  border-radius: var(--radius-pill);
  background: #ffffff;
  overflow: hidden;
}

.password-field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 207, 64, 0.55);
}

.password-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.8rem 1.15rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.password-visibility {
  display: grid;
  place-items: center;
  width: 3rem;
  flex: 0 0 3rem;
  border: 0;
  border-left: 1px solid var(--hairline);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-visibility:hover,
.password-visibility:focus-visible {
  background: rgba(255, 207, 64, 0.25);
  color: var(--ink);
  outline: none;
}

.password-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-icon-show {
  display: none;
}

.password-visibility[aria-pressed="true"] .password-icon-hide {
  display: none;
}

.password-visibility[aria-pressed="true"] .password-icon-show {
  display: block;
}

.password-submit {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.45rem;
  background: var(--amber);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.password-submit:hover,
.password-submit:focus-visible {
  background: var(--apricot);
  outline: none;
}

.password-message {
  min-height: 1.4rem;
  margin-top: 0.75rem;
  color: #b53a24;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Case Study Content */
.case-study-content {
  padding-bottom: clamp(4.5rem, 9vw, 7.5rem);
}

.case-study-header {
  padding: clamp(5.5rem, 8vw, 7rem) var(--gutter) clamp(2.5rem, 4.5vw, 3.75rem);
  border-bottom: 1px solid var(--hairline);
}

.case-study-header-inner {
  max-width: 58rem;
  margin: 0 auto;
}

.case-study-header-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.case-study-header-bar span {
  height: 8px;
  border-radius: var(--radius-pill);
}

.case-study-header-bar span:nth-child(1) { width: 4rem; }
.case-study-header-bar span:nth-child(2) { width: 2rem; }
.case-study-header-bar span:nth-child(3) { width: 1.1rem; }
.case-study-header-bar span:nth-child(4) { width: 0.65rem; }

.case-study-header h2 {
  max-width: 24ch;
  margin: 0.65rem 0 1.5rem;
  font-size: clamp(2.25rem, 4.5vw, 3.85rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.case-study-intro {
  max-width: 60ch;
  margin: 0;
  color: #363430;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.55;
}

.case-study-intro + .case-study-intro {
  margin-top: 0.95rem;
}

.case-study-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 2.25rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.case-study-meta-wide {
  grid-column: span 2;
}

.case-study-meta-item:last-child:nth-child(4n + 1) {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.case-study-meta dt {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-study-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.48;
}

.case-study-body {
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) 0;
}

.case-study-body > * {
  margin-right: auto;
  margin-left: auto;
}

.case-study-body > * + * {
  margin-top: clamp(3.5rem, 6vw, 5.25rem);
}

.case-study-section {
  max-width: 44rem;
}

.case-study-section h3 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.case-study-section p {
  max-width: 65ch;
  margin-bottom: 0;
  color: #363430;
  font-size: clamp(1.04rem, 1.15vw, 1.12rem);
  line-height: 1.72;
}

.case-study-section p strong {
  color: var(--ink);
  font-weight: 700;
}

.case-study-section p + p {
  margin-top: 1.3rem;
}

.case-study-subsection {
  margin-top: clamp(2rem, 3.5vw, 2.85rem);
}

.case-study-section > h3 + .case-study-subsection {
  margin-top: 0;
}

.case-study-subsection h4 {
  max-width: 36ch;
  margin: 0 0 0.95rem;
  font-size: clamp(1.2rem, 1.65vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.case-study-subsection-nested {
  margin-top: 1.65rem;
}

.case-study-subsection h5 {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.case-study-list {
  max-width: 62ch;
  margin: 1.35rem 0 0;
  padding: 0 0 0 1.3rem;
  color: #363430;
  font-size: clamp(1.02rem, 1.12vw, 1.09rem);
  line-height: 1.68;
}

.case-study-list li::marker {
  color: var(--apricot);
}

.case-study-list li + li {
  margin-top: 0.7rem;
}

.case-study-ordered-list {
  max-width: 62ch;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: polaris-step;
  color: #363430;
  font-size: clamp(1.02rem, 1.12vw, 1.09rem);
  line-height: 1.64;
}

.case-study-ordered-list li {
  counter-increment: polaris-step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: baseline;
}

.case-study-ordered-list li::before {
  content: counter(polaris-step, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.45rem;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.case-study-ordered-list li + li {
  margin-top: 0.85rem;
}

.case-study-table-wrap {
  width: 100%;
  margin: 1.5rem 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.case-study-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.96rem;
  line-height: 1.55;
}

.case-study-table thead th {
  padding: 0 1.25rem 0.75rem 0;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-study-table tbody td {
  padding: 0.9rem 1.25rem 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: #363430;
}

.case-study-table tbody td:first-child {
  color: var(--ink);
  font-weight: 600;
}

.case-study-table thead th:last-child,
.case-study-table tbody td:last-child {
  padding-right: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill-amber { background: rgba(255, 207, 64, 0.52); }
.status-pill-apricot { background: rgba(255, 156, 82, 0.42); }
.status-pill-periwinkle { background: rgba(153, 161, 255, 0.36); }
.status-pill-coral { background: rgba(255, 118, 107, 0.34); }
.status-pill-muted { background: rgba(25, 24, 22, 0.08); }

.case-study-list + p,
.case-study-ordered-list + p,
.case-study-table-wrap + p,
.case-study-section .case-study-quote + p {
  margin-top: 1.45rem;
}

.case-study-section .case-study-quote {
  margin: 1.5rem 0 0;
}

.case-study-section .case-study-quote > p:last-child {
  font-size: clamp(1.16rem, 1.8vw, 1.45rem);
  line-height: 1.34;
}

.case-study-figure {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}

.case-study-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.case-study-figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Open Unboxed Daylight LCARS Metrics */
.case-study-metrics {
  max-width: 58rem;
}

.case-study-metrics h3 {
  margin: 0 0 2rem;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 3.5vw, 3rem);
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.metric-bar {
  width: 3rem;
  height: 7px;
  border-radius: var(--radius-pill);
}

.metric-card:nth-child(4n + 1) .metric-bar { background: var(--amber); }
.metric-card:nth-child(4n + 2) .metric-bar { background: var(--apricot); }
.metric-card:nth-child(4n + 3) .metric-bar { background: var(--coral); }
.metric-card:nth-child(4n + 4) .metric-bar { background: var(--periwinkle); }

.metric-card strong {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: clamp(2.15rem, 3.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.metric-card > span {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.metric-card p {
  max-width: 34ch;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Airy LCARS Pull Quote */
.case-study-quote {
  max-width: 44rem;
  padding: 0.25rem 0 0.25rem 1.75rem;
  border-left: 5px solid var(--apricot);
}

.case-study-quote .kicker {
  margin-bottom: 0.9rem;
  color: var(--muted);
}

.case-study-quote del {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  text-decoration-thickness: 1.2px;
}

.case-study-quote > p:last-child {
  max-width: 34ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.5vw, 2.05rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

.case-study-end {
  display: flex;
  justify-content: center;
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter) 0;
}

/* Soft Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 850px) {
  .lcars-frame {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .rail-seg {
    font-size: 0.5rem;
    padding: 0 3px 4px 2px;
  }

  .intro-grid,
  .about-grid,
  .project,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .project-reverse .project-media {
    order: 0;
  }

  .intro-art {
    max-width: 17rem;
  }

  .about-copy {
    padding: 1.75rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .about-art,
  .contact-art {
    max-width: 15rem;
  }

  .case-study-meta,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-study-meta-wide {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .lcars-frame {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .lcars-beam-tag,
  .lcars-beam-cap,
  .rail-seg {
    font-size: 0;
  }

  .lcars-beam-tag {
    padding: 0;
  }

  .process-grid,
  .case-study-meta,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .case-study-meta-wide {
    grid-column: span 1;
  }

  .case-study-meta-item:last-child:nth-child(4n + 1) {
    padding-top: 0;
    border-top: 0;
  }

  .password-row {
    flex-direction: column;
  }

  .case-study-header {
    padding-top: 5.5rem;
  }

  .case-study-quote {
    padding-left: 1.25rem;
  }

  .compact-project-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem 0.9rem;
  }

  .compact-project-cta {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal,
  .line-inner,
  .step-pill,
  .floating-art {
    opacity: 1 !important;
    transform: none !important;
  }

  .hl {
    background-size: 100% 50% !important;
  }

  .hl-wash {
    background-size: 100% 72% !important;
  }

  .starship-follower {
    display: none !important;
  }
}
