/* ================================================
   CODEZILLA — Global Design System
   Bright Minimalist — matches teal/green logo
   ================================================ */

:root {
  --bg:        #ffffff;
  --bg-2:      #f8fafb;
  --bg-3:      #f1f5f4;
  --surface:   #edf2f0;

  --white:     #0d1b1a;
  --gray-1:    #1a3a3a;
  --gray-2:    #4a6a68;
  --gray-3:    #7a9a96;
  --gray-4:    #d0ddd9;
  --gray-5:    #e4ebe8;

  --accent:    #1a5c3a;
  --accent-2:  #2d8a4e;
  --accent-dim:rgba(26, 92, 58, .08);
  --accent-glow:rgba(26, 92, 58, .05);

  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font);
  --mono:      'JetBrains Mono', monospace;

  --ease:      cubic-bezier(.16, 1, .3, 1);
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--accent); color: #fff; }

/* --- GRAIN --- */
.grain {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; opacity: .02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px;
}

/* --- CURSOR GLOW --- */
.cursor-glow {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 92, 58, .04) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity .3s; opacity: 0;
}
.cursor-glow.active { opacity: 1; }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .75rem; font-weight: 500;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700; letter-spacing: -1.5px; line-height: 1.1;
}
.text-accent { color: var(--accent); }
.gradient-text {
  background: linear-gradient(135deg, #1a5c3a 0%, #2d8a4e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pill {
  display: inline-flex; align-items: center;
  padding: 6px 16px; border-radius: 100px;
  background: var(--accent-dim);
  border: 1px solid rgba(26, 92, 58, .15);
  color: var(--accent);
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 12px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer; border: none;
  transition: all .25s var(--ease);
  white-space: nowrap; min-height: 48px;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover {
  background: var(--accent-2);
  box-shadow: 0 8px 30px rgba(26, 92, 58, .2);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: transparent; color: var(--gray-1);
  border: 1.5px solid var(--gray-4);
}
.btn--ghost:hover {
  border-color: var(--gray-3); color: var(--white); background: var(--gray-5);
}
.btn--white { background: var(--white); color: var(--bg); }
.btn--white:hover { background: var(--accent); transform: translateY(-2px); }
.btn--full { width: 100%; justify-content: center; }
.btn--lg { padding: 18px 38px; font-size: 1rem; border-radius: 14px; }
.btn svg { flex-shrink: 0; }

/* --- REVEAL --- */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].visible { opacity: 1; transform: translateY(0); }
[data-reveal][data-delay="1"] { transition-delay: .1s; }
[data-reveal][data-delay="2"] { transition-delay: .2s; }
[data-reveal][data-delay="3"] { transition-delay: .3s; }
[data-reveal][data-delay="4"] { transition-delay: .4s; }
[data-reveal][data-delay="5"] { transition-delay: .5s; }

/* ========== NAV ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  transition: all .3s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--gray-5);
  padding: 10px 0;
}
.nav__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand img { width: 84px; height: 84px; object-fit: contain; }
.nav__brand span {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.6rem; letter-spacing: 3px;
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: .85rem; font-weight: 500; color: var(--gray-2);
  transition: color .2s; position: relative;
}
.nav__links a:hover { color: var(--white); }
.nav__links a.active { color: var(--white); }
.nav__links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nav__cta {
  padding: 8px 20px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: .82rem;
  transition: all .2s var(--ease);
}
.nav__cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.nav__burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  align-items: center; justify-content: center; position: relative;
}
.nav__burger div,
.nav__burger div::before,
.nav__burger div::after {
  width: 22px; height: 1.5px; background: var(--gray-1);
  border-radius: 1px; transition: all .3s var(--ease);
}
.nav__burger div { position: relative; }
.nav__burger div::before, .nav__burger div::after {
  content: ''; position: absolute; left: 0;
}
.nav__burger div::before { top: -7px; }
.nav__burger div::after  { top: 7px; }
.nav__burger.open div { background: transparent; }
.nav__burger.open div::before { top: 0; transform: rotate(45deg); }
.nav__burger.open div::after  { top: 0; transform: rotate(-45deg); }

/* ========== FOOTER ========== */
.footer {
  padding: 64px 24px 32px;
  background: var(--bg-2);
  border-top: 1px solid var(--gray-5);
}
.footer__inner { max-width: 1200px; margin: 0 auto; }
.footer__top {
  display: flex; justify-content: space-between;
  gap: 64px; margin-bottom: 48px;
}
.footer__logo { width: 450px; margin-bottom: 14px; }
.footer__brand p {
  color: var(--gray-3); font-size: .85rem;
  line-height: 1.7; max-width: 300px;
}
.footer__cols { display: flex; gap: 64px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col h5 {
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--gray-2); margin-bottom: 4px;
}
.footer__col a {
  font-size: .85rem; color: var(--gray-3); transition: color .2s;
}
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--gray-5);
  font-size: .75rem; color: var(--gray-3);
}

/* ========== FORM (shared) ========== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--gray-2); margin-bottom: 6px;
}
.form__field input,
.form__field select,
.form__field textarea {
  width: 100%; padding: 13px 16px;
  background: var(--bg-3); border: 1.5px solid var(--gray-5);
  border-radius: 12px; color: var(--white);
  font-size: .9rem; transition: all .2s; min-height: 48px;
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: var(--gray-3); }
.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form__field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center; padding-right: 40px;
}
.form__field select option { background: var(--bg); color: var(--white); }
.form__field textarea { resize: vertical; min-height: 100px; }

/* ========== PAGE HERO (shared) ========== */
.page-hero {
  position: relative; padding: 160px 24px 80px;
  text-align: center; overflow: hidden;
}
.page-hero__grid {
  position: absolute; inset: -100px;
  background-image:
    linear-gradient(rgba(26, 92, 58, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 92, 58, .05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}
.page-hero__radial {
  position: absolute; top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(26, 92, 58, .04) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; letter-spacing: -2px; line-height: 1.1;
  margin-bottom: 16px; position: relative;
}
.page-hero p {
  color: var(--gray-2); font-size: 1.1rem;
  max-width: 560px; margin: 0 auto;
  line-height: 1.7; position: relative;
}

/* ========== RESPONSIVE (shared) ========== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__brand img { width: 52px; height: 52px; }
  .nav__brand span { font-size: 1.1rem; }
  .footer__logo { width: 280px; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(24px);
    padding: 24px; gap: 16px;
    border-bottom: 1px solid var(--gray-5);
  }
  .section-h2 { font-size: 1.8rem; }
  .page-hero { padding: 130px 16px 60px; }
  .page-hero h1 { font-size: 2rem; }
  .page-hero p { font-size: 1rem; }
  .form__row { grid-template-columns: 1fr; }
  .footer__logo { width: 200px; }
  .footer__top { flex-direction: column; gap: 40px; }
  .footer__cols { gap: 40px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ========== LOADER ========== */
body.is-loading { overflow: hidden !important; }
#loader {
  position: fixed; inset: 0; z-index: 999999;
  background: #fff; overflow: hidden;
  transition: opacity .5s ease;
}
#loader video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%,-50%);
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .cursor-glow { display: none; }
}
