@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

:root {
  --bg-light: #f5f5f5;
  --bg-dark: #0a0a0a;
  --bg-dark-inner: #111111;
  --card-light: #ffffff;
  --card-dark: #141414;
  --card-dark-secondary: #181818;
  --text-dark: #0a0a0a;
  --text-muted-dark: rgba(10, 10, 10, 0.6);
  --text-light: #ffffff;
  --text-muted-light: rgba(255, 255, 255, 0.65);
  --border-light: rgba(0, 0, 0, 0.06);
  --border-light-hover: rgba(0, 0, 0, 0.12);
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-dark-hover: rgba(255, 255, 255, 0.2);
  --accent-green: #c7ff97;
  --font-geist: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

body {
  font-family: var(--font-inter);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--bg-light);
}

/* Display and body font utilities */
.font-display {
  font-family: var(--font-geist);
}

.font-body {
  font-family: var(--font-inter);
}

/* Editorial letter-spacing */
.tracking-display {
  letter-spacing: -0.055em;
}

.tracking-headline {
  letter-spacing: -0.04em;
}

.tracking-label {
  letter-spacing: -0.025em;
}

/* Glassmorphism & Header */
.glass-header {
  background: rgba(245, 245, 245, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glass-badge {
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Grain texture overlay */
.grain-overlay {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Smooth Accordions using CSS Grid trick (FAQ) */
.accordion-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.accordion-wrapper.expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}

.accordion-inner {
  overflow: hidden;
}

/* Plus to Minus indicator rotation */
.rotate-icon {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.expanded .rotate-icon {
  transform: rotate(45deg);
}

/* Services Section Accordion Animation */
.service-accordion-item {
  transition: background-color 0.3s ease;
}

.service-accordion-item.is-expanded {
  background-color: rgba(255, 255, 255, 0.02);
}

.service-bar {
  max-height: 90px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.service-accordion-item.is-expanded .service-bar {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.service-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
}

.service-accordion-item.is-expanded .service-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.service-panel-inner {
  overflow: hidden;
}

.service-accordion-item.is-expanded .rotate-icon {
  transform: rotate(45deg);
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Selection */
::selection {
  background-color: #0a0a0a;
  color: #ffffff;
}

/* Subtle image reveal and hover transforms */
.img-editorial {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .img-editorial {
  transform: scale(1.035);
}

/* ==========================================================================
   Editorial Blog Cards - Smooth Full-Bleed Hover Reveal
   ========================================================================== */
.editorial-hover-card {
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-hover-bg {
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.editorial-hover-card:hover .editorial-hover-bg {
  opacity: 1;
}

.editorial-hover-img {
  transform: scale(1.02);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.editorial-hover-card:hover .editorial-hover-img {
  transform: scale(1.07);
}

.editorial-hover-thumb {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-hover-card:hover .editorial-hover-thumb {
  opacity: 0;
  transform: scale(0.95);
}

.editorial-hover-btn {
  transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-hover-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-hover-card:hover .editorial-hover-icon {
  transform: rotate(90deg);
}

.editorial-hover-text {
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Circular progress ring */
.score-circle-bg {
  stroke: rgba(0, 0, 0, 0.08);
}

.score-circle-fg {
  stroke: #0a0a0a;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.2s ease-out;
}

/* Focus styles for keyboard accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 2px;
}

.dark button:focus-visible,
.dark a:focus-visible,
.dark input:focus-visible,
.dark textarea:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Menu Curtain Slide Down Transition */
#menu-panel {
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

#menu-panel.menu-open {
  transform: translateY(0) !important;
}

/* Client Section Scroll Reveal */
#clients-section {
  transform-origin: center top;
  will-change: transform;
}

@media (min-width: 1024px) {
  #clients-section {
    transform: translateY(-290px) scale(0.95);
  }
}

/* ==========================================================================
   Progressive Blur Bottom Viewport Overlay
   ========================================================================== */
.progressive-blur-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
  user-select: none;
}

@media (min-width: 768px) {
  .progressive-blur-container {
    height: 150px;
  }
}

.progressive-blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform, backdrop-filter;
}

.progressive-blur-layer.layer-1 {
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 55%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 55%);
}

.progressive-blur-layer.layer-2 {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 70%);
}

.progressive-blur-layer.layer-3 {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 85%);
}

.progressive-blur-layer.layer-4 {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 95%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 95%);
}

.progressive-blur-layer.layer-5 {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 1) 100%);
}

.progressive-blur-layer.layer-6 {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 1) 100%);
}