/* CSS Variables - Dark Theme with miso brown */
:root {
  --color-bg: #0c0a09;
  --color-bg-alt: #1a1512;
  --color-text: #faf7f2;
  --color-text-muted: #9a918a;
  --color-accent: #faf7f2;
  --color-border: #2c2420;
  --font-body: 'Söhne', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'Recoleta', Georgia, serif;
  --edge-padding: clamp(1.5rem, 4vw, 3rem);
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Alignment system: content aligns with "miso" wordmark */
  --content-indent: 116px;
  --header-icon-width: 23px;
  --header-gap: 56px;
  /* Header starts earlier so icon + gap + miso lands at content-indent */
  --header-indent: calc(var(--content-indent) - var(--header-icon-width) - var(--header-gap));
}

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

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, width, height;
}

.cursor.cursor-hover {
  width: 40px;
  height: 40px;
}

.cursor.cursor-click {
  transform: translate(-50%, -50%) scale(0.8);
}

/* Hide default cursor */
body {
  cursor: none;
}

a, button, [role="button"], input, textarea, select, .service-item {
  cursor: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Intro Overlay */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease 0.3s, visibility 0s 0.9s;
}

.intro-logo {
  width: 50%;
  max-width: 600px;
  overflow: hidden;
}

.intro-logo svg {
  width: 100%;
  height: auto;
}

.intro-logo svg path {
  fill: var(--color-text);
}

/* Intro text animation */
.intro-text {
  opacity: 0;
  filter: blur(20px);
  animation: textFadeIn 1.5s var(--transition-smooth) 0.15s forwards;
}

.intro-text path {
  fill: var(--color-text);
}

@keyframes textFadeIn {
  0% {
    opacity: 0;
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
  }
}

/* Transitioning state */
.intro-overlay.transitioning .intro-text {
  animation: textFadeOut 0.65s cubic-bezier(0.77, 0, 0.175, 1) forwards !important;
}

@keyframes textFadeOut {
  0% {
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    filter: blur(20px);
  }
}

/* Body locked during intro */
body.intro-active {
  overflow: hidden;
}

/* Main content hidden during intro */
body.intro-active .site-header,
body.intro-active .content {
  opacity: 0;
}


/* Fade in main content after intro */
.site-header,
.content {
  transition: opacity 0.6s ease;
}

body:not(.intro-active) .site-header,
body:not(.intro-active) .content {
  opacity: 1;
}

/* ========================================
   SITE HEADER - Play.studio inspired
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--content-indent) 16px var(--header-indent);
  z-index: 100;
  background-color: transparent;
  mix-blend-mode: difference;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  gap: var(--header-gap);
}

.icon-wrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.header-icon {
  height: 16px;
  width: var(--header-icon-width);
  color: var(--color-text);
}

/* Eyes that appear on hover */
.icon-eyes {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.icon-eye {
  width: 5px;
  height: 5px;
  background-color: var(--color-text);
  border-radius: 50%;
  display: block;
}

/* Show eyes on hover */
.header-logo:hover .icon-eyes {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.header-miso {
  height: 30px;
  width: auto;
  transition: opacity 0.4s ease;
}

.header-miso path {
  fill: var(--color-text);
}

/* Show header logo after intro */
body:not(.intro-active) .header-logo {
  opacity: 1;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 3rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body:not(.intro-active) .header-nav {
  opacity: 1;
}

/* Hide nav and miso text on scroll - only icon remains */
.site-header.nav-hidden .header-nav,
.site-header.nav-hidden .header-miso {
  opacity: 0;
  pointer-events: none;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
  transition: opacity 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  opacity: 0.7;
}


/* ========================================
   MAIN CONTENT - Play.studio inspired
   ======================================== */
.content {
  background-color: var(--color-bg);
  padding: 0;
  min-height: 100vh;
}

/* Hero Statement Section */
.hero-statement {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px var(--content-indent);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 300;
  line-height: 1.4;
  width: 100%;
  max-width: 600px;
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
  text-align: left;
}

.hero-tagline .highlight {
  color: var(--color-text-muted);
}

/* Services Section */
.services-section {
  padding: calc(var(--edge-padding) * 3) var(--content-indent);
  border-top: 1px solid var(--color-border);
}

.services-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background-color: var(--color-border);
}

.service-item {
  background-color: var(--color-bg);
  padding: 2rem;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.service-item:hover {
  background-color: var(--color-bg-alt);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Stats Section */
.stats-section {
  padding: calc(var(--edge-padding) * 4) var(--content-indent);
  border-top: 1px solid var(--color-border);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.stats-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

.stats-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.stats-link:hover {
  color: var(--color-text);
}

.stats-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.stats-link:hover::after {
  transform: translateX(4px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-item {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 280px;
}

/* CTA Section */
.cta-section {
  padding: calc(var(--edge-padding) * 4) var(--content-indent);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: 2rem;
  max-width: 800px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background-color: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  transition: transform 0.3s var(--transition-smooth), opacity 0.3s ease;
}

.cta-button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.cta-button::after {
  content: '→';
}

/* Footer */
.site-footer {
  padding: calc(var(--edge-padding) * 2) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-row-icon {
  padding-left: var(--content-indent);
}

.footer-icon {
  height: 14px;
  width: auto;
  color: var(--color-text);
}

.footer-row-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 0 var(--content-indent);
  gap: 2rem;
}

.footer-miso-wrap {
  display: flex;
  align-items: center;
}

.footer-miso {
  height: 18px;
  width: auto;
}

.footer-miso path {
  fill: var(--color-text);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-contact {
  text-align: right;
}

.footer-email {
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-email:hover {
  opacity: 0.7;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Dark section - now inverted to light */
.light-section {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-radius: 1rem;
  padding: calc(var(--edge-padding) * 3);
}

/* Smooth scroll reveal animations */
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: revealUp 0.8s var(--transition-smooth) forwards;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

/* ========================================
   RESPONSIVE - Tablet (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
  :root {
    --content-indent: 60px;
    --header-gap: 32px;
  }
  
  .header-nav {
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   RESPONSIVE - Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
  :root {
    --content-indent: 56px;
    --header-icon-width: 18px;
    --header-gap: 20px;
  }
  
  /* Hide custom cursor on touch devices */
  .cursor {
    display: none !important;
  }
  
  body, a, button, [role="button"], input, textarea, select, .service-item {
    cursor: auto;
  }
  
  .site-header {
    height: 60px;
  }
  
  .header-icon {
    height: 14px;
    width: var(--header-icon-width);
  }
  
  .header-miso {
    height: 24px;
  }
  
  .header-nav {
    display: none;
  }
  
  .hero-statement {
    min-height: 80vh;
    padding: 100px var(--content-indent) 60px;
  }
  
  .hero-tagline {
    font-size: 24px;
    margin-bottom: 2rem;
  }
  
  .services-section {
    padding: calc(var(--edge-padding) * 2) var(--content-indent);
  }
  
  .services-label {
    margin-bottom: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-item {
    padding: 1.5rem;
  }
  
  .stats-section {
    padding: calc(var(--edge-padding) * 2) var(--content-indent);
  }
  
  .stats-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stat-item {
    padding: 1.5rem 0;
  }
  
  .stat-label {
    max-width: 100%;
  }
  
  .cta-section {
    padding: calc(var(--edge-padding) * 2) var(--content-indent);
  }
  
  .cta-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    margin-bottom: 1.5rem;
  }
  
  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.8125rem;
  }
  
  .site-footer {
    padding: calc(var(--edge-padding) * 1.5) 0;
    gap: 1rem;
  }
  
  .footer-row-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 0 var(--content-indent);
  }
  
  .footer-contact {
    text-align: left;
  }
  
  .intro-logo {
    width: 70%;
    max-width: 300px;
  }
}

/* ========================================
   RESPONSIVE - Small Mobile (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
  :root {
    --content-indent: 48px;
    --header-icon-width: 16px;
    --header-gap: 16px;
  }
  
  .hero-statement {
    padding: 80px var(--content-indent) 40px;
  }
  
  .hero-tagline {
    font-size: 20px;
  }
  
  .service-item {
    padding: 1.25rem;
  }
  
  .service-title {
    font-size: 1.125rem;
  }
  
  .stat-number {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  
  .cta-title {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }
  
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
}
