:root {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --bg-soft: #e8edf3;
  --charcoal: #1a1c1e;
  --charcoal-soft: #2d3033;
  --muted: #5a6570;
  --accent: #39e600;
  --accent-ink: #0d1a08;
  --accent-soft: rgba(57, 230, 0, 0.14);
  --accent-glow: rgba(57, 230, 0, 0.28);
  --line: rgba(26, 28, 30, 0.1);
  --max: 1120px;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--charcoal);
  background:
    radial-gradient(900px 520px at 92% -8%, rgba(57, 230, 0, 0.12), transparent 55%),
    radial-gradient(700px 420px at 0% 100%, rgba(26, 28, 30, 0.04), transparent 50%),
    linear-gradient(180deg, #eef2f6 0%, var(--bg) 40%, #f8fafc 100%);
  background-attachment: fixed;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(245, 247, 250, 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 24px rgba(26, 28, 30, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand-lockup {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-lockup img {
  height: 44px;
  width: auto;
  max-width: none;
}

.brand-lockup .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-lockup .wordmark strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.brand-lockup .wordmark span {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--charcoal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid var(--charcoal);
  color: var(--charcoal);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: var(--charcoal);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 28, 30, 0.15);
}

.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-solid:hover {
  filter: brightness(1.05);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 22px var(--accent-glow);
}

.btn-dark {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.btn-dark:hover {
  background: var(--charcoal);
  color: #fff;
  box-shadow: 0 6px 20px rgba(26, 28, 30, 0.15);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--charcoal);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  cursor: pointer;
}

/* Hero */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero {
  padding: clamp(3.5rem, 10vw, 6.5rem) 0 clamp(3rem, 8vw, 5rem);
}

.hero > .wrap,
.page-hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image: url("/assets/decor/maze-pattern.svg");
  background-repeat: repeat;
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-visual {
  position: relative;
}

.hero-mark {
  width: min(280px, 72vw);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--charcoal);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--accent);
}

.hero h1,
.page-hero h1,
section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.2rem);
  max-width: 12ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.link-quiet {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-quiet:hover {
  color: var(--charcoal);
  border-bottom-color: var(--line);
}

/* Sections */
section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-label {
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.section-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
}

section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 18ch;
}

.section-intro {
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.grid-4,
.grid-3,
.grid-2 {
  display: grid;
  gap: 1.25rem;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Cards */
.card,
.project-card,
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 28, 30, 0.08);
}

.card-body,
.project-card .card-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.card img,
.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
}

.project-card h3,
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.project-card p,
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.feature-card {
  padding: 1.5rem;
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Status pills */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid rgba(57, 230, 0, 0.45);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 230, 0, 0.2);
}

.status.live {
  color: #14532d;
  border-color: rgba(20, 83, 45, 0.35);
  background: rgba(20, 83, 45, 0.08);
}

.status.live::before {
  background: #14532d;
  box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.15);
}

/* Format band */
.format-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.format-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--charcoal);
  color: #fff;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.format-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.format-item h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.format-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.format-item .format-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

/* Project detail */
.page-hero {
  padding: clamp(3rem, 8vw, 5rem) 0 2.5rem;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  max-width: 16ch;
}

.page-hero .project-logo {
  max-height: 64px;
  width: auto;
  margin-bottom: 1rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.screenshot-grid img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(26, 28, 30, 0.06);
}

.screenshot-grid img:first-child {
  grid-column: 1 / -1;
}

.feature-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--muted);
}

.feature-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.stage-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stage-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stage-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--charcoal);
  line-height: 1;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.1rem;
  height: fit-content;
}

.stage-item h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.stage-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  background: var(--charcoal);
  color: #fff;
  border-radius: 20px;
  padding: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(57, 230, 0, 0.25);
}

.cta-band h2 {
  color: #fff;
  max-width: none;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.cta-band .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.cta-band .btn:hover {
  filter: brightness(1.06);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 22px var(--accent-glow);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
}

.meta-block {
  color: var(--muted);
}

.meta-block h3 {
  font-family: var(--font-display);
  color: var(--charcoal);
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-block + .meta-block {
  margin-top: 1.5rem;
}

form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--charcoal);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-status {
  min-height: 1.25rem;
  font-size: 0.9rem;
}

.form-status.ok { color: #14532d; }
.form-status.err { color: #b42318; }

.prose {
  max-width: 42rem;
  color: var(--muted);
}

.prose h2 {
  font-size: 1.5rem;
  max-width: none;
  margin-top: 2rem;
}

.prose p {
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 0.8rem;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--charcoal);
}

.footer-col h4 {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal);
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.parent-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.parent-note a {
  color: var(--charcoal);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3,
  .grid-2,
  .format-band,
  .hero-grid,
  .split-layout,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    inset: calc(100% - 1px) 1.25rem auto;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 12px 32px rgba(26, 28, 30, 0.1);
  }
  .nav-links.is-open { display: flex; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { max-width: 100%; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .screenshot-grid img:first-child { grid-column: auto; }
}
