/* =========================================================================
   EXPERIMENTS SHOWCASE — page styles
   Aesthetic: Labnity cream + playful + premium card grid
   ========================================================================= */

:root {
  --cream:    #F7F2E8;
  --cream-2:  #EFE8D6;
  --cream-3:  #E5DCC4;
  --paper:    #FBF7EE;
  --ink:      #1A1814;
  --ink-2:    #3D3830;
  --ink-3:    #6B6357;
  --ink-4:    #A39A88;
  --line:     #1A1814;
  --line-soft:#D9CFB8;

  --pop-red:    #E94B35;
  --pop-yellow: #FFC83D;
  --pop-blue:   #2E6BE6;
  --pop-green:  #1FA85C;
  --pop-pink:   #FF7AB6;
  --pop-purple: #6E4BD3;

  --hl-yellow: #FFE56B;
  --hl-green:  #B8F0CF;
  --hl-pink:   #FFC9DE;

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body:    "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-hand:    "Caveat", "Comic Sans MS", cursive;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --r-1: 6px; --r-2: 12px; --r-3: 18px; --r-4: 28px; --r-pill: 999px;

  --shadow-sticker: 4px 4px 0 var(--ink);
  --shadow-sticker-lg: 6px 6px 0 var(--ink);
  --shadow-soft: 0 14px 30px -16px rgba(26, 24, 20, 0.18);

  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================================
   Reset
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--pop-yellow); color: var(--ink); }

/* Paper texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 200; opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Dot grid */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(26,24,20,0.10) 1px, transparent 1.5px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, transparent 30%, black 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, black 75%);
  opacity: 0.5;
}

.wrap {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 var(--s-5); position: relative; z-index: 1;
}

.hl { background: var(--hl-yellow); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.hand {
  font-family: var(--font-hand);
  font-weight: 500; color: var(--pop-red);
  font-size: 1.4em; line-height: 1;
}

/* =========================================================================
   Navigation
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: var(--s-4) 0;
  background: rgba(247, 242, 232, 0);
  transition: background 240ms ease, border-color 240ms ease, backdrop-filter 240ms ease;
  border-bottom: 1.5px solid transparent;
}
.nav.scrolled {
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--ink);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
}

.brand { display: inline-flex; align-items: center; gap: var(--s-3); }
.brand__logo {
  width: 38px; height: 38px;
  transition: transform 380ms var(--ease);
}
.brand:hover .brand__logo { transform: rotate(-14deg) scale(1.08); }
.brand__name {
  font-family: var(--font-display); font-size: 26px; font-weight: 500;
  letter-spacing: -0.025em; color: var(--ink);
}
.brand__name em { font-style: italic; color: var(--pop-red); font-variation-settings: "SOFT" 100; }

.nav__links {
  display: flex; align-items: center; gap: var(--s-3); list-style: none;
}
.nav__links a {
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: color 200ms ease; padding: 6px 0;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__sep { color: var(--ink-4); font-size: 13px; user-select: none; }

.nav__cta {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--cream);
  font-size: 14px; font-weight: 600;
  border: 2px solid var(--ink);
  transition: transform 180ms var(--ease), box-shadow 200ms ease;
}
.nav__cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--pop-red);
}

/* =========================================================================
   Hero
   ========================================================================= */
.exphero {
  position: relative;
  min-height: 50vh;
  display: flex; align-items: center;
  padding: 140px 0 var(--s-7);
  overflow: hidden;
}
.exphero__inner {
  position: relative; z-index: 2;
  text-align: center; width: 100%;
  max-width: 900px; margin: 0 auto;
}

.exphero__tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 14px 6px 8px; border-radius: var(--r-pill);
  border: 1.5px solid var(--ink); background: var(--paper);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: var(--s-5);
  box-shadow: 3px 3px 0 var(--ink);
  opacity: 0; animation: rise 700ms ease-out 100ms forwards;
}
.exphero__tag .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pop-green);
  box-shadow: 0 0 0 0 rgba(31, 168, 92, 0.6);
  animation: pulse 1.8s ease-out infinite;
}

.exphero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: clamp(48px, 8vw, 100px);
  line-height: 0.95; letter-spacing: -0.03em; color: var(--ink);
}
.exphero h1 .line {
  display: block; opacity: 0; transform: translateY(28px);
  animation: rise 800ms var(--ease) forwards;
}
.exphero h1 .line:nth-child(1) { animation-delay: 180ms; }
.exphero h1 .line:nth-child(2) { animation-delay: 300ms; }
.exphero h1 .line:nth-child(3) { animation-delay: 420ms; }

.exphero h1 em {
  font-style: italic; color: var(--pop-red);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  display: inline-block; position: relative;
}
.exphero h1 em.scribble::after {
  content: "";
  position: absolute; left: -4%; right: -4%; bottom: -6px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' fill='none'><path d='M2 9 Q 30 2, 60 8 T 120 8 T 198 6' stroke='%23FFC83D' stroke-width='5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-size: 100% 100%;
}

.exphero__lede {
  margin: var(--s-5) auto 0; font-size: 19px; line-height: 1.5;
  color: var(--ink-2); max-width: 52ch;
  opacity: 0; animation: rise 800ms ease-out 560ms forwards;
}

/* =========================================================================
   Experiment Grid
   ========================================================================= */
.experiments { padding: var(--s-6) 0 var(--s-10); }

.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: var(--s-5);
}

/* ---------- Card ---------- */
.exp-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 2.5px solid var(--ink);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 280ms var(--ease), box-shadow 280ms ease;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  transform: rotate(-0.3deg);
}
.exp-card:nth-child(2) { transform: rotate(0.4deg); }
.exp-card:hover {
  transform: translate(-4px, -4px) rotate(0deg) !important;
  box-shadow: 10px 10px 0 var(--ink);
}
.exp-card:active {
  transform: translate(2px, 2px) rotate(0deg) !important;
  box-shadow: 2px 2px 0 var(--ink);
}

.exp-card--soon {
  cursor: default; opacity: 0.65;
}
.exp-card--soon:hover {
  transform: rotate(0.4deg) !important;
  box-shadow: 5px 5px 0 var(--ink);
}

/* ---------- Card visual ---------- */
.exp-card__bg {
  position: relative;
  height: 280px;
  border-bottom: 2.5px solid var(--ink);
  overflow: hidden;
}
.exp-card__bg svg {
  width: 100%; height: 100%; display: block;
  transition: transform 600ms var(--ease);
}
.exp-card:hover .exp-card__bg svg { transform: scale(1.04); }

.exp-card__bg--soon { height: 200px; }

/* ---------- Card body ---------- */
.exp-card__body {
  flex: 1;
  padding: var(--s-5) var(--s-5) var(--s-6);
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.exp-card--atom .exp-card__body {
  background: #0A1628;
  color: #F0F2F8;
}

.exp-card__meta {
  display: flex; align-items: center; gap: var(--s-3);
}
.exp-card__count {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; color: #4AEADC;
}
.exp-card--soon .exp-card__count { color: var(--ink-3); }

.exp-card__status {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid rgba(74, 234, 220, 0.3);
  color: #4AEADC;
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4AEADC;
  animation: pulse-live 1.8s ease-out infinite;
}
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(74, 234, 220, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 234, 220, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 234, 220, 0); }
}

.exp-card__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400; line-height: 1.0;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  margin-top: var(--s-2);
}
.exp-card__title em {
  font-style: italic; color: #4AEADC;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.exp-card__title--muted { color: var(--ink-3); }
.exp-card__title--muted em { color: var(--pop-red); }

.exp-card__sub {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #FF6B8A; font-weight: 500;
  margin-top: var(--s-1);
}

.exp-card__desc {
  font-size: 15px; line-height: 1.55;
  color: #B4B8C8; margin-top: var(--s-2);
  max-width: 42ch;
}
.exp-card__desc--muted { color: var(--ink-3); }

.exp-card__cta {
  margin-top: auto; padding-top: var(--s-4);
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-body); font-size: 14px;
  font-weight: 600; color: #F0F2F8;
}
.exp-card__cta .arrow {
  display: inline-block;
  transition: transform 280ms var(--ease);
}
.exp-card:hover .exp-card__cta .arrow { transform: translateX(6px) rotate(-4deg); }

/* ---------- Card badge ---------- */
.exp-card__badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600; padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  background: var(--pop-green); color: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}
.exp-card__badge--soon {
  background: var(--pop-yellow); color: var(--ink);
}

/* ---------- Footnote ---------- */
.exp__footnote {
  margin-top: var(--s-7); text-align: center;
  font-size: 16px; color: var(--ink-3);
}
.exp__footnote .hand { margin-left: 4px; font-size: 24px; vertical-align: -3px; }

/* =========================================================================
   Footer
   ========================================================================= */
footer {
  border-top: 2px solid var(--ink);
  padding: var(--s-6) 0;
  background: var(--cream);
}
.foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-4); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
}
.foot__bottom .pulse {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2); font-weight: 500;
}
.foot__bottom .pulse::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--pop-green);
  animation: pulse-soft 1.8s ease-out infinite;
}

/* =========================================================================
   Animations
   ========================================================================= */
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 168, 92, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(31, 168, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 168, 92, 0); }
}
@keyframes pulse-soft {
  0%   { box-shadow: 0 0 0 0 rgba(31, 168, 92, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(31, 168, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 168, 92, 0); }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__cta { font-size: 13px; padding: 9px 14px; }
  .exphero { padding-top: 110px; min-height: auto; }
  .exp-card__bg { height: 200px; }
  .exp-card__title { font-size: 36px; }
  .foot__bottom { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
