/* ─── Custom properties ─── */
:root {
  /* Base palette */
  --bg:               #F5F5F5;
  --fg:               #151718;
  --white:            #ffffff;
  --green:            #34B87E;
  --green-dark:       #2da870;
  --blue:             #4474B8;

  /* Borders */
  --border:           rgba(21, 23, 24, 0.11);
  --border-strong:    rgba(21, 23, 24, 0.35);

  /* Text */
  --muted:            rgba(21, 23, 24, 0.48);

  /* Surfaces */
  --bg-glass:         rgba(245, 245, 245, 0.88);
  --surface-hover:    rgba(21, 23, 24, 0.04);

  /* Patterns */
  --dot-pattern:      rgba(21, 23, 24, 0.15);

  /* Button outline states */
  --btn-border:       rgba(21, 23, 24, 0.2);
  --btn-border-hover: rgba(21, 23, 24, 0.45);
  --btn-bg-hover:     rgba(21, 23, 24, 0.03);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────
   HEADER
───────────────────────────── */
header {
  height: 60px;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.header-logo img {
  height: 26px;
  width: auto;
  display: block;
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: border-color 0.18s, background 0.18s;
}

.gh-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.gh-icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}

/* ─────────────────────────────
   HERO
───────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 3.5rem);
  text-align: center;
  overflow: hidden;
}

/* Dot-grid background pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-pattern) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* Soft fade-out at the bottom of the pattern */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

/* Responsive logo swap */
.hero-logo {
  margin: 0 auto 2.75rem;
  animation: fadeUp 0.65s ease both;
}

.logo-hor {
  display: block;
  width: clamp(240px, 50vw, 480px);
  height: auto;
  margin: 0 auto;
}

.logo-ver {
  display: none;
  width: clamp(130px, 40vw, 200px);
  height: auto;
  margin: 0 auto;
}

.hero-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.2rem;
  animation: fadeUp 0.65s 0.1s ease both;
}

.hero-heading .green { color: var(--green); }

.hero-desc {
  font-size: clamp(0.975rem, 1.9vw, 1.125rem);
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeUp 0.65s 0.2s ease both;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  animation: fadeUp 0.65s 0.3s ease both;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.62rem 1.4rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.12s;
}

.btn:active { transform: scale(0.965); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-outline {
  background: var(--white);
  color: var(--fg);
  border-color: var(--btn-border);
}

.btn-outline:hover {
  border-color: var(--btn-border-hover);
  background: var(--bg);
}

/* ─────────────────────────────
   CONTENT SECTIONS
───────────────────────────── */
.section {
  padding: clamp(2.75rem, 6.5vw, 5rem) clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: 580px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9rem;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 0.8rem;
}

.section-text {
  font-size: 0.975rem;
  color: var(--muted);
  line-height: 1.72;
  margin-top: 0.45rem;
}

.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.1rem;
  font-size: 0.875rem;
  font-variation-settings: 'wght' 600;
  color: var(--blue);
  text-decoration: none;
  transition: gap 0.2s ease, font-variation-settings 0.25s ease;
}

.section-cta:hover {
  gap: 0.55rem;
  font-variation-settings: 'wght' 800;
}

/* Board logo — acts as the section heading */
.board-logo {
  display: block;
  height: 46px;
  width: auto;
  margin-bottom: 1.1rem;
}

/* Plain section headings (Open Source, Contact) */
.section-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

/* ─────────────────────────────
   CONTENT GROUP
   Wraps the 3 bottom sections. Group provides horizontal padding
   so child section border-tops are naturally inset from viewport edges.
───────────────────────────── */
.content-group {
  border-top: 1px solid var(--border);
  min-height: calc(100vh - 52px);
  padding-left: clamp(1.25rem, 5vw, 3.5rem);
  padding-right: clamp(1.25rem, 5vw, 3.5rem);
}

.content-group .section {
  padding-left: 0;
  padding-right: 0;
  border-top: none;
  position: relative;
}

/* Divider lines: centered, just wider than the 580px text block */
.content-group .section:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 100%);
  height: 1px;
  background: var(--border);
}

/* ─────────────────────────────
   FOOTER
───────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  height: 52px;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-email {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s;
}

.footer-email:hover { color: var(--fg); }

/* ─────────────────────────────
   ANIMATIONS
───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

/* ─────────────────────────────
   MOBILE
───────────────────────────── */
@media (max-width: 600px) {
  .logo-hor { display: none; }
  .logo-ver {
    display: block;
    width: clamp(160px, 58vw, 240px);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: clamp(200px, 72vw, 260px);
    justify-content: center;
  }

  footer {
    height: auto;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }
}
