@import url("./fonts/fonts.css");

/* ============================================================
   Pairstack — Ship It Kit opt-in page
   Design tokens (brand system)
   ============================================================ */
:root {
  --bg: #0E1116;
  --surface: #161B22;
  --border: #2A3340;
  --accent: #F5A524;
  --accent-hover: #FFB534;
  --text: #E9EEF3;
  --point: #C6CFD8;
  --muted: #9AA6B2;
  --faint: #5E6A78;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-field: 12px;
  --radius-panel: 16px;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.accent { color: var(--accent); }

/* ambient amber haze behind everything */
.glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: 520px;
  height: 520px;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(245, 165, 36, 0.18), rgba(245, 165, 36, 0) 62%);
  filter: blur(8px);
  animation: haze 7s ease-in-out infinite;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: relative;
  z-index: 3;
  flex: none;
  padding: 22px 24px 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wordmark__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #C47F10);
  box-shadow: 0 0 16px -2px rgba(245, 165, 36, 0.65);
  flex: none;
}
.wordmark__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ============================================================
   Layout
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.content {
  padding: 26px 24px 0;
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 8.5vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.subhead {
  margin: 14px 0 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* stacked-planes hero visual (rendered image) ------------------ */
.visual {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.planes {
  display: block;
  width: 360px;
  max-width: 94%;
  height: auto;
  /* transparent PNG-style webp: only the glass + haze paint, the rest is
     truly transparent, so there is no background box on the page. */
  pointer-events: none;
  user-select: none;
  animation: floatA 8s ease-in-out infinite;
  will-change: transform;
}

/* what you get ------------------------------------------------ */
.points {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--point);
}
.points li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(245, 165, 36, 0.8);
}

/* ============================================================
   Form — the focal point
   ============================================================ */
.capture {
  position: relative;
  z-index: 3;
  flex: none;
  padding: 20px 24px 22px;
  background: linear-gradient(180deg, rgba(22, 27, 34, 0), var(--surface) 22%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* honeypot — hidden from humans, tempting to bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

.field {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-field);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field::placeholder { color: #5A6673; }
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.18);
}
.field[aria-invalid="true"] {
  border-color: #E5484D;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.16);
}

.cta {
  position: relative;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  border: none;
  border-radius: var(--radius-field);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 26px -8px rgba(245, 165, 36, 0.6);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 34px -8px rgba(245, 165, 36, 0.7);
  transform: translateY(-1px);
}
.cta:active { transform: translateY(0) scale(0.99); }
.cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px rgba(245, 165, 36, 0.7);
}
.cta[disabled] { cursor: default; opacity: 0.85; }

/* spinner shown while sending */
.cta__spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 2px;
  border: 2px solid rgba(14, 17, 22, 0.35);
  border-top-color: var(--bg);
  border-radius: 50%;
  vertical-align: -3px;
  animation: spin 0.7s linear infinite;
}
.cta__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.form.is-loading .cta__spinner { display: inline-block; }

.error {
  margin: 2px 0 0;
  min-height: 1.2em;
  font-size: 13px;
  color: #FF8F92;
}
.microcopy {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  color: #6B7682;
}
.microlink {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  transition: color 0.15s ease;
}
.microlink:hover,
.microlink:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* success state */
.success {
  text-align: center;
  padding: 14px 0 6px;
}
.success__check {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(245, 165, 36, 0.14);
  border: 1px solid rgba(245, 165, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.success__check svg { width: 22px; height: 22px; }
.success__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  color: var(--text);
}
.success__sub {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.success__sub b { color: var(--text); font-weight: 500; }

.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 3;
  flex: none;
  padding: 14px 24px 18px;
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #3F474F;
}

/* hidden utility */
[hidden] { display: none !important; }

/* ============================================================
   Desktop — split layout
   ============================================================ */
@media (min-width: 900px) {
  body { justify-content: center; }

  .site-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 30px 56px;
    max-width: var(--maxw);
    margin: 0 auto;
  }
  .wordmark__mark { width: 26px; height: 26px; border-radius: 7px; }
  .wordmark__text { font-size: 21px; }

  .glow {
    top: -160px;
    left: auto;
    right: -60px;
    transform: none;
    width: 760px;
    height: 760px;
    background: radial-gradient(circle, rgba(245, 165, 36, 0.15), rgba(245, 165, 36, 0) 60%);
  }

  /* DOM order stays mobile-friendly (copy, motif, points, form);
     grid placement pulls the motif into a right-hand column on desktop. */
  .page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: 40px;
    padding: 0 56px;
    min-height: 100dvh;
  }
  .content { grid-column: 1; grid-row: 1; padding: 0; }
  .points  { grid-column: 1; grid-row: 2; }
  .capture { grid-column: 1; grid-row: 3; }
  .visual  {
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 420px;
    align-self: center;
  }

  .eyebrow { font-size: 12px; margin-bottom: 18px; }
  h1 { font-size: clamp(40px, 4.6vw, 54px); line-height: 1.05; letter-spacing: -0.03em; }
  .subhead { margin-top: 20px; font-size: 18px; line-height: 1.55; max-width: 440px; }

  .points {
    padding: 0;
    margin: 30px 0 34px;
    gap: 13px;
  }
  .points li { font-size: 15px; }
  .points li::before { width: 7px; height: 7px; }

  .capture {
    padding: 0;
    background: none;
    border-top: none;
    max-width: 460px;
  }
  .form { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .field { flex: 1 1 220px; height: 56px; padding: 0 18px; background: var(--surface); }
  .cta { width: auto; flex: none; height: 56px; padding: 0 26px; }
  .error { flex-basis: 100%; }
  .microcopy { flex-basis: 100%; text-align: left; margin-top: 12px; font-size: 13px; }

  .success {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid rgba(245, 165, 36, 0.35);
  }
  .success__check { margin: 0; flex: none; }
  .success__title { font-size: 18px; }

  .trust {
    justify-content: flex-start;
    margin-top: 34px;
    font-size: 13px;
    color: var(--muted);
  }

  .planes { width: 100%; max-width: 560px; }

  .site-footer {
    position: absolute;
    bottom: 0; left: 0;
    padding: 24px 56px;
    text-align: left;
  }
}

/* wider desktop: cap the copy column so lines stay readable */
@media (min-width: 1180px) {
  .content, .points, .capture { max-width: 560px; }
}

/* ============================================================
   Motion
   ============================================================ */
@keyframes floatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes floatB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes floatC { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes haze { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.85; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .planes, .glow, .cta__spinner { animation: none !important; }
  .cta, .field { transition: none !important; }
}
