/* ================================================================
   DynamicDeepSKY — homepage styles
   Light, engineering-grade product page. One accent colour.
   ================================================================ */

:root {
  --text: #16181d;
  --muted: #565d6a;
  --bg: #ffffff;
  --bg-gray: #f5f6f8;
  --line: #e3e5ea;
  --accent: #d81f1f;        /* deepened brand red for text/buttons (logo stays #f00) */
  --accent-dark: #b31818;
  --dark: #0c0f16;
  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #eef0f3;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.4em;
}

.container { width: min(1120px, 92vw); margin-inline: auto; }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--text); color: #fff; padding: 10px 16px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ================= header ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; }

.nav-menu {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav-menu a {
  color: #40454f;
  font-size: 0.92rem; font-weight: 500;
}
.nav-menu a:hover { color: var(--text); text-decoration: none; }
.nav-menu .nav-contact {
  color: #fff; background: var(--text);
  padding: 8px 18px; border-radius: 6px;
  font-weight: 600;
}
.nav-menu .nav-contact:hover { background: #000; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 11px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text); border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ================= buttons ================= */
.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 0.95rem;
  padding: 12px 26px; border-radius: 6px;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }

/* ================= hero ================= */
.hero {
  background:
    linear-gradient(rgba(9, 12, 20, 0.78), rgba(9, 12, 20, 0.78)),
    url("../img/hero-bg.jpg") center 40% / cover no-repeat, var(--dark);
  color: #fff;
  padding: 108px 0 116px;
}

.hero-eyebrow {
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #aeb6c6;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 15em;
}

.hero-sub {
  margin-top: 22px;
  max-width: 40em;
  font-size: 1.08rem;
  color: #ccd2de;
}

.hero-cta {
  margin-top: 36px;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.hero-link { color: #fff; font-weight: 600; font-size: 0.98rem; }
.hero-link:hover { color: #fff; }

/* ================= sections ================= */
.section { padding: 88px 0; }
.section-gray { background: var(--bg-gray); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 46em; }

.eyebrow {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.lead { margin-top: 14px; color: var(--muted); }

/* ---------- overview ---------- */
.overview-grid {
  margin-top: 52px;
  display: grid; gap: 40px 32px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.overview-item {
  border-top: 2px solid var(--text);
  padding-top: 18px;
}
.overview-item .num {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  display: block; margin-bottom: 10px;
}
.overview-item h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.overview-item h3 a { color: inherit; }
.overview-item h3 a:hover { color: var(--accent); text-decoration: none; }
.overview-item p { font-size: 0.93rem; color: var(--muted); }

/* ---------- platform ---------- */
.screenshot {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 18, 24, 0.06);
}
.screenshot figcaption {
  padding: 12px 16px;
  font-size: 0.86rem; color: var(--muted);
  border-top: 1px solid var(--line);
}

.feature-grid {
  margin-top: 48px;
  display: grid; gap: 36px 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature { border-top: 1px solid var(--line); padding-top: 16px; }
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: 7px; }
.feature p { font-size: 0.93rem; color: var(--muted); }

.device-row {
  margin-top: 64px;
  display: grid; grid-template-columns: 220px 1fr;
  gap: 44px; align-items: center;
}
.device-img {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.device-copy h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.device-copy p { color: var(--muted); max-width: 46em; }
.device-copy p + p { margin-top: 10px; }

/* ---------- products (cameras) ---------- */
.product {
  margin-top: 56px;
  display: grid; grid-template-columns: minmax(300px, 460px) 1fr;
  gap: 48px;
  align-items: start;
}
.product + .product { border-top: 1px solid var(--line); padding-top: 56px; }
.product-flip .product-media { order: 2; }
.product-media img {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.product-media-render {
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-gray);
  padding: 28px;
}
.product-media-render img { border: 0; }
.product-info h3 { font-size: 1.35rem; font-weight: 700; }
.product-tag {
  font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted);
  margin: 4px 0 14px;
}
.product-info > p { color: var(--muted); }
.product-info ul {
  margin: 16px 0 0 18px;
  display: grid; gap: 6px;
  font-size: 0.94rem;
}
.product-info li::marker { color: var(--accent); }

.spec-table {
  margin-top: 24px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.spec-table caption {
  text-align: left;
  font-weight: 600; font-size: 0.95rem;
  padding-bottom: 10px;
}
.spec-table th, .spec-table td {
  text-align: left; vertical-align: top;
  padding: 9px 14px 9px 0;
  border-top: 1px solid var(--line);
}
.spec-table th { width: 34%; font-weight: 500; color: var(--muted); }

/* ---------- telescopes ---------- */
.scope-grid {
  margin-top: 52px;
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}
.scope {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: grid; grid-template-columns: 180px 1fr; gap: 26px;
  align-items: start;
}
.scope-media {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
}
.scope-media img { max-height: 100%; width: auto; max-width: 100%; }
.scope-body h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 6px; }
.scope-body > p { font-size: 0.94rem; color: var(--muted); }
.scope-body ul {
  margin: 12px 0 0 18px;
  display: grid; gap: 5px;
  font-size: 0.9rem; color: #3c414b;
}
.scope-body li::marker { color: var(--accent); }

/* ---------- OEM ---------- */
.oem {
  background: var(--dark);
  color: #fff;
  padding: 56px 0;
}
.oem-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 36px; flex-wrap: wrap;
}
.oem h2 { font-size: 1.45rem; }
.oem p { margin-top: 8px; color: #b8bfcd; max-width: 46em; }

/* ---------- news ---------- */
.news-list { list-style: none; margin-top: 40px; }
.news-list li {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-list time { font-size: 0.88rem; color: var(--muted); padding-top: 2px; }
.news-list h3 { font-size: 1.02rem; font-weight: 600; }
.news-list h3 a { color: inherit; }
.news-list h3 a:hover { color: var(--accent); }
.news-list p { font-size: 0.92rem; color: var(--muted); margin-top: 3px; }

/* ---------- support ---------- */
.resource-list { list-style: none; margin-top: 40px; }
.resource-list li {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.resource-list li:last-child { border-bottom: 1px solid var(--line); }
.resource-list h3 { font-size: 1.02rem; font-weight: 600; }
.resource-list .meta {
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  margin-left: 8px; white-space: nowrap;
}
.resource-list p { font-size: 0.92rem; color: var(--muted); margin-top: 3px; }
.resource-list > li > a { font-weight: 600; font-size: 0.94rem; white-space: nowrap; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-details {
  display: grid; gap: 14px;
  border-left: 1px solid var(--line);
  padding-left: 48px;
}
.contact-details > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.contact-details dt { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.contact-details dd { font-size: 0.98rem; }

/* ================= footer ================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  font-size: 0.88rem; color: var(--muted);
}
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ================= responsive ================= */
@media (max-width: 980px) {
  .scope-grid { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product-flip .product-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-details { border-left: 0; padding-left: 0; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 4vw 16px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu li:first-child { border-top: 0; }
  .nav-menu a { display: block; padding: 13px 2px; font-size: 1rem; }
  .nav-menu .nav-contact { margin-top: 12px; text-align: center; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 64px 0; }
  .hero { padding: 72px 0 80px; }
  .device-row { grid-template-columns: 1fr; }
  .device-img { max-width: 230px; }
  .scope { grid-template-columns: 1fr; }
  .scope-media { height: auto; max-height: 220px; }
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
  .resource-list li { flex-direction: column; gap: 8px; }
}

/* ================= reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ================= print ================= */
@media print {
  .site-header, .nav-toggle, .hero-cta, .site-footer a { display: none; }
  .hero { background: none; color: #000; padding: 20px 0; }
  .hero-sub { color: #333; }
  .section { padding: 24px 0; }
}
