/* ============================================
   Gonka Labs — Clean, minimal, white
   ============================================ */

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

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-border: #e8e8e8;
  --color-surface: #f9f9f9;
  --color-accent: #111111;
  --color-accent-hover: #333333;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1120px;
  --nav-height: 64px;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Container ---- */

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

.container-narrow {
  max-width: 720px;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

.nav-social {
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.nav-social:hover {
  opacity: 1;
}

/* ---- Hero ---- */

.hero {
  padding-top: calc(var(--nav-height) + 120px);
  padding-bottom: 120px;
  text-align: center;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 24px;
}

.highlight {
  background: linear-gradient(135deg, #111 0%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 300;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Sections ---- */

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 300;
}

/* ---- Products Grid ---- */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 36px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-bg);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
}

a.product-card:hover {
  border-color: #ccc;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-text);
}

.product-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  font-weight: 300;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-top: 20px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s, transform 0.25s;
}

a.product-card:hover .product-link {
  opacity: 1;
  transform: translateX(0);
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.product-card-wide {
  grid-column: 1 / -1;
}

.product-card-soon {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
}

.product-soon-content h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.product-soon-content p {
  font-size: 15px;
  color: var(--color-text-tertiary);
  font-weight: 300;
  max-width: 280px;
  margin: 0 auto;
}

.product-badges {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.product-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  background: var(--color-surface);
  padding: 4px 12px;
  border-radius: 100px;
  margin-top: 20px;
  width: fit-content;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product-badge-beta {
  background: #fff3e0;
  color: #e65100;
}

/* ---- Repo Grid ---- */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.repo-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
}

.repo-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.repo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.repo-icon {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.repo-header h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.repo-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-weight: 300;
  flex-grow: 1;
  margin-bottom: 16px;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.lang-go {
  background: #00ADD8;
}

.lang-python {
  background: #3572A5;
}

.lang-ts {
  background: #3178C6;
}

.repo-license {
  font-size: 12px;
}

.repo-stars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-stars svg {
  color: var(--color-text-tertiary);
}

.repo-forks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-forks svg {
  color: var(--color-text-tertiary);
}

/* ---- Open Source CTA ---- */

.opensource-cta {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn svg {
  flex-shrink: 0;
}

/* ---- About Grid ---- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.about-card {
  padding: 48px 40px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-bg);
}

.about-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.about-card p {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* ---- Contact ---- */

.contact {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.contact h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contact p {
  font-size: 17px;
  color: var(--color-text-secondary);
  font-weight: 300;
  margin-bottom: 32px;
}

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

.btn-outline:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

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

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand .logo {
  font-size: 16px;
  color: var(--color-text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-tertiary);
  transition: color 0.2s;
}

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

/* ---- Policy Page ---- */

.policy {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
}

.policy h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.policy-meta {
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.policy-meta p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.policy h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.policy h2:first-of-type {
  margin-top: 40px;
}

.policy h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 32px;
  margin-bottom: 12px;
}

.policy p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  font-weight: 300;
}

.policy p strong {
  color: var(--color-text);
  font-weight: 500;
}

.policy ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}

.policy ul li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 10px;
  font-weight: 300;
}

.policy ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}

.policy ul li strong {
  color: var(--color-text);
  font-weight: 500;
}

.policy code {
  font-size: 0.9em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

.policy a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.2s;
}

.policy a:hover {
  text-decoration-color: var(--color-text);
}

.policy-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.policy table th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.policy table td {
  padding: 12px 16px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  font-weight: 300;
}

.policy table tr:last-child td {
  border-bottom: none;
}

/* ---- Animations ---- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero {
    padding-top: calc(var(--nav-height) + 80px);
    padding-bottom: 80px;
  }

  .section {
    padding: 72px 0;
  }

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

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

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

  .about-card {
    padding: 32px 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .nav-links {
    gap: 16px;
  }

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

  .product-link {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .product-card {
    padding: 24px;
  }

  .nav-links a:not(.nav-github) {
    font-size: 13px;
  }
}
