/* Global variables */
:root {
  --background: 0 0% 100%;
  --foreground: 217 33% 17%;
  --card: 0 0% 100%;
  --card-foreground: 217 33% 17%;
  --primary: 22 82% 39%;
  --primary-foreground: 0 0% 98%;
  --accent: 32 95% 44%;
  --muted: 213 27% 84%;
  --border: 213 27% 84%;
}

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

body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(
    135deg,
    hsl(var(--primary)),
    color-mix(in srgb, hsl(var(--primary)) 85%, #fff)
  );
  color: hsl(var(--primary-foreground));
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(234, 106, 26, 0.18);
}
.btn-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 28px rgba(234, 106, 26, 0.3);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow: 0 4px 12px rgba(234, 106, 26, 0.22);
}
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, hsl(var(--primary)) 30%, white);
}

.btn {
  background: hsl(var(--primary));
  color: #fff;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(234, 106, 26, 0.18);
}
.btn:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 28px rgba(234, 106, 26, 0.3);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow: 0 4px 12px rgba(234, 106, 26, 0.22);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, hsl(var(--primary)) 30%, white);
}

/* Cards */
.card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
}

/* Utilities */
.text-primary {
  color: hsl(var(--primary));
}
.border-primary {
  border-color: hsl(var(--primary));
}
.bg-primary-5 {
  background: color-mix(in srgb, hsl(var(--primary)) 8%, white);
}
.bg-accent-5 {
  background: color-mix(in srgb, hsl(var(--accent)) 8%, white);
}
.bg-grid {
  background-image:
    linear-gradient(#f4ede8 1px, transparent 1px),
    linear-gradient(90deg, #f4ede8 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}

/* Global polish */
html {
  scroll-behavior: smooth;
}
a {
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}
a:hover {
  opacity: 0.9;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, hsl(var(--primary)) 30%, white);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Gradients */
.grad-hero {
  background-image: linear-gradient(
    135deg,
    color-mix(in srgb, hsl(var(--primary)) 20%, white),
    white 40%,
    color-mix(in srgb, hsl(var(--accent)) 12%, white)
  );
}
.grad-footer {
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, hsl(var(--primary)) 18%, #0f172a),
    #0f172a
  );
}
.grad {
  background-image: linear-gradient(
    135deg,
    color-mix(in srgb, hsl(var(--primary)) 18%, #fff),
    #fff 40%,
    color-mix(in srgb, hsl(var(--accent)) 12%, #fff)
  );
}

/* Decorative blobs */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(48px);
  opacity: 0.25;
  pointer-events: none;
  animation: float 12s ease-in-out infinite alternate;
}
.grad-hero .blob:nth-of-type(2) {
  animation-duration: 14s;
  animation-delay: 0.8s;
}
@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

/* Nav underline effect */
header nav a {
  position: relative;
  transition: color 0.2s ease;
}
header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: hsl(var(--primary));
  transition: width 0.2s ease;
}
header nav a:hover::after,
header nav a.text-primary::after {
  width: 100%;
}

/* Toast notifications */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: hsl(var(--primary));
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.18);
  transform: translateY(10px);
  opacity: 0;
  animation: toast-in 200ms ease forwards;
  z-index: 1000;
}
.toast--hide {
  animation: toast-out 250ms ease forwards;
}
@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes toast-out {
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Blob helpers */
.blob--top-left {
  top: -120px;
  left: -120px;
}
.blob--bottom-right {
  bottom: -140px;
  right: -160px;
}
.blob--top-right {
  top: -100px;
  right: -120px;
}
.blob--300 {
  width: 300px;
  height: 300px;
}
.blob--320 {
  width: 320px;
  height: 320px;
}
.blob--360 {
  width: 360px;
  height: 360px;
}
.blob--380 {
  width: 380px;
  height: 380px;
}
.blob--420 {
  width: 420px;
  height: 420px;
}
.blob--primary {
  background: radial-gradient(
    circle at center,
    hsl(var(--primary)),
    transparent 60%
  );
}
.blob--accent {
  background: radial-gradient(
    circle at center,
    hsl(var(--accent)),
    transparent 60%
  );
}

/* Solid brand background */
.bg-primary-solid {
  background: hsl(var(--primary));
}
