:root {
  --gold: #D4AF37;
  --emerald: #046307;
  --midnight: #191970;
  --burgundy: #800020;
  --pearl: #F8F4F0;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--midnight);
  background: var(--pearl);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--midnight);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--gold);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.header {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--midnight) 0%, var(--burgundy) 100%);
  color: var(--pearl);
  z-index: 1000;
  transform: translateY(0);
  transition: transform var(--transition-slow);
}

.header.hidden {
  transform: translateY(-100%);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--pearl);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-menu a {
  color: var(--pearl);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  position: relative;
  transition: color var(--transition-base);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

.nav-menu a:hover::after {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--burgundy) 50%, var(--emerald) 100%);
  overflow: hidden;
  padding: var(--space-xxl) var(--space-lg);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--pearl);
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  color: var(--gold);
  margin-bottom: var(--space-md);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  margin-bottom: var(--space-lg);
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--gold);
  color: var(--midnight);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn:hover {
  background: var(--emerald);
  color: var(--pearl);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--pearl);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--midnight);
}

.section {
  padding: var(--space-xxl) var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
#hero-content  {
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: var(--space-xxl); 
  align-items: center;
}
#beneficios  {
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: var(--space-lg);
}
#automatizacion-inteligente  {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: var(--space-xl);
}
#caracteristicas-destacadas  {
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: var(--space-xl);
}
.grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

.card h3 {
  color: var(--midnight);
  margin-bottom: var(--space-sm);
}

.asymmetric-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.asymmetric-item {
  position: relative;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.asymmetric-item:nth-child(odd) {
  margin-left: 0;
  margin-right: 10%;
  transform: rotate(-1deg);
}

.asymmetric-item:nth-child(even) {
  margin-left: 10%;
  margin-right: 0;
  transform: rotate(1deg);
}

.asymmetric-item:hover {
  transform: rotate(0deg) scale(1.02);
  transition: transform var(--transition-base);
}

.overlap-section {
  position: relative;
  margin: var(--space-xxl) 0;
}

.overlap-section .content {
  position: relative;
  z-index: 2;
  background: white;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: 0 var(--space-lg);
}

.overlap-section .image {
  position: absolute;
  top: -50px;
  right: -30px;
  z-index: 1;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.angled-section {
  position: relative;
  padding: var(--space-xxl) var(--space-lg);
  background: linear-gradient(135deg, var(--pearl) 0%, white 100%);
  transform: skewY(-2deg);
  margin: var(--space-xxl) 0;
}

.angled-section > * {
  transform: skewY(2deg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
}

.product-info {
  padding: var(--space-lg);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  margin: var(--space-sm) 0;
}

.contact-section {
  background: linear-gradient(135deg, var(--midnight) 0%, var(--burgundy) 100%);
  color: var(--pearl);
  padding: var(--space-xxl) var(--space-lg);
  border-radius: var(--radius-lg);
  margin: var(--space-xxl) auto;
  max-width: 800px;
}

.contact-section h2 {
  color: var(--gold);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--pearl);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: var(--pearl);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.checkbox-group label {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.footer {
  background: var(--midnight);
  color: var(--pearl);
  padding: var(--space-lg);
  text-align: center;
  font-size: 0.75rem;
  margin-top: var(--space-xxl);
}

.footer p {
  margin-bottom: var(--space-xs);
}

.map-container {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: white;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  margin: var(--space-lg);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.popup-overlay.active .popup-content {
  transform: scale(1);
}

.popup-close {
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--midnight);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thank-you-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.thank-you-content {
  max-width: 600px;
}

.thank-you-content h1 {
  color: var(--gold);
  margin-bottom: var(--space-lg);
}

.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.error-content h1 {
  font-size: 6rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--midnight) 0%, var(--burgundy) 100%);
    flex-direction: column;
    padding: 0 var(--space-lg);
    transition: max-height 0.4s ease, padding 0.4s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-menu.active {
    max-height: 400px;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .nav-menu a {
    font-size: 1rem;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: color var(--transition-base), padding-left var(--transition-base);
  }

  .nav-menu a:hover {
    padding-left: var(--space-sm);
    color: var(--gold);
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu li:last-child a {
    border-bottom: none;
  }

  .asymmetric-item:nth-child(odd),
  .asymmetric-item:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
    transform: rotate(0deg);
  }

  .overlap-section .image {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    height: auto;
    margin-bottom: var(--space-md);
  }

  .overlap-section .content {
    margin: 0;
  }

  .angled-section {
    transform: skewY(0deg);
  }

  .angled-section > * {
    transform: skewY(0deg);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .section {
    padding: var(--space-lg) var(--space-md);
  }

  .hero {
    min-height: 70vh;
    padding: var(--space-xl) var(--space-md);
  }

  .card {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-content > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg) !important;
  }


  

  .section > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .section > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }

  .card-icon {
    font-size: 2rem;
  }

  .product-price {
    font-size: 1.25rem;
  }

  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
    width: 100%;
    text-align: center;
  }

  .map-container {
    height: 300px;
  }

  .popup-content {
    max-width: calc(100% - var(--space-md));
    padding: var(--space-md);
    margin: var(--space-sm);
  }
}

/* Enhanced 320px breakpoint - Best practices for small mobile devices */
@media (max-width: 320px) {
  /* Base typography optimization */
  html {
    font-size: 12px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }

  body {
    font-size: 0.875rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-x: hidden;
  }

  /* Header optimizations */
  .header {
    padding: 0.75rem 0.75rem;
    position: sticky;
    top: 0;
  }

  .header-container {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .logo {
    font-size: 0.9375rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.03em;
  }

  /* Touch-friendly navigation toggle (min 44x44px) */
  .nav-toggle {
    font-size: 1.375rem;
    padding: 0.625rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .nav-menu {
    width: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    padding: 0 1rem;
  }

  .nav-menu.active {
    max-height: 380px;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .nav-menu a {
    font-size: 0.9375rem;
    padding: 0.875rem 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: color var(--transition-base), padding-left var(--transition-base);
  }

  .nav-menu a:hover {
    padding-left: 0.875rem;
    color: var(--gold);
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu li:last-child a {
    border-bottom: none;
  }
  #hero-content  {
    grid-template-columns: none; 
  }
  #beneficios  {
    grid-template-columns: none; 
  }
  #automatizacion-inteligente  {
    grid-template-columns: none; 
  } 
  #caracteristicas-destacadas  {
    grid-template-columns: none; 
  }
  /* Hero section optimizations */
  .hero {
    min-height: 55vh;
    padding: 2rem 0.75rem;
  }

  .hero-content {
    max-width: 100%;
    padding: 0;
  }

  .hero-content h1 {
    font-size: 1.625rem;
    line-height: 1.2;
    margin-bottom: 0.875rem;
    word-break: break-word;
  }

  .hero-content p {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
  }

  .hero-content > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .hero-content > div[style*="grid-template-columns"] > div:last-child {
    display: none;
  }

  /* Section spacing */
  .section {
    padding: 1.5rem 0.75rem;
  }

  .section-title {
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
  }

  .section-title::after {
    width: 60px;
    height: 2px;
    bottom: -0.625rem;
  }

  /* Grid optimizations */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Card improvements */
  .card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    word-wrap: break-word;
  }

  .card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.1875rem;
    margin-bottom: 0.625rem;
    line-height: 1.3;
  }

  .card p {
    font-size: 0.8125rem;
    line-height: 1.6;
  }

  /* Asymmetric layout fixes */
  .asymmetric-item {
    padding: 1.25rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .asymmetric-item:hover {
    transform: none !important;
  }

  /* Overlap section */
  .overlap-section {
    margin: 1.5rem 0;
  }

  .overlap-section .content {
    padding: 1.25rem;
    margin: 0;
  }

  .overlap-section .image {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }

  /* Product cards */
  .product-card {
    border-radius: var(--radius-md);
  }

  .product-image {
    height: 180px;
  }

  .product-info {
    padding: 1.25rem;
  }

  .product-price {
    font-size: 1.25rem;
  }

  /* Contact section */
  .contact-section {
    padding: 1.5rem 1rem;
    margin: 1.5rem auto;
    border-radius: var(--radius-md);
  }

  .contact-section h2 {
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
  }

  /* Form optimizations - touch-friendly */
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-group label {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.875rem;
    font-size: 0.9375rem;
    min-height: 44px;
    border-radius: var(--radius-md);
    -webkit-appearance: none;
    appearance: none;
  }

  .form-group textarea {
    min-height: 120px;
    resize: vertical;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
    align-items: flex-start;
  }

  .checkbox-group input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
    margin-top: 0.125rem;
    flex-shrink: 0;
  }

  .checkbox-group label {
    font-size: 0.8125rem;
    line-height: 1.5;
    padding-left: 0.5rem;
  }

  /* Button optimizations - touch-friendly (min 44x44px) */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    min-height: 44px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-md);
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
  }

  .btn-secondary {
    margin-top: 0.875rem;
  }

  /* Footer */
  .footer {
    padding: 1.25rem 0.75rem;
    font-size: 0.6875rem;
  }

  .footer p {
    margin-bottom: 0.625rem;
    line-height: 1.5;
  }

  .footer a {
    font-size: 0.6875rem;
    padding: 0.25rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  /* Map container */
  .map-container {
    height: 280px;
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
  }

  /* Popup optimizations */
  .popup-overlay {
    padding: 0.75rem;
  }

  .popup-content {
    max-width: calc(100% - 1.5rem);
    padding: 1.25rem;
    margin: 0;
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }

  .popup-content h2 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .popup-content p {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .popup-close {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  /* Thank you page */
  .thank-you-page {
    min-height: 65vh;
    padding: 2rem 0.75rem;
  }

  .thank-you-content {
    max-width: 100%;
  }

  .thank-you-content > div[style*="font-size: 8rem"] {
    font-size: 4.5rem !important;
  }

  .thank-you-content h1 {
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
  }

  /* Error page */
  .error-page {
    min-height: 65vh;
    padding: 2rem 0.75rem;
  }

  .error-content h1 {
    font-size: 4.5rem;
    margin-bottom: 0.875rem;
    line-height: 1;
  }

  .error-content > div[style*="font-size: 12rem"] {
    font-size: 6.5rem !important;
    line-height: 1;
  }

  .error-content h2 {
    font-size: 1.375rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
  }

  .error-content p {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
  }

  /* Typography scale */
  h1 {
    font-size: 1.625rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.375rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.1875rem;
    line-height: 1.3;
  }

  h4 {
    font-size: 1.0625rem;
    line-height: 1.4;
  }

  p {
    font-size: 0.8125rem;
    line-height: 1.6;
  }

  /* Inline style overrides for better mobile experience */
  .section > div[style*="max-width"] {
    max-width: 100% !important;
  }

  .section > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .section > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .section > div[style*="text-align: center"] {
    margin-bottom: 1.25rem !important;
  }

  .section > div[style*="text-align: center"] > h2 {
    font-size: 1.375rem !important;
    margin-bottom: 0.875rem !important;
  }

  .section > div[style*="text-align: center"] > p {
    font-size: 0.8125rem !important;
    line-height: 1.6 !important;
  }

  /* Icon and size adjustments */
  div[style*="width: 100px"],
  div[style*="width: 80px"],
  div[style*="width: 70px"],
  div[style*="width: 60px"] {
    width: 56px !important;
    height: 56px !important;
  }

  div[style*="font-size: 3rem"],
  div[style*="font-size: 2.5rem"],
  div[style*="font-size: 2rem"] {
    font-size: 1.75rem !important;
  }

  div[style*="font-size: 5rem"],
  div[style*="font-size: 4rem"] {
    font-size: 3rem !important;
  }

  /* Spacing adjustments */
  div[style*="padding: var(--space-xl)"] {
    padding: 1rem !important;
  }

  div[style*="padding: var(--space-xxl)"] {
    padding: 1.25rem !important;
  }

  div[style*="gap: var(--space-xxl)"] {
    gap: 1.25rem !important;
  }

  div[style*="gap: var(--space-xl)"] {
    gap: 1rem !important;
  }

  div[style*="margin-bottom: var(--space-xxl)"] {
    margin-bottom: 1.25rem !important;
  }

  div[style*="margin-bottom: var(--space-xl)"] {
    margin-bottom: 1rem !important;
  }

  /* Image optimizations */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Accessibility improvements */
  a:focus,
  button:focus,
  input:focus,
  textarea:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }

  /* Prevent horizontal scroll */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Better text rendering on small screens */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
}
