/* Dorsia Technology */

@font-face {
  font-family: "Funnel Display";
  src: url("/fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("/fonts/funnel-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@property --x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 66%;
}

:root {
  --void: #000000;
  --ink: #ededeb;
  --ash: #8f8f8d;
  --smoke: #5c5c5b;
  --line: #262626;
  --light: 232 238 246;

  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --text: "Funnel Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: dark;
}

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

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }

::selection { background: rgb(var(--light) / 0.9); color: var(--void); }

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--void);
  text-decoration: none;
  font-size: 0.875rem;
}
.skip:focus { top: 12px; }

/* Masthead */

.masthead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(28px, env(safe-area-inset-top));
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark-a { font-weight: 640; }
.wordmark-b { font-weight: 360; color: var(--ash); }

.masthead-link {
  font-size: 0.9375rem;
  color: var(--ash);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.masthead-link:hover { color: var(--ink); }

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;
  /* Headline sits on the horizon; lede hangs beneath it. */
  row-gap: 0;
}

.hero-title {
  grid-row: 2;
  font-family: var(--display);
  font-weight: 420;
  font-size: clamp(3.1rem, 10.2vw, 9.25rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  padding-bottom: clamp(28px, 4.2vw, 56px);
  max-width: 11ch;
}

.hero-lede {
  grid-row: 3;
  padding-top: clamp(28px, 4.2vw, 56px);
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--ash);
}

/* The horizon: a slit of light the headline rests on. Its position is
   synced to the boundary between title and lede by site.js; the fallback
   value keeps it sensible before script runs. */
.horizon {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --y: 56%;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
  animation: drift 26s ease-in-out infinite alternate;
}
.horizon.is-tracking { animation: none; }

.horizon-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--y);
  height: 1px;
  background:
    radial-gradient(28% 100% at var(--x) 50%, rgb(255 255 255 / 1), rgb(var(--light) / 0) 100%),
    linear-gradient(90deg, rgb(var(--light) / 0) 0%, rgb(var(--light) / 0.22) 20%, rgb(var(--light) / 0.32) 50%, rgb(var(--light) / 0.22) 80%, rgb(var(--light) / 0) 100%);
  transform-origin: var(--x) 50%;
  animation: open 1.9s var(--ease) both;
}

.horizon-glow {
  position: absolute;
  left: -10%;
  right: -10%;
  top: var(--y);
  height: 120vh;
  transform: translateY(-50%);
  background:
    radial-gradient(22% 2.2% at var(--x) 50%, rgb(var(--light) / 0.30), rgb(var(--light) / 0) 100%),
    radial-gradient(42% 16% at var(--x) 50%, rgb(var(--light) / 0.075), rgb(var(--light) / 0) 100%),
    radial-gradient(70% 36% at var(--x) 52%, rgb(var(--light) / 0.04), rgb(var(--light) / 0) 100%);
  animation: rise 2.6s 0.5s var(--ease) both;
}

/* Fine grain over the glow prevents gradient banding on dark displays. */
.horizon-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: soft-light;
}

.hero-title,
.hero-lede,
.masthead {
  animation: appear 1.2s var(--ease) both;
}
.hero-title { animation-delay: 0.7s; }
.hero-lede { animation-delay: 1s; }
.masthead { animation-delay: 1.2s; }

@keyframes open {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  0% { --x: 58%; }
  100% { --x: 76%; }
}

/* Sections */

.view {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  column-gap: clamp(32px, 6vw, 96px);
  align-items: end;
  padding-top: clamp(64px, 9vw, 140px);
  padding-bottom: clamp(96px, 14vw, 200px);
}

.view-statement {
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(1.75rem, 3.9vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  max-width: 22ch;
}

.view-note {
  max-width: 36ch;
  color: var(--ash);
  padding-bottom: 0.35em;
}

.section-title {
  font-family: var(--display);
  font-weight: 420;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

/* Strategy, systems, deployment: a genuine sequence, drawn as a path. */

.work {
  padding-bottom: clamp(112px, 16vw, 240px);
}

.path {
  margin-top: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 64px);
  position: relative;
}

.path::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 1px;
  background: linear-gradient(90deg, rgb(var(--light) / 0.5), rgb(var(--light) / 0.16) 70%, rgb(var(--light) / 0));
}

.step {
  position: relative;
  padding-top: 40px;
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--void);
  box-shadow: inset 0 0 0 1px rgb(var(--light) / 0.75);
}

.step-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.step-text {
  margin-top: 14px;
  color: var(--ash);
  max-width: 32ch;
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(32px, 8vw, 128px);
  row-gap: 56px;
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(96px, 12vw, 176px);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}

.contact-text {
  margin-top: 22px;
  max-width: 34ch;
  color: var(--ash);
}

.contact-email {
  display: inline-block;
  margin-top: 36px;
  font-family: var(--display);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.35s var(--ease);
  overflow-wrap: anywhere;
}
.contact-email:hover { background-size: 0 1px; background-position: 100% 100%; }

.form {
  display: grid;
  gap: 30px;
  align-content: start;
}

.field { display: grid; gap: 8px; }

.field label {
  font-size: 0.875rem;
  color: var(--ash);
}
.optional { color: var(--smoke); }

.field input,
.field textarea {
  width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 1px solid #3a3a3a;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  padding: 6px 0 12px;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.5; }
.field input:hover,
.field textarea:hover { border-bottom-color: #555; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field input:focus-visible,
.field textarea:focus-visible { outline: none; }
.field [aria-invalid="true"] { border-bottom-color: #c9c9c9; }

.field-error {
  font-size: 0.875rem;
  color: var(--ink);
}
.field-error::before { content: "\2022\00a0"; color: var(--ash); }

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.turnstile:empty { display: none; }

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 6px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--void);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 560;
  padding: 15px 28px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.button:hover { background: #ffffff; }
.button:disabled { opacity: 0.5; cursor: progress; }

.form-status {
  font-size: 0.9375rem;
  color: var(--ash);
}
.form-status a { color: var(--ink); }
.form-status.is-success { color: var(--ink); }

.form-privacy {
  font-size: 0.8125rem;
  color: var(--smoke);
}

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: max(36px, env(safe-area-inset-bottom));
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
  font-size: 0.875rem;
  color: var(--smoke);
}

/* Error page */

.lost {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 28px;
}
.lost h1 {
  font-family: var(--display);
  font-weight: 420;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lost p { color: var(--ash); max-width: 34ch; }
.lost a { color: var(--ink); }

/* Responsive */

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

@media (max-width: 760px) {
  .path {
    grid-template-columns: 1fr;
    row-gap: 48px;
    padding-left: 32px;
  }
  .path::before {
    left: 3px;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, rgb(var(--light) / 0.5), rgb(var(--light) / 0.12));
  }
  .step { padding-top: 0; }
  .step::before { left: -32px; top: 8px; }
  .view { grid-template-columns: 1fr; }
  .view-note { margin-top: 32px; }
}

@media (max-width: 520px) {
  .hero-inner { grid-template-rows: 1.5fr auto auto 1fr; }
  .hero-title { font-size: 15.5vw; letter-spacing: -0.05em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .horizon { animation: none; }
}
