/* FirstWarning Harbor - Marketing Page Stylesheet (Huashu Design System) */

:root {
  /* Huashu Light Alabaster Canvas Theme */
  --bg: oklch(98% 0.003 75);            /* Warm cream off-white / Alabaster */
  --text-main: oklch(24% 0.008 75);      /* Deep charcoal */
  --text-muted: oklch(50% 0.015 75);     /* Muted slate */
  --text-dim: oklch(62% 0.012 75);       /* Dim grey for tags/meta */
  
  --border: oklch(90% 0.008 75);         /* Soft sand borders */
  --border-hover: oklch(76% 0.015 75);   /* Accentuated sand borders on hover */
  
  --accent: oklch(58% 0.14 150);         /* Emerald / Cyan Tech Signal Accent */
  --accent-secondary: oklch(58% 0.12 60); /* Terracotta / Copper accent */
  
  --cell-bg: oklch(100% 0 0);            /* Pure crisp white */
  --cell-bg-hover: oklch(99% 0.003 75);  /* Soft cream on hover */
  
  --hero-grid: oklch(86% 0.008 75 / 60%); /* Subtle grid lines in hero */
  
  /* Status LED Colors */
  --status-ok: #10b981;
  --status-warn: #f59e0b;
  --status-error: #ef4444;
  --status-bg: rgba(16, 185, 129, 0.1);

  /* Terminal Colors */
  --term-bg: #0f172a;
  --term-text: #f8fafc;
  --term-border: #1e293b;
}

/* Dark Theme Data Attribute Support */
[data-theme="dark"] {
  --bg: #090d14;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border: #1e293b;
  --border-hover: #334155;
  
  --accent: #10b981;
  --accent-secondary: #f59e0b;
  
  --cell-bg: #0f172a;
  --cell-bg-hover: #162032;
  
  --hero-grid: rgba(255, 255, 255, 0.05);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Main Layout Container */
.container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 6rem 2rem;
}

/* Header Navbar */
.navbar {
  background: oklch(98% 0.003 75 / 85%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(9, 13, 20, 0.85);
}

.nav-container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-item {
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
}

.nav-item.btn-primary {
  background: var(--text-main);
  color: var(--bg);
  border: 1px solid var(--text-main);
}

.nav-item.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 2rem 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

/* Architectural background lines */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 15% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 15% 50%, black 20%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-ok);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 6.5vw, 4.8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  text-wrap: pretty;
}

.hero-title span {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 650px;
  text-wrap: pretty;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-hero {
  background: var(--text-main);
  color: var(--bg);
  border: 1px solid var(--text-main);
}

.btn-primary-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.btn-secondary-hero {
  background: var(--cell-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary-hero:hover {
  border-color: var(--border-hover);
  background: var(--cell-bg-hover);
  transform: translateY(-2px);
}

/* Real Screenshot Showcase Frame in Hero */
.hero-showcase-frame {
  width: 100%;
  margin-top: 3.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cell-bg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.showcase-header {
  background: oklch(96% 0.005 75);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .showcase-header {
  background: #111827;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.window-dot.red { background: #ff5f56; }
.window-dot.yellow { background: #ffbd2e; }
.window-dot.green { background: #27c93f; }

.showcase-title-bar {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.showcase-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #faf7f2;
}

.showcase-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.showcase-img-wrap:hover .showcase-img {
  transform: scale(1.015);
}

.showcase-caption-overlay {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(28, 25, 23, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Lando-Style Bordered Grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4rem;
}

.feat-cell {
  background: var(--cell-bg);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 310px;
  padding: 0;
}

.feat-cell:hover {
  background-color: var(--cell-bg-hover);
}

/* Desktop Grid Spans */
.cell-wide {
  grid-column: span 8;
}

.cell-narrow {
  grid-column: span 4;
}

.cell-full {
  grid-column: span 12;
}

/* Layout for cells with top images or graphics */
.cell-image-top {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: var(--cell-bg);
}

[data-theme="dark"] .cell-image-top {
  background: #111827;
}

.feat-image-card {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .feat-image-card {
  transform: scale(1.03);
}

/* Wide Split Card Layout */
.cell-split {
  display: flex;
  width: 100%;
  min-height: 100%;
  flex-direction: row;
}

.cell-wide .cell-body {
  padding: 3rem 2.5rem;
  flex: 1.3;
}

.cell-image-side {
  flex: 1;
  overflow: hidden;
  border-left: 1px solid var(--border);
  position: relative;
  display: flex;
  background: var(--cell-bg);
}

[data-theme="dark"] .cell-image-side {
  background: #111827;
}

.feat-image-wide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .feat-image-wide {
  transform: scale(1.03);
}

/* Card Content Body */
.cell-body {
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.cell-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.95;
}

.cell-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

/* Icon Wrap */
.icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(96% 0.006 75);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .icon-wrap {
  background: #162032;
}

.feat-cell:hover .icon-wrap {
  border-color: var(--accent);
  background: oklch(94% 0.008 75);
}

[data-theme="dark"] .feat-cell:hover .icon-wrap {
  background: #1e293b;
}

.feat-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.icon-wrap i {
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.feat-cell:hover .icon-wrap i {
  color: var(--accent);
}

/* Typography inside cells */
.feat-h {
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.25s ease;
  text-wrap: pretty;
}

.feat-cell:hover .feat-h {
  color: var(--accent);
}

.feat-p {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.5rem;
  text-wrap: pretty;
}

/* Action Link at Bottom */
.cell-action {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.25s ease;
  margin-top: 2rem;
}

.feat-cell:hover .cell-action {
  color: var(--accent);
}

.cell-action i {
  font-size: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feat-cell:hover .cell-action i {
  transform: translateX(5px);
}

/* Section Header */
.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-sub {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 650px;
}

/* Screenshots Comparison Showcase Section */
.screens-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (max-width: 800px) {
  .screens-showcase-grid {
    grid-template-columns: 1fr;
  }
}

.screen-card {
  background: var(--cell-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.screen-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.08);
}

.screen-card-header {
  padding: 0.85rem 1.25rem;
  background: oklch(96% 0.005 75);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .screen-card-header {
  background: #111827;
}

.screen-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.screen-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-transform: uppercase;
}

.screen-card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.screen-card-body {
  padding: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Terminal Quickstart Box */
.terminal-card {
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4rem;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.terminal-header {
  background: #1e293b;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--term-text);
  overflow-x: auto;
}

.term-prompt {
  color: #10b981;
  user-select: none;
}

.term-comment {
  color: #64748b;
}

.term-cmd {
  color: #f1f5f9;
}

/* Architecture & Tech Specs Table */
.tech-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.spec-card {
  background: var(--cell-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  transition: border-color 0.25s ease;
}

.spec-card:hover {
  border-color: var(--border-hover);
}

.spec-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.spec-title {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.spec-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem;
  background: var(--bg);
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

footer p {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* Responsive Grid Layouts */
@media (max-width: 900px) {
  .feat-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  
  .cell-wide {
    grid-column: span 12;
  }
  
  .cell-narrow {
    grid-column: span 6;
  }
  
  .cell-split {
    flex-direction: column;
  }
  
  .cell-image-side {
    height: 220px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  
  .hero {
    padding: 5rem 1.5rem 3.5rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .cell-wide, .cell-narrow {
    grid-column: span 12;
  }
  
  .cell-body {
    padding: 2rem 1.5rem;
  }
  
  .feat-cell {
    min-height: auto;
  }
  
  .container {
    padding: 2rem 1.25rem 4rem 1.25rem;
  }
  
  .hero {
    padding: 4rem 1.25rem 3rem 1.25rem;
  }

  .nav-container {
    padding: 0 1.25rem;
  }
}
