/* ==========================================================================
   DIGITAL STRATEGY AGENCY — V2 "BUTTER" DESIGN SYSTEM
   Palette: Ink Black (#171516), Warm Ivory (#F4F0EA), Signature Pink (#EE1674), Stone White (#EBE5DC)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,400;1,600&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@300;400;600;700;800&display=swap');

:root {
  --color-ink: #171516;
  --color-ivory: #F4F0EA;
  --color-pink: #EE1674;
  --color-pink-glow: rgba(238, 22, 116, 0.4);
  --color-stone: #EBE5DC;
  --color-stone-glass: rgba(235, 229, 220, 0.12);
  --color-glass-border: rgba(255, 255, 255, 0.15);
  --color-glass-border-dark: rgba(23, 21, 22, 0.12);
  --color-ink-glass: rgba(23, 21, 22, 0.65);
  
  --font-display: 'Syne', sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'Space Mono', monospace;

  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-butter: cubic-bezier(0.25, 1, 0.3, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --z-grain: 9990;
  --z-transition: 9995;
  --z-cursor: 9999;
}

/* Base Reset & Grain Overlay */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-display);
  background-color: var(--color-ink);
  color: var(--color-ivory);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
}

/* Film Grain Texture - Fixed position site-wide */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* Magnetic Glow Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background-color: var(--color-pink);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-elastic), height 0.3s var(--ease-elastic), background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 15px var(--color-pink-glow);
  mix-blend-mode: exclusion;
}

.custom-cursor.is-hovered {
  width: 52px;
  height: 52px;
  background-color: var(--color-pink);
  box-shadow: 0 0 35px var(--color-pink);
}

.custom-cursor.is-text {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  background-color: var(--color-ivory);
}

/* Custom Selection */
::selection {
  background: var(--color-pink);
  color: var(--color-ink);
}

/* Typography & Kinetic Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  word-wrap: break-word;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  display: inline-block;
  transition: transform 0.4s var(--ease-elastic), color 0.3s ease;
  will-change: transform;
}

.serif-italic.hover-elastic:hover {
  transform: skewX(-12deg) scaleX(1.08) translateY(-2px);
  color: var(--color-pink);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(244, 240, 234, 0.6);
}

/* Variable Weight Scroll Morph */
.weight-morph {
  font-weight: 300;
  transition: font-weight 0.1s linear;
  will-change: font-weight;
}

/* Distortion / Liquid Type Ripple on Load */
@keyframes liquidRipple {
  0% {
    filter: url('#liquid-distort-filter');
    transform: scale(0.96) translateY(12px);
    opacity: 0;
  }
  60% {
    filter: url('#liquid-distort-filter');
    transform: scale(1.02) translateY(-2px);
    opacity: 0.9;
  }
  100% {
    filter: none;
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.liquid-type-entry {
  animation: liquidRipple 1.4s var(--ease-butter) forwards;
}

/* Colors & Surfaces */
.bg-ink {
  background-color: var(--color-ink);
  color: var(--color-ivory);
  position: relative;
}

.bg-ink-mesh {
  background-color: var(--color-ink);
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(238, 22, 116, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(238, 22, 116, 0.08) 0%, transparent 40%);
  color: var(--color-ivory);
}

.bg-ivory {
  background-color: var(--color-ivory);
  color: var(--color-ink);
  position: relative;
}

.bg-ivory .mono-label {
  color: rgba(23, 21, 22, 0.6);
}

/* Glass Panels */
.glass-panel {
  background: var(--color-stone-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s var(--ease-elastic), box-shadow 0.4s ease, border-color 0.3s ease;
}

.bg-ivory .glass-panel {
  background: rgba(235, 229, 220, 0.65);
  border: 1px solid var(--color-glass-border-dark);
  box-shadow: 0 15px 35px rgba(23, 21, 22, 0.08);
}

.glass-panel:hover {
  border-color: rgba(238, 22, 116, 0.4);
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* mix-blend-mode: difference; */
  transition: padding 0.3s ease;
  background-color: #f5f5f5;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-pink);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--color-pink);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #181818;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding-bottom: 4px;
  transition: opacity 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-pink);
  transition: width 0.3s var(--ease-elastic);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: rgb(0 0 0);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-elastic);
}

.nav-cta-btn:hover {
  background: var(--color-pink);
  border-color: var(--color-pink);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 25px var(--color-pink-glow);
}

/* Mobile Menu Toggle Hamburger */
.mobile-menu-btn {
  display: none;
  background: #0d0c0d;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  position: relative;
  z-index: 1002;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.mobile-menu-btn span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.mobile-menu-btn.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--color-pink);
}

.mobile-menu-btn.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--color-pink);
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(23, 21, 22, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-butter), transform 0.4s var(--ease-butter);
  transform: translateY(-10px);
}

.mobile-nav-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav-drawer a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-ivory);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s ease, transform 0.3s var(--ease-elastic);
}

.mobile-nav-drawer a.active,
.mobile-nav-drawer a:hover {
  color: var(--color-pink);
  transform: scale(1.08);
}

/* Responsive Grid System Classes */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.col-span-12 { grid-column: span 12; }
.col-span-8  { grid-column: span 8; }
.col-span-7  { grid-column: span 7; }
.col-span-6  { grid-column: span 6; }
.col-span-5  { grid-column: span 5; }
.col-span-4  { grid-column: span 4; }
.col-span-2  { grid-column: span 2; }

/* 3D Tilt Canvas Container */
.tilt-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.tilt-inner {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
}

.specular-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.tilt-card:hover .specular-shine {
  opacity: 1;
}

/* Split-Flap Numerals */
.split-flap-wrap {
  display: inline-flex;
  font-family: var(--font-mono);
  font-weight: 700;
  perspective: 400px;
}

.split-flap-digit {
  position: relative;
  display: inline-block;
  padding: 2px 6px;
  background: rgba(23, 21, 22, 0.9);
  color: var(--color-pink);
  border: 1px solid rgba(238, 22, 116, 0.3);
  border-radius: 4px;
  margin: 0 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.split-flap-digit.flipping {
  animation: flipDigit 0.6s var(--ease-elastic);
}

@keyframes flipDigit {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-90deg); background: var(--color-pink); color: var(--color-ink); }
  100% { transform: rotateX(0deg); }
}

/* Asymmetric Bento Layout Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.bento-hero-item {
  grid-column: span 8;
  min-height: 480px;
}

.bento-tall-item {
  grid-column: span 4;
  min-height: 480px;
}

.bento-wide-item {
  grid-column: span 7;
  min-height: 380px;
}

.bento-square-item {
  grid-column: span 5;
  min-height: 380px;
}

/* Z-Depth Layering & Overlaps */
.z-layer-text {
  position: relative;
  z-index: 10;
}

.z-layer-img {
  position: relative;
  z-index: 5;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.z-layer-float {
  position: absolute;
  z-index: 15;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.negative-bleed-top {
  margin-top: -80px;
  position: relative;
  z-index: 20;
}

/* Buttons & Elastic Interactions */
.btn-butter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 36px;
  background-color: var(--color-pink);
  color: #fff;
  border: none;
  border-radius: 60px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px var(--color-pink-glow);
  transition: transform 0.4s var(--ease-elastic), box-shadow 0.4s ease, background-color 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.btn-butter::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.btn-butter:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 18px 45px rgba(238, 22, 116, 0.55);
}

.btn-butter:hover::before {
  left: 100%;
}

.btn-butter-secondary {
  background-color: transparent;
  color: var(--color-ivory);
  border: 1px solid var(--color-glass-border);
  backdrop-filter: blur(12px);
  box-shadow: none;
}

.btn-butter-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-pink);
  color: var(--color-pink);
  box-shadow: 0 10px 30px rgba(238, 22, 116, 0.2);
}

/* Liquid Blob Page Transition Overlay */
.liquid-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-transition);
  pointer-events: none;
}

.liquid-transition-overlay svg {
  width: 100%;
  height: 100%;
}

.blob-path {
  fill: var(--color-pink);
  transition: transform 0.7s var(--ease-butter);
}

/* Section Layout Spacing */
.section-padding {
  padding: 150px 60px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
}

/* Form Styles with Elastic Underline */
.form-group {
  position: relative;
  margin-bottom: 40px;
}

.form-control {
  width: 100%;
  padding: 16px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(23, 21, 22, 0.2);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-ink);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-label {
  position: absolute;
  top: 16px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(23, 21, 22, 0.5);
  pointer-events: none;
  transition: transform 0.4s var(--ease-elastic), color 0.3s ease, font-size 0.3s ease;
}

.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
  transform: translateY(-28px);
  font-size: 0.7rem;
  color: var(--color-pink);
}

.form-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-pink);
  transition: width 0.4s var(--ease-elastic);
}

.form-control:focus ~ .form-underline {
  width: 100%;
}

/* Footer Section */
.site-footer {
  background-color: #0d0c0d;
  color: var(--color-ivory);
  padding: 80px 60px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* SVG Displacement Filter Container */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (TABLETS & MOBILE PHONES)
   ========================================================================== */

@media (max-width: 1024px) {
  .site-header { padding: 20px 24px; }
  .section-padding { padding: 100px 24px; }
  .grid-12 { gap: 20px; }

  /* Collapse desktop grid spans to full width on tablets & phones */
  .col-span-8, .col-span-7, .col-span-6, .col-span-5, .col-span-4, .col-span-2 {
    grid-column: span 12 !important;
  }

  .bento-hero-item, .bento-tall-item, .bento-wide-item, .bento-square-item {
    grid-column: span 12 !important;
    min-height: 360px;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .nav-links, .nav-cta-btn { display: none !important; }
  .mobile-menu-btn { display: flex !important; }

  /* Spacing & Layout */
  .section-padding { padding: 70px 18px !important; }
  .site-header { padding: 16px 20px !important; }
  .negative-bleed-top { margin-top: 0 !important; }
  .custom-cursor { display: none !important; }
  .container-wide { padding: 0 4px; }

  /* Floating Z-Layer Glass Cards on Mobile */
  .z-layer-float {
    position: relative !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin-top: 20px !important;
    box-shadow: none !important;
  }

  /* Glass Panels Padding on Mobile */
  .glass-panel {
    padding: 24px 20px !important;
    border-radius: 14px !important;
  }

  /* Flex Button Wrappers */
  .hero-btn-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 14px !important;
  }

  .btn-butter, .btn-butter-secondary {
    width: 100% !important;
    padding: 16px 24px !important;
    font-size: 0.8rem !important;
  }

  /* Typography Adjustments for Mobile */
  h1 { font-size: clamp(2.3rem, 9vw, 4rem) !important; }
  h2 { font-size: clamp(1.8rem, 7vw, 3rem) !important; }
  h3 { font-size: 1.5rem !important; }

  /* Service Rows Padding */
  .tilt-card.glass-panel {
    padding: 24px 18px !important;
  }

  /* Footer */
  .site-footer {
    padding: 60px 20px 30px !important;
    text-align: center;
  }
  .site-footer .container-wide {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 20px !important;
  }

  /* Form Container Padding */
  .glass-panel form {
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  .section-padding { padding:110px 14px 50px 14px !important; }
  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.65rem !important; }
  .mono-label { font-size: 0.7rem !important; }
}
