/* ============================================================
   Horve IFC Viewer — site stylesheet
   Plain CSS, no build step. Brand tokens in :root.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #2563EB;
  --blue-dark: #1E4FC2;
  --blue-light: #5E96F3;
  --blue-tint: #EDF3FE;
  --ink: #0B1220;
  --text: #3C4A63;
  --muted: #7A879B;
  --line: #E3E9F2;
  --bg: #FFFFFF;
  --bg-alt: #F5F7FB;
  --dark-text: #B9C4D8;
  --dark-strong: #DCE5F2;
  --dark-muted: #8FA0BC;
  --radius: 12px;
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

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

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

code { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 22px; }

section { padding: 88px 0; }

[id] { scroll-margin-top: 84px; }

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title { font-size: clamp(1.7rem, 3.4vw, 2.2rem); }

.section-intro { max-width: 640px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 11px 20px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-outline {
  background: #fff;
  color: var(--blue);
  border-color: #C9D8F7;
}
.btn-outline:hover {
  background: var(--blue-tint);
  border-color: var(--blue);
  color: var(--blue);
}
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.55rem;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 26px;
}
.site-nav a:not(.btn) { color: #42506A; font-size: 0.94rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.site-nav .btn { padding: 9px 18px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  padding: 84px 0 96px;
  background: radial-gradient(1100px 480px at 75% -10%, var(--blue-tint) 0%, rgba(237, 243, 254, 0) 65%);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero .lead { font-size: 1.16rem; max-width: 660px; }

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 18px 0 28px;
}

.hero-ctas { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }

.hero-shot { margin-top: 58px; }
.hero-shot a { display: block; }
.hero-shot img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(11, 18, 32, 0.16), 0 4px 14px rgba(11, 18, 32, 0.08);
}

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

.features { background: var(--bg-alt); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 42px;
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11, 18, 32, 0.08);
  border-color: #CDD9EC;
}

.feature .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature h3 { font-size: 1.04rem; margin-bottom: 8px; }
.feature p { font-size: 0.93rem; }

.also {
  margin-top: 36px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 2;
}

/* ---------- privacy band ---------- */

.privacy { background: var(--ink); color: var(--dark-text); }
.privacy .kicker { color: var(--blue-light); }
.privacy h2 { color: #fff; }
.privacy .section-intro { color: var(--dark-text); }

.privacy blockquote {
  margin: 28px 0 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--blue);
  color: var(--dark-strong);
  font-size: 1.02rem;
  max-width: 640px;
}
.privacy blockquote .cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dark-muted);
}
.privacy blockquote .cite a { color: var(--dark-strong); text-decoration: underline; }

/* ---------- screenshots ---------- */

.shots-grid {
  display: grid;
  grid-template-columns: minmax(250px, 340px) 1fr;
  gap: 24px;
  margin-top: 42px;
  align-items: start;
}

.shot-col { display: grid; gap: 24px; }

.shot { margin: 0; }
.shot a { display: block; }
.shot img {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.07);
  background: #fff;
}
.shot figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 10px; }

/* ---------- download ---------- */

.download { background: var(--bg-alt); }

.dl-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-top: 36px;
  max-width: 860px;
}

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
}

.dl-card h3 { font-size: 1.08rem; margin-bottom: 8px; padding-right: 90px; }
.dl-card > p { font-size: 0.92rem; margin-bottom: 20px; }
.dl-card .btn { margin-top: auto; }

.dl-file {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  word-break: break-all;
}

.dl-note { margin-top: 20px; font-size: 0.92rem; max-width: 860px; }

.trial-box {
  margin-top: 24px;
  max-width: 860px;
  background: var(--blue-tint);
  border: 1px solid #D5E3FC;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.95rem;
}
.trial-box strong { color: var(--ink); }

.fineprint { margin-top: 26px; max-width: 860px; font-size: 0.85rem; color: var(--muted); }

.checksums { margin-top: 12px; font-size: 0.85rem; max-width: 860px; }
.checksums summary { cursor: pointer; font-weight: 600; color: var(--text); }
.sha-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  margin-top: 10px;
  color: var(--text);
}
.sha-row code { color: var(--muted); word-break: break-all; }
.checksums .sums-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

/* ---------- FAQ ---------- */

.faq .container { max-width: 800px; }

.faq-list { margin-top: 30px; border-top: 1px solid var(--line); }

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  position: relative;
  padding: 18px 38px 18px 0;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--muted);
}
.faq-list details[open] summary::after { content: "\2212"; }

.faq-list details > p { margin: 0 0 20px; font-size: 0.95rem; padding-right: 38px; }

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

.site-footer {
  background: var(--ink);
  color: #93A1B8;
  padding: 42px 0 46px;
  font-size: 0.88rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.site-footer a { color: #D3DCEA; }
.foot-note {
  width: 100%;
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #6E7E99;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 10, 18, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1400px, 94vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.1rem;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
}

/* ---------- legal (EULA) / error pages ---------- */

.legal { padding: 64px 0 96px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: 1.9rem; }
.legal .copyright {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 36px;
}
.legal h2 { font-size: 1rem; letter-spacing: 0.02em; margin: 36px 0 10px; }
.legal p, .legal li { font-size: 0.95rem; }
.legal ul { margin: 0 0 16px; padding-left: 24px; }

.error-page { padding: 130px 0 150px; text-align: center; }
.error-page h1 { font-size: 2.2rem; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  section { padding: 64px 0; }

  .site-header .container { height: 60px; gap: 16px; }

  html.js .nav-toggle { display: inline-flex; }
  html.js .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(11, 18, 32, 0.08);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 22px 20px;
    gap: 2px;
  }
  html.js .site-header.nav-open .site-nav { display: flex; }
  html.js .site-nav a:not(.btn) { padding: 11px 0; }
  html.js .site-nav .btn { margin-top: 10px; }

  .hero { padding: 54px 0 68px; }
  .hero-shot { margin-top: 38px; }

  .shots-grid { grid-template-columns: 1fr; }
  .shot--tall { max-width: 360px; }

  .dl-card h3 { padding-right: 0; }
  .badge { position: static; display: inline-block; margin-bottom: 10px; align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
