/*
  Upaura: "The Glint"
  One matte navy world, one line of cyan light.
  Tonal ramp n0..n10 is the only set of neutrals. --glint is light only: lines, edges, focus. Never a filled block.
  Shape rule: interactive = full pill, nothing else rounded.
*/

@font-face {
  font-family: "Gabarito";
  src: url("fonts/gabarito-latin-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --n0: #05080f;
  --n1: #060d1b;
  --n2: #0c1224;
  --n3: #111a30;
  --n4: #18233d;
  --n5: #22304d;
  --n6: #3a4a66;
  --n7: #6386a6;
  --n8: #8fa2bb;
  --n9: #c3cedc;
  --n10: #eceff4;
  --glint: #37aedb;
  --glint-edge: #24bcd4;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* measured from the approved comp at 1536px: 60px gutter */
  --gutter: clamp(20px, 3.9vw, 72px);

  color-scheme: dark;
}

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

html { background: var(--n1); scrollbar-color: var(--n5) var(--n1); }

body {
  margin: 0;
  background: var(--n1);
  color: var(--n10);
  font-family: "Gabarito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.24vw, 1.3rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--n5); color: var(--n10); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 1.5px solid var(--glint); outline-offset: 4px; border-radius: 999px; }
img, svg, canvas { display: block; max-width: 100%; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--n10); color: var(--n1); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* Pill with a light edge */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font: inherit;
  font-size: clamp(0.95rem, 1.04vw, 1.1rem);
  font-weight: 500;
  color: var(--n10);
  text-decoration: none;
  height: clamp(40px, 2.7vw, 48px);
  padding-inline: clamp(20px, 2.2vw, 36px);
  border-radius: 999px;
  border: 1px solid var(--glint-edge);
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: transform 160ms var(--ease-out), background-color 220ms ease, border-color 220ms ease;
}
.pill:active { transform: scale(0.97); }
/* a line of light crosses the pill's top edge on hover */
.pill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #eaf8ff, transparent);
  transform: translateX(-120%);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .pill:hover { border-color: var(--glint); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .pill:hover::after { transform: translateX(240%); transition: transform 650ms var(--ease-out); }
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: clamp(64px, 5.1vw, 96px);
  padding-inline: calc(var(--gutter) + 0.4vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-header .pill { height: clamp(36px, 2.45vw, 42px); padding-inline: clamp(16px, 1.25vw, 22px); font-size: clamp(0.85rem, 0.9vw, 1rem); }
.brand img { height: clamp(18px, 1.5vw, 24px); width: auto; }

/* Hero */

.hero {
  position: relative;
  height: max(560px, 77.4vh);
  overflow: hidden;
  isolation: isolate;
}

.hero-plate {
  position: absolute;
  z-index: -1;
  /* tube framed to the comp: curve's left edge near 49% of the frame, arc exits the right edge near the top */
  left: 32.6vw;
  top: -2.28vw;
  width: 67.4vw;
  height: 67.4vw;
  max-width: none;
  object-fit: cover;
  filter: brightness(0.95);
  /* the comp keeps the lower tube in shadow: light falls off below the arc */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%), linear-gradient(to bottom, #000 66%, rgba(0,0,0,0.3) 86%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 20%), linear-gradient(to bottom, #000 66%, rgba(0,0,0,0.3) 86%);
  mask-composite: intersect;
}

.hero-glint {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: var(--gutter);
  bottom: 9.2%;
  max-width: 47vw;
}

.hero h1 {
  font-size: clamp(2.6rem, 3.68vw, 5.3rem);
  font-weight: 440;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 0.3em;
  max-width: 12.6em;
  text-wrap: balance;
}

.hero p {
  color: var(--n7);
  letter-spacing: -0.01em;
  margin: 0 0 1.9em;
  max-width: 34em;
}

/* Sections */

.section { padding-inline: var(--gutter); }

.services { padding-block: clamp(40px, 5vw, 88px) clamp(96px, 10vw, 180px); }

.services h2 {
  font-size: clamp(2.2rem, 3.12vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(28px, 2.7vw, 44px);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 56px) clamp(24px, 3vw, 48px);
}
.service-list li:nth-child(-n+3) { grid-column: span 2; }
.service-list li:nth-child(n+4) { grid-column: span 3; }

.service-list li { border-top: 1px solid var(--n4); padding-top: clamp(14px, 1.2vw, 22px); }
.service-list h3 { font-size: inherit; font-weight: 400; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--n10); }
.service-list p { margin: 0; color: var(--n8); max-width: 32ch; }

.services .intro { color: var(--n8); max-width: 44ch; margin: calc(-1 * clamp(12px, 1.4vw, 24px)) 0 clamp(36px, 3.4vw, 56px); }
.service-list li { position: relative; overflow-x: clip; }

/* the light passes along each hairline once, left to right */
.term-grid li { position: relative; overflow-x: clip; }
.service-list li::before,
.term-grid li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glint), transparent);
  opacity: 0;
  pointer-events: none;
}

/* Terms */

.terms {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 120px);
  border-top: 1px solid var(--n4);
  margin-inline: var(--gutter);
  padding-inline: 0;
  padding-block: clamp(72px, 8vw, 150px) clamp(96px, 10vw, 180px);
}
.terms h2 {
  text-wrap: balance;
  font-size: clamp(2.2rem, 3.12vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 8em;
}
.term-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 3.4vw, 56px) clamp(24px, 3vw, 48px);
}
.term-grid li { border-top: 1px solid var(--n4); padding-top: clamp(14px, 1.2vw, 22px); }
.term-grid strong { display: block; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 6px; }
.term-grid span { color: var(--n8); }

/* Contact close */

.contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: clamp(40px, 5vw, 96px) clamp(48px, 4vw, 72px);
}
.contact h2 {
  text-wrap: balance;
  font-size: clamp(2.8rem, 5.2vw, 7.2rem);
  font-weight: 440;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 0.4em;
  max-width: 11em;
}
.contact-copy p { color: var(--n7); max-width: 40ch; margin: 0 0 2em; letter-spacing: -0.01em; }

.contact-copy .contact-email { margin: 1.25em 0 0; color: var(--n7); font-size: 0.9em; }

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  margin-inline: var(--gutter);
  padding-block: clamp(24px, 2vw, 36px) clamp(32px, 3vw, 48px);
  border-top: 1px solid var(--n4);
  color: var(--n7);
  font-size: 0.85em;
}
.legal-line { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--n10); }
}

/* Header over content */

.site-header { border-bottom: 1px solid transparent; transition: background-color 300ms ease, border-color 300ms ease; }
.site-header.is-scrolled {
  background: var(--n1);
  border-bottom-color: var(--n3);
}

/* Legal pages */

.legal { padding: clamp(120px, 12vw, 200px) var(--gutter) clamp(96px, 10vw, 160px); }
.legal article { max-width: 68ch; }
.legal h1 {
  font-size: clamp(2.6rem, 4.4vw, 5rem);
  font-weight: 440;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 0.25em;
}
.legal .updated { color: var(--n7); margin: 0 0 3em; }
.legal h2 { font-size: 1.15em; font-weight: 500; margin: 2.6em 0 0.5em; }
.legal p, .legal li { color: var(--n8); }
.legal strong { color: var(--n10); font-weight: 500; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 0.4em; }

/* Motion. Content is visible without JS; motion only layers on top. */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 900ms var(--ease-out) both; }
  .hero-copy > :nth-child(1) { animation-delay: 80ms; }
  .hero-copy > :nth-child(2) { animation-delay: 140ms; }
  .hero-copy > :nth-child(3) { animation-delay: 200ms; }

  .motion-ready [data-reveal] {
    clip-path: inset(0 0 100% 0);
    transform: translateY(28px);
    transition: clip-path 900ms var(--ease-out), transform 900ms var(--ease-out);
  }
  .motion-ready [data-reveal][data-visible] { clip-path: inset(0 0 -20% 0); transform: none; }

  .motion-ready :is(.service-list, .term-grid)[data-visible] li::before { animation: sweep 1600ms var(--ease-in-out) both; }
  .motion-ready :is(.service-list, .term-grid)[data-visible] li:nth-child(2)::before { animation-delay: 90ms; }
  .motion-ready :is(.service-list, .term-grid)[data-visible] li:nth-child(3)::before { animation-delay: 180ms; }
  .motion-ready :is(.service-list, .term-grid)[data-visible] li:nth-child(4)::before { animation-delay: 270ms; }
  .motion-ready .service-list[data-visible] li:nth-child(5)::before { animation-delay: 360ms; }
}


@keyframes rise {
  from { opacity: 0.001; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes sweep {
  0% { opacity: 0; transform: translateX(-100%); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(330%); }
}

/* Plates-only capture mode for the build gate */
.plates-only .semantic { visibility: hidden; }

/* Responsive */

@media (max-width: 1023px) {
  .terms { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .hero { height: max(600px, 92svh); }
  .hero-plate {
    left: -6vw; top: 18vw; width: 150vw; height: 150vw;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%), linear-gradient(to bottom, #000 45%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 20%), linear-gradient(to bottom, #000 45%, transparent 100%);
  }
  .service-list li:nth-child(n) { grid-column: auto; }
  .hero-copy { right: var(--gutter); bottom: 7%; max-width: none; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); max-width: 9em; }
  .service-list, .term-grid { grid-template-columns: 1fr; }
  .contact { padding-top: 24px; }
  .site-footer { flex-direction: column; }
}
