/* Aperture Consulting — camera-body monochrome + one red dot */

:root {
  --body: #0a0a0b;        /* matte camera body */
  --surface: #131316;     /* raised plate */
  --blade: #101013;       /* shutter blade fill */
  --line: #2a2a31;        /* hairline engraving */
  --steel: #9a9aa3;       /* secondary text */
  --paper: #f4f4f2;       /* engraved lettering */
  --red: #e01a2b;         /* the dot — spend sparingly */

  --display: "Archivo", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 34rem;
}

* { box-sizing: border-box; margin: 0; }

html {
  scroll-behavior: smooth;
  /* no horizontal panning ever — the hero iris deliberately bleeds off-edge.
     hidden = fallback for engines without clip; clip wins where supported
     and, unlike hidden, can never turn an ancestor into a scroll container
     (which would break the sticky curtain hero). */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  background: var(--body);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--paper); color: var(--body); }

.mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- shutter overlay ---------- */

.shutter {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.shutter svg { width: 100%; height: 100%; display: block; }
.shutter .iris-disc { fill: var(--blade); }
.shutter .iris-seams { stroke: var(--line); stroke-width: 0.7; }
.shutter.done { display: none; }

/* ---------- header ---------- */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  z-index: 10;
}

.lockup { display: block; }
.lockup-img {
  height: 38px;
  display: block;
}
.coords { color: var(--steel); }

/* ---------- sections shared ---------- */

section, .site-footer {
  padding: clamp(5rem, 14vh, 9rem) var(--gutter);
  max-width: 72rem;
  margin: 0 auto;
}

.eyebrow {
  color: var(--steel);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin-right: 0.8rem;
}

h1, h2 {
  font-weight: 860;
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 8.5vw, 6.5rem); }
h2 { font-size: clamp(2.1rem, 5.5vw, 4rem); }
h1 em, h2 em { font-style: italic; font-stretch: 100%; }

.lede {
  max-width: var(--measure);
  color: var(--steel);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-top: 1.6rem;
}
.lede br.wide-only { display: none; }
@media (min-width: 640px) { .lede br.wide-only { display: block; } }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* pinned: the rest of the site slides over it like a curtain */
  position: sticky;
  top: 0;
  z-index: 0;
}
.hero-copy { will-change: transform, opacity; }

/* full-width plates that ride over the pinned hero */
.band-dark, .band-light {
  position: relative;
  z-index: 1;
}
.band-dark { background: var(--body); }

/* ambient iris behind the hero — opens with scroll */
.hero-iris {
  position: absolute;
  top: 50%;
  right: -12vmin;
  width: 76vmin;
  height: 76vmin;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}
.hero-iris .iris-disc { fill: #0f0f14; }
.hero-iris .iris-seams { stroke: var(--line); stroke-width: 1.1; }
.hero-iris .iris-rim { stroke: var(--line); stroke-width: 1.4; }
.hero .eyebrow, .hero h1, .hero .lede { position: relative; z-index: 1; }
.scroll-cue { z-index: 1; }
@media (max-width: 720px) {
  .hero-iris { right: -34vmin; opacity: 0.6; }
  /* on phones the hero box spans the viewport, so clip the iris bleed here */
  .hero { overflow-x: clip; }
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--steel);
}
.cue-line {
  width: 4rem;
  height: 1px;
  background: var(--steel);
  transform-origin: left;
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleX(0.25); opacity: 0.4; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ---------- lens-ring ticker ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 36s linear infinite;
}
.ticker-track span {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
  padding-right: 0.5em;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- capabilities ---------- */

.cap-list {
  list-style: none;
  padding: 0;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
}

.cap {
  display: grid;
  grid-template-columns: 3.4rem minmax(12rem, 22rem) 1fr;
  gap: 1.6rem 2.2rem;
  align-items: start;
  padding: 2.1rem 0;
  border-bottom: 1px solid var(--line);
}
.cap-iris { width: 3.4rem; height: 3.4rem; }
.cap-iris .iris-disc { fill: #2b2b33; }
.cap-iris .iris-seams { stroke: var(--body); stroke-width: 2.5; }
.cap-iris .iris-rim { stroke: var(--line); stroke-width: 3; }
.cap h3 {
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.cap p { color: var(--steel); max-width: var(--measure); }

@media (max-width: 720px) {
  .cap { grid-template-columns: 2.6rem 1fr; }
  .cap-iris { width: 2.6rem; height: 2.6rem; grid-row: span 2; }
  .cap p { grid-column: 2; }
}

/* ---------- team ---------- */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.4rem;
  margin-top: 3.5rem;
}

.person {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2.2rem 2rem 2rem;
}

.portrait {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
  display: block;
  filter: grayscale(1) contrast(1.06);
}

/* light plate — the team steps into the light */
.band-light {
  background: #f4f4f2;
  color: #101013;
  --paper: #101013;
  --steel: #5a5a63;
  --line: #d9d9d3;
  --surface: #ffffff;
}

.person h3 {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.role { color: var(--steel); margin: 0.7rem 0 1rem; }
.bio { color: var(--steel); max-width: 30rem; }

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  margin-top: 1.4rem;
}
.person-link {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2em;
}
.person-link:hover, .person-link:focus-visible { border-color: var(--red); }

/* AF brackets — appear on hover/focus like a camera locking focus */
.af-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--red);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  transform: scale(1.25);
  pointer-events: none;
}
.af-corner.tl { top: 7px; left: 7px; border-top-width: 2px; border-left-width: 2px; }
.af-corner.tr { top: 7px; right: 7px; border-top-width: 2px; border-right-width: 2px; }
.af-corner.bl { bottom: 7px; left: 7px; border-bottom-width: 2px; border-left-width: 2px; }
.af-corner.br { bottom: 7px; right: 7px; border-bottom-width: 2px; border-right-width: 2px; }
.person:hover .af-corner, .person:focus-within .af-corner {
  opacity: 1;
  transform: scale(1);
}

/* ---------- depth-of-field scale ---------- */

.field-depth { margin-top: 4.5rem; }

.scale {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  max-width: 46rem;
}
.ticks {
  height: 12px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px 10%
  );
  background-size: 25% 100%;
}
.ticks::after {
  content: "";
  display: block;
  height: 7px;
  margin-top: -7px;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px 5%
  );
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--steel);
  margin-top: 0.55rem;
}
.scale-labels .hot { color: var(--paper); }
.marker {
  position: absolute;
  top: 0.35rem;
  left: 80%;
  width: 2px;
  height: 1.4rem;
  background: var(--red);
}
.scale-caption {
  color: var(--steel);
  margin-top: 1.3rem;
  max-width: var(--measure);
}
.scale-caption strong { color: var(--paper); font-weight: 700; }

/* ---------- footer ---------- */

.site-footer h2 { margin-bottom: 2.4rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.4rem;
}
.footer-links a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25em;
}
.footer-links a:hover, .footer-links a:focus-visible { border-color: var(--red); }

.fine {
  margin-top: 4.5rem;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.red-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
}

/* skyline-scale engraved wordmark closing the page */
.giant-wordmark {
  font-style: italic;
  font-weight: 900;
  font-stretch: 118%;
  font-size: clamp(5rem, 17vw, 19rem);
  line-height: 0.78;
  letter-spacing: -0.03em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.5px #35353e;
  user-select: none;
  transform: translateY(0.06em);
  overflow: hidden;
}

/* ---------- scroll aperture widget ---------- */

.scroll-iris {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.scroll-iris svg { width: 44px; height: 44px; display: block; }
.scroll-iris .iris-disc { fill: #34343d; }
.scroll-iris .iris-seams { stroke: var(--body); stroke-width: 3; }
.scroll-iris .iris-rim { stroke: #45454f; stroke-width: 6; }
.fstop { color: var(--steel); min-width: 3.4em; }

/* ---------- reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(10px);   /* out of focus until revealed */
  transition: opacity 640ms ease, transform 640ms ease, filter 720ms ease;
}
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- focus & motion ---------- */

:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* Lenis smooth-scroll host classes */
.lenis.lenis-smooth { scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shutter { display: none; }
  .cue-line { animation: none; }
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .af-corner { transition: none; }
}
