@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Fonts ---- */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/BricolageGrotesque-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Martian Mono';
  src: url('/fonts/MartianMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

/* ---- Tokens ---- */

:root {
  --bg:             #0A0A0B;
  --bg-elevated:    #141416;
  --bg-overlay:     #1C1C1F;
  --border:         #26262A;
  --border-strong:  #3A3A40;

  --text:           #F5F5F0;
  --text-secondary: #A8A8A2;
  --text-tertiary:  #6B6B66;

  --accent:         #E85D2C;
  --accent-hover:   #FF7041;
  --accent-muted:   #E85D2C26;

  --success:        #6BAF7A;
  --error:          #C85D5D;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Bricolage Grotesque', -apple-system, system-ui, sans-serif;
  --font-mono:    'Martian Mono', 'SF Mono', 'Fira Code', monospace;

  --max-width:    1280px;
  --prose-width:  720px;
}

/* ---- Reset ---- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button, input {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

/* ---- Utility ---- */

.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;
}

/* ---- Focus ---- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Skip Link ---- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10001;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ---- Typography ---- */

.eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: 1.4;
}

h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
}

.body-large {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.caption {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: var(--bg);
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-header__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.site-header__wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.site-header__glint {
  flex: none;
  align-self: baseline;
  transform: translateY(1px);
}


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

.hero {
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  width: 100%;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero__content {
  max-width: var(--prose-width);
}

.hero__eyebrow {
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 48px;
}

.hero__visual {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
}

.hero__shard-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.hero__shard-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-muted) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero__shard {
  position: relative;
  z-index: 1;
  width: 100%;
  animation: shard-rotate 75s linear infinite;
}

@keyframes shard-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- Staggered entry animations ---- */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__eyebrow {
  opacity: 0;
  animation: fade-in-up 0.6s ease forwards;
}

.hero__title .word {
  display: inline-block;
  opacity: 0;
  animation: fade-in-up 0.5s ease forwards;
}

.hero__title .word:nth-of-type(1)  { animation-delay: 0.1s; }
.hero__title .word:nth-of-type(2)  { animation-delay: 0.16s; }
.hero__title .word:nth-of-type(3)  { animation-delay: 0.22s; }
.hero__title .word:nth-of-type(4)  { animation-delay: 0.28s; }
.hero__title .word:nth-of-type(5)  { animation-delay: 0.34s; }
.hero__title .word:nth-of-type(6)  { animation-delay: 0.40s; }
.hero__title .word:nth-of-type(7)  { animation-delay: 0.46s; }
.hero__title .word:nth-of-type(8)  { animation-delay: 0.52s; }

.hero__subtitle {
  opacity: 0;
  animation: fade-in-up 0.6s ease forwards;
  animation-delay: 0.6s;
}

.signup {
  opacity: 0;
  animation: fade-in-up 0.6s ease forwards;
  animation-delay: 1s;
}

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

.signup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}

.signup__input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup__input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.2s;
}

.signup__input::placeholder {
  color: var(--text-tertiary);
}

.signup__input:focus-visible {
  border-color: var(--accent);
}

.signup__input:focus:not(:focus-visible) {
  outline: none;
  border-color: var(--accent);
}

.signup__button {
  padding: 14px 28px;
  background: var(--accent);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.signup__button:hover {
  background: var(--accent-hover);
}

.signup__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.signup__honeypot {
  position: absolute;
  left: -9999px;
}

.signup__error {
  color: var(--error);
  font-size: 14px;
  margin-top: 4px;
  display: none;
}

.signup__error.visible {
  display: block;
}

.signup__form[hidden] {
  display: none;
}

.signup__success {
  color: var(--accent);
  font-size: 18px;
  font-family: var(--font-body);
  line-height: 1.5;
}

/* ---- Divider ---- */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---- Overview ---- */

.overview {
  padding: 80px 0;
}

.overview__intro {
  max-width: var(--prose-width);
}

.overview__title {
  margin-bottom: 32px;
}

.overview__lead {
  margin-bottom: 24px;
}

.overview__body {
  margin-bottom: 96px;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.feature__label {
  margin-bottom: 12px;
}

.feature__description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 44ch;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.site-footer__left,
.site-footer__center,
.site-footer__right {
  font-size: 14px;
  color: var(--text-tertiary);
}

.site-footer__right {
  display: flex;
  gap: 24px;
}

.site-footer__link {
  color: var(--text-tertiary);
  position: relative;
  padding-bottom: 1px;
}

.site-footer__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-secondary);
  transition: width 0.2s ease;
}

.site-footer__link:hover {
  color: var(--text-secondary);
}

.site-footer__link:hover::after {
  width: 100%;
}

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

@media (min-width: 640px) {
  .container {
    padding: 0 48px;
  }

  .signup__input-row {
    flex-direction: row;
  }

  .signup__input {
    flex: 1;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .site-footer .container {
    flex-direction: row;
    text-align: left;
  }

  .site-footer__left,
  .site-footer__center,
  .site-footer__right {
    flex: 1;
  }

  .site-footer__center {
    text-align: center;
  }

  .site-footer__right {
    justify-content: flex-end;
  }
}

@media (min-width: 768px) {
  h1 {
    font-size: 64px;
  }

  h2 {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 20px;
  }

  .body-large {
    font-size: 20px;
  }

  .overview {
    padding: 144px 0;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 80px;
  }

  h1 {
    font-size: 80px;
  }

  h2 {
    font-size: 40px;
  }

  .body-large {
    font-size: 21px;
  }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero .container {
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 64px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero__visual {
    display: flex;
  }

  .overview {
    padding: 160px 0;
  }

  .overview__body {
    margin-bottom: 96px;
  }
}

@media (min-width: 1280px) {
  .features {
    gap: 48px;
  }
}
