/* ---------------------------------------------------------------------------
   CrateDesk — self-hosted webfonts
   Latin subset only, pulled from Google Fonts and served from our own domain
   so the page makes no third-party requests. Both faces are OFL licensed.
   --------------------------------------------------------------------------- */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/sora-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/sora-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/manrope-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/manrope-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/manrope-600.woff2') format('woff2');
}

/* ---------------------------------------------------------------------------
   Design tokens

   The palette is deliberately monochrome — black, white, and glass, no accent.
   Change values here rather than in the rules below.
   --------------------------------------------------------------------------- */

:root {
  --font-display: 'Sora', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --navy: #081826;
  --black: #000;
  --white: #fff;
  --hero-sub: #cddbe9;
  --hero-eyebrow: #dce9f7;

  --dim-55: rgba(255, 255, 255, 0.55);
  --dim-50: rgba(255, 255, 255, 0.5);
  --dim-45: rgba(255, 255, 255, 0.45);
  --dim-35: rgba(255, 255, 255, 0.35);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.12);
  --glass-bg-focus: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-focus: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(24px) saturate(160%);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 0 24px rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.25);

  --nav-blur: blur(18px) saturate(160%);
  --radius-field: 10px;
  --radius-card: 16px;
}

/* --------------------------------------------------------------------------- */

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

/* The `hidden` attribute only sets `display:none` at UA-stylesheet strength, so
   any class here that sets a display value would silently beat it. Both the
   form and the success card rely on `hidden`, so pin it down. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2 { margin: 0; }

/* --- Glass ------------------------------------------------------------------

   Used on the hero CTA, every form field, the submit button and the success
   card. backdrop-filter needs the -webkit- prefix for Safari.
   --------------------------------------------------------------------------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

a.glass:hover,
button.glass:hover { background: var(--glass-bg-hover); }

a.glass:active,
button.glass:active { transform: scale(0.97); }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* --- Nav --------------------------------------------------------------------

   Fixed, sits over the hero. Shrinks and darkens past 40px of scroll.
   --------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 22px 48px;
  background: rgba(8, 24, 38, 0.3);
  -webkit-backdrop-filter: var(--nav-blur);
  backdrop-filter: var(--nav-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: padding 0.25s ease, background 0.25s ease;
}

.nav.is-scrolled {
  padding: 12px 48px;
  background: rgba(4, 10, 18, 0.7);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 20px;
  height: 20px;
  flex: none;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

/* --- Hero -------------------------------------------------------------------

   svh rather than vh: on mobile browsers vh includes the collapsing address
   bar, which pushes the CTA below the fold on first paint.
   --------------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 14, 26, 0.55) 0%,
    rgba(4, 14, 26, 0.05) 22%,
    rgba(4, 14, 26, 0) 45%,
    rgba(4, 14, 26, 0.15) 100%
  );
}

.hero-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: min(400px, 32vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-eyebrow);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--white);
  animation: pulse 1.8s ease-in-out infinite;
}

.headline {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.hero-sub {
  margin: 20px 0 0;
  max-width: 32ch;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--hero-sub);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.fade-4 { margin-top: 32px; }

.btn-pill {
  display: inline-block;
  padding: 15px 26px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

/* --- What we're building ----------------------------------------------------

   Sits between the photo hero and the black contact section so the page darkens
   as you scroll. Deliberately not full-viewport — three short blocks stretched
   over a whole screen would read as padding.
   --------------------------------------------------------------------------- */

.what {
  background: var(--navy);
  padding: 96px 48px;
}

.what-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.what-eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-50);
}

.what-head {
  max-width: 20ch;
  margin: 0 0 56px;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* A hairline rule per column rather than glass panels — three glass cards would
   read as a stock SaaS feature row and fight the restraint of the rest. */
.what-block {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.what-block-head {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.what-block p {
  margin: 0;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--dim-55);
}

/* --- Contact ----------------------------------------------------------------

   Solid black, full viewport, so the CTA anchor lands with no hero bleed.
   --------------------------------------------------------------------------- */

.contact {
  background: var(--black);
  min-height: 100vh;
  min-height: 100svh;
  scroll-margin-top: 0;
  padding: 96px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-50);
}

.contact-head {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-sub {
  margin: 16px 0 40px;
  max-width: 44ch;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dim-55);
}

/* --- Form ------------------------------------------------------------------- */

#pilot-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#pilot-form.is-sent {
  opacity: 0;
  pointer-events: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { text-align: left; }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-45);
}

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-field);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
}

textarea.input { resize: none; display: block; }

.input::placeholder { color: var(--dim-35); }

.input:focus {
  outline: none;
  border-color: var(--glass-border-focus);
  background: var(--glass-bg-focus);
}

.btn-submit {
  margin-top: 8px;
  padding: 16px;
  border-radius: var(--radius-field);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-submit:disabled { opacity: 0.5; cursor: default; }

/* Hidden from people, visible to bots. Never display this. */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin: 4px 0 0;
  min-height: 1.25rem;
  font-size: 14px;
  color: var(--dim-55);
}

.form-status.is-error { color: #ff9c8c; }

/* --- Success ---------------------------------------------------------------- */

.success {
  width: 100%;
  padding: 32px 28px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.success-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.success-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.success-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--dim-55);
}

/* --- Footer ----------------------------------------------------------------- */

.site-footer {
  margin: 56px 0 0;
  font-size: 13px;
  color: var(--dim-35);
}

/* --- Motion ----------------------------------------------------------------- */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-1, .fade-2, .fade-3, .fade-4 { animation: fadeUp 0.7s ease both; }
.fade-1 { animation-delay: 0.05s; }
.fade-2 { animation-delay: 0.18s; }
.fade-3 { animation-delay: 0.3s; }
.fade-4 { animation-delay: 0.42s; }

/* Not in the original spec, but the entrance stagger and the pulsing dot are
   exactly the kind of motion that triggers vestibular symptoms. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .fade-1, .fade-2, .fade-3, .fade-4 { opacity: 1; transform: none; }
}

/* --- Responsive -------------------------------------------------------------

   Single breakpoint. The hero text moves from a floating right-hand panel to a
   full-width block anchored to the bottom, on its own scrim so it stays legible
   over the containers.
   --------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .nav { padding: 18px 20px; }
  .nav.is-scrolled { padding: 12px 20px; }

  .hero-img { object-position: 30% center; }

  .hero-content {
    top: auto;
    bottom: 0;
    left: 0;
    right: auto;
    width: 100%;
    transform: none;
    padding: 32px 28px 56px;
    background: linear-gradient(
      180deg,
      rgba(6, 16, 26, 0) 0%,
      rgba(6, 16, 26, 0.75) 30%,
      rgba(6, 16, 26, 0.92) 100%
    );
  }

  .headline { font-size: 40px; }
  .hero-sub { font-size: 16px; }

  .what { padding: 72px 20px; }
  .what-head { font-size: 30px; margin-bottom: 40px; }
  .what-grid { grid-template-columns: 1fr; gap: 32px; }

  .contact { padding: 88px 20px 40px; }
  .contact-head { font-size: 34px; }
  .form-grid { grid-template-columns: 1fr; }
}
