/* Surf Browser Landing Page — Brand Identity v3 */
/* Cobalt Blue #0052CC | Montserrat + Inter | WCAG AA */

:root {
  /* Brand */
  --accent: #0052CC;
  --accent-hover: #003D99;
  --accent-light: #4C9AFF;

  /* Surfaces */
  --background: #F9FAFF;
  --card: #FFFFFF;
  --secondary: #F1F5F9;
  --muted: #E8EEF7;
  --border: #D4DDEB;

  /* Text */
  --foreground: #0C2339;
  --muted-foreground: #606B7B;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;

  /* Motion */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: #4DA3FF;
    --background: #000000;
    --card: #0D1117;
    --secondary: #161B22;
    --muted: #1F242C;
    --border: #1F242C;
    --foreground: #FFFFFF;
    --muted-foreground: #94A3B8;
  }
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

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

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports (backdrop-filter: blur(12px)) {
  .nav {
    background: color-mix(in srgb, var(--background) 85%, transparent);
  }
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--foreground);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.nav-icon {
  color: var(--accent);
  display: flex;
}

.nav-icon-img {
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--foreground);
}

.nav-cta {
  background: var(--accent);
  color: #FFFFFF !important;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #FFFFFF !important;
}

/* Hero */
.hero {
  padding-top: calc(var(--space-24) + 52px);
  padding-bottom: var(--space-16);
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-headline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.1;
  color: var(--foreground);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: var(--space-8);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.hero-meta {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  min-height: 44px;
  border: none;
  text-decoration: none;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Window Frame (Hero Visual) */
.window-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

@media (prefers-color-scheme: dark) {
  .window-frame {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
  }
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #FF5F57; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #28CA42; }

.window-title {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.window-content {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  min-height: 280px;
}

.window-sidebar {
  padding: var(--space-3);
  border-right: 1px solid var(--border);
  background: var(--secondary);
  font-size: 0.75rem;
}

.sidebar-header {
  font-weight: 600;
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.sidebar-item {
  padding: 3px var(--space-2);
  border-radius: 4px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.sidebar-item.active {
  background: var(--accent);
  color: #FFFFFF;
}

.sidebar-item.indent {
  padding-left: var(--space-5);
}

.file-icon {
  font-size: 0.5rem;
  opacity: 0.7;
}

.window-editor {
  padding: var(--space-3);
  border-right: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--foreground);
  overflow: hidden;
}

.editor-line {
  white-space: nowrap;
}

.token-meta { color: var(--accent); }
.token-key { color: #B45309; }
@media (prefers-color-scheme: dark) { .token-key { color: #FFC833; } }
.token-string { color: #16A34A; }
@media (prefers-color-scheme: dark) { .token-string { color: #4ADE80; } }
.token-heading { color: var(--accent); font-weight: 700; }
.token-block { color: #4F46E5; }
@media (prefers-color-scheme: dark) { .token-block { color: #818CF8; } }

.window-preview {
  padding: var(--space-4);
  font-size: 0.75rem;
  overflow: hidden;
}

.preview-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.preview-meta {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.preview-h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  margin-bottom: var(--space-2);
  color: var(--foreground);
}

.preview-p {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Sections */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-24) var(--space-6);
}

.section-headline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: var(--space-12);
  max-width: 560px;
}

/* Dual Purpose Section */
.dual-purpose {
  background: var(--secondary);
}

.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.dual-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8);
}

.dual-icon {
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.dual-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  margin-bottom: var(--space-3);
}

.dual-card p {
  color: var(--muted-foreground);
  margin-bottom: var(--space-5);
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

/* Features Detail */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-card {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.feature-icon {
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.feature-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* SurfDoc Section */
.surfdoc-section {
  background: var(--secondary);
}

.surfdoc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.surfdoc-example {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-header {
  background: var(--muted);
  padding: var(--space-2) var(--space-4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.code-block {
  background: var(--card);
  padding: var(--space-4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  margin: 0;
}

.surfdoc-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.info-item h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-1);
}

.info-item p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* FAQ Section */
.faq-section {
  background: var(--secondary);
}

.faq-list {
  max-width: 680px;
}

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

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  padding: var(--space-5) 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--foreground);
}

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

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted-foreground);
  transition: transform var(--duration-fast) var(--ease-default);
}

.faq-item[open] .faq-question::after {
  content: '\2212';
}

.faq-answer {
  padding-bottom: var(--space-5);
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Download Section */
.download-section {
  padding: var(--space-24) 0;
}

.download-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  text-align: center;
}

.download-card .section-headline {
  margin-bottom: var(--space-2);
}

.download-card .section-subtitle {
  margin: 0 auto var(--space-12);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  text-align: left;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.platform-card.available {
  border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.platform-icon {
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.platform-icon.muted {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.platform-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.platform-version {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.platform-req {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: var(--space-3);
}

.platform-card .btn {
  margin-top: auto;
}

.coming-soon h4 {
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-brand {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-brand a {
  color: var(--muted-foreground);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-privacy {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-content {
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-meta {
    text-align: center;
  }

  .dual-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .surfdoc-grid {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .window-content {
    grid-template-columns: 1fr;
  }

  .window-sidebar {
    display: none;
  }

  .window-editor {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .section-inner {
    padding: var(--space-16) var(--space-4);
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-privacy {
    order: 3;
  }
}

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