/* ============================================
   ConstructionX AI -- Design System
   Brand: #1e293b (dark slate) / #22c55e (neon green) / #f1f5f9 (off-white)
   Fonts: Space Grotesk (headings) + Inter (body)
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg-primary: #1e293b;
  --bg-card: #334155;
  --bg-dark: #0f172a;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #475569;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --nav-height: 80px;
  --transition: 0.3s ease;
  --radius: 8px;
  --radius-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

.text-accent {
  color: var(--accent);
}

.text-white {
  color: var(--text-primary);
}

.text-center {
  text-align: center;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--dark {
  background-color: var(--bg-dark);
}

.section--card {
  background-color: var(--bg-card);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(71, 85, 105, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo img {
  height: 40px;
  width: auto;
  border-radius: 0;
  mix-blend-mode: lighten;
}

.nav__logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
}

.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav__cta {
  margin-left: 1rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 6px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.nav__toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg-dark);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 1.5rem;
}

.card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Trust Bar --- */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
}

.trust-bar__item {
  text-align: center;
  flex: 0 1 auto;
}

.trust-bar__value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.trust-bar__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-dark);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat__value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Grid Utilities --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* --- Hero --- */
.hero {
  padding: calc(var(--nav-height) + 4rem) 0 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero--short {
  min-height: auto;
  padding: calc(var(--nav-height) + 3rem) 0 3rem;
}

.hero__content {
  max-width: 720px;
}

.hero__badge {
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero__trust {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Journey / Steps --- */
.journey {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.journey__step {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
}

.journey__marker {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.journey__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.journey__line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: 0.75rem;
}

.journey__step:last-child .journey__line {
  display: none;
}

.journey__content h3 {
  margin-bottom: 0.5rem;
}

/* --- Service Flow (horizontal on desktop) --- */
.service-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 3rem 0;
}

.service-flow__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.service-flow__item::after {
  content: '\2193';
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 1.2rem;
  z-index: 1;
}

.service-flow__item:last-child::after {
  display: none;
}

.service-flow__name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.service-flow__price {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* --- Service Detail Block --- */
.service-detail {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-of-type {
  border-bottom: none;
}

.service-detail__header {
  margin-bottom: 2rem;
}

.service-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

/* --- Testimonial / Quote --- */
.quote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.quote__author {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- FAQ --- */
.faq__item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq__question {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.faq__answer {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Case Study Card --- */
.case-study {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.case-study__image {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.case-study__image--blurred {
  filter: blur(4px);
  transition: filter 0.3s ease;
}

.case-study__image-wrap {
  position: relative;
}

.case-study__image-wrap--right-blur::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 59%;
  height: 100%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.case-study__body {
  padding: 2rem;
}

.case-study__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* --- Contact Form --- */
.form {
  max-width: 600px;
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.form__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form__success {
  display: none;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.form__success.visible {
  display: block;
}

.form__success h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col--reverse .two-col__content {
  order: 1;
}

.two-col__image {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.two-col__image img {
  width: 100%;
  height: auto;
}

/* --- Founder --- */
.founder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.founder__photo {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin: 0 auto;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cta-section__trust {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer__links a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__contact p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.footer__contact a {
  color: var(--text-muted);
}

.footer__contact a:hover {
  color: var(--accent);
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- List Styles --- */
.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utility --- */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Responsive Breakpoints (mobile-first)
   ============================================ */

/* 480px -- minor spacing */
@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768px -- two-column layouts */
@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .two-col--reverse .two-col__content {
    order: 0;
  }

  .two-col--reverse .two-col__image {
    order: -1;
  }

  .founder {
    grid-template-columns: auto 1fr;
  }

  .founder__photo {
    margin: 0;
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .service-flow {
    flex-direction: row;
    align-items: stretch;
  }

  .service-flow__item::after {
    content: '\2192';
    position: absolute;
    right: -1.25rem;
    top: 50%;
    bottom: auto;
    left: auto;
    transform: translateY(-50%) translateX(0);
  }

  .service-detail__grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 1024px -- full desktop */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    min-height: 85vh;
  }
}

/* Mobile nav */
@media (max-width: 1023px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-dark);
    flex-direction: column;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    gap: 0;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
  }

  .nav__links.open {
    right: 0;
  }

  .nav__links a {
    font-size: 1.1rem;
    padding: 0.75rem 0;
    display: block;
    width: 100%;
  }

  .nav__cta {
    margin-left: 0;
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }

  .nav__toggle {
    display: block;
  }
}

/* Overlay behind mobile nav */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.open {
  display: block;
}

/* Body scroll lock when nav is open */
body.nav-open {
  overflow: hidden;
}

/* --- Calendly Embed --- */
.calendly-inline-widget {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* --- Print --- */
@media print {
  .nav, .footer, .nav-overlay {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 2rem 0;
  }
}
