/* ============================================================
   FOUNDRY LEAP — styles.css
   Brand: Night #090806 | Blue Whale #002746 | Soft Gray #EAEAEA
          Iceberg #DAF0FE | After Burn #FE875C | White #FFFFFF
   Fonts: Manrope (headings) | Poppins (body)
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --night:      #090806;
  --blue-whale: #002746;
  --soft-gray:  #EAEAEA;
  --iceberg:    #DAF0FE;
  --after-burn: #FE875C;
  --white:      #FFFFFF;

  --font-heading: 'Manrope', sans-serif;
  --font-body:    'Poppins', sans-serif;

  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);

  --nav-h: 72px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --glow-burn:  rgba(254, 135, 92, 0.25);
  --glow-blue:  rgba(0, 39, 70, 0.6);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--night);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
textarea { resize: vertical; }

/* ── Utilities ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.text--accent {
  background: linear-gradient(90deg, var(--after-burn) 0%, #ffb38a 60%, var(--after-burn) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 4s linear infinite;
}
@keyframes shimmer-text {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--after-burn);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.section-title--dark {
  color: var(--blue-whale);
}

/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children with delay */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent {
  background: linear-gradient(90deg, var(--after-burn) 0%, #ff9c76 50%, var(--after-burn) 100%);
  background-size: 200% auto;
  color: var(--white);
  animation: shimmer-btn 3s linear infinite;
  box-shadow: 0 0 0 rgba(254,135,92,0);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
@keyframes shimmer-btn {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.btn--accent:hover {
  box-shadow: 0 8px 36px rgba(254,135,92,0.45), 0 0 60px rgba(254,135,92,0.15);
}

.btn--ghost {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn--ghost:hover {
  border-color: var(--white);
  background-color: rgba(255,255,255,0.06);
}

.btn--dark {
  background-color: var(--blue-whale);
  color: var(--white);
}
.btn--dark:hover {
  background-color: #003660;
  box-shadow: 0 8px 32px rgba(0,39,70,0.3);
}

.btn--submit {
  border-radius: 100px;
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* ── NAV ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), backdrop-filter 0.4s;
}

.nav--scrolled {
  background-color: rgba(9, 8, 6, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--nav-h);
}

.nav__logo img { height: 30px; width: auto; }

.nav__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background-color: var(--after-burn);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__cta { margin-left: 0.5rem; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer {
  display: none;
  flex-direction: column;
  background-color: rgba(9,8,6,0.97);
  padding: 2rem var(--container-pad);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav__drawer.open { display: flex; }
.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.nav__drawer-links .nav__link { font-size: 1.25rem; color: var(--white); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--night);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  margin-bottom: -4rem;
}

/* Ambient glow blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  animation: glow-pulse 6s ease-in-out infinite alternate;
}
.hero::before {
  width: 600px; height: 600px;
  top: -150px; right: -100px;
  background: radial-gradient(circle, rgba(0,39,70,0.7) 0%, transparent 70%);
  animation-delay: 0s;
}
.hero::after {
  width: 400px; height: 400px;
  bottom: 0; left: 10%;
  background: radial-gradient(circle, rgba(254,135,92,0.12) 0%, transparent 70%);
  animation-delay: -3s;
}
@keyframes glow-pulse {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.12); }
}

/* Grain overlay */
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
  padding-bottom: 6rem;
}

.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--after-burn);
  margin-bottom: 1.25rem;
  transition-delay: 0s !important;
}

.hero__headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
  transition-delay: 0.1s !important;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  margin-bottom: 2.5rem;
  transition-delay: 0.2s !important;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  transition-delay: 0.3s !important;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--after-burn);
  animation: bounce 2s infinite var(--ease-in-out);
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── SERVICES ──────────────────────────────────────────────── */
.services {
  background-color: var(--blue-whale);
  padding-block: clamp(5rem, 10vw, 8rem);
  padding-top: calc(clamp(5rem, 10vw, 8rem) + 4rem);
  position: relative;
}

.section-header {
  margin-bottom: 4rem;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  background-color: var(--night);
  border-top: 3px solid var(--after-burn);
  border-radius: 0 0 12px 12px;
  padding: 2.5rem 2rem 2rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
/* Glow border on hover via pseudo-element */
.service-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(254,135,92,0.5) 0%, transparent 50%, rgba(0,39,70,0.4) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 40px rgba(254,135,92,0.08);
}
/* Subtle inner glow on hover */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(254,135,92,0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

.service-card__icon {
  margin-bottom: 1.5rem;
}

.service-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.875rem;
}

.service-card__body {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

.service-card__number {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  user-select: none;
}

/* Stagger service cards */
.services__grid .service-card:nth-child(1) { transition-delay: 0s; }
.services__grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services__grid .service-card:nth-child(3) { transition-delay: 0.24s; }

/* ── ABOUT ─────────────────────────────────────────────────── */
.about {
  background-color: var(--soft-gray);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about .section-label { color: var(--after-burn); }

.about__body {
  font-size: 1rem;
  color: rgba(9, 8, 6, 0.7);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about__text .btn { margin-top: 0.75rem; }

.about__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.about__logo-mark {
  width: 100%;
  max-width: 280px;
  opacity: 0.12;
  filter: hue-rotate(200deg);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--white);
  border-radius: 12px;
  padding: 1.25rem 0.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.stat__number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--blue-whale);
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(9,8,6,0.5);
  letter-spacing: 0.05em;
}

/* ── CONTACT ───────────────────────────────────────────────── */
.contact {
  background-color: var(--night);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.contact__header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.contact__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  margin-top: -0.5rem;
}

.contact__form {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

.required { color: var(--after-burn); }
.optional { color: rgba(255,255,255,0.35); font-weight: 400; }

.form__input {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form__input::placeholder { color: rgba(255,255,255,0.25); }
.form__input:focus {
  outline: none;
  border-color: var(--after-burn);
  background-color: rgba(254,135,92,0.05);
  box-shadow: 0 0 0 3px rgba(254,135,92,0.12);
}
.form__textarea { min-height: 140px; }

.form__footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form__status {
  font-size: 0.875rem;
  font-family: var(--font-heading);
  font-weight: 600;
}
.form__status.success { color: #4ade80; }
.form__status.error   { color: #f87171; }

/* Loading spinner on submit */
.btn--loading .btn__text::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.5rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background-color: var(--blue-whale);
  padding-top: 3.5rem;
}

.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer__tagline {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}

.footer__nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.footer__link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer__link:hover { color: var(--white); }

.footer__social {
  display: flex;
  gap: 1rem;
}
.footer__social-link {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s, transform 0.2s;
}
.footer__social-link:hover { color: var(--after-burn); transform: translateY(-2px); }

.footer__bottom {
  padding-block: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }

  .hero__headline { font-size: clamp(2.5rem, 12vw, 4rem); }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about__visual { order: -1; }
  .about__logo-mark { max-width: 180px; }
  .about__stats { grid-template-columns: repeat(3, 1fr); }

  .form__row { grid-template-columns: 1fr; }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .footer__nav { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 480px) {
  .about__stats { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { text-align: center; justify-content: center; }
}
