/* ===================================
   ZSTRATA — Stylesheet
   =================================== */

/* Variables */
:root {
  --color-primary:       #A50D25;
  --color-primary-dark:  #C8102E;
  --color-primary-light: #fce8ec;

  --color-black:    #0D0D0D;
  --color-white:    #FFFFFF;
  --color-gray-50:  #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-400: #9CA3AF;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-900: #111827;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height:    72px;
  --max-width:     1200px;
  --radius:        8px;
  --radius-lg:     16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-gray-900);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
}
.btn--outline {
  background: transparent;
  color: var(--color-gray-900);
  border-color: var(--color-gray-200);
}
.btn--outline:hover {
  border-color: var(--color-gray-400);
  background: var(--color-gray-50);
  transform: translateY(-1px);
}
.btn--lg   { padding: 14px 28px; font-size: 1rem; }
.btn--full { width: 100%; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-gray-100);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }

.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__logo    { flex-shrink: 0; }
.nav__logo-img { height: 40px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__link {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover,
.nav__link.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.nav__cta { margin-left: 8px; padding: 8px 18px; font-size: 0.875rem; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-gray-700);
  border-radius: 2px;
  transition: all 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); }

/* Offset anchor scroll for fixed nav */
section[id] { scroll-margin-top: var(--nav-height); }

/* ===== SECTION SHARED ===== */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px;
}
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--color-black);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-subtext {
  font-size: 1rem;
  color: var(--color-gray-600);
  line-height: 1.75;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}
/* Subtle radial brand-tint in top-right */
.hero::before {
  content: '';
  position: absolute;
  top: -250px; right: -250px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,16,46,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: center;
  width: 100%;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero__heading {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-black);
  margin-bottom: 24px;
}
.hero__heading--accent {
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  color: var(--color-primary);
}

.hero__subtext {
  font-size: 1.1rem;
  color: var(--color-gray-600);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero decorative visual */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__visual-inner {
  position: relative;
  width: 380px;
  height: 380px;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-gray-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-gray-200) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 72%);
  opacity: 0.7;
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
}
.hero__orb--1 {
  width: 260px; height: 260px;
  background: rgba(200,16,46,0.11);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: floatOrb 7s ease-in-out infinite;
}
.hero__orb--2 {
  width: 160px; height: 160px;
  background: rgba(200,16,46,0.07);
  top: 15%; right: 5%;
  animation: floatOrb 9s ease-in-out infinite reverse;
}

/* Floating node dots */
.hero__nodes {
  position: absolute;
  inset: 0;
}
.hero__node {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.5;
}
.hero__node:nth-child(1) { top: 20%; left: 25%; animation: pulse 3s ease-in-out infinite; }
.hero__node:nth-child(2) { top: 60%; left: 15%; animation: pulse 4s ease-in-out infinite 0.5s; }
.hero__node:nth-child(3) { top: 35%; right: 20%; animation: pulse 3.5s ease-in-out infinite 1s; }
.hero__node:nth-child(4) { bottom: 25%; right: 30%; animation: pulse 5s ease-in-out infinite 0.2s; }
.hero__node:nth-child(5) { top: 75%; left: 50%; animation: pulse 4.5s ease-in-out infinite 1.5s; }

@keyframes floatOrb {
  0%, 100% { transform: translate(-50%,-50%) translateY(0px); }
  50%       { transform: translate(-50%,-50%) translateY(-18px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%       { transform: scale(1.6); opacity: 0.9; }
}

/* ===== SERVICES ===== */
.services { background: var(--color-gray-50); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}
.service-card__icon {
  width: 44px; height: 44px;
  color: var(--color-primary);
  margin-bottom: 24px;
}
.service-card__icon svg { width: 100%; height: 100%; }
.service-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 12px;
  line-height: 1.3;
}
.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-gray-600);
  line-height: 1.75;
}

/* ===== CONTACT ===== */
.contact { background: var(--color-white); }

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
}
.form-required { color: var(--color-primary); }

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-gray-900);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input::placeholder { color: var(--color-gray-400); }
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}
.form-input.error { border-color: var(--color-primary); }
.form-textarea    { resize: vertical; min-height: 140px; }

.form-error {
  font-size: 0.8125rem;
  color: var(--color-primary);
}
.form-success {
  display: none;
  padding: 16px 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  color: #15803d;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
}
.form-success.visible { display: block; }

/* ===== FOOTER ===== */
.footer { background: var(--color-black); padding: 48px 0; }

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer__logo  { height: 26px; width: auto; filter: brightness(0) invert(1); }
.footer__name    { font-size: 1rem; font-weight: 700; color: var(--color-white); }
.footer__tagline { font-size: 0.8125rem; color: var(--color-gray-400); }

.footer__nav { display: flex; gap: 24px; }
.footer__link {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  transition: color 0.2s;
}
.footer__link:hover { color: var(--color-white); }

.footer__copy { font-size: 0.8125rem; color: var(--color-gray-400); }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.services__grid .fade-in:nth-child(2) { transition-delay: 0.12s; }
.services__grid .fade-in:nth-child(3) { transition-delay: 0.24s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__subtext   { max-width: 100%; }
  .hero__actions   { justify-content: center; }
  .hero__visual    { display: none; }
  .services__grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links     { display: none; }
  .nav__hamburger { display: flex; }
  .nav__cta       { margin-left: auto; padding: 7px 14px; font-size: 0.8rem; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--color-white);
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--color-gray-100);
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  .nav__links.open li    { width: 100%; }
  .nav__links.open .nav__link { display: block; padding: 12px 16px; font-size: 0.9375rem; }

  .services__grid        { grid-template-columns: 1fr; }
  .contact-form__row     { grid-template-columns: 1fr; }
  .section-container     { padding: 72px 20px; }

  .footer__container {
    flex-direction: column;
    text-align: center;
  }
  .footer__brand { align-items: center; }
  .footer__nav   { justify-content: center; }
}
