/* ==========================================================================
   Phexicon — Desktop Layout Control
   Brand design system and responsive styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Foundations
   -------------------------------------------------------------------------- */

:root {
  --phex-red: #cc0011;
  --phex-red-bright: #e8202f;
  --phex-gold: #ffd700;
  --phex-pink: #ff69b4;
  --phex-violet: #6a0dad;

  --ink-0: #050609;
  --ink-1: #090b10;
  --ink-2: #10131a;
  --ink-3: #171b24;
  --ink-4: #1f2430;

  --text-main: #f7f7fa;
  --text-muted: #aeb4c2;
  --text-dim: #7a8190;

  --max-width: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-height: 60px;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --section-gap: clamp(3rem, 8vw, 6rem);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --t-fast: 150ms ease;
  --t-normal: 250ms ease;

  --focus-ring: 2px solid var(--phex-gold);
  --focus-ring-offset: 2px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1rem + 0.2vw, 18px);
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--ink-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--phex-gold);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--phex-gold);
  background: var(--ink-2);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

ul, ol, dl { list-style: none; }

/* --------------------------------------------------------------------------
   2. Accessibility
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 1000;
  padding: 0.6rem 1.2rem;
  background: var(--phex-red);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: 0;
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

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

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section-heading {
  font-size: clamp(1.6rem, 1rem + 2.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.15rem);
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 2.5rem;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink-0);
  border-bottom: 1px solid transparent;
  transition: background var(--t-normal), border-color var(--t-normal);
}

.site-header.scrolled {
  background: rgba(9, 11, 16, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--ink-3);
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.brand-wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.site-nav { margin-inline: auto; }

.nav-list {
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  position: relative;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text-main);
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--phex-red);
  transition: width var(--t-fast);
}

.nav-list a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--phex-gold);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
}

.cta-primary {
  background: var(--phex-red);
  color: #fff;
}

.cta-primary:hover {
  background: var(--phex-red-bright);
  color: #fff;
}

.cta-primary:disabled {
  background: var(--ink-3);
  color: var(--text-dim);
  cursor: not-allowed;
  opacity: 0.7;
}

.cta-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--ink-4);
}

.cta-secondary:hover {
  border-color: var(--phex-gold);
  color: var(--phex-gold);
}

.cta-large {
  font-size: 1.05rem;
  padding: 0.8rem 2rem;
}

.header-cta { display: none; }

/* --------------------------------------------------------------------------
   6. Mobile navigation
   -------------------------------------------------------------------------- */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

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

.mobile-nav {
  display: none;
  background: var(--ink-1);
  border-bottom: 1px solid var(--ink-3);
  padding: 0.5rem var(--gutter) 1rem;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--text-main);
  font-size: 1rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  background: var(--ink-2);
  color: var(--phex-gold);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(106, 13, 173, 0.08), transparent), var(--ink-0);
}

.hero-grid {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--phex-red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: clamp(2rem, 1.2rem + 3.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-product-line {
  font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.4rem);
  font-weight: 600;
  color: var(--phex-gold);
  margin-bottom: 1.25rem;
}

.hero-supporting {
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.1rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.proof-icon {
  color: var(--phex-gold);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. Hero visual
   -------------------------------------------------------------------------- */

.hero-visual { position: relative; }

.canvas-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.hero-canvas {
  position: relative;
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 340px;
  display: flex;
  gap: 0.75rem;
  overflow: hidden;
}

.canvas-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.monitor {
  position: relative;
  flex: 1;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-md);
  min-height: 280px;
  padding: 0.5rem;
}

.monitor-primary { border-color: rgba(204, 0, 17, 0.3); }
.monitor-secondary { border-color: rgba(106, 13, 173, 0.3); }

.monitor-label {
  position: absolute;
  top: 0.4rem;
  left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.monitor-dpi {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--phex-gold);
}

.icon-token {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 40px;
  z-index: 2;
}

.icon-token-dot {
  width: 20px;
  height: 20px;
  background: var(--ink-4);
  border: 1px solid var(--text-dim);
  border-radius: 4px;
}

.monitor-primary .icon-token-dot { border-color: var(--phex-red); }
.monitor-secondary .icon-token-dot { border-color: var(--phex-violet); }

.icon-token-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.saved-zone {
  position: absolute;
  border: 1px dashed rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 215, 0, 0.03);
  z-index: 1;
}

.saved-zone-alt {
  border-color: rgba(255, 105, 180, 0.2);
  background: rgba(255, 105, 180, 0.03);
}

.zone-label {
  position: absolute;
  top: 0.25rem;
  left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--phex-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.saved-zone-alt .zone-label { color: var(--phex-pink); }

.canvas-overlay {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  background: rgba(5, 6, 9, 0.85);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  z-index: 3;
}

.overlay-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.overlay-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.overlay-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-main);
}

.overlay-status { color: #4caf50; }

/* --------------------------------------------------------------------------
   9. Problem and Promise
   -------------------------------------------------------------------------- */

.problem-promise { background: var(--ink-1); }

.pp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.pp-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
}

.pp-problem {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
}

.pp-promise {
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(204, 0, 17, 0.15);
}

.pp-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.pp-intro {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pp-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pp-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phex-red);
}

.pp-body {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   10. Features grid
   -------------------------------------------------------------------------- */

.features { background: var(--ink-0); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
}

.feature-card {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: border-color var(--t-normal), transform var(--t-normal);
}

.feature-card:hover {
  border-color: rgba(204, 0, 17, 0.3);
  transform: translateY(-2px);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.feature-icon { color: var(--phex-red); }

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.feature-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. Preset showcase
   -------------------------------------------------------------------------- */

.presets { background: var(--ink-1); }

.presets-demo {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.preset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0;
}

.preset-tab {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.preset-tab:hover {
  border-color: var(--ink-4);
  color: var(--text-main);
}

.preset-tab[aria-selected="true"] {
  background: var(--phex-red);
  border-color: var(--phex-red);
  color: #fff;
}

.preset-static {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.preset-static-card {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.preset-static-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--phex-gold);
}

.preset-static-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.preset-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.preset-canvas-wrap { position: relative; }

.preset-canvas {
  position: relative;
  background: var(--ink-0);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 320px;
  overflow: hidden;
}

.preset-monitors {
  position: relative;
  display: flex;
  gap: 0.75rem;
  min-height: 280px;
  z-index: 1;
}

.preset-panels {
  display: flex;
  flex-direction: column;
}

.preset-panel {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.preset-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--phex-gold);
}

.preset-details {
  display: grid;
  gap: 0.75rem;
}

.preset-details dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preset-details dd {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   12. Adaptation spotlight
   -------------------------------------------------------------------------- */

.adaptation { background: var(--ink-0); }

.adaptation-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 3rem;
}

.adaptation-card {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.adaptation-broken { border-color: rgba(204, 0, 17, 0.2); }
.adaptation-fixed { border-color: rgba(255, 215, 0, 0.2); }

.adaptation-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.adaptation-visual {
  background: var(--ink-2);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.adaptation-monitor {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--ink-0);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.adaptation-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 28px;
}

.adapt-icon-shape {
  width: 16px;
  height: 16px;
  background: var(--ink-4);
  border: 1px solid var(--text-dim);
  border-radius: 3px;
}

.adapt-large .adapt-icon-shape {
  width: 24px;
  height: 24px;
}

.adapt-large { width: 42px; }

.adapt-icon-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.adapt-large .adapt-icon-label { font-size: 0.55rem; }

.adaptation-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.adaptation-note-warn { color: var(--phex-red); }
.adaptation-note-good { color: #4caf50; }

.adaptation-factors {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.adaptation-factors-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.factors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.factors-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.factors-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--phex-gold);
}

.apply-modes-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.apply-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.apply-mode-card {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.apply-mode-featured {
  border-color: rgba(255, 215, 0, 0.25);
  background: linear-gradient(135deg, var(--ink-1), var(--ink-2));
}

.apply-mode-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--phex-gold);
}

.apply-mode-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. How It Works
   -------------------------------------------------------------------------- */

.how-it-works { background: var(--ink-1); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  margin-bottom: 2.5rem;
}

.step {
  position: relative;
  padding: 1.5rem 1.25rem;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--phex-red);
  margin-bottom: 0.75rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.step-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tech-note {
  background: var(--ink-2);
  border-left: 3px solid var(--phex-violet);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
}

.tech-note p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   14. Trust principles
   -------------------------------------------------------------------------- */

.trust { background: var(--ink-0); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 1.5rem);
}

.trust-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-md);
}

.trust-icon {
  color: var(--phex-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.trust-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   15. Status section
   -------------------------------------------------------------------------- */

.status { background: var(--ink-1); }

.status-card {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-dev {
  background: var(--phex-gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.status-dot-preview { background: var(--phex-pink); }
.status-dot-released { background: #4caf50; }

.status-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0 auto 1.5rem;
}

.status-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   16. FAQ
   -------------------------------------------------------------------------- */

.faq { background: var(--ink-0); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-item {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 2.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--phex-red);
  transition: transform var(--t-fast);
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item summary:hover { background: var(--ink-2); }

.faq-item p {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   17. Final CTA
   -------------------------------------------------------------------------- */

.final-cta {
  background: var(--ink-1);
  text-align: center;
}

.final-cta-heading {
  font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text-main), var(--phex-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.final-cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink-0);
  border-top: 1px solid var(--ink-3);
  padding-block: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.footer-wordmark {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-nav a:hover { color: var(--phex-gold); }

.footer-meta { text-align: right; }

.footer-project-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-link {
  color: var(--phex-gold);
  font-weight: 600;
}

.footer-link:hover { color: var(--phex-red-bright); }

.footer-privacy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.footer-year {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   19. Section reveal animation
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   20. Responsive — tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .preset-content { grid-template-columns: 1fr; }
  .adaptation-comparison { grid-template-columns: 1fr; }
  .apply-modes-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }
}

/* --------------------------------------------------------------------------
   21. Responsive — mobile
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .status-badge { display: none; }
  .menu-toggle { display: flex; }

  .mobile-nav[hidden] { display: none; }
  .mobile-nav:not([hidden]) { display: block; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    order: -1;
    margin-bottom: 1rem;
  }

  .hero-canvas { min-height: 260px; }
  .monitor { min-height: 220px; }
  .pp-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .footer-meta { text-align: left; }
  .footer-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   22. Responsive — narrow mobile
   -------------------------------------------------------------------------- */

@media (max-width: 420px) {
  .hero-canvas {
    min-height: 240px;
    padding: 0.6rem;
  }
  .monitor {
    min-height: 200px;
    padding: 0.4rem;
  }
  .icon-token { width: 32px; }
  .icon-token-dot {
    width: 16px;
    height: 16px;
  }
  .icon-token-label { font-size: 0.5rem; }
  .canvas-overlay {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 0.6rem;
  }
  .proof-strip { gap: 0.75rem 1.25rem; }
  .proof-item { font-size: 0.8rem; }
  .preset-canvas {
    min-height: 260px;
    padding: 0.6rem;
  }
  .preset-monitors { min-height: 220px; }
  .preset-tab {
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
  }
  .adaptation-monitor { aspect-ratio: 4 / 3; }
  .steps-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   23. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .feature-card:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   24. High contrast preference
   -------------------------------------------------------------------------- */

@media (prefers-contrast: more) {
  :root {
    --text-muted: #c8ccd4;
    --text-dim: #a0a6b0;
    --ink-3: #2a2f3a;
    --ink-4: #333a48;
  }
  .feature-card, .pp-card, .trust-item, .step, .faq-item, .adaptation-card, .apply-mode-card, .status-card, .preset-panel { border-width: 2px; }
  .cta-secondary { border-width: 2px; }
}

/* --------------------------------------------------------------------------
   25. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .menu-toggle, .mobile-nav, .hero-visual, .preset-canvas-wrap, .canvas-overlay, .adaptation-visual { display: none; }
  body {
    background: #fff;
    color: #000;
  }
  .section { padding-block: 1rem; }
}
