/* p9.rs - anti-design masonry, gradient retro */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --hot-pink: #E84070;
  --amber: #F0A030;
  --teal: #30C0A0;
  --slate: #1A1A2A;
  --cream: #F8F4F0;
  --violet: #8050D0;
  --light-gray: #E8E4E0;
}

html, body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--slate);
  background: var(--cream);
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--hot-pink); }

code {
  font-family: 'Nunito', monospace;
  font-weight: 600;
  font-size: 14px;
  background: rgba(232, 64, 112, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
}

pre {
  background: rgba(26, 26, 42, 0.92);
  color: var(--cream);
  padding: 14px 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 12px 0;
  border-left: 3px solid var(--teal);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== Splash ===== */
.splash {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E84070 0%, #F0A030 50%, #30C0A0 100%);
  background-size: 200% 200%;
  animation: gradientShift 18s ease-in-out infinite;
  overflow: hidden;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.border-pattern {
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
}
.border-top { top: 12px; }
.border-bottom { bottom: 12px; }

.zigzag-path {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  animation: drawPath 800ms ease-out 200ms forwards;
}

@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}

.iso-scatter {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0;
  animation: isoFadeIn 700ms ease-out forwards;
}
.iso-scatter svg { width: 100%; height: 100%; }

.iso-1 { top: 12%; left: 8%; animation-delay: 400ms; }
.iso-2 { top: 22%; right: 11%; animation-delay: 550ms; transform: rotate(12deg); }
.iso-3 { bottom: 18%; left: 14%; animation-delay: 700ms; transform: rotate(-8deg); }
.iso-4 { bottom: 24%; right: 9%; animation-delay: 850ms; transform: rotate(20deg); }
.iso-5 { top: 48%; left: 4%; animation-delay: 600ms; transform: rotate(-15deg); }

@keyframes isoFadeIn {
  from { opacity: 0; transform: scale(0.5) rotate(0); }
  to { opacity: 0.9; transform: scale(1) rotate(var(--rot, 0)); }
}

.iso-2.visible { animation: isoFadeIn 700ms ease-out forwards, isoFloat 4s ease-in-out 700ms infinite; }

@keyframes isoFloat {
  0%, 100% { transform: rotate(12deg) translateY(0); }
  50% { transform: rotate(15deg) translateY(-6px); }
}

.iso-scatter.hover-active {
  transition: transform 400ms ease;
  transform: rotate(15deg) scale(1.15) !important;
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.domain-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(72px, 14vw, 200px);
  color: var(--cream);
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 4px 4px 0 rgba(26, 26, 42, 0.18);
  opacity: 0;
  transform: scale(0.8);
  animation: bounceIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms forwards;
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.8); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.splash-tag {
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--cream);
  margin-top: 18px;
  font-weight: 600;
  opacity: 0;
  animation: fadeUp 600ms ease-out 700ms forwards;
}

.splash-aside {
  font-style: italic;
  font-size: 13px;
  color: rgba(248, 244, 240, 0.72);
  margin-top: 12px;
  opacity: 0;
  animation: fadeUp 600ms ease-out 900ms forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Interstitials ===== */
.interstitial {
  height: 60px;
  width: 100%;
  overflow: hidden;
}
.interstitial svg { width: 100%; height: 100%; display: block; }

/* ===== Masonry ===== */
.masonry-section {
  position: relative;
  background: linear-gradient(180deg, #F8F4F0 0%, #F0EBE5 50%, #F8F4F0 100%);
  padding: 60px 24px;
}

.masonry {
  max-width: 1200px;
  margin: 0 auto;
  column-count: 3;
  column-gap: 12px;
}

@media (max-width: 900px) {
  .masonry { column-count: 2; }
}
@media (max-width: 560px) {
  .masonry { column-count: 1; }
}

.block {
  break-inside: avoid;
  margin-bottom: 12px;
  padding: 22px 20px;
  background: rgba(248, 244, 240, 0.9);
  border-radius: 6px;
  border: 1px solid var(--light-gray);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease-out, transform 700ms ease-out, box-shadow 250ms ease;
  background-image:
    linear-gradient(135deg,
      rgba(232, 64, 112, 0.04) 0%,
      rgba(240, 160, 48, 0.04) 50%,
      rgba(48, 192, 160, 0.04) 100%),
    linear-gradient(rgba(248, 244, 240, 0.92), rgba(248, 244, 240, 0.92));
}

.block.visible {
  opacity: 1;
  transform: translateY(0);
}

.block-rotate-left { transform: translateY(20px) rotate(-1.5deg); }
.block-rotate-left.visible { transform: rotate(-1.5deg); }
.block-rotate-right { transform: translateY(20px) rotate(1.8deg); }
.block-rotate-right.visible { transform: rotate(1.8deg); }
.block-offset-left.visible { transform: translateX(-6px); }
.block-offset-right.visible { transform: translateX(8px); }

.block:nth-child(2n).visible { background-image:
  linear-gradient(160deg, rgba(232, 64, 112, 0.07) 0%, rgba(128, 80, 208, 0.05) 100%),
  linear-gradient(rgba(248, 244, 240, 0.9), rgba(248, 244, 240, 0.9)); }
.block:nth-child(3n).visible { background-image:
  linear-gradient(45deg, rgba(48, 192, 160, 0.07) 0%, rgba(240, 160, 48, 0.06) 100%),
  linear-gradient(rgba(248, 244, 240, 0.9), rgba(248, 244, 240, 0.9)); }
.block:nth-child(5n).visible { background-image:
  linear-gradient(220deg, rgba(128, 80, 208, 0.06) 0%, rgba(48, 192, 160, 0.06) 100%),
  linear-gradient(rgba(248, 244, 240, 0.9), rgba(248, 244, 240, 0.9)); }

.block:hover {
  transform: translateY(0) rotate(0deg) translateX(0) !important;
  box-shadow: 0 8px 30px rgba(26, 26, 42, 0.12);
  z-index: 2;
}

.block-tag {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--violet);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.block h2, .block h3 {
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.25;
}

.block h2 { font-size: clamp(20px, 2vw, 26px); }
.block h3 { font-size: clamp(17px, 1.5vw, 20px); }

.block p {
  font-size: 15px;
  margin: 8px 0;
}

.block-aside {
  font-style: italic;
  font-size: 13px;
  color: rgba(26, 26, 42, 0.7);
}

.block-tall { padding: 28px 22px; }
.block-medium { padding: 22px 20px; }
.block-short { padding: 18px 18px; }

.conversational {
  font-size: 15px;
  font-weight: 500;
}

.underline-term {
  position: relative;
  display: inline-block;
  font-weight: 600;
  padding-bottom: 2px;
}
.underline-term::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--hot-pink), var(--teal));
  transition: width 300ms ease-out, background 250ms ease;
}
.underline-term.drawn::after { width: 100%; }
.underline-term:hover {
  background-color: rgba(240, 160, 48, 0.18);
  border-radius: 2px;
}

/* ===== Playground ===== */
.playground {
  position: relative;
  background: linear-gradient(180deg, #1A1A2A 0%, #2A1A3A 100%);
  padding: 80px 24px;
  overflow: hidden;
}

.iso-foot-1 { top: 30px; left: 6%; opacity: 0.55; animation: footFloat 5s ease-in-out infinite; }
.iso-foot-2 { bottom: 30px; right: 8%; opacity: 0.55; animation: footFloat 6s ease-in-out 1s infinite; }

@keyframes footFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(8deg); }
}

.playground-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(248, 244, 240, 0.06);
  border: 1px solid rgba(48, 192, 160, 0.3);
  border-radius: 6px;
  padding: 36px 32px;
  color: var(--cream);
  position: relative;
  z-index: 2;
}

.playground-card .block-tag { color: var(--teal); }
.playground-card h2 {
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--cream);
  margin-bottom: 16px;
}

.playground-card pre {
  background: rgba(0, 0, 0, 0.4);
  border-left-color: var(--hot-pink);
}

.playground-card .conversational { margin-top: 18px; }

.footer-meta {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(248, 244, 240, 0.55);
  font-style: italic;
}
.footer-meta a { color: var(--teal); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .splash { animation: none; }
}
