@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --bg: #faf9f7;
  --bg-alt: #f0eeeb;
  --surface: #ffffff;
  --border: #e2dfd9;
  --text: #1a1a1a;
  --text-secondary: #5c5a56;
  --muted: #9b9893;
  --accent: #8b6d2e;
  --accent-dim: rgba(139, 109, 46, 0.10);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.75;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}


/* ── Nav ─────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 48px;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.lang-select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.06em;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-select:hover {
  border-color: var(--accent);
  color: var(--text);
}

.lang-select:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.lang-select option {
  background: var(--bg);
  color: var(--text);
}


/* ── Hero ────────────────────────────────────────────── */

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 48px 60px;
  position: relative;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 900px;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 48px;
  max-width: 760px;
}

.hero-attribution {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.hero-attribution a {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-attribution a:hover {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}


/* ── Sections ────────────────────────────────────────── */

.section {
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 32px;
  max-width: 700px;
}

.section-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.8;
}

.section-body p + p {
  margin-top: 20px;
}

.section-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 0 auto;
}


/* ── Clients Grid ────────────────────────────────────── */

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 64px;
  border: 1px solid var(--border);
}

.client-card {
  background: var(--bg);
  padding: 56px 48px;
  transition: background 0.3s ease;
}

.client-card:hover {
  background: var(--bg-alt);
}

.client-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.client-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}


/* ── Tech Grid ───────────────────────────────────────── */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  margin-top: 72px;
}

.tech-item {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.tech-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.tech-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
}

.tech-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ── API Section ─────────────────────────────────────── */

.api-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.api-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 48px;
}

.api-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 40px;
  margin-top: 48px;
  overflow-x: auto;
}

.api-code pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.api-code .code-accent {
  color: var(--accent);
}

.api-code .code-muted {
  color: var(--muted);
}

.api-code .code-text {
  color: var(--text);
}

.api-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.api-feature {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.api-cta {
  margin-top: 64px;
}

.api-cta a {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.api-cta a:hover {
  background: var(--accent);
  color: #ffffff;
  opacity: 1;
}


/* ── Footer ──────────────────────────────────────────── */

.footer {
  padding: 48px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent);
  opacity: 1;
}


/* ── Fade-in Animations ──────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ── Responsive ──────────────────────────────────────── */

/* ── Tablet ───────────────────────────────────────────── */

@media (max-width: 1024px) {
  .nav {
    padding: 20px 32px;
  }

  .nav-right {
    gap: 18px;
  }

  .nav-links {
    gap: 24px;
  }

  .hero {
    min-height: 60vh;
    padding-top: 132px;
  }

  .section {
    padding: 64px 32px;
  }

  .api-content {
    padding: 64px 32px;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    padding: 18px 24px;
  }

  .nav-right {
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .hero {
    padding: 148px 24px 52px;
  }

  .api-feature {
    padding-left: 12px;
  }
}

/* ── Mobile ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
    align-items: flex-start;
  }

  .nav-right {
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    min-height: auto;
    padding: 100px 20px 48px;
  }

  .hero-headline {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 20px;
  }

  .hero-sub {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    margin-bottom: 32px;
  }

  .scroll-indicator {
    display: none;
  }

  .section {
    padding: 48px 20px;
  }

  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .section-body {
    font-size: 0.95rem;
  }

  .clients-grid {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

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

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 40px;
  }

  .api-content {
    padding: 48px 20px;
  }

  .api-code {
    padding: 20px;
  }

  .api-code pre {
    font-size: 0.75rem;
  }

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

  .api-cta {
    margin-top: 40px;
  }

  .footer {
    padding: 32px 20px;
  }
}

/* ── Small phone ─────────────────────────────────────── */

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-brand {
    font-size: 0.75rem;
  }

  .nav-right {
    justify-content: space-between;
    gap: 10px 12px;
  }

  .nav-links a {
    font-size: 0.7rem;
  }

  .nav-links {
    gap: 12px;
  }

  .lang-select {
    font-size: 0.7rem;
    padding: 4px 6px;
  }

  .hero {
    padding: 124px 16px 40px;
  }

  .section {
    padding: 40px 16px;
  }

  .api-content {
    padding: 40px 16px;
  }

  .client-card {
    padding: 24px 20px;
  }

  .api-code {
    padding: 16px;
    border-radius: 6px;
  }
}
