/* ==========================================================================
   AlamoSites - Layout
   ========================================================================== */

/* ========================================
   CONTAINER
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding-top: var(--section-padding-mobile);
  padding-bottom: var(--section-padding-mobile);
}

@media (min-width: 1024px) {
  .section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
  }
}

/* Alternating background sections */
.section-alt {
  background-color: var(--color-sandstone);
}

/* Dark sections */
.section-dark {
  background-color: var(--color-deep-slate);
  color: var(--color-warm-white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-warm-white);
}

.section-dark .section-label {
  color: var(--color-limestone);
}

.section-dark .text-lead {
  color: rgba(250, 249, 246, 0.8);
}

/* Charcoal section (footer-style) */
.section-charcoal {
  background-color: var(--color-charcoal);
  color: var(--color-warm-white);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-2xl);
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: var(--space-3xl);
  }
}

.section-header .section-label {
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header .text-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: var(--color-warm-white);
  border-bottom: 1px solid var(--color-limestone);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

@media (min-width: 1024px) {
  .header-inner {
    height: 80px;
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  color: var(--color-deep-slate);
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

/* Desktop Navigation */
.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
  }
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--color-soft-gray);
  text-decoration: none;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-deep-slate);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Header CTA */
.header-cta {
  display: none;
}

@media (min-width: 1024px) {
  .header-cta {
    display: block;
  }
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-deep-slate);
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile Navigation */
.nav-mobile {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-warm-white);
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  z-index: var(--z-fixed);
  overflow-y: auto;
}

.nav-mobile.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .nav-mobile {
    display: none;
  }
}

.nav-mobile-link {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  color: var(--color-deep-slate);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-limestone);
  text-decoration: none;
}

.nav-mobile-link:hover {
  color: var(--color-terracotta);
}

.nav-mobile-cta {
  margin-top: var(--space-xl);
}

/* ========================================
   HERO SECTIONS
   ======================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  background: radial-gradient(120% 120% at 10% 0%, rgba(184, 92, 56, 0.12) 0%, rgba(232, 223, 208, 0.35) 40%, rgba(250, 249, 246, 0.9) 70%),
    linear-gradient(180deg, var(--color-warm-white) 0%, #f4efe7 100%);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
}

.hero::before {
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(44, 95, 124, 0.22) 0%, rgba(44, 95, 124, 0) 70%);
}

.hero::after {
  bottom: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(184, 92, 56, 0.18) 0%, rgba(184, 92, 56, 0) 70%);
}

@media (min-width: 1024px) {
  .hero {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
  animation: hero-fade-up 0.6s ease both;
}

.hero-centered .hero-content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-title {
  margin-bottom: var(--space-lg);
}

.hero-text {
  font-size: var(--text-body-lg);
  color: var(--color-soft-gray);
  margin-bottom: var(--space-xl);
  max-width: 550px;
}

.hero-centered .hero-text {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero-checklist {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.hero-checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-body);
  color: var(--color-deep-slate);
}

.hero-checklist li::before {
  content: '+';
  color: var(--color-terracotta);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.hero-note {
  font-size: var(--text-small);
  color: var(--color-soft-gray);
  margin-top: var(--space-md);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-limestone);
  background: rgba(250, 249, 246, 0.9);
  color: var(--color-deep-slate);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.hero-centered .hero-actions {
  justify-content: center;
}

/* Hero with Image */
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 1;
  animation: hero-fade-up 0.8s ease 0.1s both;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.hero-visual {
  position: relative;
  padding: var(--space-lg);
  max-width: 540px;
  width: 100%;
}

.hero-visual-screen {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-limestone);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero-visual-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background-color: var(--color-sandstone);
  border-bottom: 1px solid var(--color-limestone);
}

.hero-visual-url {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-soft-gray);
}

.hero-visual-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.6) 0%, rgba(232, 223, 208, 0.7) 100%);
}

.hero-visual-hero {
  height: 150px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-river-teal) 0%, var(--color-sage) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.hero-visual-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.hero-visual-tile {
  height: 64px;
  background: rgba(250, 249, 246, 0.9);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-limestone);
}

.hero-visual-line {
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(44, 95, 124, 0.2);
}

.hero-visual-line.short {
  width: 60%;
}

.hero-visual-card {
  position: static;
  margin-top: var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-limestone);
  box-shadow: var(--shadow-lg);
  animation: hero-float 6s ease-in-out infinite;
}

.hero-visual-card-top {
  animation-delay: 0.3s;
}

.hero-visual-card-bottom {
  animation-delay: 0.8s;
}

.hero-visual-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-sage);
  margin-bottom: var(--space-xs);
}

.hero-visual-value {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--color-deep-slate);
}

.hero-visual-sub {
  font-size: var(--text-xs);
  color: var(--color-soft-gray);
  margin-top: var(--space-xs);
}

@media (min-width: 1024px) {
  .hero-visual-card {
    position: absolute;
    margin-top: 0;
    max-width: 220px;
  }

  .hero-visual-card-top {
    top: 14%;
    right: -10%;
  }

  .hero-visual-card-bottom {
    bottom: 10%;
    left: -10%;
  }
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Browser Mockup Frame */
.browser-mockup {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.browser-mockup-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background-color: var(--color-sandstone);
  border-bottom: 1px solid var(--color-limestone);
}

.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-limestone);
}

.browser-mockup-body {
  aspect-ratio: 16 / 10;
  background-color: var(--color-warm-white);
}

.browser-mockup-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   GRIDS
   ======================================== */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-mobile);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-mobile);
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap-mobile);
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background-color: var(--color-charcoal);
  color: var(--color-warm-white);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Footer Brand */
.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  color: var(--color-warm-white);
  margin-bottom: var(--space-md);
}

.footer-tagline {
  font-size: var(--text-body);
  color: rgba(250, 249, 246, 0.7);
  margin-bottom: var(--space-lg);
}

/* Footer Columns */
.footer-column h4 {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--color-warm-white);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: var(--text-body);
  color: rgba(250, 249, 246, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-warm-white);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(250, 249, 246, 0.1);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copyright {
  font-size: var(--text-small);
  color: rgba(250, 249, 246, 0.5);
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal a {
  font-size: var(--text-small);
  color: rgba(250, 249, 246, 0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--color-warm-white);
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1A3A4A 0%, #23485c 50%, #1A3A4A 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.cta-section::before,
.cta-section::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}

.cta-section::before {
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, rgba(232, 223, 208, 0.35) 0%, rgba(232, 223, 208, 0) 70%);
}

.cta-section::after {
  bottom: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(184, 92, 56, 0.25) 0%, rgba(184, 92, 56, 0) 70%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: var(--color-warm-white);
  margin-bottom: var(--space-md);
}

.cta-section p {
  color: rgba(250, 249, 246, 0.8);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-xl);
}

/* ========================================
   TWO-COLUMN LAYOUTS
   ======================================== */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}

.two-col-reverse {
  composes: two-col;
}

@media (min-width: 1024px) {
  .two-col-reverse .two-col-content {
    order: 2;
  }
  
  .two-col-reverse .two-col-media {
    order: 1;
  }
}

/* For contact page: form + info */
.two-col-60-40 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .two-col-60-40 {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-3xl);
  }
}
