/* AO3 Wrapppped — Landing Page Styles (Light Theme) */

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

:root {
  --bg: #EFEFDA;
  --bg-light: #E4E0CC;
  --text: #2A2A2A;
  --text-muted: #6B6B5E;
  --ao3-green: #6C9930;
  --ao3-yellow: #C5A028;
  --ao3-orange: #C27529;
  --ao3-red: #9B1C1C;
  --ao3-blue: #3B5998;
  --ao3-gray: #D5D0C0;
  --ao3-complete-green: #6B8E23;
  --ao3-warning-orange: #C05621;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --cube-size: clamp(64px, 10vw, 110px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   PAGE LAYOUT — 60/40 split on desktop, stacked on mobile
   ============================================================ */

.page-layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* --- Left column: hero + CTA --- */
.hero {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 60px);
  gap: 0;
}

/* --- Right column: info panel --- */
.info-panel {
  flex: 0 0 40%;
  border-left: 1px solid var(--bg-light);
  padding: clamp(32px, 5vh, 60px) clamp(24px, 3vw, 48px);
  padding-top: clamp(80px, 14vh, 150px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 32px;
  overflow-y: auto;
}

.info-panel-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

/* ============================================================
   DICE GRID
   ============================================================ */

.grid-container {
  perspective: 800px;
  margin-bottom: clamp(12px, 2vh, 20px);
}

.grid {
  display: grid;
  grid-template-columns: var(--cube-size) var(--cube-size);
  grid-template-rows: var(--cube-size) var(--cube-size);
  gap: 16px;
}

/* --- 3D Dice --- */
.dice {
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 600px;
  overflow: hidden;
  border-radius: 6px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0deg);
}

.cube-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(20px, 3.5vw, 32px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Face colors */
.cube-face[data-color="green"]          { background: var(--ao3-green); color: #fff; }
.cube-face[data-color="yellow"]         { background: var(--ao3-yellow); color: #fff; }
.cube-face[data-color="orange"]         { background: var(--ao3-orange); color: #fff; }
.cube-face[data-color="red"]            { background: var(--ao3-red); color: #fff; }
.cube-face[data-color="blue"]           { background: var(--ao3-blue); color: #fff; }
.cube-face[data-color="gray"]           { background: var(--ao3-gray); color: var(--text); }
.cube-face[data-color="purple"]         { background: #6B3FA0; color: #fff; }
.cube-face[data-color="complete-green"] { background: var(--ao3-complete-green); color: #fff; }
.cube-face[data-color="warning-orange"] { background: var(--ao3-warning-orange); color: #fff; }

.cube-face.front  { transform: rotateX(0deg)    translateZ(calc(var(--cube-size) / 2)); }
.cube-face.top    { transform: rotateX(90deg)   translateZ(calc(var(--cube-size) / 2)); }
.cube-face.back   { transform: rotateX(180deg)  translateZ(calc(var(--cube-size) / 2)); }
.cube-face.bottom { transform: rotateX(-90deg)  translateZ(calc(var(--cube-size) / 2)); }

@keyframes roll-up {
  0%   { transform: rotateX(0deg); }
  100% { transform: rotateX(1170deg); }
}

.cube.rolling {
  animation: roll-up 5.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.04); opacity: 0.85; }
}

.dice.settled {
  animation: pulse 2s ease-in-out infinite;
}

.cube-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* "?" placeholder face — sized to visually match the icons */
.cube-face:not(:has(img)) {
  font-size: clamp(32px, 5.5vw, 56px);
}

/* ============================================================
   LOGO + TAGLINE
   ============================================================ */

.main-logo {
  max-width: clamp(100px, 16vw, 180px);
  height: auto;
  margin-bottom: 6px;
}

.tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.social-proof {
  color: var(--text-muted);
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  margin-bottom: clamp(16px, 2.5vh, 28px);
}

/* ============================================================
   CTA
   ============================================================ */

.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.understand-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.understand-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--ao3-red);
  cursor: pointer;
}

.cta-button {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 32px;
  border: none;
  border-radius: 8px;
  background: var(--ao3-red);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.cta-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(155, 28, 28, 0.3);
}

.cta-button:active:not(:disabled) {
  transform: translateY(0);
}

.cta-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cta-button.secondary {
  background: transparent;
  color: var(--ao3-red);
  border: 2px solid var(--ao3-red);
}

.cta-button.secondary:hover {
  background: rgba(155, 28, 28, 0.06);
}

/* ============================================================
   RETURNING USER
   ============================================================ */

.returning-user {
  text-align: center;
}

.returning-user[hidden] {
  display: none;
}

.returning-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.returning-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   INFO PANEL CONTENT (How It Works + Privacy)
   ============================================================ */

.info-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.how-it-works,
.privacy {
  padding: 0;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ao3-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.step-text strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.step-text span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.privacy-details ul {
  list-style: none;
  padding: 0;
}

.privacy-details li {
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.privacy-details li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--ao3-green);
  font-weight: 700;
}

/* ============================================================
   BROWSER MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--bg-light);
  border-radius: 16px;
  padding: 40px;
  max-width: 440px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.modal p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================================
   RESPONSIVE — mobile: single column, stacked
   ============================================================ */

@media (max-width: 700px) {
  .page-layout {
    flex-direction: column;
    min-height: unset;
  }

  .hero {
    flex: none;
    padding: 36px 20px 20px;
    width: 100%;
  }

  .info-panel {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--bg-light);
    padding: 28px 20px;
    width: 100%;
    gap: 24px;
  }

  .info-panel-heading {
    display: none; /* Less relevant when stacked */
  }

  .cta-button {
    width: 100%;
    max-width: 320px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .dice.settled  { animation: none; }
  .cube.rolling  { animation: none; }
  .cta-button    { transition: none; }
}
