/*
Theme Name: Ehton
Theme URI: https://ehton.eu
Author: Ehton OÜ
Description: Ehton OÜ ehitusfirma veebileht
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Proprietary
Text Domain: ehton
*/

/* ─── CSS Design Tokens (from React index.css) ─── */
:root {
  --background: 220 20% 97%;
  --foreground: 220 25% 10%;

  --card: 0 0% 100%;
  --card-foreground: 220 25% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 220 25% 10%;

  --primary: 4 72% 46%;
  --primary-foreground: 0 0% 100%;

  --secondary: 220 15% 92%;
  --secondary-foreground: 220 25% 10%;

  --muted: 220 15% 92%;
  --muted-foreground: 220 10% 46%;

  --accent: 220 20% 95%;
  --accent-foreground: 220 25% 10%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 220 15% 88%;
  --input: 220 15% 88%;
  --ring: 4 72% 46%;

  --radius: 0.5rem;

  --hero-overlay: linear-gradient(135deg, hsla(220, 25%, 8%, 0.85), hsla(220, 20%, 15%, 0.6));
  --section-dark: 220 25% 8%;
  --section-dark-foreground: 220 15% 90%;
  --warm-stone: 30 15% 55%;
}

/* ─── Base ─── */
html, body {
  overflow-x: hidden;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── Scrollbar hide ─── */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ─── Projects carousel ─── */
.projects-scroll {
  cursor: grab;
}
.projects-nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.projects-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  color: #374151;
  visibility: hidden;
}
.projects-arrow.is-visible {
  visibility: visible;
}
.projects-arrow:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transform: scale(1.05);
}
.projects-progress-track {
  flex: 1;
  height: 3px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}
.projects-progress-thumb {
  height: 100%;
  background: #C84535;
  border-radius: 9999px;
  width: 20%;
}
@media (hover: none) {
  .projects-nav-row {
    display: none;
  }
}

/* ─── Partner carousel animation ─── */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-scroll-x {
  animation: scroll-x 30s linear infinite;
  will-change: transform;
}
.animate-scroll-x:hover {
  animation-play-state: paused;
}

/* ─── Bounce (hero arrow) — Tailwind defines bounce but we ensure it here ─── */
@keyframes ehton-bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50%       { transform: translateY(0);    animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce {
  animation: ehton-bounce 1s infinite;
}

/* ─── Fade animations ─── */
@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.animate-fade-up  { animation: fade-up  0.8s ease-out forwards; }
.animate-fade-in  { animation: fade-in  0.6s ease-out forwards; }

/* ─── Lightbox body lock ─── */
body.lightbox-open {
  overflow: hidden;
}

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