/* ==========================================================
   KEX Ventures — design tokens + shared styles
   Dark, modern, gradient-accent. Mobile-first.
   ========================================================== */

:root {
  /* Backgrounds */
  --bg: #0e1726;
  --bg-soft: #15203a;
  --bg-card: #1a2540;
  --bg-card-hover: #243057;

  /* Text */
  --text: #e9ecf6;
  --text-soft: #aab2c8;
  --text-muted: #6f7896;

  /* Accents — sunset gradient */
  --accent-1: #ff7a59;
  --accent-2: #e84d8a;
  --accent-3: #7c5cff;

  /* Status */
  --green: #4dd99a;
  --amber: #ffb84d;

  /* Borders */
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 64px -12px rgba(232, 77, 138, 0.40);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "Iowan Old Style", "Apple Garamond", "Palatino Linotype", "Times New Roman", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(124, 92, 255, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(232, 77, 138, 0.08) 0%, transparent 40%);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-1); }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(14, 23, 38, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.brand-mark { width: 36px; height: 36px; }
.brand-text { letter-spacing: -0.02em; }

.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 600px) {
  .site-header { padding: 12px 18px; }
  .brand-text { display: none; }
  .site-nav { gap: 18px; font-size: 14px; }
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  overflow: hidden;
}
.hero-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 22px;
  color: var(--text);
}
.gradient-text {
  background: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 540px;
  margin: 0 0 28px;
}
.lede a { color: var(--accent-1); border-bottom: 1px dashed var(--accent-1); }
.lede a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero artwork */
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
}
.hero-svg { width: 100%; height: 100%; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: drift 14s ease-in-out infinite alternate;
}
.orb-1 { width: 50%; height: 50%; top: -10%; left: -10%; background: var(--accent-1); }
.orb-2 { width: 60%; height: 60%; bottom: -10%; right: -15%; background: var(--accent-3); animation-delay: -4s; }
.orb-3 { width: 40%; height: 40%; top: 30%; right: 20%; background: var(--accent-2); animation-delay: -8s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -10px) scale(1.06); }
}

@media (max-width: 800px) {
  .hero { padding: 56px 24px 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 320px; }
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  color: #fff;
  box-shadow: var(--shadow-md), 0 0 32px -8px rgba(232, 77, 138, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 48px -8px rgba(232, 77, 138, 0.6);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
  color: var(--text);
}

/* ==========================================================
   Sections
   ========================================================== */
.section {
  padding: 80px 24px;
}
.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2,
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 600px) {
  .section { padding: 56px 20px; }
}

/* ==========================================================
   Projects grid
   ========================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s, background 0.22s, box-shadow 0.22s;
}
.project-card.live::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,122,89,0.08) 0%, rgba(124,92,255,0.06) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s;
}
.project-card.live:hover::before { opacity: 1; }
.project-card.live:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-md), 0 0 32px -16px rgba(232, 77, 138, 0.5);
}

.project-art {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255,122,89,0.18) 0%, rgba(124,92,255,0.18) 100%);
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.project-art-placeholder {
  background: var(--bg-soft);
  opacity: 0.7;
}
.project-emoji { line-height: 1; }

.project-meta { min-width: 0; }
.project-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.project-meta h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.project-tagline {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}
.project-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tags li {
  font-size: 12px;
  padding: 3px 9px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.project-link-arrow {
  font-size: 22px;
  color: var(--text-muted);
  transition: transform 0.22s, color 0.22s;
}
.project-card.live:hover .project-link-arrow {
  color: var(--accent-1);
  transform: translateX(4px);
}

.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-live {
  background: rgba(77, 217, 154, 0.16);
  color: var(--green);
  border: 1px solid rgba(77, 217, 154, 0.4);
}
.status-soon {
  background: rgba(255, 184, 77, 0.13);
  color: var(--amber);
  border: 1px solid rgba(255, 184, 77, 0.32);
}

.project-placeholder {
  opacity: 0.65;
}

@media (max-width: 600px) {
  .project-card {
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 18px;
  }
  .project-link-arrow {
    grid-column: 2;
    justify-self: end;
    margin-top: -8px;
  }
}

/* ==========================================================
   About
   ========================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p {
  color: var(--text-soft);
  margin: 0 0 16px;
  max-width: 560px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 18px;
  text-align: center;
}
.stat-card:nth-child(3) {
  grid-column: 1 / -1;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-label {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================
   Contact
   ========================================================== */
.contact-block {
  text-align: center;
  max-width: 720px;
}
.contact-lede {
  color: var(--text-soft);
  font-size: 17px;
  margin: 14px auto 32px;
  max-width: 520px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.18s, transform 0.18s;
}
.contact-pill:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
  color: var(--text);
}
.contact-icon { font-size: 18px; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
}
.footer-brand .muted {
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-left: 6px;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}
.footer-links a:hover { color: var(--text); }

@media (max-width: 600px) {
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }
}

/* ==========================================================
   Project detail pages (FocusFarm etc.) — shared layout
   ========================================================== */
.project-detail {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.project-detail .back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.project-detail .back-to-home:hover { color: var(--text); }

.project-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 36px;
}
.project-hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,122,89,0.20) 0%, rgba(124,92,255,0.20) 100%);
  display: grid;
  place-items: center;
  font-size: 44px;
  border: 1px solid var(--border);
}
.project-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 48px);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.project-hero .project-tagline {
  font-size: 17px;
  color: var(--text-soft);
  margin: 0;
}

.project-detail h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 38px 0 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.project-detail p { color: var(--text-soft); }
.project-detail ul {
  color: var(--text-soft);
  padding-left: 22px;
}
.project-detail ul li { margin: 6px 0; }

/* CTA row on detail pages */
.detail-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.feature {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.feature-emoji {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 10px;
}
.feature h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text);
}
.feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Inline embedded preview frame */
.preview-frame-wrap {
  margin: 20px 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 10;
}
.preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .project-hero { grid-template-columns: auto 1fr; gap: 16px; }
  .project-hero-icon { width: 64px; height: 64px; font-size: 32px; }
}
