/* ==========================================================================
   H-Prime — shared styles
   Extracted verbatim from the original index.html <style> block (visual style
   preserved), then extended with new components for the multi-page site.
   No build step: this file is linked directly by index.html and product.html.
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --accent: #1E3A5F;
  --accent-hover: #162B47;
  --max-width: 1080px;
  --section-padding: 120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-size: 14px;
  font-weight: 500;
}
.skip-link:focus {
  left: 0;
}

/* Visible focus styles for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
nav.scrolled {
  border-bottom-color: var(--border);
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
nav .brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
nav .nav-links a:hover {
  color: var(--text);
}
nav .nav-links a[aria-current="page"] {
  color: var(--text);
}
nav .nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px !important;
  transition: background 0.15s ease !important;
}
nav .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
nav.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
nav.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
nav.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  letter-spacing: -0.005em;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow {
  transform: translateX(3px);
}
/* Secondary / outline button */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: #d1d5db;
}

/* Hero */
.hero {
  padding: 100px 0 var(--section-padding);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}
.hero h1 {
  font-size: 64px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 24px;
}
.hero .subhead {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.hero p.lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
}

/* Hero illustration */
.hero-visual {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  justify-self: end;
}
.hero-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sections */
section {
  padding: var(--section-padding) 0;
}
section.alt {
  background: var(--bg-alt);
}
.section-header {
  margin-bottom: 64px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
h2 {
  font-size: 40px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 16px;
}
.section-header p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.step h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.step p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* What it is — plain-language lead block */
.lead-block {
  max-width: 760px;
}
.lead-block p {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
}
.lead-block p:last-child {
  margin-bottom: 0;
}
.lead-block p.muted {
  font-size: 18px;
  color: var(--text-muted);
}

/* Why different */
.why-grid {
  display: grid;
  gap: 40px;
  max-width: 820px;
}
.why-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.why-item:last-child {
  border-bottom: none;
}
.why-item p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}
.why-item p strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

/* Built for cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: #d1d5db;
  transform: translateY(-2px);
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* CTA section */
.cta-section {
  text-align: center;
}
.cta-section h2 {
  margin-bottom: 24px;
}
.cta-section p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Waitlist form */
.waitlist-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.waitlist-form .field {
  flex: 1 1 240px;
  text-align: left;
}
.waitlist-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.waitlist-form input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}
.waitlist-form input[type="email"]:focus {
  border-color: var(--accent);
  outline: none;
}
.waitlist-form .btn {
  flex: 0 0 auto;
  align-self: flex-end;
}
.form-msg {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  min-height: 1.2em;
}
.form-msg--success {
  color: var(--accent);
  font-weight: 500;
}
.form-msg--error {
  color: #b91c1c;
  font-weight: 500;
}

/* Institutional enquiry form (stacked fields inside a panel) */
.institution-form .field {
  text-align: left;
  margin-bottom: 16px;
}
.institution-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.institution-form input,
.institution-form textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}
.institution-form textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.6;
}
.institution-form input:focus,
.institution-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.institution-form .btn {
  margin-top: 4px;
}

/* Institutions split */
.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  text-align: left;
}
.panel.alt-panel {
  background: var(--bg-alt);
}
.panel h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.panel p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: none;
}

/* ==========================================================================
   Product page
   ========================================================================== */

.product-hero {
  padding: 88px 0 64px;
}
.product-hero .eyebrow {
  margin-bottom: 16px;
}
.product-hero h1 {
  font-size: 52px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 760px;
}
.product-hero p {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 620px;
}

/* Screenshot showcase */
.shots {
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.shot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.shot:nth-child(even) .shot-figure {
  order: 2;
}
.shot-text h3 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}
.shot-text p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
}
.shot-figure {
  margin: 0;
}
.shot-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 32px rgba(17, 24, 39, 0.06);
  background: var(--bg-alt);
}
/* Placeholder shown until a real screenshot is dropped in.
   Activated by main.js when the image fails to load (onerror). */
.shot-figure.is-missing img {
  display: none;
}
.shot-figure.is-missing {
  position: relative;
}
.shot-figure.is-missing::before {
  content: "Screenshot pending — " attr(data-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  aspect-ratio: 16 / 10;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
footer .brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
footer .footer-right {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  color: var(--text-muted);
}
footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
footer a:hover {
  color: var(--text);
}
.footer-disclaimer {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.footer-disclaimer .container {
  display: block;
  padding-top: 24px;
  padding-bottom: 4px;
}
.footer-disclaimer p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 760px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 880px) {
  :root {
    --section-padding: 80px;
  }
  .container {
    padding: 0 24px;
  }
  .hero {
    padding: 64px 0 var(--section-padding);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual {
    max-width: 320px;
    justify-self: center;
    order: -1;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero .subhead {
    font-size: 19px;
  }
  h2 {
    font-size: 30px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .product-hero h1 {
    font-size: 36px;
  }
  /* Product shots stack vertically; image first regardless of source order */
  .shots {
    gap: 64px;
  }
  .shot {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .shot:nth-child(even) .shot-figure {
    order: 0;
  }
  .shot-figure {
    order: -1;
  }

  /* Mobile nav: hamburger reveals a stacked dropdown panel */
  .nav-toggle {
    display: flex;
  }
  nav .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    display: none;
  }
  nav.menu-open .nav-links {
    display: flex;
  }
  nav .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  nav .nav-links a:last-child {
    border-bottom: none;
  }
  nav .nav-cta {
    margin-top: 12px;
    text-align: center;
    border-bottom: none !important;
  }
  .footer-right {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
  footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 36px;
  }
  .section-header {
    margin-bottom: 48px;
  }
  .waitlist-form .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
