:root {
  --bg: #0E0E10;
  --bg-2: #131316;
  --surface: #17181c;
  --surface-2: #1d1e23;
  --line: rgba(255,255,255,0.08);
  --text: #F4F4F2;
  --muted: #9a9aa2;
  --lime: #5CFF3A;
  --lime-soft: #9bff86;
  --lime-ink: #7dff63;
  --turq: #2BD4C4;
  --glow: 0 0 14px rgba(92,255,58,0.22);
  --radius: 18px;
  --max: 1120px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --hand: 'Caveat', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ambient lime glow + grain */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(640px 480px at 78% -6%, rgba(92,255,58,0.08), transparent 60%),
    radial-gradient(720px 560px at 8% 8%, rgba(92,255,58,0.04), transparent 55%),
    radial-gradient(900px 700px at 50% 112%, rgba(92,255,58,0.05), transparent 60%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* layout */
.nav, main > section, .footer { width: 100%; }
.hero, .how, .features, .contact-inner, .nav, .footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 28px; padding-right: 28px;
}

/* NAV */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(14,14,16,0.85), rgba(14,14,16,0.4));
  max-width: 100%;
}
.nav > * { max-width: var(--max); }
.nav { padding-left: max(28px, calc((100vw - var(--max))/2 + 28px)); padding-right: max(28px, calc((100vw - var(--max))/2 + 28px)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { filter: drop-shadow(0 0 5px rgba(92,255,58,0.3)); }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand-name::after { content: ""; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-toggle { display: flex; align-items: center; gap: 4px; font-size: 0.9rem; }
.lang-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font: inherit; font-weight: 700; padding: 4px 4px; border-radius: 6px;
}
.lang-btn.is-active { color: var(--lime); text-shadow: 0 0 7px rgba(92,255,58,0.3); }
.lang-sep { color: var(--line); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 14px 26px; font-size: 1rem;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.92rem; }
.btn-lg { padding: 18px 38px; font-size: 1.1rem; }
.btn-primary {
  background: var(--lime); color: #0d1400;
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 30px rgba(92,255,58,0.6); background: #6fff52; }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); border-color: rgba(92,255,58,0.5); box-shadow: 0 0 16px rgba(92,255,58,0.18); }

/* HERO */
.hero { padding-top: 92px; padding-bottom: 96px; text-align: left; }
.eyebrow {
  color: var(--lime); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 22px; text-shadow: 0 0 8px rgba(92,255,58,0.22);
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 900; line-height: 1.02;
  letter-spacing: -0.035em; max-width: 16ch; margin-bottom: 26px;
}
.hl-wrap { position: relative; display: inline-block; white-space: nowrap; }
.hl-text { position: relative; z-index: 1; color: var(--lime); text-shadow: 0 0 16px rgba(92,255,58,0.25);
  font-family: var(--hand); font-weight: 700; font-size: 1.18em; letter-spacing: 0.01em; }
.strike { position: relative; color: var(--lime); white-space: nowrap; }
.strike .scribble { position: absolute; left: -5%; top: 8%; width: 110%; height: 84%; overflow: visible; pointer-events: none; }
.strike .scribble path { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.35)); }
.hl-underline {
  position: absolute; left: -2%; bottom: -0.28em; width: 104%; height: 0.4em;
  overflow: visible;
}
.hl-underline path {
  fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(92,255,58,0.35));
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 1.1s ease forwards .35s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-sub { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); max-width: 46ch; margin-top: clamp(20px, 4vw, 40px); margin-bottom: 38px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; }

/* doodle arrow */
.doodle-wrap { position: absolute; left: -86px; top: -46px; display: none; }
.doodle-note { font-family: var(--hand); color: var(--lime); font-size: 1.5rem; transform: rotate(-8deg); display: block; }
.doodle-arrow { width: 70px; height: 56px; display: block; }
.doodle-arrow path { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(92,255,58,0.3)); }
@media (min-width: 760px) { .doodle-wrap { display: block; } }

/* section titles */
.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 900; letter-spacing: -0.03em;
  line-height: 1.08; margin-bottom: 48px; max-width: 18ch;
}
.ink { font-family: var(--hand); font-style: normal; font-weight: 700; color: var(--lime);
  font-size: 1.25em; text-shadow: 0 0 12px rgba(92,255,58,0.25); }
.brand-inline { color: var(--lime); text-shadow: 0 0 11px rgba(92,255,58,0.22); }

.section-title--wide { max-width: none; white-space: nowrap; }
@media (max-width: 560px) { .section-title--wide { white-space: normal; } }

.how, .features { padding-top: 64px; padding-bottom: 64px; }

/* steps — timeline */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
/* horizontal connecting line removed on desktop; vertical line restored on mobile below */
.steps::before { content: ""; display: none; }
.step { position: relative; padding-top: 40px; }
.step-ring {
  position: absolute; top: 0; left: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--lime);
  box-shadow: 0 0 0 5px rgba(14,14,16,1), 0 0 12px rgba(92,255,58,0.5);
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover .step-ring { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(14,14,16,1), 0 0 18px rgba(92,255,58,0.8); }
.step h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* hand-drawn turquoise connectors between rings */
.link { position: absolute; top: -34px; height: 74px; width: 33.333%; pointer-events: none; }
.link--a { left: 0; }
.link svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* iteration loop between station 2 (Agiles Engineering) and 3 (Review) */
.cycle { position: absolute; top: -34px; left: 33.333%; width: 33.333%; height: 74px; pointer-events: none; }
.cycle svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cycle-arc { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(92,255,58,0.5)); }
.cycle-label { position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--hand); color: var(--lime); font-size: 1.2rem; white-space: nowrap;
  text-shadow: 0 0 10px rgba(92,255,58,0.35); }
@media (max-width: 760px) { .cycle, .link { display: none; } }

@media (max-width: 760px) {
  /* vertical timeline */
  .steps { grid-template-columns: 1fr; gap: 0; padding-left: 6px; }
  .steps::before { display: block; top: 6px; bottom: 6px; left: 10px; right: auto; width: 2px; height: auto;
    background: linear-gradient(to bottom, rgba(92,255,58,0.15), rgba(92,255,58,0.55), rgba(92,255,58,0.15)); }
  .step { padding-top: 0; padding-left: 40px; padding-bottom: 34px; }
  .step:last-child { padding-bottom: 0; }
  .step-ring { top: 2px; left: 0; }
}

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: rgba(92,255,58,0.4); transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,0.4); }
.card-ico { margin-bottom: 16px; line-height: 0; }
.card-ico .ico { width: 42px; height: 42px; transition: transform .3s ease, filter .3s ease; }
.card-ico .ico path, .card-ico .ico circle, .card-ico .ico rect {
  fill: none; stroke: var(--lime); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(92,255,58,0.35));
}
.card:hover .ico { transform: scale(1.15) translateY(-2px); filter: drop-shadow(0 0 9px rgba(92,255,58,0.7)); }
.card-ico .ico .fill { fill: var(--lime); stroke: none; }
.card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* contact */
.contact { padding: 96px 0 80px; }
.contact-inner {
  text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(92,255,58,0.10), transparent 60%);
  border: 1px solid var(--line); border-radius: 28px; padding: 64px 28px 56px;
}
.contact-title { margin: 0 auto 18px; max-width: 22ch; }
.contact-inner .hl-wrap { white-space: normal; }
.contact-sub { color: var(--muted); font-size: 1.15rem; max-width: 46ch; margin: 0 auto 34px; }
.contact-mail { margin-top: 22px; color: var(--muted); font-size: 0.98rem; }
.contact-mail a { color: var(--lime); text-decoration: none; }
.contact-mail a:hover { text-decoration: underline; }

/* footer */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-top: 40px; padding-bottom: 48px; border-top: 1px solid var(--line); margin-top: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.footer-copy { color: var(--muted); font-size: 0.88rem; }
.footer-copy a { color: var(--muted); text-decoration: none; }
.footer-copy a:hover { color: var(--lime); }

/* legal page */
.legal { max-width: 800px; margin: 0 auto; padding: 64px 28px 80px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 36px; }
.legal h1::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 14px; border-radius: 4px; background: var(--lime); box-shadow: var(--glow); }
.legal h2 { font-size: 1.15rem; font-weight: 800; color: var(--lime); margin: 32px 0 8px; text-shadow: 0 0 8px rgba(92,255,58,0.2); }
.legal p { color: var(--muted); margin-bottom: 6px; line-height: 1.65; }
.legal a { color: var(--lime); text-decoration: none; word-break: break-word; }
.legal a:hover { text-decoration: underline; }
.legal code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--lime-soft); font-size: 0.9em; }
.legal-note { margin-top: 40px; padding: 16px 18px; border: 1px dashed rgba(92,255,58,0.4); border-radius: 12px; font-size: 0.9rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 620px) {
  .hero { padding-top: 56px; padding-bottom: 64px; }
  .nav-right { gap: 12px; }
  .btn-sm[href="#contact"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hl-underline path { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}
