/* ==========================================================================
   StackLab landing page
   Palette and type taken from the approved design.
   ========================================================================== */

:root {
  --black: #000000;
  --ink: #0a0a08;
  --white: #ffffff;

  --yellow: #f5dd02;
  --yellow-deep: #a39301;
  --olive: #524a01;

  --surface: #f7f7f5;

  --muted: #555555;
  --muted-2: #666666;
  --muted-3: #888888;
  --muted-dark: #b8b8b0;
  --muted-dark-2: #cfcfcf;

  --line: rgba(0, 0, 0, 0.08);
  --line-light: rgba(255, 255, 255, 0.12);

  --pad-x: 6vw;
  --maxw: 1180px;
  --radius: 2px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Helvetica Neue";
  src: local("Helvetica Neue");
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Anchor targets clear the sticky header */
section[id] {
  scroll-margin-top: 84px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}

.btn-cta {
  font-size: 14px;
  background: var(--black);
  color: var(--yellow);
  padding: 10px 20px;
  letter-spacing: 0.02em;
}
.btn-cta:hover {
  background: var(--olive);
}

.btn-primary {
  font-size: 16px;
  background: var(--black);
  color: var(--yellow);
  padding: 16px 32px;
}
.btn-primary:hover {
  background: var(--olive);
}

.btn-primary-yellow {
  font-size: 17px;
  background: var(--yellow);
  color: var(--black);
  padding: 18px 40px;
  margin-top: 12px;
}
.btn-primary-yellow:hover {
  background: var(--yellow-deep);
}

.btn-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  padding: 16px 8px;
  border-bottom: 2px solid var(--black);
}
.btn-link:hover {
  color: var(--yellow-deep);
  border-color: var(--yellow-deep);
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  border-bottom: 1px solid var(--line);
}

.brand img {
  height: 26px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links > a:not(.btn) {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.18s ease;
}
.nav-links > a:not(.btn):hover {
  color: var(--yellow-deep);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13vh var(--pad-x) 11vh;
  max-width: var(--maxw);
  gap: 26px;
}

.accent-bar {
  width: 64px;
  height: 6px;
  background: var(--yellow);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 800;
  max-width: 920px;
}

.hero .lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: #333333;
  max-width: 640px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Section heads
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 800;
}
.section-head span {
  font-size: 15px;
  max-width: 440px;
  color: var(--muted-dark-2);
}
.section-head.on-light span {
  color: var(--muted);
}

.section-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  margin: 12px 0 40px;
}

/* --------------------------------------------------------------------------
   Services (dark)
   -------------------------------------------------------------------------- */
.services {
  padding: 10vh var(--pad-x);
  background: var(--ink);
  color: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.service-card {
  background: var(--ink);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color 0.2s ease;
}
.service-card:hover {
  background: #141410;
}

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  flex: none;
}
.icon-badge svg {
  width: 22px;
  height: 22px;
}
.service-card:nth-child(2) .icon-badge {
  border-color: var(--yellow-deep);
  color: var(--yellow-deep);
}
.service-card:nth-child(3) .icon-badge {
  border-color: var(--muted-dark);
  color: var(--muted-dark);
}
.service-card:nth-child(4) .icon-badge {
  border-color: var(--yellow);
  color: var(--yellow);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
}
.service-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-dark);
}

/* --------------------------------------------------------------------------
   Method (light surface)
   -------------------------------------------------------------------------- */
.method {
  padding: 10vh var(--pad-x);
  background: var(--surface);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.method-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.method-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

.method-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 1px var(--yellow-deep);
  letter-spacing: -0.02em;
}
.method-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 4px;
}
.method-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   Stack
   -------------------------------------------------------------------------- */
.stack {
  padding: 10vh var(--pad-x);
}
.stack h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 800;
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}
.stack-list li {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.stack-list li:hover {
  background: var(--black);
  color: var(--yellow);
}

/* --------------------------------------------------------------------------
   CTA (black)
   -------------------------------------------------------------------------- */
.cta {
  padding: 14vh var(--pad-x);
  background: var(--black);
  color: var(--white);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.cta h2 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  max-width: 720px;
}
.cta p {
  font-size: 17px;
  color: var(--muted-dark-2);
  max-width: 540px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 32px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
}
.site-footer img {
  height: 20px;
  width: auto;
  opacity: 0.85;
}
.site-footer span {
  font-size: 13px;
  color: var(--muted-3);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   Progressive enhancement: hidden state only applies once JS adds `.js`, so
   the content is always visible if JS fails or IntersectionObserver is absent.
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    padding: 8px var(--pad-x) 20px;
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path 0.28s ease, opacity 0.2s ease;
  }
  .nav-links.is-open {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links > a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .nav-links > .btn-cta {
    margin-top: 16px;
    padding: 14px 20px;
    font-size: 15px;
  }
  .site-header {
    position: sticky;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 8vh;
    padding-bottom: 9vh;
  }
  .service-card,
  .method-card {
    padding: 32px 24px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .method-card,
  .service-card,
  .stack-list li {
    transition: none;
  }
}
