responsive.css

7.82 KB
12/11/2025 13:10
CSS
responsive.css
/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero {
    padding: calc(var(--spacing-xxl) + var(--spacing-xl)) 0;
  }
}
/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  .countdown {
    gap: var(--spacing-sm);
  }
  .countdown-item {
    min-width: 70px;
    padding: var(--spacing-sm);
  }
}
/* Laptop (768px - 1023px) */
@media (max-width: 1023px) {
  .container {
    max-width: 720px;
  }
  .nav-menu {
    gap: var(--spacing-sm);
  }
  .nav-link {
    font-size: 14px;
  }
  .hero-title {
    font-size: clamp(36px, 5vw, 56px);
  }
  .hero-subtitle {
    font-size: 18px;
  }
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
/* Tablet (481px - 767px) */
@media (max-width: 767px) {
  .container {
    max-width: 540px;
    padding: 0 var(--spacing-md);
  }
  .nav-menu {
    display: none;
    /* Simplify for mobile - could add hamburger menu */
  }
  .theme-toggle {
    right: var(--spacing-sm);
    width: 48px;
    height: 48px;
  }
  .hero {
    min-height: 80vh;
    padding: calc(var(--spacing-xxl) + 80px) 0 var(--spacing-xl);
  }
  .logo-large svg {
    width: 80px;
    height: 80px;
  }
  .hero-title {
    font-size: clamp(28px, 6vw, 40px);
    margin-bottom: var(--spacing-sm);
  }
  .hero-subtitle {
    font-size: 16px;
    margin-bottom: var(--spacing-lg);
  }
  .countdown-container h3 {
    font-size: 16px;
  }
  .countdown {
    gap: var(--spacing-xs);
  }
  .countdown-item {
    min-width: 60px;
    padding: var(--spacing-xs);
  }
  .countdown-number {
    font-size: 24px;
  }
  .countdown-label {
    font-size: 10px;
  }
  .section-title {
    font-size: clamp(28px, 5vw, 36px);
  }
  .about,
  .services,
  .contact {
    padding: var(--spacing-xl) 0;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  .service-card {
    padding: var(--spacing-md);
  }
  .service-icon {
    width: 48px;
    height: 48px;
  }
  .service-icon svg {
    width: 24px;
    height: 24px;
  }
  .stat-item {
    padding: var(--spacing-sm);
  }
  .stat-number {
    font-size: 36px;
  }
  .greeting-message {
    font-size: 18px;
  }
  .contact-form {
    padding: var(--spacing-md);
  }
}
/* Mobile (320px - 480px) */
@media (max-width: 480px) {
  :root {
    --spacing-xs: 4px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
  }
  .container {
    padding: 0 var(--spacing-sm);
  }
  .header {
    padding: var(--spacing-xs) 0;
  }
  .nav {
    padding: var(--spacing-sm) 0;
  }
  .brand-text {
    font-size: 16px;
  }
  .logo svg {
    width: 32px;
    height: 32px;
  }
  .hero {
    min-height: 70vh;
    padding: calc(var(--spacing-xxl) + 60px) 0 var(--spacing-lg);
  }
  .hero-logo {
    margin-bottom: var(--spacing-md);
  }
  .logo-large svg {
    width: 60px;
    height: 60px;
  }
  .hero-title {
    font-size: clamp(24px, 8vw, 32px);
    line-height: 1.3;
  }
  .hero-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }
  .countdown-container {
    margin-top: var(--spacing-lg);
  }
  .countdown-container h3 {
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
  }
  .countdown {
    gap: 6px;
  }
  .countdown-item {
    min-width: 50px;
    padding: 6px;
  }
  .countdown-number {
    font-size: 18px;
  }
  .countdown-label {
    font-size: 8px;
  }
  .section-title {
    font-size: clamp(24px, 6vw, 28px);
    margin-bottom: var(--spacing-xs);
  }
  .section-decoration {
    width: 60px;
    height: 3px;
  }
  .about-text p {
    font-size: 16px;
    line-height: 1.6;
  }
  .stat-number {
    font-size: 28px;
  }
  .stat-label {
    font-size: 12px;
  }
  .service-card {
    padding: var(--spacing-sm);
  }
  .service-title {
    font-size: 20px;
  }
  .service-description {
    font-size: 16px;
  }
  .greeting-message {
    font-size: 16px;
    line-height: 1.6;
  }
  .contact-item {
    font-size: 14px;
  }
  .contact-form {
    padding: var(--spacing-sm);
  }
  .form-group input,
  .form-group textarea {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 16px;
    /* Prevent zoom on iOS */
  }
  .submit-btn {
    padding: var(--spacing-sm);
    font-size: 14px;
  }
  .footer-text {
    font-size: 14px;
  }
}
/* Small Mobile (up to 319px) */
@media (max-width: 319px) {
  .container {
    padding: 0 var(--spacing-xs);
  }
  .hero-title {
    font-size: 20px;
  }
  .hero-subtitle {
    font-size: 12px;
  }
  .countdown-number {
    font-size: 16px;
  }
  .countdown-label {
    font-size: 7px;
  }
  .service-icon {
    width: 40px;
    height: 40px;
  }
  .service-icon svg {
    width: 20px;
    height: 20px;
  }
}
/* Landscape Mobile Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: calc(var(--spacing-xxl) + 40px) 0 var(--spacing-lg);
  }
  .logo-large svg {
    width: 60px;
    height: 60px;
  }
  .hero-title {
    font-size: clamp(20px, 4vw, 32px);
  }
  .hero-subtitle {
    font-size: 14px;
  }
}
/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo svg,
  .service-icon svg,
  .contact-item svg {
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
  }
}
/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  .service-card:active {
    transform: scale(0.98);
  }
  .theme-toggle:hover {
    transform: none;
  }
  .submit-btn:hover {
    transform: none;
  }
  .nav-link:hover::after {
    width: 0;
  }
  /* Increase touch targets */
  .service-link {
    padding: var(--spacing-sm);
    margin: calc(var(--spacing-sm) * -1);
  }
  .contact-item {
    padding: var(--spacing-sm);
    margin: calc(var(--spacing-sm) * -1);
  }
}
/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    animation: none;
  }
  .countdown-number {
    animation: none;
  }
  .service-card,
  .stat-item,
  .submit-btn {
    transition: none;
  }
  .snowflake {
    display: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --snowfall-white: #1a1a1a;
    --first-frost: #2d2d2d;
    --charcoal: #e5e5e5;
    --winter-mist: #9ca3af;
  }
  .form-group input,
  .form-group textarea {
    border-color: #4b5563;
  }
  .form-group input:focus,
  .form-group textarea:focus {
    border-color: var(--antique-gold);
  }
}
/* Print Styles */
@media print {
  .theme-toggle,
  #snowCanvas,
  .festive-cursor,
  .countdown-container {
    display: none !important;
  }
  .header {
    position: static;
    background: white;
  }
  .hero {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }
  .service-card,
  .stat-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
  * {
    color: black !important;
    background: white !important;
  }
}
/* Accessibility Improvements */
@media (prefers-contrast: high) {
  :root {
    --forest-green: #1a1a1a;
    --antique-gold: #8b6914;
    --charcoal: #000000;
    --winter-mist: #4a4a4a;
  }
  .service-card,
  .stat-item {
    border: 2px solid var(--forest-green);
  }
  .submit-btn {
    border: 2px solid var(--forest-green);
  }
}