/* Capy's company site. Tokens first; every colour, face and easing below comes from them. */
@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/gabarito-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/gabarito-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/spline-sans-mono-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ground: #0C0A18;
  --raise: #141127;
  --brand: #28234A;
  --brand-hi: #3D3680;
  --line: #2C2850;
  --line-strong: #423D74;
  --fg: #F3F3F5;
  --fg-2: #CFCCE4;
  --fg-3: #A29EC4;
  --accent: #7270F0;
  --accent-fill: #4B49D6;
  --accent-fg: #ADAAFA;
  --accent-soft: #2A2760;
  --white: #FFFFFF;
  --white-hover: #E9E8FB;
  --on-white: #28234A;
  --outline: #8F8BC0;
  --on-violet-2: #E4E3FB;
  --on-violet-line: #5F59AE;
  --font-sans: "Gabarito", ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  scrollbar-color: var(--line-strong) var(--ground);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-fill); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
svg { flex: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(72px, 9vw, 128px); }

.display {
  font-size: clamp(2.6rem, 1rem + 5vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.025em;
}
.lede {
  font-size: clamp(1.0625rem, .95rem + .5vw, 1.25rem);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 30em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--white); color: var(--on-white); }
.btn-primary:hover { background: var(--white-hover); }
.btn-ghost { border-color: var(--outline); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: var(--brand-hi); }
.btn-small { min-height: 44px; padding: 0 1rem; font-size: .9375rem; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--brand); }
.hero .wrap { position: relative; z-index: 1; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}
.wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--fg-2); text-decoration: none; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--white); text-decoration: underline; }
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 760px;
  padding-top: clamp(40px, 7vw, 104px);
  padding-bottom: clamp(72px, 10vw, 144px);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art {
  position: absolute;
  right: 0;
  top: 84px;
  width: 46%;
  height: calc(100% - 84px);
  display: block;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, transparent 0, #000 20%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, transparent 0, #000 20%);
  mask-composite: intersect;
}

/* Problems */
.problems-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.problems { list-style: none; margin: 0; padding: 0; }
.problems li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 32px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.problems li:last-child { border-bottom: 1px solid var(--line); }
.quote { font-size: clamp(1.2rem, 1rem + .9vw, 1.6rem); font-weight: 500; line-height: 1.25; }
.jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.jump svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.jump:hover { text-decoration: underline; }
.jump:hover svg { transform: translateX(4px); }

/* Services */
.services { background: var(--raise); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.svc {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.svc:last-of-type { border-bottom: 1px solid var(--line); }
.custom {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 24px 48px;
  align-items: center;
  margin-top: 48px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
  scroll-margin-top: 24px;
}
.custom h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
.custom-what { margin-top: 12px; color: var(--fg-2); max-width: 38em; }
.custom-side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.custom-side .svc-len { margin: 0; }
.custom:target { border-color: var(--accent); }
.svc::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  z-index: -1;
  border-radius: 10px;
  background: var(--accent-soft);
  opacity: 0;
}
.svc:target::before { animation: flash 2s var(--ease); }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.svc h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
.svc-len { margin-top: 10px; font: 500 .8125rem/1.4 var(--font-mono); color: var(--accent-fg); }
.svc-what { color: var(--fg-2); }
.svc-end { font-weight: 500; }
.svc-end small { display: block; margin-bottom: 4px; font-size: .8125rem; font-weight: 400; color: var(--fg-3); }

/* Steps */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 44px 0 0;
  list-style: none;
}
.steps::before, .steps::after {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.steps::after {
  background: var(--accent);
  transform-origin: left top;
  transition: transform 1.8s var(--ease);
}
.step { position: relative; display: flex; flex-direction: column; gap: 10px; }
.step::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: -44px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--ground);
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
}
.step:nth-child(2)::before { transition-delay: .45s; }
.step:nth-child(3)::before { transition-delay: .9s; }
.step:nth-child(4)::before { transition-delay: 1.35s; }
.steps.pre::after { transform: scaleX(0); }
.steps.pre .step::before { background: var(--ground); border-color: var(--line-strong); }
.step h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.step p { color: var(--fg-2); }
.step .jump { font-size: .9375rem; white-space: normal; }
.step-links { display: flex; flex-wrap: wrap; gap: 0 18px; }

/* Products */
.products { background: var(--brand-hi); }
.products-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.products-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.products .lede { color: var(--on-violet-2); }
.tools { display: flex; flex-direction: column; }
.tools-title { font-size: 1.0625rem; font-weight: 700; padding-bottom: 14px; }
.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--on-violet-line);
  text-decoration: none;
}
.tool:last-child { border-bottom: 1px solid var(--on-violet-line); }
.tool strong { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.tool span { grid-column: 1; color: var(--on-violet-2); }
.tool svg { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; transition: transform .3s var(--ease); }
.tool:hover strong { text-decoration: underline; }
.tool:hover svg { transform: translate(3px, -3px); }

/* Close */
.close { background: var(--ground); }
.close-inner { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.close .lede { color: var(--fg-2); }
.phone { font: 500 1rem/1.4 var(--font-mono); color: var(--fg-2); text-decoration: none; }
.phone:hover { color: var(--white); text-decoration: underline; }
.footer { padding-block: 28px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--fg-3); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer a { color: var(--fg-2); }

@media (max-width: 960px) {
  .hero-copy { padding-bottom: 24px; }
  .hero-art {
    position: relative;
    top: auto;
    width: 100%;
    height: 200px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 55%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent 0, #000 55%);
    mask-composite: add;
  }
  .problems-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .svc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 32px; }
  .svc > header { grid-column: 1 / -1; }
  .products-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .problems li { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 18px 0 8px; }
  .svc { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0; }
  .custom { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .section-head { margin-bottom: 32px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 0 0 0 40px; }
  .steps::before, .steps::after { left: 9px; top: 0; width: 2px; height: 100%; }
  .steps.pre::after { transform: scaleY(0); }
  .step::before { left: -40px; top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
