/*
Theme Name: Fortronic
Theme URI: https://fortronic.ee
Author: Fortronic OÜ
Description: Fortronic AS — professionaalsete elektri- ja valgustuslahenduste maaletooja
Version: 1.0.0
License: Proprietary
Text Domain: fortronic
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (from React index.css)
   ============================================================ */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 12%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 12%;
  --primary: 0 0% 15%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 95%;
  --secondary-foreground: 0 0% 20%;
  --muted: 0 0% 94%;
  --muted-foreground: 0 0% 45%;
  --accent: 0 85% 45%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 88%;
  --input: 0 0% 88%;
  --ring: 0 85% 45%;
  --radius: 0.75rem;
  --gradient-primary: linear-gradient(135deg, hsl(0 0% 15%) 0%, hsl(0 0% 25%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(0 85% 45%) 0%, hsl(5 90% 50%) 100%);
  --gradient-hero: linear-gradient(180deg, hsl(0 0% 97%) 0%, hsl(0 0% 100%) 100%);
  --shadow-card: 0 4px 24px -4px hsl(0 0% 12% / 0.08);
  --shadow-elevated: 0 12px 40px -8px hsl(0 0% 12% / 0.15);
}

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

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

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

/* ============================================================
   CUSTOM UTILITY CLASSES (from React index.css)
   ============================================================ */
.container-wide {
  width: 100%;
  max-width: 80rem; /* 7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-wide {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-wide {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--gradient-accent);
}

.card-elevated {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card-hover {
  transition: all 0.3s ease-out;
}

.card-hover:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

/* Retro grid background — used on inner page top strip */
.retro-grid-bg {
  --grid-size: 60px;
  background-color: hsl(0 65% 48%);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent var(--grid-size),
      hsl(0 0% 100% / 0.04) var(--grid-size),
      hsl(0 0% 100% / 0.04) calc(var(--grid-size) + 1px)
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent var(--grid-size),
      hsl(0 0% 100% / 0.04) var(--grid-size),
      hsl(0 0% 100% / 0.04) calc(var(--grid-size) + 1px)
    ),
    repeating-conic-gradient(
      hsl(0 50% 55% / 0.6) 0% 25%,
      transparent 0% 50%
    ),
    linear-gradient(
      90deg,
      hsl(0 60% 42%) 0%,
      hsl(0 65% 48%) 30%,
      hsl(0 55% 52%) 60%,
      hsl(0 60% 45%) 100%
    );
  background-size:
    calc(var(--grid-size) + 1px) 100%,
    100% calc(var(--grid-size) + 1px),
    calc(var(--grid-size) * 2) calc(var(--grid-size) * 2),
    100% 100%;
  /* No position: relative here — let Tailwind's .absolute/.relative handle it.
     The ::before pseudo-element is still contained by any positioned ancestor. */
}

.retro-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-conic-gradient(
      hsl(0 40% 70% / 0.35) 0% 25%,
      transparent 0% 50%
    );
  background-size: 120px 120px;
  background-position: 30px 30px;
}

/* Marquee (partner logos) */
.animate-marquee {
  animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Hero entrance animations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: hsl(var(--card) / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.header-topbar {
  display: none;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

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

/* Active nav link */
.nav-link-active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Dropdown */
[x-cloak] { display: none !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-accent {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--accent));
}

.btn-accent:hover {
  background-color: hsl(0 85% 38%);
  color: hsl(var(--accent-foreground));
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}

.btn-outline:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  text-decoration: none;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

/* ============================================================
   ASPECT RATIO
   ============================================================ */
.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-16-10 {
  aspect-ratio: 16 / 10;
}

/* ============================================================
   PROSE (news content)
   ============================================================ */
.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

/* ============================================================
   HERO — homepage entrance animation
   ============================================================ */
.hero-animate {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* ============================================================
   ALPINE TRANSITIONS
   ============================================================ */
.mobile-menu-enter {
  transition: all 0.25s ease-out;
}

/* ============================================================
   WORDPRESS BODY CLASS OVERRIDES
   ============================================================ */
.wp-block-image img,
.wp-post-image {
  max-width: 100%;
  height: auto;
}
