/* ==========================================================================
   DesComm landing page — style.css

   Design language
   ---------------
   - Dark, low-chrome "field kit" aesthetic: near-black blue background,
     muted field-green accent (#a8c69a).
   - No external fonts or requests; system fonts only.

   Images
   ------
   Every photo ships natively at 1080 x 1350 px (4:5 portrait). Each photo
   lives in a frame that reserves that exact aspect ratio *before* the
   image loads, so:
   - the layout is identical before and after the photo arrives
     (no layout shift),
   - the photo always fills its frame with no cropping,
   - on any viewport the frame simply scales down (width: 100%, height
     derived from the 4:5 ratio).
   object-fit: cover is only a safety net in case a future replacement
   asset has a different ratio — it will then crop gracefully instead of
   distorting or leaving letterbox gaps.
   ========================================================================== */

:root {
  --bg: #070b12;
  --surface: #0c121b;
  --surface-2: #0f1620;
  --border: #1b2431;
  --border-strong: #2a3648;
  --text: #e9eef5;
  --text-muted: #94a1b3;
  --text-faint: #66738a;
  --accent: #a8c69a;
  --accent-bright: #c2dcb7;
  --accent-deep: #7fa870;
  --accent-ink: #0b120a;
  --radius: 14px;
  --header-h: 64px;
}

/* ---------- base ---------- */

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Never let an image blow past its container */
img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--accent-bright);
}

::selection {
  background: rgba(168, 198, 154, 0.35);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- skip link ---------- */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
}

.skip-link:focus {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* ---------- layout primitives ---------- */

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

/* Anchored sections clear the sticky header */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 58ch;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}

.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
  max-width: 56ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-deep);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

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

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand:hover {
  color: var(--accent-bright);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 198, 154, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  padding: 0;
}

/* :where() keeps these rules at specificity 0, and :not(.btn) excludes
   the "Get an RNode" button so the .btn-primary rules still color it
   instead of it being overridden to muted gray. */
.nav-links :where(a:not(.btn)) {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links :where(a:not(.btn):hover) {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav-optional {
    display: none;
  }
}
/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    640px 420px at 72% 22%,
    rgba(168, 198, 154, 0.09),
    transparent 70%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative; /* sits above the glow */
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  }
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 14px 0 18px;
}

.text-accent {
  color: var(--accent);
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 52ch;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-stats li {
  padding-left: 18px;
  border-left: 1px solid var(--border);
  display: grid;
  gap: 4px;
}

.hero-stats li:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Hero visual — the 1080x1350 photo, framed at its native 4:5 ratio */
.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  aspect-ratio: 1080 / 1350;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.visual-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.72);
  border: 1px solid rgba(168, 198, 154, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.visual-tag-bottom {
  top: auto;
  bottom: 14px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-num {
  display: block;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1;
  font-weight: 700;
  color: rgba(168, 198, 154, 0.22);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- photo cards / field carousel ----------
   The .photo-frame reserves the exact native 4:5 (1080 x 1350) aspect
   ratio, so carousel and specs photos never shift the layout while
   they load and never crop. In the carousel each slide is exactly as
   wide as the viewport; the track slides one slide at a time. */

.photo-card {
  display: block;
}

/* Carousel is capped so the 4:5 photo stays a sane height on wide screens */
.carousel {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
  outline: none;
}

.carousel-viewport {
  overflow: hidden;
  /* Horizontal swipes are handled by JS; vertical page scroll stays native. */
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

.carousel .photo-card {
  flex: 0 0 100%;
  width: 100%;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    color 0.15s ease;
}

.carousel-btn:hover {
  border-color: var(--accent-deep);
  color: var(--accent-bright);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-dots {
  display: inline-flex;
  gap: 10px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* Visually hidden live region announcing the current slide */
.carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.photo-frame {
  position: relative;
  aspect-ratio: 1080 / 1350;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card figcaption {
  padding-top: 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.photo-card:hover .photo-frame {
  border-color: var(--border-strong);
}

.photo-card:hover figcaption {
  color: var(--text);
}

/* ---------- features ---------- */

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature {
  display: grid;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(168, 198, 154, 0.12);
  color: var(--accent);
}

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

.feature h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- specs ---------- */

.specs-grid {
  display: grid;
  gap: 32px;
  align-items: start;
}

/* Keep the photo from stretching full-width when the grid stacks */
.specs-grid .photo-card {
  max-width: 420px;
  margin-inline: auto;
}

@media (min-width: 880px) {
  .specs-grid {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
}

.specs-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}

.specs {
  list-style: none;
  padding: 0;
}

.spec {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.spec:last-child {
  border-bottom: 0;
}

.spec-key {
  color: var(--text-muted);
}

.spec-value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.price-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.price-block p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- ordering ---------- */

.order-grid {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.order-fact {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.order-fact h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.order-fact p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- faq ---------- */

.faq-list {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.faq-list details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.faq-list details[open] {
  border-color: var(--border-strong);
}

.faq-list summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.faq-list summary:hover {
  color: var(--accent-bright);
}

.faq-list details p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- manifesto ---------- */

.manifesto blockquote {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 34ch;
  margin-inline: auto;
}

.manifesto-by {
  margin-top: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.cta-card {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 52px);
}

.cta-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.015em;
  margin: 14px 0 16px;
  text-wrap: balance;
}

.cta-card p {
  color: var(--text-muted);
  max-width: 46ch;
  margin-inline: auto;
}

.cta-card .btn {
  margin-top: 24px;
}

.cta-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- footer ---------- */

.site-footer {
  background: #05080e;
  border-top: 1px solid var(--border);
  padding-block: 44px 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
}

.footer-links a {
  color: var(--text-muted);
}

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

.footer-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.footer-tech {
  text-align: center;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.footer-tech a {
  color: var(--accent-deep);
}

.footer-tech a:hover {
  color: var(--accent-bright);
}

/* ---------- small screens ---------- */

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-card .btn {
    width: 100%;
  }

  .hero-stats li {
    padding-left: 14px;
  }

  .stat-value {
    font-size: 1.45rem;
  }
}

/* ---------- reduced motion ---------- */

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

  .live-dot {
    animation: none;
  }

  .btn,
  .btn-primary,
  .btn-ghost,
  .photo-frame,
  .carousel-track,
  .carousel-btn,
  .carousel-dot {
    transition: none;
  }
}
