/* ==========================================================================
   HyperArchive — Architectural Daylight Design System
   Calm Swiss-inspired layout matching Material 3 app captures
   ========================================================================== */

:root {
  --bg: #f8f9fb;
  --bg-subtle: #eff2f6;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --accent: #1d63ed;
  --accent-hover: #154ec2;
  --accent-tint: #eff5ff;
  --emerald: #059669;

  --dark-bg: #111318;
  --dark-surface: #191d24;
  --dark-border: #2a303c;
  --dark-ink: #f8fafc;
  --dark-muted: #94a3b8;

  --shadow-sm: 0 1px 2px rgba(13, 17, 23, 0.05);
  --shadow-device: 0 28px 64px -16px rgba(13, 17, 23, 0.16), 0 8px 20px -6px rgba(13, 17, 23, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 68px;
  background: rgba(248, 249, 251, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.nav-menu a:hover {
  color: var(--ink);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 8px 0;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
}

.btn-dark:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 72px 0 88px;
}

.hero-head {
  max-width: 780px;
  margin: 0 auto 48px;
  text-align: center;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-head h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.03;
  margin-bottom: 20px;
}

.hero-head p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Wide Hardware Stage in Hero */
.hero-stage {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 36px 28px;
}

.tablet-frame {
  max-width: 860px;
  margin: 0 auto;
  background: #14161a;
  padding: 12px;
  border-radius: 22px;
  box-shadow: var(--shadow-device);
}

.tablet-screen {
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.tablet-screen video {
  width: 100%;
  height: auto;
  display: block;
}

.hero-stage-bar {
  max-width: 860px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-stage-bar span strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Fact Strip
   ========================================================================== */
.fact-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.fact-item {
  border-left: 1px solid var(--border);
  padding-left: 20px;
}

.fact-item:first-child {
  border-left: none;
  padding-left: 0;
}

.fact-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.fact-item span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ==========================================================================
   Editorial Feature Chapters
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section-white {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.split.reverse .split-media {
  order: -1;
}

.split-copy,
.split-media {
  min-width: 0;
}

.split-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.split-copy h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.split-copy p {
  color: var(--ink-2);
  font-size: 1.03rem;
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 52ch;
}

.spec-mini-list {
  border-top: 1px solid var(--border);
}

.spec-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.spec-mini-row dt {
  color: var(--muted);
  font-weight: 500;
}

.spec-mini-row dd {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

/* Slim Phone Hardware Frame */
.media-well {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-white .media-well {
  background: var(--bg);
}

.phone-frame {
  width: 280px;
  background: #14161a;
  padding: 10px;
  border-radius: 36px;
  box-shadow: var(--shadow-device);
}

.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: #ffffff;
}

.phone-screen video {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Interactive Workbench Switcher (Utilities)
   ========================================================================== */
.workbench-header {
  max-width: 640px;
  margin-bottom: 40px;
}

.workbench-header h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  margin-bottom: 12px;
}

.workbench-header p {
  color: var(--ink-2);
  font-size: 1.02rem;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.wb-list {
  border-top: 1px solid var(--border);
}

.wb-tab {
  width: 100%;
  text-align: left;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: background-color 0.15s ease;
}

.wb-tab:hover {
  background: rgba(29, 99, 237, 0.04);
}

.wb-tab.active {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.wb-tab strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.wb-tab.active strong {
  color: var(--accent);
}

.wb-tab span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.wb-arrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 2px;
}

.wb-tab.active .wb-arrow {
  color: var(--accent);
}

/* ==========================================================================
   Swiss Architectural Spec Sheet
   ========================================================================== */
.spec-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.spec-section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.spec-section-head p {
  color: var(--muted);
  max-width: 460px;
  font-size: 0.95rem;
}

.spec-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-key {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fbfcfd;
  border-right: 1px solid var(--border);
}

.spec-val {
  padding: 18px 24px;
  font-size: 0.93rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.spec-val code,
.faq-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
}

/* ==========================================================================
   Matte Charcoal Showcase Band (Launch Film + Raw UI Gallery)
   ========================================================================== */
.cinema-band {
  background: var(--dark-bg);
  color: var(--dark-ink);
  padding: 96px 0;
}

.cinema-band h2,
.cinema-band h3 {
  color: var(--dark-ink);
}

.cinema-head {
  margin-bottom: 44px;
  max-width: 640px;
}

.cinema-head .split-label {
  color: #60a5fa;
}

.cinema-head p {
  color: var(--dark-muted);
  margin-top: 12px;
  font-size: 1rem;
}

.cinema-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.film-frame {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  padding: 16px;
}

.film-box {
  border-radius: 14px;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 9 / 16;
}

.film-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.chapter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.chapter-btn:hover,
.chapter-btn.active {
  border-color: #60a5fa;
  color: #ffffff;
  background: #1e293b;
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.screen-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.screen-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
}

.screen-card img {
  width: 100%;
  aspect-ratio: 9 / 20;
  object-fit: cover;
  border-radius: 8px;
}

.screen-card span {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-ink);
}

/* ==========================================================================
   Privacy & FAQ Editorial Section
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 56px;
  align-items: start;
}

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

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

.faq-item summary {
  padding: 20px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--ink);
}

.faq-body {
  padding-bottom: 20px;
  font-size: 0.94rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 62ch;
}

.faq-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.aside-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.aside-meta h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.aside-meta p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.meta-rows {
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.meta-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.meta-row small {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}

.meta-row a,
.meta-row span {
  font-family: var(--font-mono);
  color: var(--ink);
  word-break: break-all;
}

.meta-row a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-col h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ==========================================================================
   Privacy Policy Document Page
   ========================================================================== */
.doc-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.doc-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.doc-head h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 10px 0 12px;
}

.doc-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.doc-body h2 {
  font-size: 1.3rem;
  margin-top: 32px;
  margin-bottom: 10px;
}

.doc-body h3 {
  font-size: 1.02rem;
  margin-top: 18px;
  margin-bottom: 6px;
}

.doc-body p,
.doc-body li {
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.7;
}

.doc-body ul {
  padding-left: 20px;
  margin: 10px 0 16px;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 17, 23, 0.92);
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 94vw;
  max-height: 82vh;
}

.lightbox-stage img {
  max-width: 82vw;
  max-height: 80vh;
  border-radius: 12px;
}

.lightbox-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-caption {
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .split,
  .workbench-grid,
  .cinema-layout,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .split.reverse .split-media {
    order: 0;
  }

  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-item:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-menu,
  .nav-desktop-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .section,
  .cinema-band {
    padding: 68px 0;
  }

  .hero {
    padding: 44px 0 64px;
  }

  .hero-stage {
    padding: 16px;
  }

  .spec-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec-key {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 18px;
  }

  .spec-val {
    padding: 12px 18px;
  }

  .screens-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 16px;
  }

  .fact-grid,
  .footer-top,
  .screens-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fact-item {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }

  .fact-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .doc-body {
    padding: 24px 18px;
  }

  .lightbox-nav {
    display: none;
  }
}

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