/*
  OriginsBot marketing site — "Apple-native precision" light theme.
  Shared design tokens + base/component styles for all non-homepage pages.
*/

:root {
  --bg: #FBFBFD;
  --surface: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --accent: #0066CC;
  --accent-dark: #004C99;
  --confidence: #1FA971;
  --border: #D2D2D7;
  --border-soft: #E8E8ED;

  /* Supplementary tokens (tints + functional warning color) derived from the
     palette above so that no component needs a hardcoded hex value. */
  --accent-tint: #EAF2FC;
  --accent-tint-strong: #D6E7FA;
  --confidence-tint: #E7F7EF;
  --warning: #D70015;
  --warning-tint: #FDECEB;
  --warning-tint-strong: #FADBD8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-secondary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.font-mono,
code,
pre,
.mono {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

p {
  line-height: 1.5;
}

a {
  color: inherit;
}

/* Single-accent-word / headline highlight treatment. Replaces the old
   amber/gold gradient-text with a flat accent-blue color (no gradient
   needed for a solid brand color). */
.gradient-text,
.text-accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
}

/* ---------- Navigation ---------- */

.site-nav {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

/* Color is intentionally left to each link's own utility class (e.g.
   text-[var(--text-secondary)], or text-[var(--accent)] for the current
   page) so that per-link states aren't overridden by a lower-specificity
   default here. */
.site-nav a {
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav .brand {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Primary CTA pill inside the nav bar. */
.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  color: #FFFFFF;
  background-color: var(--text-primary);
  border-radius: 980px;
  padding: 8px 18px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-nav-cta:hover {
  opacity: 0.8;
  color: #FFFFFF;
}

/* ---------- Buttons ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #FFFFFF;
  background-color: var(--accent);
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  color: #FFFFFF;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--border-soft);
  border-color: var(--border);
}

/* ---------- Cards ---------- */

.card-surface {
  background-color: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

/* ---------- Status ---------- */

.status-active {
  color: var(--confidence);
  font-weight: 500;
}

.status-active-badge {
  display: inline-block;
  color: var(--confidence);
  background-color: var(--confidence-tint);
  border-radius: 980px;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border-soft);
}

.site-footer a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .legal {
  color: var(--text-tertiary);
}

.site-footer .divider {
  color: var(--border);
}

/* ---------- Homepage: hero badge ---------- */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--confidence);
  flex-shrink: 0;
}

/* ---------- Homepage: hero product shot ---------- */

.hero-shot {
  position: relative;
  isolation: isolate;
}

/* Soft stage behind the black screenshot so it doesn’t meet pure white edge-on */
.hero-shot::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 8%;
  bottom: -6%;
  z-index: -1;
  background: radial-gradient(
    ellipse 80% 70% at 50% 45%,
    rgba(29, 29, 31, 0.14) 0%,
    rgba(29, 29, 31, 0.05) 45%,
    transparent 70%
  );
  filter: blur(28px);
  pointer-events: none;
}

.hero-shot-stage {
  position: relative;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f5f5f7 0%, #ececf0 100%);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.02),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 32px 72px -16px rgba(0, 0, 0, 0.18);
}

.hero-shot-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.18);
}

.hero-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ---------- Homepage: product demo frame ---------- */

.demo-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.demo-chrome {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 40px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}

.demo-chrome-dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 6px;
}

.demo-chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.demo-chrome-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.demo-viewport {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.demo-viewport img {
  display: block;
  width: 100%;
  height: auto;
}

/* Vision viewfinder brackets — confidence green, demo imagery only */
.viewfinder {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  z-index: 2;
}

.viewfinder::before,
.viewfinder::after,
.viewfinder span::before,
.viewfinder span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--confidence);
}

.viewfinder::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 4px;
}

.viewfinder::after {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 4px;
}

.viewfinder span::before {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 4px;
}

.viewfinder span::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 4px;
}

.viewfinder span {
  position: absolute;
  inset: 0;
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(31, 169, 113, 0.15),
    var(--confidence),
    rgba(31, 169, 113, 0.15),
    transparent
  );
  box-shadow: 0 0 12px rgba(31, 169, 113, 0.35);
  z-index: 3;
  pointer-events: none;
  animation: scanline-travel 2.5s linear infinite;
}

@keyframes scanline-travel {
  0% { top: 8%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

.confidence-readout {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 4;
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--confidence);
  background: rgba(251, 251, 253, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 4px 8px;
  pointer-events: none;
}

.demo-caption {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* iPhone device chrome — dark bezel for contrast on light backgrounds */
.iphone-bezel {
  background: linear-gradient(160deg, #3a3a3c 0%, #1c1c1e 40%, #0a0a0a 100%);
  border: 1px solid #2c2c2e;
  box-sizing: border-box;
}

/* Soft selection for light theme */
::selection {
  background: var(--accent-tint-strong);
  color: var(--text-primary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
