/* =============================================================
   LUXYNTH — landing page styles

   Everything that might want to change later lives in :root as
   a CSS variable. Edit those, leave the rest alone.

   Breakpoints:
     - desktop  : default
     - tablet   : <= 900px
     - phone    : <= 560px
   ============================================================= */

:root {
  /* ---- Color palette ----------------------------------------- */
  --color-bg:              #0E0B1A;          /* page background */
  --color-bg-elevated:     #14102A;          /* cards, inputs, frames */
  --color-bg-nav:          rgba(14, 11, 26, 0.85);

  --color-text:            #E8E4F5;          /* primary text */
  --color-text-strong:     #F5F1FF;          /* headlines */
  --color-text-muted:      #A89EC8;          /* body / secondary */
  --color-text-faint:      #8B7FB5;          /* labels, hints */

  --color-accent:          #A855F7;          /* primary purple */
  --color-accent-hover:    #B968F8;
  --color-accent-soft:     #C084FC;          /* lighter purple for highlights */
  --color-accent-on:       #0E0B1A;          /* text on accent fills */

  --color-border:          #2A2240;          /* default border */
  --color-border-strong:   #4A3D7A;          /* hover / emphasis border */

  --color-grid-line:       rgba(168, 85, 247, 0.04);

  /* ---- Typography -------------------------------------------- */
  --font-mono:             'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-display:          'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;

  --fs-xs:                 0.6875rem;        /* 11px — labels, ribbons */
  --fs-sm:                 0.8125rem;        /* 13px — small body */
  --fs-base:               0.9375rem;        /* 15px — body */
  --fs-md:                 1rem;             /* 16px */
  --fs-lg:                 1.25rem;          /* 20px — wordmark */
  --fs-xl:                 1.75rem;          /* 28px — section heads */
  --fs-2xl:                2.75rem;          /* 44px — hero headline */

  --lh-tight:              1.1;
  --lh-snug:               1.35;
  --lh-normal:             1.65;

  --ls-wide:               0.15em;
  --ls-wider:              0.2em;

  /* ---- Spacing ----------------------------------------------- */
  --space-1:               0.25rem;
  --space-2:               0.5rem;
  --space-3:               0.75rem;
  --space-4:               1rem;
  --space-5:               1.5rem;
  --space-6:               2rem;
  --space-7:               2.5rem;
  --space-8:               3.5rem;
  --space-9:               5rem;

  --section-py:            var(--space-9);   /* vertical padding per section */
  --container-px:          var(--space-7);   /* horizontal page padding */

  /* ---- Sizing ------------------------------------------------ */
  --container-max:         1120px;           /* outer container */
  --content-narrow-max:    640px;            /* max width for prose / form / founder */
  --video-max:             720px;            /* max width for video frames */

  /* ---- Radius ------------------------------------------------ */
  --radius-sm:             4px;
  --radius-md:             6px;
  --radius-lg:             8px;

  /* ---- Borders ----------------------------------------------- */
  --border-width:          1px;

  /* ---- Misc -------------------------------------------------- */
  --grid-cell:             32px;             /* hero background grid spacing */
  --transition:            150ms ease;
  --nav-height:            64px;
}

/* =============================================================
   Reset / base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html {
  /* Smooth anchor scrolling, with offset so sticky nav doesn't cover targets */
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font: inherit;
  cursor: pointer;
}

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

/* =============================================================
   Layout primitives
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.content-narrow {
  max-width: var(--content-narrow-max);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  border-top: var(--border-width) solid var(--color-border);
}

.section:first-of-type {
  border-top: none;
}

/* =============================================================
   Ribbon (// 0X_LABEL)
   ============================================================= */
.ribbon {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

/* =============================================================
   Nav
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg-nav);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--border-width) solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  min-height: var(--nav-height);
}

.logo-cell {
  /* Ensure the cell centers its contents if it isn't already */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem; /* Add a little breathing room if you don't have it */
}

.logo-cell img {
  max-width: 100%;
  height: auto;
  max-height: 48px; /* Adjust this value to scale the logos up or down uniformly */
  object-fit: contain;
}
.nav__brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-strong);
}

.tagline {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-faint);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--fs-sm);
}

.nav__links a {
  color: var(--color-text-faint);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--color-text);
}

.nav__links .btn {
  color: var(--color-accent-on);
}

/* Hamburger toggle — hidden on desktop */
.nav__toggle {
  display: none;
  background: transparent;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.nav__toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle.is-open .nav__toggle-bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav__toggle.is-open .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open .nav__toggle-bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: var(--border-width) solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-on);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent-soft);
  border-color: var(--color-border-strong);
}

.btn--ghost:hover {
  border-color: var(--color-accent-soft);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* =============================================================
   01 Hero
   ============================================================= */
.section--hero {
  background-image:
    linear-gradient(var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  color: var(--color-text-strong);
  margin: 0 0 var(--space-4);
}

.hero__subhead {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-7);
}

.hero__ctas {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

/* =============================================================
   Video frames
   ============================================================= */
.video-frame {
  position: relative;
  width: 100%;
  max-width: var(--video-max);
  aspect-ratio: 16 / 9;
  background: var(--color-bg-elevated);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-frame__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  background: rgba(168, 85, 247, 0.03);
}

.video-frame__label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-faint);
}

.video-frame__hint {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* =============================================================
   02 Problem
   ============================================================= */
.prose {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
}

.prose p { margin: 0 0 var(--space-4); }
.prose p:last-child { margin-bottom: 0; }

/* =============================================================
   04 Coverage
   ============================================================= */
.coverage__label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5);
}

.coverage__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.logo-cell {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-faint);
  background: var(--color-bg-elevated);
}

/* =============================================================
   05 Personas
   ============================================================= */
.personas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.persona {
  background: var(--color-bg-elevated);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.persona__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--color-accent-soft);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.persona__body {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--color-text-muted);
  margin: 0;
}

/* =============================================================
   06 Founder
   ============================================================= */
.founder {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.founder__photo {
  aspect-ratio: 1;
  background: var(--color-bg-elevated);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-faint);
}

.founder__body > * { margin: 0 0 var(--space-4); }
.founder__body > *:last-child { margin-bottom: 0; }

.founder__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--color-accent-soft);
  letter-spacing: -0.01em;
}

.founder__note {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
}

.founder__contact {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* =============================================================
   07 Form
   ============================================================= */
.form__headline {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text-strong);
  margin: 0 0 var(--space-3);
}

.form__intro {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
}

.form {
  display: grid;
  gap: var(--space-3);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.field {
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}

.field__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-faint) 50%),
                    linear-gradient(135deg, var(--color-text-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--space-7);
}

/* Form success state
   Default-hidden via CSS; SDK reveals via inline style on successful submission.
   The :empty selector hides it again if the SDK clears its content. */
.form__success {
  display: none;
  background: var(--color-bg-elevated) !important;
  color: var(--color-text) !important;
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

/* SDK reveals the element by setting a non-none display value */
.form__success[style*="block"],
.form__success[style*="flex"] {
  display: block !important;
}

.form__success-headline {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-accent-soft);
  margin: 0 0 var(--space-2);
}

.form__success-body {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Form-level error state — same default-hidden pattern */
.form__error {
  display: none;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
}

.form__error[style*="block"] {
  display: block !important;
}

.form__error a {
  color: var(--color-accent-soft);
  text-decoration: underline;
}

/* Field-level error (rendered by Formspree SDK into [data-fs-error="fieldname"]) */
.field__error {
  font-size: var(--fs-xs);
  color: var(--color-accent-soft);
  min-height: 0;
}

.field__error:empty {
  display: none;
}

/* Invalid field highlight (SDK adds aria-invalid="true" on errors) */
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--color-accent-soft);
}

/* Disabled submit button while sending */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* iOS Safari ≥16px on inputs prevents auto-zoom on focus.
   Targets all touch input fonts on phones. */
@media (max-width: 560px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 1rem; /* 16px */
  }
}

/* =============================================================
   Footer
   ============================================================= */
.footer {
  border-top: var(--border-width) solid var(--color-border);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-faint);
}

/* =============================================================
   TABLET (<= 900px)
   - Hamburger nav appears
   - Personas drop to 2 cols
   - Coverage drops to 3 cols
   - Section padding tightens
   ============================================================= */
@media (max-width: 900px) {
  :root {
    --section-py: var(--space-8);
    --container-px: var(--space-5);
    --fs-2xl: 2.25rem;
  }

  .nav__toggle {
    display: flex;
  }

  /* Mobile menu collapses into a column underneath the brand */
  .nav__inner {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .nav__links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: var(--border-width) solid var(--color-border);
    margin-top: var(--space-3);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: var(--space-3);
    color: var(--color-text);
  }

  .nav__links .btn {
    margin-top: var(--space-2);
  }

  .coverage__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .personas {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================================
   PHONE (<= 560px)
   - Hide tagline next to wordmark (cramped)
   - All grids collapse to 1 column
   - Hero headline shrinks more
   - CTAs stretch full-width and stack
   ============================================================= */
@media (max-width: 560px) {
  :root {
    --section-py: var(--space-7);
    --container-px: var(--space-4);
    --fs-2xl: 1.875rem;
    --fs-xl: 1.375rem;
  }

  .tagline {
    display: none;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__ctas .btn {
    width: 100%;
  }

  .coverage__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .personas {
    grid-template-columns: 1fr;
  }

  .founder {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .founder__photo {
    max-width: 140px;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}