/* ============================================================
   renai.xyz — Pop-Art Aurora Design System
   Colors: #FAF5EC #2D1B35 #F26B5E #F5E642 #C9A8E8 #A8E8D4 #F0C8D8 #E8D5C4 #1A1018
   Fonts: Lilita One (display), Plus Jakarta Sans (body), Caveat (accent)
   ============================================================ */

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

:root {
  --cream:         #FAF5EC;
  --aubergine:     #2D1B35;
  --coral:         #F26B5E;
  --lemon:         #F5E642;
  --violet:        #C9A8E8;
  --mint:          #A8E8D4;
  --blush:         #F0C8D8;
  --sand:          #E8D5C4;
  --near-black:    #1A1018;

  --font-display: 'Lilita One', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-accent:  'Caveat', cursive;

  --split-clip-base: polygon(0 0, 62% 0, 58% 25%, 65% 50%, 60% 75%, 62% 100%, 0 100%);
  --split-clip-anim: polygon(0 0, 62% 0, 60% 20%, 63% 50%, 58% 78%, 63% 100%, 0 100%);
  --ease-magnetic: cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--near-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow: hidden;
}

/* --- Aurora Overlay (global, pointer-events none) --- */
.aurora-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-overlay svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.aurora-ribbon {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  filter: blur(18px);
  transition: stroke-dashoffset 3s ease;
}

.aurora-ribbon.ribbon-animate {
  stroke-dashoffset: 0;
}

.ribbon-1 { animation: none; }
.ribbon-2 { animation: none; }
.ribbon-3 { animation: none; }
.ribbon-4 { animation: none; }
.ribbon-5 { animation: none; }

/* --- Scroll Container with Snap --- */
.scroll-container {
  width: 100vw;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  position: relative;
  z-index: 1;
}

/* --- Sections --- */
.section {
  width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* --- Split Wrapper --- */
.split-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* --- Panels --- */
.panel {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.panel-left {
  width: 62%;
  background: var(--aubergine);
  clip-path: var(--split-clip-base);
  animation: splitBreath 4s ease-in-out infinite alternate;
  z-index: 2;
}

.panel-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 45%;
  height: 100%;
  background: var(--cream);
  z-index: 1;
  display: flex;
  align-items: center;
  padding-right: 5%;
}

/* Aurora shimmer bleeding from split edge into right panel */
.aurora-shimmer {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  height: 100%;
  background: linear-gradient(to right, rgba(201, 168, 232, 0.22), rgba(168, 232, 212, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Alt section: text left, image right */
.section-alt .split-wrapper-alt {
  flex-direction: row;
}

.panel-text-left {
  width: 40%;
  background: var(--cream);
  z-index: 2;
  display: flex;
  align-items: center;
  padding-left: 5%;
}

.panel-image-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 65%;
  height: 100%;
  background: var(--aubergine);
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 8% 100%, 5% 75%, 10% 50%, 5% 25%);
  animation: splitBreathAlt 4.5s ease-in-out infinite alternate;
  z-index: 1;
}

/* About section (alt2) reuses same split-wrapper as hero */
.section-alt2 .panel-left {
  background: var(--sand);
  clip-path: var(--split-clip-base);
  animation: splitBreath 4s ease-in-out infinite alternate;
}

.section-alt2 .panel-right {
  background: var(--cream);
}

/* --- Animated Split Line --- */
@keyframes splitBreath {
  0%   { clip-path: var(--split-clip-base); }
  100% { clip-path: var(--split-clip-anim); }
}

@keyframes splitBreathAlt {
  0%   { clip-path: polygon(8% 0, 100% 0, 100% 100%, 8% 100%, 5% 75%, 10% 50%, 5% 25%); }
  100% { clip-path: polygon(7% 0, 100% 0, 100% 100%, 7% 100%, 9% 78%, 6% 50%, 9% 22%); }
}

/* Split line visual (thin overlay) */
.split-line {
  position: absolute;
  top: 0;
  left: 59%;
  width: 4px;
  height: 100%;
  background: var(--near-black);
  z-index: 10;
  pointer-events: none;
  animation: splitLineShift 4s ease-in-out infinite alternate;
  transform-origin: top center;
}

.split-line-alt {
  left: auto;
  right: 62%;
}

@keyframes splitLineShift {
  0%   { left: 59%; }
  100% { left: 60.5%; }
}

/* --- Photo Frame + Halftone --- */
.photo-frame {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.halftone-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--near-black) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 3;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-placeholder svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CSS duotone filter on placeholder images */
.photo-hero {
  filter: sepia(100%) hue-rotate(270deg) saturate(0.4) brightness(1.05);
}

/* --- Panel Content --- */
.panel-content {
  padding: 3rem 3rem 3rem 2rem;
  position: relative;
  z-index: 1;
  max-width: 480px;
}

/* Hero right panel content positioning */
.panel-right .panel-content {
  padding-left: 3.5rem;
}

/* --- Typography --- */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 130px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--aubergine);
  text-rendering: geometricPrecision;
  margin-bottom: 1.2rem;
}

.headline-dot {
  color: var(--coral);
}

.hero-subhead {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--aubergine);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.hero-body {
  margin-bottom: 2rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 6.5vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--aubergine);
  text-rendering: geometricPrecision;
  margin-bottom: 1.4rem;
}

.body-text {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--near-black);
  margin-bottom: 1.2rem;
}

.caveat-text {
  font-family: var(--font-accent);
  font-size: clamp(22px, 2.2vw, 30px);
  color: #9B72CF;
  font-weight: 700;
}

.accent-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(20px, 2vw, 26px);
}

.section-tag {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(18px, 1.8vw, 24px);
  color: #9B72CF;
}

/* --- Buttons --- */
.cta-group {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  background: var(--lemon);
  border: 3px solid var(--near-black);
  padding: 0.75rem 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.6s var(--ease-magnetic), box-shadow 0.3s ease;
  position: relative;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  box-shadow: 0 0 0 2px var(--violet), 0 0 20px rgba(201, 168, 232, 0.4);
}

.btn-ghost {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  background: transparent;
  border: 3px solid var(--coral);
  padding: 0.75rem 2rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.6s var(--ease-magnetic), box-shadow 0.3s ease;
  letter-spacing: 0.01em;
}

.btn-ghost:hover {
  box-shadow: 0 0 0 2px var(--coral), 0 0 20px rgba(242, 107, 94, 0.3);
}

/* --- Callout Box (speech-bubble derived) --- */
.callout-box {
  background: var(--blush);
  border: 3px solid var(--near-black);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  border-radius: 8px 8px 8px 0;
  transition: transform 0.6s var(--ease-magnetic), box-shadow 0.3s ease;
}

.callout-box::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 0px solid transparent;
  border-top: 16px solid var(--near-black);
}

.callout-box::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 27px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 0px solid transparent;
  border-top: 13px solid var(--blush);
  z-index: 1;
}

.callout-box:hover {
  box-shadow: 0 0 0 2px var(--violet), 0 0 20px rgba(201, 168, 232, 0.4);
}

.callout-quote {
  font-size: clamp(18px, 1.8vw, 26px);
  color: var(--aubergine);
  font-style: normal;
}

/* --- Dot cluster decoration --- */
.dot-cluster-decoration {
  width: 80px;
  height: 20px;
  background: radial-gradient(circle, var(--sand) 2.5px, transparent 2.5px);
  background-size: 12px 12px;
  opacity: 0.6;
  margin-top: 2rem;
}

/* --- Section: Feature Break --- */
.section-feature {
  background: var(--aubergine);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-aurora-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.feature-aurora-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.feature-ribbon {
  filter: blur(22px);
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
}

.feature-ribbon.ribbon-in {
  animation: ribbonDraw 3.5s var(--ease-magnetic) forwards;
}

.fr-1 { animation-delay: 0s; }
.fr-2 { animation-delay: 0.8s; }
.fr-3 { animation-delay: 1.6s; }
.fr-4 { animation-delay: 0.4s; }
.fr-5 { animation-delay: 1.2s; }

@keyframes ribbonDraw {
  0%   { stroke-dashoffset: 3000; opacity: 0.1; }
  30%  { opacity: 1; }
  80%  { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0.7; }
}

.feature-text-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
  padding: 2rem;
}

.feature-label {
  display: block;
  color: var(--violet);
  margin-bottom: 0.8rem;
  font-size: clamp(20px, 2vw, 28px);
}

.feature-headline {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-rendering: geometricPrecision;
  margin-bottom: 1.5rem;
}

.feature-body {
  color: var(--sand);
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: clamp(15px, 1.2vw, 18px);
}

.ben-day-cluster {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* --- Footer Split --- */
.section-footer {
  background: var(--cream);
}

.footer-split {
  display: flex;
  width: 100%;
  height: 100%;
}

.footer-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.footer-panel-cream {
  background: var(--cream);
}

.footer-panel-aubergine {
  background: var(--aubergine);
}

.footer-dot-divider {
  width: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  flex-shrink: 0;
}

.footer-dot-divider svg {
  width: 20px;
  height: 100%;
}

.footer-content {
  max-width: 360px;
  width: 100%;
}

.footer-label {
  display: block;
  margin-bottom: 0.8rem;
  color: #9B72CF;
}

.footer-label-light {
  color: var(--violet);
}

.footer-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 5.5vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--aubergine);
  text-rendering: geometricPrecision;
  margin-bottom: 1.2rem;
}

.footer-body {
  color: var(--near-black);
  margin-bottom: 1.8rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.footer-link {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 48px);
  color: var(--cream);
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.6s var(--ease-magnetic), color 0.2s ease;
  display: inline-block;
}

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

.footer-social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.social-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--sand);
  text-decoration: none;
  border-bottom: 2px solid var(--coral);
  padding-bottom: 2px;
  transition: transform 0.6s var(--ease-magnetic), color 0.2s ease;
  display: inline-block;
}

.social-link:hover {
  color: var(--lemon);
}

.footer-copy {
  font-size: 18px;
  color: var(--sand);
  opacity: 0.7;
  margin-top: 1rem;
}

.dot-strip-divider {
  margin-top: 1.5rem;
}

.footer-dot-accent {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
}

/* --- Magnetic Element Base --- */
.magnetic {
  transition: transform 0.6s var(--ease-magnetic);
  will-change: transform;
}

/* --- Content Reveal Animation --- */
.content-reveal {
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-magnetic);
}

.panel-left .content-reveal,
.panel-image-right .content-reveal {
  transform: translateX(-8%);
}

.panel-right .content-reveal,
.panel-text-left .content-reveal,
.about-right .content-reveal {
  transform: translateX(8%);
}

.feature-text-center.content-reveal {
  transform: translateY(16px);
}

.content-reveal.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* --- Halftone bg on certain sections --- */
.section-alt {
  background: var(--cream);
}

.section-alt2 {
  background: var(--cream);
}

/* Dot grid texture on alt sections */
.section-alt::before,
.section-alt2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--sand) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* --- Work panel SVG adjustments --- */
.work-illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-illustration {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Responsive tweaks --- */
@media (max-width: 900px) {
  .panel-left {
    width: 55%;
    clip-path: polygon(0 0, 58% 0, 54% 25%, 60% 50%, 55% 75%, 58% 100%, 0 100%);
  }

  .panel-right {
    width: 50%;
  }

  .panel-text-left {
    width: 42%;
    padding-left: 3%;
  }

  .panel-image-right {
    width: 64%;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 10% 100%, 7% 75%, 12% 50%, 7% 25%);
  }

  .hero-headline {
    font-size: clamp(52px, 8vw, 90px);
  }

  .panel-content {
    padding: 2rem 1.5rem 2rem 1.5rem;
  }

  .footer-split {
    flex-direction: column;
  }

  .footer-dot-divider {
    width: 100%;
    height: 20px;
  }

  .footer-dot-divider svg {
    width: 100%;
    height: 20px;
    transform: rotate(90deg);
  }
}

@media (max-width: 600px) {
  body {
    overflow: auto;
  }

  .scroll-container {
    scroll-snap-type: none;
    overflow-y: auto;
    height: auto;
  }

  .section {
    height: auto;
    min-height: 100vh;
    scroll-snap-align: none;
  }

  .split-wrapper,
  .split-wrapper-alt {
    flex-direction: column;
  }

  .panel-left,
  .panel-right,
  .panel-text-left,
  .panel-image-right {
    width: 100%;
    position: static;
    clip-path: none;
    height: 50vh;
    animation: none;
  }

  .panel-right {
    justify-content: center;
  }

  .split-line {
    display: none;
  }

  .footer-split {
    flex-direction: column;
  }

  .footer-panel {
    padding: 2rem;
  }
}
