/* ============================================================
   MZ AUTOMATED RETAIL — styles.css
   Mobile-first. Sections in page order:
     1. Tokens & reset
     2. Base typography & utilities
     3. Buttons
     4. Header & nav
     5. Hero (ink)
     6. The offer (paper)
     7. The machine (lilac)
     8. Who buys (purple)
    8b. What you earn (ink)
     9. Who does what (paper / ink split)
    10. About (lilac)
   10b. Fair questions (paper)
    11. Locations (lilac)
    12. Contact (ink)
    13. Footer (ink-soft)
    14. Photo placeholders
    15. Reveal animation & reduced motion
   ============================================================ */

/* ------------------------------------------------------------
   1. TOKENS & RESET
   ------------------------------------------------------------ */
:root {
  --ink: #1E1233;
  --ink-soft: #2E1D4D;
  --deep: #4A1596;
  --purple: #6425C7;
  --violet: #A578F5;
  --lilac: #EDE6FA;
  --paper: #FBF9FE;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1120px;
  --header-height: 72px;
  --shadow: 0 4px 24px rgba(30, 18, 51, 0.08);
}

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

html {
  scroll-behavior: smooth;
  /* Anchor targets land below the sticky header */
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font);
  font-size: 1rem; /* 16px minimum */
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--purple);
}

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 2px;
}

.hero :focus-visible,
.section-purple :focus-visible,
.section-ink :focus-visible,
.split-you :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--violet);
}

/* ------------------------------------------------------------
   2. BASE TYPOGRAPHY & UTILITIES
   ------------------------------------------------------------ */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 72px;
}

/* Section background rotation: paper, lilac, purple, ink */
.section-lilac {
  background: var(--lilac);
}

.section-purple {
  background: var(--purple);
  color: var(--paper);
}

.section-ink {
  background: var(--ink);
  color: var(--paper);
}

.section-title {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  margin-bottom: 40px;
}

/* Short declarative line under a section title */
.section-lede {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin: -28px 0 40px;
}

.section-lilac .section-lede {
  color: var(--deep);
}

.section-purple .section-lede,
.section-ink .section-lede {
  color: var(--violet);
}

@media (min-width: 768px) {
  .section {
    padding-block: 104px;
  }
}

/* ------------------------------------------------------------
   3. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--purple);
  color: #fff;
}

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

/* Outline button for dark backgrounds */
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--violet);
}

.btn-ghost:hover {
  background: rgba(165, 120, 245, 0.15);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
}

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

.btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ------------------------------------------------------------
   4. HEADER & NAV
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 254, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30, 18, 51, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo .logo-img,
.header-logo .logo-placeholder {
  height: 54px;
  width: auto;
}

/* Slightly smaller on narrow screens so it shares the bar with the hamburger */
@media (max-width: 480px) {
  .header-logo .logo-img,
  .header-logo .logo-placeholder {
    height: 46px;
  }
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(30, 18, 51, 0.08);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 24px;
}

.nav-link {
  display: block;
  padding: 12px 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--purple);
  background: var(--lilac);
}

.btn-nav {
  margin-top: 8px;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  .nav-link {
    padding: 8px 12px;
  }

  .nav-link:hover {
    background: none;
  }

  .btn-nav {
    margin-top: 0;
    margin-left: 12px;
    padding: 10px 20px;
  }
}

/* ------------------------------------------------------------
   5. HERO (ink)
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding-block: 96px;
}

/* Large soft circles bleeding off the edges */
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--deep);
  filter: blur(60px);
}

.hero-circle-1 {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -160px;
  opacity: 0.45;
}

.hero-circle-2 {
  width: 380px;
  height: 380px;
  bottom: -200px;
  left: -140px;
  opacity: 0.35;
}

.hero-circle-3 {
  width: 220px;
  height: 220px;
  top: 40%;
  left: 60%;
  opacity: 0.2;
}

.hero-inner {
  position: relative;
}

.hero-copy {
  max-width: 640px;
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  margin-bottom: 20px;
}

.hero-subhead {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  max-width: 34em;
  color: rgba(251, 249, 254, 0.85);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

@media (min-width: 900px) {
  .hero {
    padding-block: 140px;
  }
}

/* ------------------------------------------------------------
   6. THE OFFER (paper)
   ------------------------------------------------------------ */
.offer-grid {
  display: grid;
  gap: 20px;
}

.offer-card {
  background: #fff;
  border: 1px solid rgba(30, 18, 51, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  text-align: center;
}

.offer-stat {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--purple);
}

.offer-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 10px;
  color: var(--ink);
}

.offer-line {
  margin-top: 12px;
  color: rgba(30, 18, 51, 0.75);
}

.offer-note {
  margin-top: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 1.0625rem;
}

@media (min-width: 768px) {
  .offer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------
   7. THE MACHINE (lilac)
   ------------------------------------------------------------ */
.machine-inner {
  display: grid;
  gap: 40px;
}

/* Real machine photo. It is a transparent PNG, so no frame or
   background: it sits directly on the lilac. */
.machine-photo {
  max-width: 320px;
  width: 100%;
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 18px 36px rgba(30, 18, 51, 0.22));
}

.machine-list li {
  padding-block: 14px;
  border-bottom: 1px solid rgba(30, 18, 51, 0.1);
}

.machine-list li:last-child {
  border-bottom: none;
}

.machine-point {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.machine-line {
  color: rgba(30, 18, 51, 0.75);
}

.machine-footprint {
  margin-top: 20px;
  font-weight: 600;
  color: var(--deep);
}

@media (min-width: 900px) {
  .machine-inner {
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    gap: 64px;
  }

  .machine-photo {
    justify-self: start;
  }
}

/* ------------------------------------------------------------
   8. WHO BUYS (purple)
   ------------------------------------------------------------ */
.buyers-grid {
  display: grid;
  gap: 20px;
}

.buyers-item {
  background: rgba(30, 18, 51, 0.25);
  border: 1px solid rgba(251, 249, 254, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.buyers-title {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.buyers-line {
  color: rgba(251, 249, 254, 0.85);
}

@media (min-width: 768px) {
  .buyers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------
   8b. WHAT YOU EARN (ink)
   ------------------------------------------------------------ */
.earn .section-title {
  margin-bottom: 24px;
}

.earn-statement {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--violet);
  max-width: 14em;
}

.earn-line {
  margin-top: 16px;
  font-size: 1.125rem;
  font-weight: 600;
}

.earn-kicker {
  margin-top: 24px;
  font-size: 1.0625rem;
  color: rgba(251, 249, 254, 0.7);
}

/* ------------------------------------------------------------
   9. WHO DOES WHAT (paper / ink split)
   ------------------------------------------------------------ */
.split.section {
  padding-block: 0; /* the two halves carry their own padding */
}

.split-inner {
  display: grid;
}

.split-we,
.split-you {
  padding: 72px 20px;
}

.split-we {
  background: var(--paper);
}

.split-you {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
}

.split-content {
  max-width: calc(var(--container) / 2 - 20px);
  width: 100%;
}

/* Push each half's content toward the page center line */
.split-we .split-content {
  margin-left: auto;
}

.split-you .split-content {
  margin-right: auto;
}

.split-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 24px;
}

.split-lede {
  font-weight: 600;
  color: var(--deep);
  margin: -16px 0 20px;
}

.we-list li {
  position: relative;
  padding: 10px 0 10px 34px;
  font-size: 1.0625rem;
  border-bottom: 1px solid rgba(30, 18, 51, 0.08);
}

.we-list li:last-child {
  border-bottom: none;
}

/* Checkmark bullet */
.we-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 800;
}

.split-nothing {
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--violet);
}

.split-staff {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: rgba(251, 249, 254, 0.85);
}

@media (min-width: 768px) {
  .split-inner {
    grid-template-columns: 1fr 1fr;
  }

  .split-we,
  .split-you {
    padding: 104px 40px;
  }
}

/* ------------------------------------------------------------
   10. ABOUT (lilac)
   ------------------------------------------------------------ */
.founders-grid {
  display: grid;
  gap: 24px;
  max-width: 640px;
}

.founder-card {
  background: #fff;
  border: 1px solid rgba(30, 18, 51, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.founder-photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 220px;
  margin-inline: auto;
  margin-bottom: 18px;
}

.founder-name {
  font-size: 1.25rem;
}

.founder-role {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
  margin-top: 4px;
}

.founder-phone {
  margin-top: 10px;
  font-weight: 600;
}

.founder-phone a {
  color: var(--purple);
  text-decoration-color: rgba(100, 37, 199, 0.4);
}

.about-story {
  max-width: 640px;
  margin-top: 40px;
  font-size: 1.0625rem;
}

.about-story p + p {
  margin-top: 16px;
}

@media (min-width: 600px) {
  .founders-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ------------------------------------------------------------
   10b. FAIR QUESTIONS (paper)
   ------------------------------------------------------------ */
.faq-grid {
  display: grid;
  gap: 20px;
}

.faq-item {
  background: #fff;
  border: 1px solid rgba(30, 18, 51, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}

.faq-q {
  font-size: 1.0625rem;
  color: var(--deep);
  margin-bottom: 6px;
}

.faq-a {
  color: rgba(30, 18, 51, 0.85);
  font-weight: 500;
}

@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------
   11. LOCATIONS (lilac)
   ------------------------------------------------------------ */
.locations-grid {
  display: grid;
  gap: 20px;
}

.locations-grid:empty {
  display: none;
}

.location-card {
  background: #fff;
  border: 1px solid rgba(30, 18, 51, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.location-name {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.location-meta {
  color: rgba(30, 18, 51, 0.75);
}

.location-hours {
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--deep);
}

.locations-empty {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  font-size: 1.0625rem;
  max-width: 640px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .locations-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* ------------------------------------------------------------
   12. CONTACT (ink)
   ------------------------------------------------------------ */
.contact-lede {
  max-width: 38em;
  color: rgba(251, 249, 254, 0.85);
  margin: -24px 0 40px;
}

.contact-grid {
  display: grid;
  gap: 48px;
}

.contact-subtitle {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

/* Form */
.contact-form {
  background: rgba(251, 249, 254, 0.04);
  border: 1px solid rgba(165, 120, 245, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.form-row {
  display: grid;
  gap: 0;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.req {
  color: var(--violet);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--deep) 50%),
    linear-gradient(135deg, var(--deep) 50%, transparent 50%);
  background-position:
    calc(100% - 21px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible,
.form-field select:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #FF9DB0;
}

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

/* Inline validation messages */
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #FF9DB0;
}

.field-error.is-visible {
  display: block;
}

.form-status {
  display: none;
  margin-top: 16px;
  font-weight: 600;
  text-align: center;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: #8EE6B8;
}

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

/* Direct contact column */
.contact-direct-line {
  color: rgba(251, 249, 254, 0.85);
  margin-bottom: 24px;
}

.contact-links li {
  margin-bottom: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration-color: var(--violet);
  overflow-wrap: anywhere;
}

.contact-link:hover {
  color: var(--violet);
}

.contact-icon {
  flex-shrink: 0;
  color: var(--violet);
}

.contact-photo {
  aspect-ratio: 3 / 2;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .contact-form {
    padding: 36px 32px;
  }
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
  }
}

/* ------------------------------------------------------------
   13. FOOTER (ink-soft)
   ------------------------------------------------------------ */
.site-footer {
  background: var(--ink-soft);
  color: var(--paper);
  padding-block: 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--paper);
  font-weight: 600;
  text-decoration-color: var(--violet);
}

.footer-links a:hover {
  color: var(--violet);
}

.footer-tagline {
  color: var(--violet);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 8px;
}

.footer-copy {
  color: rgba(251, 249, 254, 0.7);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------
   14. PHOTO PLACEHOLDERS
   Swap each .photo-placeholder div for a real <img> later.
   The aspect-ratio on the container keeps layout stable.
   ------------------------------------------------------------ */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(100, 37, 199, 0.45);
  background:
    linear-gradient(135deg, rgba(100, 37, 199, 0.14), rgba(74, 21, 150, 0.08));
}

/* Placeholders sitting on dark sections need lighter accents */
.section-ink .photo-placeholder {
  border-color: rgba(165, 120, 245, 0.5);
  background:
    linear-gradient(135deg, rgba(100, 37, 199, 0.25), rgba(74, 21, 150, 0.15));
}

.photo-placeholder-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  color: var(--deep);
}

.section-ink .photo-placeholder-label {
  color: var(--violet);
}

/* Text-based stand-in when a logo image is missing (built by script.js) */
.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple);
  background: var(--lilac);
  border-radius: 8px;
  padding: 0 14px;
  white-space: nowrap;
}

.site-footer .logo-placeholder {
  color: var(--violet);
  background: rgba(165, 120, 245, 0.15);
  height: 40px;
}

/* ------------------------------------------------------------
   15. REVEAL ANIMATION & REDUCED MOTION
   Hidden state only applies once script.js tags <html> with
   .js. Visitors without JavaScript see everything immediately.
   ------------------------------------------------------------ */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .nav-toggle-bar {
    transition: none;
  }
}
