/* ───────────────────────────────────────
   Liquid Glass — White & Black
   ─────────────────────────────────────── */
:root {
  --clr-bg: #ffffff;
  --clr-surface: rgba(0, 0, 0, 0.02);
  --clr-surface-hover: rgba(0, 0, 0, 0.04);
  --clr-glass: rgba(0, 0, 0, 0.03);
  --clr-glass-border: rgba(0, 0, 0, 0.08);
  --clr-glass-strong: rgba(0, 0, 0, 0.05);
  --clr-text: #1a1a1a;
  --clr-text-soft: rgba(0, 0, 0, 0.55);
  --clr-text-muted: rgba(0, 0, 0, 0.35);
  --clr-black: #0a0a0a;
  --clr-border: rgba(0, 0, 0, 0.07);

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --blur: 20px;
  --blur-strong: 40px;

  --max-w: 720px;
  --space-page: clamp(1.25rem, 5vw, 3rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── Liquid ambient orbs ── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: .35;
}
body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,0,0,.04) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  animation: floatOrb1 18s ease-in-out infinite;
}
body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,0,0,.03) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: floatOrb2 22s ease-in-out infinite;
}

@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-40px, 60px) scale(1.05); }
  66%      { transform: translate(30px, -30px) scale(.95); }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(50px, -40px) scale(1.08); }
}

img, video, iframe { display: block; max-width: 100%; }

a {
  color: var(--clr-black);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.2);
  transition: border-color .25s ease, opacity .25s ease;
}
a:hover {
  border-color: rgba(0,0,0,.6);
  opacity: .8;
}

/* ───────────────────────────────────────
   Layout
   ─────────────────────────────────────── */
.page-wrapper {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-page);
  position: relative;
  z-index: 1;
}

/* ───────────────────────────────────────
   Glass Mixin
   ─────────────────────────────────────── */
.glass {
  background: var(--clr-glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--clr-glass-border);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.7) inset,
    0 4px 24px rgba(0,0,0,.06);
}

.glass-strong {
  background: var(--clr-glass-strong);
  backdrop-filter: blur(var(--blur-strong));
  -webkit-backdrop-filter: blur(var(--blur-strong));
  border: 1px solid rgba(0,0,0,.1);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.6) inset,
    0 8px 32px rgba(0,0,0,.08);
}

/* ───────────────────────────────────────
   Header
   ─────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 1.75rem var(--space-page) 1rem;
  position: relative;
  z-index: 1;
}
.site-header .logo-text {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clr-text-soft);
  padding: .45rem 1.1rem;
  border-radius: 999px;
  display: inline-block;
}

/* ───────────────────────────────────────
   Badge
   ─────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-black);
  background: rgba(0,0,0,.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,.1);
  padding: .3rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

/* ───────────────────────────────────────
   Post Meta
   ─────────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--clr-text-muted);
  margin-bottom: 1.25rem;
}
.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--clr-text-muted);
}

/* ───────────────────────────────────────
   Typography
   ─────────────────────────────────────── */
.post-title {
  font-size: clamp(1.65rem, 4.5vw, 2.4rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--clr-black);
  margin-bottom: 1.25rem;
}

.post-intro {
  font-size: 1rem;
  color: var(--clr-text-soft);
  line-height: 1.85;
  margin-bottom: 2.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 3px solid rgba(0,0,0,.12);
}

h2.step-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-black);
  margin: 2.75rem 0 .85rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
h2.step-heading .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--clr-bg);
  background: var(--clr-black);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0,0,0,.1);
}

/* ───────────────────────────────────────
   Step Cards — Liquid Glass
   ─────────────────────────────────────── */
.step-card {
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem 1.3rem;
  margin-bottom: 1rem;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.step-card:hover {
  transform: translateY(-3px);
  background: var(--clr-surface-hover);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 12px 40px rgba(0,0,0,.08);
}

.step-card ol {
  padding-left: 1.25rem;
}
.step-card ol li {
  margin-bottom: .5rem;
  color: var(--clr-text);
  font-size: .93rem;
}
.step-card ol li::marker {
  color: var(--clr-text-soft);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: .8em;
  background: rgba(0,0,0,.05);
  color: var(--clr-black);
  padding: .18em .45em;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.08);
}

/* ───────────────────────────────────────
   Callout — Premium Glass
   ─────────────────────────────────────── */
.callout {
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.6rem 1.5rem;
  margin: 3rem 0;
}
.callout-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--clr-black);
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.callout-title svg {
  flex-shrink: 0;
  opacity: .7;
}
.callout ul {
  list-style: none;
  padding: 0;
}
.callout ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .7rem;
  font-size: .9rem;
  color: var(--clr-text-soft);
  line-height: 1.75;
}
.callout ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,.3);
}
.callout strong {
  color: var(--clr-text);
  font-weight: 600;
}

/* ───────────────────────────────────────
   Video Section
   ─────────────────────────────────────── */
.video-section {
  margin: 3.5rem 0 2rem;
}
.video-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  text-align: center;
  color: var(--clr-black);
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-caption {
  text-align: center;
  font-size: .78rem;
  color: var(--clr-text-muted);
  margin-top: .85rem;
  font-style: italic;
}

/* ───────────────────────────────────────
   Footer — Glass
   ─────────────────────────────────────── */
.site-footer {
  background: rgba(0,0,0,.02);
  border-top: 1px solid var(--clr-border);
  text-align: center;
  padding: 1.75rem var(--space-page);
  font-size: .78rem;
  color: var(--clr-text-muted);
  position: relative;
  z-index: 1;
}

/* ───────────────────────────────────────
   Entrance Animations
   ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glassReveal {
  from { opacity: 0; transform: translateY(16px) scale(.98); backdrop-filter: blur(0); }
  to   { opacity: 1; transform: translateY(0) scale(1); backdrop-filter: blur(var(--blur)); }
}

.animate-in {
  opacity: 0;
  animation: fadeUp .6s cubic-bezier(.22, 1, .36, 1) forwards;
}
.animate-in:nth-child(1) { animation-delay: .05s; }
.animate-in:nth-child(2) { animation-delay: .12s; }
.animate-in:nth-child(3) { animation-delay: .20s; }
.animate-in:nth-child(4) { animation-delay: .28s; }
.animate-in:nth-child(5) { animation-delay: .36s; }
.animate-in:nth-child(6) { animation-delay: .44s; }
.animate-in:nth-child(7) { animation-delay: .52s; }
.animate-in:nth-child(8) { animation-delay: .60s; }
.animate-in:nth-child(9) { animation-delay: .68s; }

.glass-animate {
  opacity: 0;
  animation: glassReveal .7s cubic-bezier(.22, 1, .36, 1) forwards;
}

/* ── Shimmer on glass hover ── */
.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,.6) 50%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.step-card {
  position: relative;
  overflow: hidden;
}
.step-card:hover::before {
  opacity: 1;
}

/* ───────────────────────────────────────
   Responsive
   ─────────────────────────────────────── */
@media (max-width: 600px) {
  .step-card { padding: 1.15rem; }
  .callout   { padding: 1.15rem; }
  h2.step-heading { font-size: 1.02rem; }
  body::before { width: 350px; height: 350px; }
  body::after  { width: 300px; height: 300px; }
}

/* ───────────────────────────────────────
   Cursor Trail
   ─────────────────────────────────────── */
.cursor-trail-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.cursor-trail-img {
  position: absolute;
  width: 70px;
  height: 70px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0) rotate(-30deg);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  will-change: opacity, transform, left, top;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.12));
}

.cursor-trail-img.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
  animation: trailPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes trailPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-40deg); }
  50%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(5deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

/* hide trail on touch devices */
@media (hover: none) {
  .cursor-trail-container { display: none; }
}
