/* ==========================================================================
   Mindful Labs — Design Tokens + Global Styles
   ========================================================================== */

:root {
  /* Brand */
  --teal: #08A878;
  --teal-deep: #067356;
  --teal-ink: #0A2E24;
  --sky: #1689CA;
  --sky-deep: #0E6BA0;
  --coral: #DD4B05;

  /* Surfaces */
  --paper: #FBFAF5;
  --paper-2: #F5F2EA;
  --surface: #FFFFFF;
  --ink: #0A2E24;
  --ink-2: #4A6B62;
  --ink-3: #86968F;
  --line: #E6E4DD;
  --line-strong: #D4D1C6;

  /* Dark surfaces */
  --night: #061612;
  --night-2: #0B1F1A;
  --night-3: #112A24;
  --night-ink: #F6F3EC;
  --night-ink-2: #A5B8B1;
  --night-line: rgba(246, 243, 236, 0.12);

  /* Glass */
  --glass-blur: 40px;
  --glass-light: rgba(255, 255, 255, 0.55);
  --glass-light-border: rgba(10, 46, 36, 0.08);
  --glass-dark: rgba(246, 243, 236, 0.06);
  --glass-dark-border: rgba(246, 243, 236, 0.12);

  /* Typography */
  --font-display: "Instrument Serif", "Pretendard", ui-serif, serif;
  --font-sans: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-kr: "Pretendard Variable", "Pretendard", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Layout */
  --container: 1280px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --radius-xl: 40px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-kr);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--teal); color: var(--paper); }

/* Grain overlay — non-fixed, no blend mode (cheap) */
body::before {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.20;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms cubic-bezier(0.2, 0.7, 0.1, 1), transform 900ms cubic-bezier(0.2, 0.7, 0.1, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
/* Hero reveals: always visible with staggered entry animation */
.hero .reveal {
  opacity: 1 !important;
  transform: none !important;
  animation: heroFadeUp 1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.hero .reveal.delay-1 { animation-delay: 80ms; }
.hero .reveal.delay-2 { animation-delay: 200ms; }
.hero .reveal.delay-3 { animation-delay: 320ms; }
.hero .reveal.delay-4 { animation-delay: 440ms; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }
.reveal.delay-5 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Type helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
}
.serif { font-family: var(--font-display); font-weight: 400; font-style: italic; }
.serif-up { font-family: var(--font-display); font-weight: 400; font-style: normal; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, box-shadow 300ms ease;
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: var(--teal-ink);
  color: var(--paper);
  box-shadow: 0 10px 30px -10px rgba(10, 46, 36, 0.4);
}
.btn--primary:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(8, 168, 120, 0.5);
}
.btn--ghost {
  background: var(--glass-light);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--ghost:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
  transform: translateY(-2px);
}
.btn .arr {
  transition: transform 200ms ease;
}
.btn:hover .arr { transform: translate(3px, -1px); }

.inline-link {
  color: var(--teal-deep);
  position: relative;
  white-space: nowrap;
}
.inline-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 400ms ease;
}
.inline-link:hover::after { transform: scaleX(1); }

/* Section scaffolding */
section {
  position: relative;
  padding: 140px 0;
}
@media (max-width: 900px) {
  section { padding: 96px 0; }
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 72px;
  max-width: 820px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.section-head h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--teal-deep);
}

/* Glass */
.glass {
  background: var(--glass-light);
  border: 1px solid var(--glass-light-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border-radius: var(--radius-lg);
}
.glass-dark {
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border-radius: var(--radius-lg);
}

.blob-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Custom cursor — lightweight: only the dot, no RAF loop, no blend mode */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity 200ms ease, width 200ms ease, height 200ms ease, background 200ms ease;
  will-change: transform;
}
body.cursor-ready .cursor-dot { opacity: 0.7; }
body.cursor-hover .cursor-dot { width: 22px; height: 22px; opacity: 0.85; }

@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}
