@import 'tailwindcss';
@import './shadcn.css';

@custom-variant dark (&:is(.dark *));

@theme inline {
  --font-heading: var(--font-plus-jakarta), var(--font-source-sans), system-ui, sans-serif;
  --font-sans: var(--font-source-sans), system-ui, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', monospace;
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --color-foreground: var(--foreground);
  --color-background: var(--background);
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);
}

:root {
  /* Rokyan brand — magenta #90206e (live topnav) + gold #dea004 + teal #097263 */
  color-scheme: light;
  --background: oklch(0.988 0.006 343);
  --foreground: oklch(0.24 0.04 343);
  --primary: oklch(0.455 0.167 343.2);
  --primary-foreground: oklch(0.99 0.005 343);
  --card: color-mix(in oklch, var(--primary) 4%, white);
  --card-foreground: oklch(0.24 0.04 343);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.24 0.04 343);
  --secondary: oklch(0.495 0.088 179.2);
  --secondary-foreground: oklch(0.99 0.005 180);
  --muted: oklch(0.96 0.01 343);
  --muted-foreground: oklch(0.46 0.03 343);
  --accent: oklch(0.746 0.154 80.6);
  --accent-foreground: oklch(0.24 0.04 343);
  --destructive: oklch(0.55 0.2 25);
  --border: oklch(0.91 0.015 343);
  --input: oklch(0.945 0.01 343);
  --ring: oklch(0.455 0.167 343.2);
  --chart-1: oklch(0.455 0.167 343.2);
  --chart-2: oklch(0.495 0.088 179.2);
  --chart-3: oklch(0.746 0.154 80.6);
  --chart-4: oklch(0.46 0.03 343);
  --chart-5: oklch(0.35 0.08 343);
  --radius: 0.5rem;
  --sidebar: oklch(0.985 0.006 343);
  --sidebar-foreground: oklch(0.24 0.04 343);
  --sidebar-primary: oklch(0.455 0.167 343.2);
  --sidebar-primary-foreground: oklch(0.99 0.005 343);
  --sidebar-accent: oklch(0.495 0.088 179.2);
  --sidebar-accent-foreground: oklch(0.99 0.005 180);
  --sidebar-border: oklch(0.91 0.015 343);
  --sidebar-ring: oklch(0.455 0.167 343.2);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground overflow-x-hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    letter-spacing: 0.01em;
    line-height: 1.6;
  }
  html {
    @apply font-sans scroll-smooth overflow-x-hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  button:not(:disabled),
  [role='button']:not([aria-disabled='true']) {
    cursor: pointer;
  }
  button:disabled,
  [role='button'][aria-disabled='true'] {
    cursor: not-allowed;
  }
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.015em;
    line-height: 1.25;
    text-wrap: balance;
  }
  p {
    letter-spacing: 0.01em;
    line-height: 1.7;
  }
}

@layer utilities {
  .font-heading {
    font-family: var(--font-heading);
    letter-spacing: 0.015em;
    font-feature-settings: 'kern' 1, 'liga' 1;
  }
  .section-padding {
    @apply py-24 md:py-32;
  }
  .container-wide {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
  }
  .text-balance {
    text-wrap: balance;
  }
  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }
}

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

.animate-marquee {
  animation: marquee 96s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .animate-marquee {
    animation: none;
  }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

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

.animate-fade-up {
  animation: fade-up 0.7s ease-out both;
}

@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up {
    animation: none;
  }

  .motion-safe\:animate-\[hero-zoom_18s_ease-out_forwards\] {
    animation: none !important;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-in.fade-in.zoom-in-95 {
  animation: dialog-in 0.2s ease-out forwards;
}

/* Homepage 3D decorative accents */
@keyframes home-shape-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

@keyframes home-shape-orbit {
  0%,
  100% {
    transform: rotateX(18deg) rotateY(-24deg) translateY(0);
  }
  50% {
    transform: rotateX(22deg) rotateY(-18deg) translateY(-10px);
  }
}

@keyframes home-shape-tilt {
  0%,
  100% {
    transform: rotateX(62deg) rotateZ(-18deg);
  }
  50% {
    transform: rotateX(58deg) rotateZ(-12deg);
  }
}

@keyframes home-shape-spin {
  0% {
    transform: rotateX(20deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(20deg) rotateY(360deg);
  }
}

.home-shape-float {
  animation: home-shape-float 9s ease-in-out infinite;
}

.home-shape-float-delayed {
  animation: home-shape-float 11s ease-in-out infinite;
  animation-delay: 1.4s;
}

.home-shape-orbit {
  animation: home-shape-orbit 10s ease-in-out infinite;
}

.home-shape-tilt {
  animation: home-shape-tilt 12s ease-in-out infinite;
}

.home-shape-spin {
  animation: home-shape-spin 18s linear infinite;
  transform-style: preserve-3d;
}

@media (prefers-reduced-motion: reduce) {
  .home-shape-float,
  .home-shape-float-delayed,
  .home-shape-orbit,
  .home-shape-tilt,
  .home-shape-spin {
    animation: none !important;
  }
}

/* Elevated logo plate used on homepage clients section */
.home-logo-plate {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(27, 42, 74, 0.08),
    0 2px 6px rgba(27, 42, 74, 0.05);
  transform: translateZ(0);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.home-logo-plate:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 40px rgba(27, 42, 74, 0.12),
    0 4px 10px rgba(27, 42, 74, 0.06);
}

/* Homepage service cards */
.home-service-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px rgba(27, 42, 74, 0.06),
    0 2px 8px rgba(27, 42, 74, 0.03);
  transform: translateZ(0);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.home-service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in oklch, var(--secondary) 35%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 22px 48px rgba(27, 42, 74, 0.12),
    0 6px 14px rgba(27, 42, 74, 0.05);
}

.home-service-card:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .home-service-card,
  .home-logo-plate {
    transition: none;
  }

  .home-service-card:hover,
  .home-logo-plate:hover {
    transform: none;
  }
}

/* Header submenu options — soft brand background, no border */
.nav-sub-option {
  display: block;
  border-radius: 0.65rem;
  background: oklch(0.97 0.012 343);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-sub-option__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: inherit;
  padding: 0.45rem 0.7rem;
}

.nav-sub-option__icon {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: oklch(0.455 0.167 343.2 / 0.1);
  color: oklch(0.455 0.167 343.2);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-sub-option__icon svg {
  height: 0.85rem;
  width: 0.85rem;
}

.nav-sub-option__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: oklch(0.28 0.04 343);
  transition: color 0.2s ease;
}

.nav-sub-option__desc {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  color: oklch(0.46 0.03 343);
  transition: color 0.2s ease;
}

.nav-sub-option:hover {
  background: oklch(0.455 0.167 343.2 / 0.1);
  box-shadow: 0 4px 14px oklch(0.455 0.167 343.2 / 0.08);
}

.nav-sub-option:hover .nav-sub-option__icon {
  background: oklch(0.455 0.167 343.2);
  color: white;
}

.nav-sub-option:hover .nav-sub-option__title {
  color: oklch(0.455 0.167 343.2);
}

.nav-sub-option:hover .nav-sub-option__desc {
  color: oklch(0.36 0.05 343);
}

.nav-sub-option[data-active='true'] {
  background: oklch(0.455 0.167 343.2 / 0.12);
}

.nav-sub-option[data-active='true'] .nav-sub-option__icon {
  background: oklch(0.455 0.167 343.2);
  color: white;
}

.nav-sub-option[data-active='true'] .nav-sub-option__title {
  color: oklch(0.455 0.167 343.2);
}

.nav-sub-option[data-active='true'] .nav-sub-option__desc {
  color: oklch(0.38 0.04 343);
}

.nav-sub-option--compact .nav-sub-option__inner {
  padding: 0.4rem 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
  .nav-sub-option {
    transition: none;
  }
}
