/* ============================================================
   Qmedia WOM — landing page styles
   Hard-Edged Neutral (see DESIGN.md): solid colors only, square
   corners, hairline borders. Hierarchy from type and space.
   ============================================================ */

:root {
  color-scheme: light;

  /* Palette */
  --background: #ffffff;
  --foreground: #0a0a0a;
  --secondary: #525252;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --muted: #f5f5f5;
  --accent: #0a0a0a;
  --on-accent: #ffffff;
  --accent-hover: #262626;
  --error: #dc2626;

  /* Typography */
  --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo,
    monospace;

  /* Layout */
  --page-max-width: 72rem;
  --section-gap: 64px;
  --card-padding: 24px;

  /* Corners: 0 everywhere. Absolute. */
  --radius: 0;
}

/* Dark theme (toggled via the header switch, persisted in localStorage).
   Same ramp as the Tailwind .dark tokens. */
html.dark {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --secondary: #b5b5b5;
  --muted-foreground: #8f8f8f;
  --border: #262626;
  --border-strong: #404040;
  --muted: #171717;
  --accent: #fafafa;
  --on-accent: #0a0a0a;
  --accent-hover: #d4d4d4;
  --error: #f87171;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   Ambient atmosphere: removed in Hard-Edged Neutral.
   The block is kept hidden so base.html needs no changes.
   ------------------------------------------------------------ */

.atmosphere {
  display: none;
}

.page {
  position: relative;
}

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

/* ------------------------------------------------------------
   Type helpers
   ------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: var(--border);
}

.section-heading {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--foreground);
}

.section-body {
  max-width: 640px;
  margin: 16px auto 0;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--secondary);
}

/* ------------------------------------------------------------
   Buttons — square family. Primary is solid black, secondary is
   white with a hairline border. No pills.
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 0;
  padding: 8px 24px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.43;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

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

.btn-outlined {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--border-strong);
}

.btn-outlined:hover {
  background: var(--muted);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Form submit — the single accent, solid black */
.btn-violet {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.btn:focus-visible,
.btn-violet:focus-visible,
.provider-btn:focus-visible,
.eye-toggle:focus-visible {
  outline: none;
  border-color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--foreground);
}

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

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

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

.wordmark {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.site-nav a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a.nav-link:hover {
  color: var(--foreground);
}

.site-nav .btn {
  margin-left: 8px;
}

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

.hero {
  position: relative;
  padding: 96px 0 0;
  text-align: center;
}

.hero-wordmark {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.hero-subcopy {
  max-width: 560px;
  margin: 24px auto 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--secondary);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

/* Product mockup fan */

.card-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  margin-top: 64px;
  padding-bottom: 64px;
  perspective: 1200px;
}

.auth-card {
  width: 300px;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: left;
}

.auth-card h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.33;
  color: var(--foreground);
  margin-bottom: 4px;
}

.auth-card .card-hint {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.auth-card.center {
  width: 340px;
  z-index: 2;
  transform: translateY(-24px);
}

.auth-card.left {
  transform: rotate(-6deg) translateY(24px);
}

.auth-card.right {
  transform: rotate(6deg) translateY(24px);
}

/* Text inputs — square, hairline border, black focus ring */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 8px;
}

.field label a {
  float: right;
  font-weight: 400;
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.field .helptext {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.control {
  position: relative;
}

.text-input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:hover {
  border-color: var(--muted-foreground);
}

.text-input::placeholder {
  color: var(--muted-foreground);
}

.text-input:focus {
  border-color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--foreground);
}

.text-input:-webkit-autofill,
.text-input:-webkit-autofill:hover,
.text-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--foreground);
  -webkit-box-shadow: var(--background) 0 0 0 1000px inset;
  caret-color: var(--foreground);
  transition: background-color 9999s ease-out;
}

/* Password visibility toggle */

.eye-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.eye-toggle:hover {
  color: var(--foreground);
  background: var(--muted);
}

.eye-toggle svg {
  width: 16px;
  height: 16px;
}

.control:has(.eye-toggle) .text-input {
  padding-right: 42px;
}

/* Checkbox — shared control styling */

.field-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--secondary);
  cursor: pointer;
  margin-bottom: 0;
}

.field-checkbox input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.field-checkbox input[type="checkbox"]:hover {
  border-color: var(--foreground);
}

.field-checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.field-checkbox input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.5px solid var(--on-accent);
  border-bottom: 1.5px solid var(--on-accent);
  transform: rotate(-45deg) translateY(-1px);
}

.field-checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--foreground);
}

.auth-card .btn-violet {
  width: 100%;
  margin-top: 4px;
}

/* Provider buttons + divider */

.provider-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.provider-btn:hover {
  background: var(--muted);
}

.provider-btn + .provider-btn {
  margin-top: 8px;
}

.provider-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.provider-btn .spacer {
  flex: 1;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Code-entry variant (right card) */

.code-row {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px;
}

.code-row .text-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  padding: 8px 0;
}

/* Badge / tag — square, subtle fill */

.badge {
  display: inline-block;
  border-radius: 0;
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  margin-bottom: 16px;
}

/* Build status tags — the one sanctioned color exception (see DESIGN.md):
   green success, amber running, red failed. */

.status-success,
.status-running,
.status-failed {
  display: inline-block;
  border-radius: 0;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  margin-bottom: 16px;
}

.status-success {
  background: #16a34a;
}

.status-running {
  background: #d97706;
}

.status-failed {
  background: #dc2626;
}

/* Theme toggle (decorative mock) */

.theme-toggle-row {
  display: flex;
  justify-content: center;
  padding: 8px 0 64px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  padding: 2px;
}

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}

.theme-toggle button.active {
  background: var(--foreground);
  color: var(--on-accent);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* Header theme switch — square, hairline border, icon swaps with theme */

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-switch:hover {
  background: var(--muted);
  color: var(--foreground);
}

.theme-switch:focus-visible {
  outline: none;
  border-color: var(--foreground);
  box-shadow: inset 0 0 0 1px var(--foreground);
}

.theme-switch svg {
  width: 16px;
  height: 16px;
}

.theme-switch .icon-sun {
  display: none;
}

html.dark .theme-switch .icon-moon {
  display: none;
}

html.dark .theme-switch .icon-sun {
  display: block;
}

/* Breadcrumbs — small mono trail above the page heading */

.breadcrumbs {
  margin-bottom: 16px;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumbs .separator {
  color: var(--border-strong);
}

.breadcrumbs [aria-current="page"] {
  color: var(--foreground);
}

/* ------------------------------------------------------------
   Feature row — square icon tiles
   ------------------------------------------------------------ */

.features {
  padding: var(--section-gap) 0;
}

.feature-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  margin-top: 48px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

/* connecting hairline between tiles */
.feature-item + .feature-item::before {
  content: "";
  position: absolute;
  top: 28px;
  right: 50%;
  width: 100%;
  height: 1px;
  background: var(--border);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border-strong);
  color: var(--foreground);
  position: relative;
  z-index: 1;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-item p {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--secondary);
  text-align: center;
}

/* ------------------------------------------------------------
   Feature cards — white surface, hairline border, no shadow
   ------------------------------------------------------------ */

.showcase {
  padding: var(--section-gap) 0;
}

.glass-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.glass-card {
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border);
  padding: var(--card-padding);
}

.glass-card .feature-icon {
  margin-bottom: 20px;
}

.glass-card h4 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.33;
  color: var(--foreground);
  margin-bottom: 8px;
}

.glass-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--secondary);
}

/* ------------------------------------------------------------
   Customization — design-tool workspace mockup
   ------------------------------------------------------------ */

.customize {
  padding: var(--section-gap) 0;
}

.browser-frame {
  max-width: 720px;
  margin: 48px auto 0;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.browser-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 0;
  background: var(--muted);
  border: 1px solid var(--border-strong);
}

.browser-body {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 48px 32px;
}

/* Floating inspector panels */

.inspector {
  position: absolute;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border-strong);
  padding: 16px;
  text-align: left;
}

.inspector .inspector-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}

.inspector.tl {
  top: 24px;
  left: -64px;
  transform: rotate(-3deg);
}

.inspector.tr {
  top: 40px;
  right: -64px;
  transform: rotate(3deg);
}

.inspector.bl {
  bottom: 24px;
  left: -48px;
  transform: rotate(2deg);
}

.swatch-row {
  display: flex;
  gap: 4px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 0;
  border: 1px solid var(--border-strong);
}

.swatch.violet {
  background: var(--foreground);
}

.swatch.blue {
  background: var(--secondary);
}

.swatch.teal {
  background: var(--muted-foreground);
}

.swatch.ember {
  background: var(--border-strong);
}

.swatch.frost {
  background: var(--background);
}

.radius-slider {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radius-slider .slider {
  width: 96px;
  height: 8px;
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border-strong);
  position: relative;
}

.radius-slider .slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 60%;
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--foreground);
  transform: translate(-50%, -50%);
}

.radius-slider .value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
}

/* ------------------------------------------------------------
   Final CTA
   ------------------------------------------------------------ */

.final-cta {
  padding: var(--section-gap) 0;
  text-align: center;
}

.final-cta .hero-actions {
  margin-top: 32px;
}

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

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

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

.site-footer nav a {
  font-size: 0.875rem;
  color: var(--secondary);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--foreground);
}

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

@media (max-width: 1024px) {
  .inspector.tl,
  .inspector.tr,
  .inspector.bl {
    display: none;
  }
}

@media (max-width: 900px) {
  .feature-row {
    flex-wrap: wrap;
    gap: 32px;
  }

  .feature-item {
    flex: 0 0 30%;
  }

  .feature-item + .feature-item::before {
    display: none;
  }

  .glass-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .card-fan {
    flex-direction: column;
    align-items: center;
  }

  .auth-card.left,
  .auth-card.right {
    transform: none;
  }

  .site-nav a.nav-link {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .feature-item {
    flex: 0 0 45%;
  }

  .site-footer .container {
    flex-direction: column;
  }

  .section-heading {
    font-size: 2rem;
  }
}
/* ============================================================
   About page
   ============================================================ */

.about-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content */

.about-main {
  flex: 1;
  padding: 48px 0 64px;
}

.about-main .eyebrow {
  justify-content: center;
}

/* Facts grid */

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.fact-card {
  border-radius: 0;
  background: var(--background);
  border: 1px solid var(--border);
  padding: var(--card-padding);
}

.fact-card h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.33;
  color: var(--foreground);
  margin-bottom: 8px;
}

.fact-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--secondary);
}

/* About content */

.about-content {
  max-width: 720px;
  margin: var(--section-gap) auto 0;
}

.about-content h3 {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.14;
  color: var(--foreground);
  margin-top: 48px;
  margin-bottom: 16px;
}

.about-content p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--secondary);
  margin-bottom: 16px;
}

.about-content ul {
  padding-left: 24px;
  margin: 16px 0;
}

.about-content li {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--secondary);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .facts-grid {
    grid-template-columns: 1fr;
  }
}
