@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --neutral: #b0c4c4;
  --brand: #BAC8B1;
  --action: #7B9669;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #1d2b26;
  --muted: rgba(29, 43, 36, 0.75);
  --shadow: rgba(123, 140, 122, 0.25);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f0f5f2, var(--neutral));
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--text);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 4vw;
  background: rgba(240, 245, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(29, 43, 36, 0.1);
  transition: all 0.3s ease;
}

.logo {
  font-size: 0.85rem;
  letter-spacing: 0.4rem;
  text-transform: uppercase;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.site-header nav a,
.pill,
.btn {
  text-decoration: none;
  color: inherit;
}

.site-header nav a {
  font-size: 0.85rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.site-header nav a:hover {
  color: var(--action);
}

.site-header nav a::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--action);
  transition: width 0.3s ease;
}

.site-header nav a:hover::after {
  width: 100%;
}

.pill {
  padding: 0.35rem 1.25rem;
  border: 1px solid rgba(29, 43, 36, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.1rem;
  transition: all 0.3s ease;
}

.pill:hover {
  background: var(--action);
  color: white;
  border-color: var(--action);
  transform: translateY(-2px);
}

main {
  display: flex;
  flex-direction: column;
  padding-top: 4rem;
}

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 4vw;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.section-bg-image {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  image-rendering: pixelated;
  opacity: 0.69;
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(-15deg) scale(1);
  }
  25% {
    transform: translate(-48%, -52%) rotate(-12deg) scale(1.05);
  }
  50% {
    transform: translate(-52%, -50%) rotate(-18deg) scale(0.98);
  }
  75% {
    transform: translate(-50%, -48%) rotate(-14deg) scale(1.02);
  }
}

.section-corner-image {
  position: absolute;
  width: 150px;
  height: 150px;
  image-rendering: pixelated;
  opacity: 0.75;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  z-index: 0;
  pointer-events: none;
  animation: cornerFloat 5s ease-in-out infinite;
}

.section-corner-top-right {
  top: 8%;
  right: 8%;
  transform: rotate(15deg);
}

.section-corner-bottom-left {
  bottom: 8%;
  left: 8%;
  transform: rotate(-12deg);
  animation: cornerFloatReverse 5s ease-in-out infinite;
}

.section-corner-left-center {
  top: 20%;
  left: 5%;
  transform: translateY(-50%) rotate(5deg) scaleX(-1);
  width: 140px;
  height: 140px;
}

@keyframes cornerFloat {
  0%, 100% {
    transform: rotate(15deg) translateY(0);
  }
  50% {
    transform: rotate(18deg) translateY(-15px);
  }
}

@keyframes cornerFloatReverse {
  0%, 100% {
    transform: rotate(-12deg) translateY(0);
  }
  50% {
    transform: rotate(-15deg) translateY(-15px);
  }
}

.panel.layer::after {
  content: '';
  position: absolute;
  inset: 10% 5%;
  border: 1px solid rgba(29, 43, 36, 0.22);
  border-radius: 1.5rem;
  pointer-events: none;
}

.panel-content {
  width: min(960px, 100%);
  background: var(--panel);
  border: 1px solid rgba(29, 43, 36, 0.12);
  border-radius: 1.75rem;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 35px 70px var(--shadow);
  position: relative;
  z-index: 1;
  overflow: visible;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4rem;
  font-size: 0.75rem;
  color: rgba(29, 43, 36, 0.85);
  margin-bottom: 1rem;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

p {
  line-height: 1.7;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 0;
}

.panel-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--action);
  background: var(--action);
  color: white;
  font-weight: 600;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  background: #6a8358;
  border-color: #6a8358;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(123, 150, 105, 0.4);
}

.btn.ghost {
  background: var(--action);
  border-color: var(--action);
  color: white;
}

.btn.ghost:hover {
  background: #8fae7a;
  border-color: #8fae7a;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(143, 174, 122, 0.4);
}

.stats {
  margin-top: 1.25rem;

  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding-left: 0;
}

.stats li {
  padding-left: 1.5rem;
  position: relative;
}

.stats li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--action);
  font-weight: 700;
}

.api-card {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(29, 43, 36, 0.08);
  font-size: 0.85rem;
  color: #3e4a3f;
  position: relative;
  overflow: hidden;
}

.api-card::before {
  content: 'API';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  background: var(--action);
  color: white;
  border-radius: 0.25rem;
  font-weight: 600;
}

.api-card code {
  display: block;
  white-space: pre;
  font-family: 'Monaco', 'Menlo', monospace;
  background: rgba(29, 43, 36, 0.05);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.grid article {
  border: 1px solid rgba(29, 43, 36, 0.12);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  min-height: 160px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(123, 140, 122, 0.2);
}

.dark {
  background: linear-gradient(180deg, #d9e3d9, #c1d0c5);
}

.panel.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

footer {
  text-align: center;
  padding: 2rem 4vw;
  color: rgba(29, 43, 36, 0.7);
  border-top: 1px solid rgba(29, 43, 36, 0.15);
  font-size: 0.85rem;
}

footer a {
  color: var(--action);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--action);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .panel {
    padding: 2.5rem 5vw;
  }
}
