@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@700;800;900&display=swap');

:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --brand-blue: #2484ff;
  --accent: #ec4899;
  --bg: #fafafa;
  --card-bg: rgba(255, 255, 255, 0.7);
  --fg: #18181b;
  --muted: #71717a;
  --border: rgba(0, 0, 0, 0.06);
  --radius: 20px;
  --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --card-bg: rgba(24, 24, 27, 0.6);
    --fg: #fafafa;
    --muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
  }
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, var(--primary-glow) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.05) 0, transparent 50%);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Typography Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--fg) 60%, var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header - Premium Full-Width Style */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(9, 9, 11, 0.8);
  }
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    gap: 2rem;
  }

  .site-nav.is-open {
    right: 0;
  }

  .site-nav a {
    font-size: 1.5rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0;
  z-index: 110;
}

.brand-word {
  color: #101828;
  font-family: 'Outfit', 'Avenir Next', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.08em;
  line-height: 1;
  text-rendering: geometricPrecision;
}

.brand-word-accent {
  color: var(--brand-blue);
}

@media (prefers-color-scheme: dark) {
  .brand-word {
    color: #f8fafc;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  color: var(--fg);
}

.site-nav .auth-nav-btn {
  background: var(--fg);
  color: #fff;
  border-radius: 12px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.site-nav .auth-nav-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.account-chip {
  max-width: 220px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--fg);
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.account-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.nav-text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-text-button:hover {
  color: var(--fg);
}

/* Hero Section */
.hero {
  padding: 10rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: var(--primary);
  filter: blur(150px);
  opacity: 0.08;
  z-index: -1;
}

.eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 550px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  cursor: pointer;
}

.button.primary {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.button.primary:hover {
  transform: translateY(-2px) scale(1.02);
}

.button.ghost {
  border: 1px solid var(--border);
  color: var(--fg);
  background: var(--card-bg);
}

.button.ghost:hover {
  background: var(--bg);
  border-color: var(--fg);
}

/* Visual Demo Area */
.hero-visual {
  margin: 5rem auto 0;
  position: relative;
  display: block;
  max-width: 900px;
  width: calc(100% - 2rem);
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  display: block;
}

/* Bento Grid */
.bento-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 8rem 1.5rem;
}

.bento-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.bento-item:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

.bento-item.large {
  grid-column: span 2;
}

.bento-item h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.bento-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

.bento-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 8rem;
}

.download-gate {
  max-width: 620px;
  margin: 0 auto;
}

.download-status {
  color: var(--muted);
  font-size: 0.95rem;
  margin: -1.5rem auto 1.5rem;
}

.download-panel {
  display: grid;
  gap: 1rem;
}

.download-choice {
  display: grid;
  gap: 0.75rem;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.download-choice-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.download-option {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--fg);
  padding: 0.9rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.download-option:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.06);
}

.download-option:focus-visible {
  outline: 3px solid var(--primary-glow);
  outline-offset: 3px;
}

.download-option[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--primary);
  box-shadow: 0 18px 50px rgba(99, 102, 241, 0.16);
}

.download-option-main {
  min-height: 1.45rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.download-option-os {
  font-size: 0.86rem;
  font-weight: 800;
}

.download-option-arch {
  font-size: 1.05rem;
  font-weight: 800;
}

.download-option-badge {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.3;
  opacity: 0.78;
}

.download-detect-note {
  max-width: 500px;
  margin: 0 auto 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Mock OCR Animation - Full Workflow */
.mock-interface {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
}

.mock-window {
  position: absolute;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.window-header {
  height: 24px;
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.window-header .title {
  font-size: 0.6rem;
  color: var(--muted);
}

.source-app {
  top: 10%;
  left: 5%;
  width: 38%;
  height: 55%;
}

.notes-app {
  top: 35%;
  right: 5%;
  width: 42%;
  height: 50%;
  z-index: 20;
}

.content-placeholder {
  padding: 12%;
}

.text-line {
  height: 4px;
  background: var(--border);
  margin-bottom: 8px;
  border-radius: 2px;
  width: 80%;
}

.text-line.highlight {
  width: 95%;
  background: var(--primary);
  opacity: 0.2;
}

.notes-content {
  padding: 10%;
}

.cursor-line {
  width: 2px;
  height: 1rem;
  background: var(--primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.mock-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 100;
  opacity: 0;
  animation: workflow-cursor 12s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

.mock-selection {
  position: absolute;
  top: 30%;
  left: 10%;
  border: 2px solid var(--primary);
  background: rgba(99, 102, 241, 0.05);
  border-radius: 4px;
  opacity: 0;
  animation: workflow-selection 12s infinite;
}

.mock-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  animation: workflow-scan 12s infinite;
}

.mock-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--fg);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  z-index: 50;
  animation: workflow-toast 12s infinite;
}

@keyframes workflow-cursor {
  0% { top: 90%; left: 90%; opacity: 0; }
  5% { opacity: 1; }
  15% { top: 30%; left: 12%; }
  20% { transform: scale(0.8); }
  35% { top: 45%; left: 35%; transform: scale(0.8); }
  40% { transform: scale(1); }
  55% { top: 45%; left: 35%; }
  65% { top: 55%; left: 80%; }
  85% { top: 55%; left: 80%; opacity: 1; }
  95% { opacity: 0; }
}

@keyframes workflow-selection {
  0%, 20% { width: 0; height: 0; opacity: 0; }
  35%, 55% { width: 140px; height: 60px; opacity: 1; }
  60%, 100% { opacity: 0; }
}

@keyframes workflow-scan {
  0%, 40% { top: 0; opacity: 0; }
  42% { opacity: 1; }
  52% { top: 100%; opacity: 1; }
  55%, 100% { top: 100%; opacity: 0; }
}

@keyframes workflow-toast {
  0%, 55% { opacity: 0; transform: translate(-50%, -20%); }
  60%, 75% { opacity: 1; transform: translate(-50%, -50%); }
  80%, 100% { opacity: 0; }
}

.notes-content::after {
  content: 'Hello World! This is SnipFox...';
  font-size: 0.75rem;
  color: var(--fg);
  font-family: monospace;
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: workflow-typing 12s infinite steps(30);
}

@keyframes workflow-typing {
  0%, 70% { width: 0; }
  85%, 95% { width: 100%; }
  100% { width: 0; }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .bento-container {
    grid-template-columns: 1fr;
  }
  .bento-item.large {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .hero-visual {
    margin-top: 2rem;
  }
  .bento-container {
    padding: 4rem 1.5rem;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    padding-bottom: 4rem;
  }
  .download-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-actions .button {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 420px) {
  .download-options {
    grid-template-columns: 1fr;
  }
}
