/* ============================================
   ANCHRAS - Private Cloud Solutions
   Brand Style Sheet
   Colors: #0a0b09 (black), #CDFC54 (lime), #1a1b19 (dark gray)
   Font: Domyouji Regular
   ============================================ */

@font-face {
  font-family: 'Domyouji';
  src: url('../fonts/Domyouji Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Canonical Anchras design tokens. DESIGN.md is the source of truth.
     Replicated identically across anchras.com, platform.anchras.com,
     selfhosted.anchras.com. Edit DESIGN.md and propagate to all three. */

  /* ---- Neutrals (warm ~110° hue family; never #000 or #fff) ---- */
  --obsidian: #0a0b09;
  --hangar: #111210;
  --hangar-raised: #161714;
  --hangar-raised-hover: #1c1d1a;
  --hangar-edge: #2a2b28;
  --bone: #f0f0ee;
  --instrument-grey: #9a9b98;

  /* ---- Accent (single-signal doctrine) ---- */
  --signal-lime: #CDFC54;
  --signal-lime-bright: #e0ff80;
  --signal-lime-veil: rgba(205, 252, 84, 0.15);
  --signal-lime-haze: rgba(205, 252, 84, 0.30);

  /* ---- Type ---- */
  --font-display: 'Domyouji', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;

  /* ---- Layout ---- */
  --max-width: 1200px;

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.3s;
  --transition: var(--duration-fast) var(--ease-standard);

  /* ---- Radius (sharp by doctrine; true circles use 50%) ---- */
  --radius-none: 0;
  --radius-hairline: 2px;

  /* ---- Legacy aliases (do not use in new code; kept so existing CSS works) ---- */
  --black: var(--obsidian);
  --lime: var(--signal-lime);
  --lime-hover: var(--signal-lime-bright);
  --lime-dim: var(--signal-lime-veil);
  --lime-glow: var(--signal-lime-haze);
  --dark: var(--hangar);
  --dark-card: var(--hangar-raised);
  --dark-card-hover: var(--hangar-raised-hover);
  --dark-border: var(--hangar-edge);
  --gray-text: var(--instrument-grey);
  --white: var(--bone);
  --font-brand: var(--font-display);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--lime); text-decoration: none; transition: color var(--transition); }
a:hover { color: #e0ff80; }

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

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

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 { font-family: var(--font-brand); font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

.text-lime { color: var(--lime); }
.text-gray { color: var(--gray-text); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none; border-radius: 0; cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.btn-primary {
  background: var(--lime);
  color: var(--black);
}
.btn-primary:hover {
  background: #e0ff80;
  color: var(--black);
  box-shadow: 0 0 30px var(--lime-glow);
}

.btn-outline {
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--lime);
}
.btn-outline:hover {
  background: var(--lime-dim);
  color: var(--lime);
}

.btn-arrow::after {
  content: '\2192';
  transition: transform var(--transition);
}
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition);
  background: rgba(10, 11, 9, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  border-bottom-color: var(--dark-border);
}

.nav .container {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* The global `img { max-width: 100% }` reset combined with the nav's flex
   layout creates a circular sizing constraint: the parent <a> sizes to
   the image, the image's max-width sizes to the parent. On viewports
   where the rest of the nav (links + lang switch + theme switch + CTA)
   is wide enough, this collapses the logo to 0px or near-zero. Two
   guards: flex-shrink so the logo container can't be squeezed, and
   max-width: none on the img so the natural aspect ratio holds. */
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 48px; width: auto; max-width: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin-right: auto; /* push lang/theme/cta cluster to the right edge */
}

.nav-links a {
  color: var(--gray-text);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--font-brand);
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--lime);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--lime);
}

.nav-cta {
  padding: 0.6rem 1.5rem !important;
  background: var(--lime) !important;
  color: var(--black) !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  font-family: var(--font-brand) !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap;
}
.nav-cta:hover { background: #e0ff80 !important; }

/* ---------- THEME SWITCH (hardware-style on/off for DARK MODE) ---------- */
/* Single switch, labeled "DARK MODE". Light is the brand default; flipping the
   switch ON turns dark mode on. The visual state is driven by the :root class,
   so no JS state-syncing is needed to avoid a flash. */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--instrument-grey);
  padding: 0.4rem 0.25rem;
  margin-right: 0.5rem;
  line-height: 1;
  transition: color var(--transition);
}

.theme-switch:hover { color: var(--bone); }

.theme-switch__label { white-space: nowrap; }

.theme-switch__track {
  display: inline-block;
  width: 30px;
  height: 14px;
  border: 1px solid currentColor;
  position: relative;
  flex-shrink: 0;
  transition: border-color var(--transition), background-color var(--transition);
}

.theme-switch__knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  background: currentColor;
  transition: transform var(--transition), background-color var(--transition);
}

/* ON state = dark mode active = :root WITHOUT .theme-paper.
   Lime fills the track and knob — the running indicator is lit. */
:root:not(.theme-paper) .theme-switch { color: var(--bone); }

:root:not(.theme-paper) .theme-switch__track {
  border-color: var(--signal-lime);
  background-color: var(--signal-lime-veil);
}

:root:not(.theme-paper) .theme-switch__knob {
  transform: translateX(16px);
  background-color: var(--signal-lime);
}

.theme-switch:focus-visible {
  outline: 2px solid var(--signal-lime);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch,
  .theme-switch__track,
  .theme-switch__knob { transition: none; }
}

/* ---------- LANGUAGE SWITCH (inline underline indicator) ---------- */
/* Two inline links matching the nav-link voice. The active locale carries
   the same 2px lime underline used by .nav-links a.active — no box, no
   fill. Quieter than the active nav item: locale is secondary information,
   so the active text stays bone instead of going lime. The underline is
   the single signal. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: 2.5rem;
  margin-right: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--hangar-edge);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}

.lang-switch__item {
  position: relative;
  padding: 0.3rem 0;
  color: var(--instrument-grey);
  text-decoration: none;
  transition: color var(--transition);
}

.lang-switch__item:hover { color: var(--bone); }

.lang-switch__item--active {
  color: var(--bone);
  pointer-events: none;
}

.lang-switch__item--active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--signal-lime);
}

/* In the footer-bottom row the lang switch sits between the copyright
   and the region tag. Drop the divider / margins that the nav variant
   uses; the footer-bottom row already has its own border-top + spacing. */
.footer-bottom .lang-switch {
  margin: 0;
  padding: 0;
  border-left: 0;
}

.lang-switch__item:focus-visible {
  outline: 2px solid var(--signal-lime);
  outline-offset: 4px;
}

/* ---------- THEMED LOGOS (swap between NEG/POS by theme) ---------- */
/* Two image elements per logo slot; CSS hides the wrong one for the active theme.
   Both load (so the toggle is instant), but only one renders. */
.logo--paper { display: none; }
:root.theme-paper .logo--obsidian { display: none; }
:root.theme-paper .logo--paper { display: block; }

/* Mobile nav toggle */
.nav-toggle { display: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--lime-dim) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(205, 252, 84, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--dark-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--dark-border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.15;
  pointer-events: none;
}

.hero .container {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content { max-width: 600px; }

.hero-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--lime-dim);
  border: 1px solid rgba(205, 252, 84, 0.2);
  color: var(--lime);
  font-size: 0.8rem;
  font-family: var(--font-brand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .accent { color: var(--lime); }

.hero p {
  font-size: 1.15rem;
  color: var(--gray-text);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.hero-logo-wrap {
  width: 400px; height: 400px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.hero-logo-wrap img {
  width: 320px; height: auto;
  filter: drop-shadow(0 0 60px var(--lime-glow));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-logo-ring {
  position: absolute; inset: -20px;
  border: 1px solid var(--dark-border);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.hero-logo-ring::before {
  content: '';
  position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 50%;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- SECTIONS ---------- */
section { padding: 6rem 0; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--lime-dim);
  border: 1px solid rgba(205, 252, 84, 0.15);
  color: var(--lime);
  font-size: 0.75rem;
  font-family: var(--font-brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.section-header h2 { margin-bottom: 1rem; }
.section-header p { color: var(--gray-text); font-size: 1.05rem; }

/* ---------- CARDS ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  padding: 2.25rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.card:hover {
  border-color: rgba(205, 252, 84, 0.2);
  transform: translateY(-2px);
}

.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--lime-dim);
  margin-bottom: 1.5rem;
}

.card-icon svg { width: 24px; height: 24px; stroke: var(--lime); fill: none; stroke-width: 1.5; }

.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--gray-text); font-size: 0.95rem; }

/* ---------- CASE STUDIES ---------- */
.case-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  overflow: hidden;
  transition: all var(--transition);
  margin-bottom: 2rem;
}

.case-card:hover {
  border-color: rgba(205, 252, 84, 0.2);
}

.case-card-img {
  background: var(--dark);
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.case-card-img .placeholder-pattern {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, var(--lime-dim) 0%, transparent 50%),
    linear-gradient(45deg, rgba(205, 252, 84, 0.05) 0%, transparent 50%);
}

.case-card-body {
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: center;
}

.case-tag {
  font-size: 0.75rem;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-brand);
  margin-bottom: 1rem;
}

.case-card-body h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.case-card-body p { color: var(--gray-text); margin-bottom: 1.5rem; }

.case-results {
  display: flex; gap: 2rem;
  margin-bottom: 1.5rem;
}

.case-result-item .num {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  color: var(--lime);
}

.case-result-item .label {
  font-size: 0.8rem;
  color: var(--gray-text);
}

/* ---------- BLOG ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  overflow: hidden;
  transition: all var(--transition);
}

.blog-card:hover {
  border-color: rgba(205, 252, 84, 0.2);
  transform: translateY(-2px);
}

.blog-card-img {
  height: 200px;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.blog-card-img .placeholder-pattern {
  position: absolute; inset: 0;
  opacity: 0.6;
}

.blog-card-body { padding: 1.75rem; }

.blog-meta {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--gray-text);
}

.blog-category {
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-brand);
}

.blog-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.blog-card:hover h3 { color: var(--lime); }

.blog-card-body p {
  color: var(--gray-text);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.read-more {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group label {
  display: block;
  font-family: var(--font-brand);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--dark);
  border: 1px solid var(--dark-border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--lime);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.contact-info { display: flex; flex-direction: column; gap: 2rem; }

.contact-info-item {
  display: flex; align-items: flex-start; gap: 1rem;
}

.contact-info-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--lime-dim);
}

.contact-info-icon svg { width: 18px; height: 18px; stroke: var(--lime); fill: none; stroke-width: 1.5; }

.contact-info-item h4 { margin-bottom: 0.25rem; font-family: var(--font-brand); }
.contact-info-item p { color: var(--gray-text); font-size: 0.9rem; }

/* ---------- WHY SECTION (single-column manifesto) ---------- */
.why-section { padding: 8rem 0; }

.why-section__container { max-width: 880px; }

.why-section__container .section-tag { margin: 0 0 2rem; }

.why-section__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bone);
  max-width: 22ch;
  margin: 0 0 2.5rem;
}

.why-section__body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--instrument-grey);
  max-width: 65ch;
  margin: 0;
}

.why-section__body strong {
  color: var(--bone);
  font-weight: 500;
}

@media (max-width: 768px) {
  .why-section { padding: 5rem 0; }
}

/* ---------- PLATFORM SPREAD (editorial pillars) ---------- */
.platform-spread {
  background: var(--obsidian);
  padding: 6rem 0;
  border-top: 1px solid var(--hangar-edge);
  border-bottom: 1px solid var(--hangar-edge);
}

.platform-spread__layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5rem;
  align-items: start;
}

.platform-spread__intro .section-tag {
  margin-bottom: 1.25rem;
}

.platform-spread__intro h2 {
  margin: 0 0 1.25rem;
}

.platform-spread__intro p {
  color: var(--instrument-grey);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 38ch;
  margin: 0 0 2rem;
}

.platform-spread__pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--hangar-edge);
}

.pillar:first-child { padding-top: 0; }
.pillar:last-child { border-bottom: none; padding-bottom: 0; }

.pillar__num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--instrument-grey);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}

.pillar__body h3 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.pillar__body p {
  color: var(--instrument-grey);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 60ch;
  margin: 0;
}

@media (max-width: 968px) {
  .platform-spread__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .pillar { gap: 1.25rem; padding: 1.5rem 0; }
  .pillar__num { font-size: 1.75rem; }
}

/* ---------- DIRECTORY INDEX (typographic category list) ---------- */
.directory-index {
  padding: 6rem 0;
}

.directory-index__head {
  max-width: 720px;
  margin-bottom: 3rem;
}

.directory-index__head .section-tag {
  margin-bottom: 1.25rem;
}

.directory-index__head h2 {
  margin: 0 0 1rem;
}

.directory-index__head p {
  color: var(--instrument-grey);
  font-size: 1.05rem;
  margin: 0;
}

.directory-index__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hangar-edge);
}

.dir-row {
  border-bottom: 1px solid var(--hangar-edge);
}

.dir-row__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  gap: 2rem;
  align-items: baseline;
  padding: 1.75rem 1rem;
  margin: 0 -1rem;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.dir-row__link:hover {
  background: var(--hangar-raised);
  color: inherit;
}

.dir-row__cat {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--bone);
  letter-spacing: -0.02em;
  transition: color var(--transition);
}

.dir-row__link:hover .dir-row__cat {
  color: var(--signal-lime);
}

.dir-row__items {
  font-family: var(--font-body);
  color: var(--instrument-grey);
  font-size: 1rem;
  line-height: 1.6;
}

.dir-row__arrow {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--instrument-grey);
  transition: transform var(--transition), color var(--transition);
}

.dir-row__link:hover .dir-row__arrow {
  color: var(--signal-lime);
  transform: translateX(4px);
}

.directory-index__cta {
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .dir-row__link {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "cat arrow"
      "items items";
    gap: 0.5rem 1rem;
    padding: 1.5rem 1rem;
  }
  .dir-row__cat { grid-area: cat; font-size: 1.25rem; }
  .dir-row__items { grid-area: items; font-size: 0.95rem; }
  .dir-row__arrow { grid-area: arrow; }
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, var(--lime-dim) 0%, transparent 70%);
}

.cta-banner .container { position: relative; }
.cta-banner h2 { margin-bottom: 1rem; }
.cta-banner p { color: var(--gray-text); margin-bottom: 2rem; max-width: 500px; margin-inline: auto; }

/* ---------- FOOTER ---------- */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--dark-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img { height: 44px; margin-bottom: 1rem; }
.footer-brand p { color: var(--gray-text); font-size: 0.9rem; max-width: 280px; }

.footer-col h4 {
  font-family: var(--font-brand);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--lime);
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--gray-text); font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--dark-border);
  font-size: 0.8rem;
  color: var(--gray-text);
}

/* ---------- SERVICES CATALOG (typographic two-column list) ---------- */
.services-catalog {
  padding: 6rem 0;
}

.services-catalog__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hangar-edge);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--hangar-edge);
}

.service-row__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 0;
}

.service-row__body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--instrument-grey);
  max-width: 65ch;
  margin: 0;
}

.service-row__link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--signal-lime);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.service-row__link:hover { color: var(--signal-lime-bright); }

@media (max-width: 768px) {
  .services-catalog { padding: 4rem 0; }
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.5rem 0;
  }
  .service-row__name { font-size: 1.25rem; }
}

/* ---------- SUPPORT STACK (3-up enterprise support pillars) ---------- */
.support-stack {
  padding: 6rem 0;
  background: var(--obsidian);
  border-top: 1px solid var(--hangar-edge);
  border-bottom: 1px solid var(--hangar-edge);
}

.support-stack__head {
  max-width: 760px;
  margin-bottom: 3.5rem;
}

.support-stack__head .section-tag { margin-bottom: 1.25rem; }
.support-stack__head h2 { margin: 0 0 1rem; }
.support-stack__head p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--instrument-grey);
  max-width: 62ch;
}

.support-stack__pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.support-pillar {
  border-top: 1px solid var(--hangar-edge);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-pillar > .section-tag {
  align-self: flex-start;
  margin-bottom: 0;
}

.support-pillar__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.support-pillar__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.support-pillar__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: currentColor;
  opacity: 0.72;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
}

.support-pillar__icon--proxmox    { -webkit-mask-image: url('../img/products/proxmox.svg');       mask-image: url('../img/products/proxmox.svg'); }
.support-pillar__icon--truenas    { -webkit-mask-image: url('../img/products/truenas.svg');       mask-image: url('../img/products/truenas.svg'); }
.support-pillar__icon--postgresql { -webkit-mask-image: url('../img/products/postgresql.svg');    mask-image: url('../img/products/postgresql.svg'); }
.support-pillar__icon--mariadb    { -webkit-mask-image: url('../img/products/mariadb.svg');       mask-image: url('../img/products/mariadb.svg'); }
.support-pillar__icon--nextcloud  { -webkit-mask-image: url('../img/products/nextcloud.svg');     mask-image: url('../img/products/nextcloud.svg'); }
.support-pillar__icon--paperless  { -webkit-mask-image: url('../img/products/paperless-ngx.svg'); mask-image: url('../img/products/paperless-ngx.svg'); }

.support-pillar__body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--instrument-grey);
  margin: 0;
}

.support-stack__footnote {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hangar-edge);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--instrument-grey);
  max-width: 70ch;
}

.support-stack__footnote strong { color: var(--bone); font-weight: 600; }

@media (max-width: 968px) {
  .support-stack__pillars { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
  .support-stack { padding: 4rem 0; }
  .support-stack__head { margin-bottom: 2.5rem; }
  .support-stack__pillars { grid-template-columns: 1fr; gap: 2rem; }
  .support-pillar__item { font-size: 1.25rem; }
}

/* ---------- PROCESS STRIP (4-up numbered) ---------- */
.process-strip {
  padding: 6rem 0;
  background: var(--obsidian);
  border-top: 1px solid var(--hangar-edge);
  border-bottom: 1px solid var(--hangar-edge);
}

.process-strip__head {
  max-width: 720px;
  margin-bottom: 3.5rem;
}

.process-strip__head .section-tag { margin-bottom: 1.25rem; }
.process-strip__head h2 { margin: 0; }

.process-strip__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process-step {
  border-top: 1px solid var(--hangar-edge);
  padding-top: 1.25rem;
}

.process-step__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--instrument-grey);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
  margin-bottom: 1rem;
}

.process-step__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bone);
  margin: 0 0 0.5rem;
}

.process-step__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--instrument-grey);
  margin: 0;
}

@media (max-width: 968px) {
  .process-strip__steps { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  .process-strip__steps { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- DEMO STRIP (theme-aware video walkthroughs) ---------- */
.demo-strip {
  padding: 6rem 0;
  background: var(--obsidian);
  border-top: 1px solid var(--hangar-edge);
  border-bottom: 1px solid var(--hangar-edge);
}

.demo-strip__head {
  max-width: 720px;
  margin-bottom: 3rem;
}

.demo-strip__head .section-tag { margin-bottom: 1.25rem; }
.demo-strip__head h2 { margin: 0 0 1rem; }
.demo-strip__head p {
  color: var(--instrument-grey);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.demo-strip__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.demo-strip__card {
  background: var(--hangar-raised);
  border: 1px solid var(--hangar-edge);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.demo-strip__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--signal-lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.demo-strip__card:hover {
  border-color: rgba(205, 252, 84, 0.2);
  transform: translateY(-2px);
}

.demo-strip__card:hover::before { transform: scaleX(1); }

.demo-strip__card:focus-within {
  border-color: rgba(205, 252, 84, 0.2);
}

.demo-strip__card:focus-within::before { transform: scaleX(1); }

.demo-strip__card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bone);
  margin: 0;
}

.demo-strip__card p {
  color: var(--instrument-grey);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* The player wrapper owns the aspect ratio and border once demo-player.js
   wraps the <video>. Until that runs (JS off / first paint), the video
   keeps its own framing so the layout never collapses. */
.demo-strip__video {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--hangar);
  border: 1px solid var(--hangar-edge);
  display: block;
}

.vplayer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--hangar);
  border: 1px solid var(--hangar-edge);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
}

.vplayer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--hangar);
  display: block;
  aspect-ratio: auto;
}

.vplayer__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: opacity 0.25s var(--ease-standard, ease-out);
}

.vplayer__playbox {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--signal-lime);
  color: var(--obsidian);
  box-shadow: 0 0 40px var(--signal-lime-haze);
}

.vplayer__playbox svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.vplayer.is-playing .vplayer__overlay {
  opacity: 0;
  pointer-events: none;
}

.vplayer__overlay:focus-visible {
  outline: 2px solid var(--signal-lime);
  outline-offset: -4px;
}

.vplayer__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.85rem 0.65rem;
  background: linear-gradient(to top, rgba(10, 11, 9, 0.92) 0%, rgba(10, 11, 9, 0) 100%);
  color: var(--bone);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-standard, ease-out);
  z-index: 3;
}

.vplayer:hover .vplayer__bar,
.vplayer:focus-within .vplayer__bar,
.vplayer:not(.is-playing) .vplayer__bar {
  opacity: 1;
  pointer-events: auto;
}

.vplayer__playpause,
.vplayer__fs {
  background: transparent;
  border: 0;
  color: var(--bone);
  cursor: pointer;
  padding: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.vplayer__playpause svg,
.vplayer__fs svg {
  width: 16px;
  height: 16px;
}

.vplayer__playpause svg[data-icon="pause"] { display: none; }
.vplayer.is-playing .vplayer__playpause svg[data-icon="play"] { display: none; }
.vplayer.is-playing .vplayer__playpause svg[data-icon="pause"] { display: inline; }

.vplayer__playpause:hover,
.vplayer__fs:hover { color: var(--signal-lime); }
.vplayer__playpause:focus-visible,
.vplayer__fs:focus-visible {
  outline: 1px solid var(--signal-lime);
  outline-offset: 2px;
}

.vplayer__track {
  position: relative;
  height: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.vplayer__track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(154, 155, 152, 0.45);
}

.vplayer__buffer,
.vplayer__fill {
  position: absolute;
  left: 0;
  height: 2px;
  pointer-events: none;
}

.vplayer__buffer {
  background: rgba(154, 155, 152, 0.75);
  width: 0;
}

.vplayer__fill {
  background: var(--signal-lime);
  width: 0;
}

.vplayer__track:focus-visible {
  outline: 1px solid var(--signal-lime);
  outline-offset: 4px;
}

.vplayer__time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--instrument-grey);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vplayer:fullscreen,
.vplayer:-webkit-full-screen {
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  border: 0;
}

.vplayer:fullscreen video,
.vplayer:-webkit-full-screen video {
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .vplayer__overlay,
  .vplayer__bar {
    transition: none;
  }
}

.demo-strip__transcript {
  font-size: 0.9rem;
  color: var(--instrument-grey);
}

.demo-strip__transcript summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone);
  list-style: none;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hangar-edge);
}

.demo-strip__transcript summary::-webkit-details-marker { display: none; }

.demo-strip__transcript summary::before {
  content: '+';
  display: inline-block;
  width: 1ch;
  margin-right: 0.6ch;
  color: var(--signal-lime);
  font-family: var(--font-body);
}

.demo-strip__transcript[open] summary::before { content: '−'; }

.demo-strip__transcript p {
  margin: 0.75rem 0 0;
  line-height: 1.7;
  max-width: 68ch;
}

@media (max-width: 968px) {
  .demo-strip__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- FAQ (single-column accordion using <details>) ---------- */
.faq-section {
  padding: 6rem 0;
  background: var(--obsidian);
  border-top: 1px solid var(--hangar-edge);
}

.faq-section__container { max-width: 880px; }

.faq-section__head { margin-bottom: 3rem; }
.faq-section__head .section-tag { margin-bottom: 1.25rem; }
.faq-section__head h2 { margin: 0; }

.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hangar-edge);
}

.faq-item {
  border-bottom: 1px solid var(--hangar-edge);
}

.faq-item details { padding: 0; }

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-item summary:hover { color: var(--signal-lime); }

.faq-toggle {
  font-family: var(--font-display);
  color: var(--instrument-grey);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.faq-item details[open] .faq-toggle {
  transform: rotate(45deg);
  color: var(--signal-lime);
}

.faq-a {
  font-family: var(--font-body);
  color: var(--instrument-grey);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 65ch;
  margin: 0 0 1.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary, .faq-toggle { transition: none; }
}

/* ---------- NEWSLETTER (left-aligned signup row) ---------- */
.newsletter {
  padding: 6rem 0;
  border-top: 1px solid var(--hangar-edge);
}

.newsletter__container { max-width: 720px; }

.newsletter__head { margin-bottom: 2.5rem; }
.newsletter__head .section-tag { margin-bottom: 1.25rem; }

.newsletter__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 0 0 1rem;
}

.newsletter__lead {
  color: var(--instrument-grey);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.newsletter__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--instrument-grey);
  margin-bottom: 0.5rem;
}

.newsletter__row {
  display: flex;
  gap: 1rem;
}

.newsletter__input {
  flex: 1;
  padding: 0.9rem 1rem;
  background: var(--hangar);
  border: 1px solid var(--hangar-edge);
  border-radius: 0;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter__input:focus { border-color: var(--signal-lime); }
.newsletter__input::placeholder { color: var(--instrument-grey); opacity: 0.6; }

@media (max-width: 600px) {
  .newsletter__row { flex-direction: column; }
}

/* ---------- ARTICLE (blog post pages) ---------- */
.article-header { padding: 2.5rem 0 1.25rem; }

.article-meta {
  color: var(--instrument-grey);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}
.article-meta span { margin-right: 1rem; }

.article-category {
  color: var(--signal-lime);
}

.article-body {
  padding: 2.5rem 0 5rem;
}

.article-body h2 {
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  max-width: 720px;
}

.article-body p {
  color: #c0c0be;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 1.25rem;
  max-width: 65ch;
}

.article-body ul,
.article-body ol {
  color: #c0c0be;
  font-family: var(--font-body);
  line-height: 1.8;
  margin: 0 0 1.25rem;
  max-width: 65ch;
  padding-left: 1.5rem;
}

.article-body li { margin-bottom: 0.5rem; }

.article-body a {
  color: var(--signal-lime);
  transition: color var(--transition);
}
.article-body a:hover { color: var(--signal-lime-bright); }

.article-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--signal-lime);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.article-back:hover { color: var(--signal-lime-bright); }

/* ---------- PAGE HEADER ---------- */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--lime-dim) 0%, transparent 60%);
}

.page-header .container { position: relative; }
.page-header h1 { margin-bottom: 1rem; }
.page-header p { color: var(--gray-text); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 968px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero p { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 2rem; }
  .hero-logo-wrap { width: 220px; height: 220px; }
  .hero-logo-wrap img { width: 180px; }

  .card-grid { grid-template-columns: 1fr; }
  .case-card { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .theme-switch { display: none; }
  .lang-switch { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black);
    border-bottom: 1px solid var(--dark-border);
    padding: 1.5rem 2rem;
    gap: 1rem;
  }
  section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
