/* ===== Variables ===== */
:root {
  --bg: #f7f8fc;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --surface-hover: #f5f7fc;
  --border: #e2e6f0;
  --text: #12162a;
  --text-muted: #5b6478;
  --accent: #4f7cff;
  --accent-2: #7c5cff;
  --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container: 1160px;

  /* Dark bookend sections (hero + footer) */
  --dark-bg: #0a0e17;
  --dark-surface: #121829;
  --dark-border: #232c45;
  --dark-text: #e8ecf7;
  --dark-text-muted: #97a1bf;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
}

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

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

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

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow.center { display: block; text-align: center; }

.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 18px; }
.section-title.center { text-align: center; }
.section-lead { color: var(--text-muted); max-width: 560px; }
.section-lead.center { margin: 0 auto 40px; text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color .2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79, 124, 255, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--dark-text);
  border-color: var(--dark-border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-full { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  color: var(--dark-text);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(247, 248, 252, 0.88);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(18, 22, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-accent { color: var(--accent); }

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-size: 0.95rem;
  color: currentColor;
  opacity: 0.7;
  font-weight: 500;
  transition: opacity 0.2s ease;
  position: relative;
}
.main-nav a:hover { opacity: 1; }
.main-nav a.active { opacity: 1; }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.btn-nav { padding: 10px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--dark-bg);
  color: var(--dark-text);
  padding: 190px 0 120px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, rgba(79,124,255,0.25) 0%, rgba(124,92,255,0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; max-width: 780px; }

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--dark-text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Thank you page ===== */
.thanks-hero { min-height: 80vh; display: flex; align-items: center; padding: 160px 0; }
.thanks-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.thanks-inner .hero-lead { margin-left: auto; margin-right: auto; }
.thanks-inner .hero-actions { justify-content: center; }
.thanks-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 30px rgba(79, 124, 255, 0.4);
}
.thanks-icon svg { width: 30px; height: 30px; }

/* ===== Sections ===== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

/* ===== Grid & Cards ===== */
.grid { display: grid; gap: 24px; margin-top: 50px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: 0 1px 2px rgba(18, 22, 42, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 16px 32px rgba(79, 124, 255, 0.12);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.project-placeholder {
  height: 140px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79,124,255,0.15), rgba(124,92,255,0.1));
  border: 1px dashed var(--border);
  margin-bottom: 20px;
}

.project-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  margin-bottom: 20px;
}
.project-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}
.project-link svg { width: 15px; height: 15px; }
.project-link:hover { gap: 10px; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.about-visual { position: sticky; top: 110px; }

.about-text p { color: var(--text-muted); margin-bottom: 16px; }

.stats { display: flex; gap: 36px; margin-top: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

.about-visual { display: flex; justify-content: center; }
.visual-card {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  box-shadow: 0 20px 60px rgba(18, 22, 42, 0.08);
}
.visual-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.visual-lines { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.visual-lines span { display: block; height: 10px; border-radius: 6px; background: var(--border); }
.visual-lines span:nth-child(1) { width: 80%; }
.visual-lines span:nth-child(2) { width: 95%; background: var(--accent-gradient); opacity: 0.5; }
.visual-lines span:nth-child(3) { width: 60%; }
.visual-lines span:nth-child(4) { width: 88%; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info p { color: var(--text-muted); margin-bottom: 24px; }

.contact-list { list-style: none; margin-bottom: 24px; }
.contact-list li { display: flex; flex-direction: column; margin-bottom: 16px; }
.contact-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.contact-list a { font-size: 1.05rem; font-weight: 500; transition: color 0.2s ease; }
.contact-list a:hover { color: var(--accent); }

.social-links { display: flex; gap: 14px; margin-top: 8px; }
.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.social-icon svg { width: 18px; height: 18px; }
.social-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; font-style: italic; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.85rem; color: var(--text-muted); }

.form-row input,
.form-row textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note { margin-top: 14px; font-size: 0.85rem; color: var(--accent); text-align: center; min-height: 1.2em; }

/* ===== Footer ===== */
.site-footer {
  background: var(--dark-bg);
  color: var(--dark-text);
  border-top: 1px solid var(--dark-border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner p { color: var(--dark-text-muted); font-size: 0.85rem; }
.footer-social { margin: 0; }
.footer-social .social-icon {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: var(--dark-text-muted);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-nav, .btn-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--dark-border);
    padding: 20px 24px 28px;
    gap: 18px;
  }

  .site-header.scrolled .main-nav.open {
    background: rgba(247, 248, 252, 0.98);
    border-bottom-color: var(--border);
  }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; position: static; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 150px 0 80px; }
  .section { padding: 80px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}
