/*
Theme Name: Tomson Transport
Theme URI: https://tomsontransport.ee/
Author: H.Tomson Transport OÜ
Author URI: https://tomsontransport.ee/
Description: H.Tomson Transport OÜ — kallurveod, liiva ja killustiku müük ja vedu Tallinnas ja lähiümbruses alates 2006.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: tomsontransport
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (from React index.css)
   ============================================================ */
:root {
  --background: 210 20% 98%;
  --foreground: 220 25% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 25% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 25% 10%;
  --primary: 24 95% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 20% 14%;
  --secondary-foreground: 0 0% 98%;
  --muted: 210 15% 93%;
  --muted-foreground: 220 10% 45%;
  --accent: 24 80% 95%;
  --accent-foreground: 24 95% 35%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 210 15% 88%;
  --input: 210 15% 88%;
  --ring: 24 95% 50%;
  --radius: 0.75rem;
  --hero-overlay: 220 25% 8%;
  --section-alt: 210 20% 96%;
  --gradient-warm: linear-gradient(135deg, hsl(24 95% 50%), hsl(35 100% 55%));
  --shadow-card: 0 4px 24px -4px hsl(220 25% 10% / 0.08);
  --shadow-elevated: 0 12px 40px -8px hsl(220 25% 10% / 0.15);
}

/* ============================================================
   BASE RESETS
   ============================================================ */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  border-color: hsl(var(--border));
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   UTILITY CLASSES (from React index.css @layer utilities)
   ============================================================ */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--gradient-warm);
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* On light background sections, use a more opaque glass */
.bg-background .glass-card,
.bg-white .glass-card {
  background: hsl(var(--card) / 0.8);
  border-color: hsl(var(--border) / 0.5);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Hero entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll arrow bounce */
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* Accordion (kept from Tailwind config) */
@keyframes accordion-down {
  from { height: 0; }
  to   { height: var(--radix-accordion-content-height); }
}
@keyframes accordion-up {
  from { height: var(--radix-accordion-content-height); }
  to   { height: 0; }
}

/* Intersection Observer animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}
[data-animate-delay="100"] { transition-delay: 0.1s; }
[data-animate-delay="200"] { transition-delay: 0.2s; }
[data-animate-delay="300"] { transition-delay: 0.3s; }
[data-animate-delay="400"] { transition-delay: 0.4s; }

/* Scale animation for gallery */
[data-animate-scale] {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
[data-animate-scale].animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Hero content (CSS-based, no JS needed) */
.hero-content {
  animation: fadeInUp 0.8s ease-out both;
}

/* Bounce arrow */
.hero-scroll-arrow {
  animation: bounce-arrow 2s ease-in-out infinite;
}

/* ============================================================
   GALLERY GRID (asymmetric layout matching React source)
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-grid .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.gallery-item {
  overflow: hidden;
  border-radius: 0.75rem;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: hsl(var(--secondary) / 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.1);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .navbar-inner {
    height: 5rem;
  }
}

.nav-link {
  color: hsl(var(--secondary-foreground) / 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: hsl(var(--primary));
}

/* Mobile menu */
.mobile-menu {
  background: hsl(var(--secondary));
  border-top: 1px solid hsl(var(--border) / 0.1);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   PRICING DARK SECTION
   ============================================================ */
.pricing-section {
  background-color: hsl(var(--secondary));
}

.pricing-section .glass-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   SCROLL OFFSET FOR FIXED HEADER
   ============================================================ */
:target {
  scroll-margin-top: 5rem;
}

section[id] {
  scroll-margin-top: 4rem;
}

@media (min-width: 768px) {
  section[id] {
    scroll-margin-top: 5rem;
  }
}
