/* ============================================================
   THE REEF SMP — KINGDOM DEVELOPMENT PHASE HOMEPAGE
   reef.css — All styles for the post-draw premium homepage
   ============================================================ */

/* ── SECTION WRAPPER ── */
#section-home {
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: 0;
  position: relative;
  overflow-x: hidden;
}

/* ────────────────────────────────────────────────────────────
   AUDIO PLAYER TOGGLE
   ──────────────────────────────────────────────────────────── */
.reef-audio-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
}

.reef-audio-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 33, 62, 0.92);
  border: 1px solid rgba(78, 204, 163, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--success);
  font-size: 10px;
  letter-spacing: 0.05em;
  transition: background var(--transition-normal), border-color var(--transition-normal);
  backdrop-filter: blur(8px);
}

.reef-audio-btn:hover {
  background: rgba(78, 204, 163, 0.12);
  border-color: rgba(78, 204, 163, 0.6);
}

.reef-audio-btn.playing {
  border-color: rgba(78, 204, 163, 0.7);
  background: rgba(78, 204, 163, 0.1);
}

.reef-audio-icon {
  font-size: 14px;
}

.reef-audio-label {
  font-size: 8px;
  color: var(--text-secondary);
}

.reef-audio-status {
  font-size: 8px;
  color: var(--success);
}

/* ────────────────────────────────────────────────────────────
   PHASE STATUS BANNER
   ──────────────────────────────────────────────────────────── */
.reef-phase-banner {
  background: linear-gradient(90deg,
    rgba(10, 20, 40, 0.98) 0%,
    rgba(15, 52, 96, 0.95) 50%,
    rgba(10, 20, 40, 0.98) 100%
  );
  border-bottom: 1px solid rgba(78, 204, 163, 0.25);
  padding: 10px 20px;
  position: relative;
  overflow: hidden;
}

.reef-phase-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(78, 204, 163, 0.04) 40px,
    rgba(78, 204, 163, 0.04) 41px
  );
  pointer-events: none;
}

.reef-phase-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.reef-phase-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: reefPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes reefPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.reef-phase-eyebrow {
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.15em;
}

.reef-phase-divider {
  color: rgba(78, 204, 163, 0.35);
  font-size: 10px;
}

.reef-phase-label {
  font-size: 9px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.reef-phase-name {
  color: var(--success);
}

.reef-phase-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

/* ────────────────────────────────────────────────────────────
   HERO SECTION
   ──────────────────────────────────────────────────────────── */
.reef-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  overflow: hidden;
}

/* Pixel-grid map texture overlay */
.reef-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(78, 204, 163, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 204, 163, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Deep ocean layered depth */
.reef-hero-depth {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(15, 52, 96, 0.6) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(26, 82, 118, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 70%, rgba(0, 30, 60, 0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.reef-hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: center;
}

.reef-hero-eyebrow {
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  opacity: 0.85;
}

.reef-hero-title {
  margin: 0 0 24px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reef-title-line-1,
.reef-title-line-2 {
  font-size: clamp(22px, 4vw, 42px);
  color: var(--text-primary);
  display: block;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.reef-title-line-3 {
  font-size: clamp(24px, 4.5vw, 48px);
  display: block;
}

.reef-title-accent {
  background: linear-gradient(135deg, #4ecca3 0%, #85c1e9 50%, #5b9bd5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(78, 204, 163, 0.4));
}

.reef-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 auto 32px;
  max-width: 600px;
  font-family: var(--font-body);
}

/* Hero CTAs */
.reef-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Prize stakes */
.reef-hero-stakes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(243, 156, 18, 0.06);
  border: 1px solid rgba(243, 156, 18, 0.2);
  border-radius: 8px;
  padding: 14px 24px;
  max-width: 500px;
  margin: 0 auto;
}

.reef-stake {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reef-stake-amt {
  font-size: 18px;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(243, 156, 18, 0.5);
}

.reef-stake-amt.reef-stake-gold {
  font-size: 22px;
  color: #f5d76e;
}

.reef-stake-lbl {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  text-align: center;
}

.reef-stake-sep {
  font-size: 14px;
  color: rgba(243, 156, 18, 0.3);
}

/* ── WEDDING COUNTDOWN WIDGET (hero sidebar) ── */
.reef-wedding-widget {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  background: rgba(22, 33, 62, 0.92);
  border: 1px solid rgba(232, 160, 191, 0.35);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  min-width: 160px;
  backdrop-filter: blur(10px);
  z-index: 3;
}

.reef-wedding-rings {
  font-size: 20px;
  margin-bottom: 8px;
  display: block;
  animation: reefRingFloat 3s ease-in-out infinite;
}

@keyframes reefRingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.reef-wedding-label {
  font-size: 8px;
  color: var(--pink);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.reef-wedding-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.reef-wt-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.reef-wt-digit {
  font-size: 20px;
  color: var(--pink);
  text-shadow: 0 0 10px rgba(232, 160, 191, 0.5);
  min-width: 36px;
  text-align: center;
  background: rgba(232, 160, 191, 0.08);
  border: 1px solid rgba(232, 160, 191, 0.2);
  border-radius: 4px;
  padding: 4px 6px;
}

.reef-wt-unit {
  font-size: 6px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.reef-wt-colon {
  font-size: 18px;
  color: rgba(232, 160, 191, 0.5);
  margin-bottom: 14px;
}

.reef-wedding-sub {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-style: italic;
  line-height: 1.4;
}

/* ────────────────────────────────────────────────────────────
   CTA BUTTONS (shared)
   ──────────────────────────────────────────────────────────── */
.reef-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success);
  color: #0a1428;
  border: none;
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 9px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast);
  font-family: var(--font-pixel);
}

.reef-cta-primary:hover {
  background: #5dd8ae;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 204, 163, 0.35);
}

.reef-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--success);
  border: 1px solid rgba(78, 204, 163, 0.5);
  border-radius: 6px;
  padding: 11px 20px;
  font-size: 9px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast);
  font-family: var(--font-pixel);
}

.reef-cta-secondary:hover {
  background: rgba(78, 204, 163, 0.1);
  border-color: var(--success);
  transform: translateY(-2px);
}

.reef-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(160, 160, 176, 0.3);
  border-radius: 6px;
  padding: 11px 20px;
  font-size: 9px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast);
  font-family: var(--font-pixel);
}

.reef-cta-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(160, 160, 176, 0.6);
  transform: translateY(-2px);
}

.reef-cta-icon {
  font-size: 13px;
}

/* ────────────────────────────────────────────────────────────
   CEREMONY STRIP (Royal Weddings)
   ──────────────────────────────────────────────────────────── */
.reef-ceremony-strip {
  background: linear-gradient(135deg,
    rgba(232, 160, 191, 0.08) 0%,
    rgba(30, 20, 50, 0.95) 40%,
    rgba(22, 10, 40, 0.98) 60%,
    rgba(232, 160, 191, 0.06) 100%
  );
  border-top: 1px solid rgba(232, 160, 191, 0.2);
  border-bottom: 1px solid rgba(232, 160, 191, 0.2);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.reef-ceremony-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(232, 160, 191, 0.02) 20px,
    rgba(232, 160, 191, 0.02) 21px
  );
  pointer-events: none;
}

.reef-ceremony-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.reef-ceremony-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.reef-ceremony-rings {
  font-size: 28px;
  animation: reefRingFloat 3s ease-in-out infinite;
  flex-shrink: 0;
}

.reef-ceremony-title {
  font-size: 11px;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.reef-ceremony-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.5;
  max-width: 520px;
}

.reef-ceremony-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.reef-ceremony-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(232, 160, 191, 0.08);
  border: 1px solid rgba(232, 160, 191, 0.25);
  border-radius: 8px;
  padding: 12px 20px;
}

.reef-ceremony-count {
  font-size: 28px;
  color: var(--pink);
  text-shadow: 0 0 14px rgba(232, 160, 191, 0.5);
}

.reef-ceremony-unit {
  font-size: 7px;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
}

/* ────────────────────────────────────────────────────────────
   SHARED SECTION INNER
   ──────────────────────────────────────────────────────────── */
.reef-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.reef-section-label {
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  opacity: 0.8;
}

.reef-section-title {
  font-size: clamp(14px, 2.5vw, 24px);
  color: var(--text-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}

.reef-section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 36px;
}

/* ────────────────────────────────────────────────────────────
   START HERE / STEPS
   ──────────────────────────────────────────────────────────── */
.reef-startnow {
  padding: 72px 0 80px;
  background: rgba(15, 52, 96, 0.12);
  border-top: 1px solid rgba(78, 204, 163, 0.08);
  border-bottom: 1px solid rgba(78, 204, 163, 0.08);
}

.reef-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.reef-step-card {
  background: rgba(22, 33, 62, 0.8);
  border: 1px solid rgba(78, 204, 163, 0.15);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.reef-step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--success), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.reef-step-card:hover {
  border-color: rgba(78, 204, 163, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.reef-step-card:hover::before {
  opacity: 1;
}

.reef-step-num {
  font-size: 9px;
  color: rgba(78, 204, 163, 0.5);
  letter-spacing: 0.1em;
}

.reef-step-icon {
  font-size: 28px;
  line-height: 1;
}

.reef-step-title {
  font-size: 9px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.reef-step-body {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.6;
  flex: 1;
}

.reef-step-btn {
  display: inline-block;
  margin-top: auto;
  background: transparent;
  border: 1px solid rgba(78, 204, 163, 0.35);
  border-radius: 4px;
  color: var(--success);
  font-size: 8px;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all var(--transition-fast);
  font-family: var(--font-pixel);
}

.reef-step-btn:hover {
  background: rgba(78, 204, 163, 0.1);
  border-color: var(--success);
}

/* ────────────────────────────────────────────────────────────
   LIVE MAP SECTION
   ──────────────────────────────────────────────────────────── */
.reef-map-section {
  padding: 80px 0;
}

.reef-map-header {
  text-align: center;
  margin-bottom: 40px;
}

.reef-map-header .reef-section-sub {
  margin: 0 auto 0;
}

/* ── MAP LAUNCH CARD (replaces iframe embed) ── */
.reef-map-launch {
  position: relative;
  background: rgba(8, 16, 32, 0.98);
  border: 2px solid rgba(78, 204, 163, 0.3);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(78, 204, 163, 0.08),
    0 0 50px rgba(78, 204, 163, 0.07),
    inset 0 0 80px rgba(0, 0, 0, 0.5);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

/* Shared corner + label styles (same for launch card and old frame) */
.reef-map-corner {
  position: absolute;
  font-size: 10px;
  color: rgba(78, 204, 163, 0.35);
  z-index: 5;
  line-height: 1;
  pointer-events: none;
}

.reef-map-corner-tl { top: 8px; left: 10px; }
.reef-map-corner-tr { top: 8px; right: 10px; }
.reef-map-corner-bl { bottom: 8px; left: 10px; }
.reef-map-corner-br { bottom: 8px; right: 10px; }

.reef-map-label-top,
.reef-map-label-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: rgba(78, 204, 163, 0.45);
  letter-spacing: 0.15em;
  z-index: 5;
  white-space: nowrap;
  pointer-events: none;
}

.reef-map-label-top    { top: 10px; }
.reef-map-label-bottom { bottom: 10px; }

/* Animated terrain canvas behind the launch body */
.reef-map-terrain {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.reef-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.55;
}

/* Horizontal scan-line sweep */
.reef-map-scan-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(78, 204, 163, 0.06) 49%,
    rgba(78, 204, 163, 0.12) 50%,
    transparent 51%
  );
  background-size: 100% 40px;
  animation: reefScanLine 4s linear infinite;
  pointer-events: none;
}

@keyframes reefScanLine {
  0%   { background-position: 0 -40px; }
  100% { background-position: 0 100%; }
}

/* Launch body — centered over the terrain */
.reef-map-launch-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 60px 40px 50px;
  gap: 16px;
}

/* LIVE dot indicator */
.reef-map-live-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(78, 204, 163, 0.08);
  border: 1px solid rgba(78, 204, 163, 0.25);
  border-radius: 20px;
  padding: 5px 12px;
}

.reef-map-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: reefPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.reef-map-live-label {
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.15em;
}

.reef-map-launch-title {
  font-size: clamp(14px, 2.5vw, 22px);
  color: var(--text-primary);
  letter-spacing: 0.1em;
}

.reef-map-launch-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.7;
  max-width: 520px;
  margin: 0;
}

.reef-map-launch-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* URL bar display */
.reef-map-url-bar {
  font-size: 9px;
  color: rgba(78, 204, 163, 0.45);
  background: rgba(78, 204, 163, 0.05);
  border: 1px solid rgba(78, 204, 163, 0.12);
  border-radius: 4px;
  padding: 6px 14px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
  cursor: default;
  user-select: all;
}

/* Map context pills */
.reef-map-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.reef-map-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 33, 62, 0.7);
  border: 1px solid rgba(78, 204, 163, 0.15);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.reef-pill-icon {
  font-size: 14px;
}

/* ────────────────────────────────────────────────────────────
   KINGDOMS GRID (live from draw)
   ──────────────────────────────────────────────────────────── */
.reef-kingdoms-section {
  padding: 80px 0;
  background: rgba(10, 20, 40, 0.5);
  border-top: 1px solid rgba(78, 204, 163, 0.08);
}

.reef-kingdoms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.reef-kingdom-card {
  background: rgba(22, 33, 62, 0.75);
  border: 1px solid rgba(78, 204, 163, 0.12);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.reef-kingdom-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 0 0 12px 12px;
  opacity: 0.7;
  transition: opacity var(--transition-normal);
}

.reef-kingdom-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(78, 204, 163, 0.3);
}

.reef-kingdom-card:hover::after {
  opacity: 1;
}

.reef-kc-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reef-kc-crest {
  font-size: 26px;
  line-height: 1;
}

.reef-kc-name {
  font-size: 9px;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.reef-kc-motto {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-style: italic;
  line-height: 1.5;
}

.reef-kc-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.reef-kc-player {
  background: rgba(78, 204, 163, 0.1);
  border: 1px solid rgba(78, 204, 163, 0.2);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.reef-kingdom-loading {
  color: var(--text-secondary);
  font-size: 9px;
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
  letter-spacing: 0.1em;
}

.reef-kingdoms-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ────────────────────────────────────────────────────────────
   ROYAL DECREE (parchment)
   ──────────────────────────────────────────────────────────── */
.reef-decree-section {
  padding: 80px 24px;
  background: linear-gradient(180deg,
    var(--bg) 0%,
    rgba(15, 30, 55, 0.7) 50%,
    var(--bg) 100%
  );
}

.reef-decree-parchment {
  max-width: 740px;
  margin: 0 auto;
  background:
    linear-gradient(160deg,
      rgba(35, 27, 14, 0.95) 0%,
      rgba(28, 22, 12, 0.97) 50%,
      rgba(32, 25, 10, 0.95) 100%
    );
  border: 1px solid rgba(180, 140, 60, 0.35);
  border-radius: 4px;
  box-shadow:
    0 0 0 4px rgba(100, 70, 20, 0.15),
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(200, 160, 80, 0.1);
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}

/* Parchment texture overlay */
.reef-decree-parchment::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.reef-decree-header {
  text-align: center;
  margin-bottom: 24px;
}

.reef-decree-seal {
  font-size: 28px;
  color: rgba(200, 160, 70, 0.8);
  display: block;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(200, 160, 70, 0.4);
}

.reef-decree-title {
  font-size: 13px;
  color: rgba(210, 170, 80, 0.95);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}

.reef-decree-subtitle {
  font-size: 8px;
  color: rgba(180, 140, 60, 0.7);
  letter-spacing: 0.15em;
}

.reef-decree-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(180, 140, 60, 0.4) 30%, rgba(180, 140, 60, 0.4) 70%, transparent
  );
  margin: 20px 0;
}

.reef-decree-body {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: rgba(220, 200, 160, 0.9);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.reef-decree-body p {
  margin: 0 0 14px;
}

.reef-decree-body p:last-child {
  margin-bottom: 0;
  font-style: italic;
  opacity: 0.85;
}

.reef-decree-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 8px;
  color: rgba(180, 140, 60, 0.55);
  letter-spacing: 0.12em;
  flex-wrap: wrap;
}

.reef-decree-dot {
  font-size: 8px;
  opacity: 0.5;
}

/* ────────────────────────────────────────────────────────────
   QUICK ACTIONS + COMMANDS
   ──────────────────────────────────────────────────────────── */
.reef-actions-section {
  padding: 80px 0;
  border-top: 1px solid rgba(78, 204, 163, 0.08);
}

.reef-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .reef-actions-grid {
    grid-template-columns: 1fr;
  }
}

.reef-actions-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Quick nav cards */
.reef-quicknav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.reef-quicknav-card {
  background: rgba(22, 33, 62, 0.7);
  border: 1px solid rgba(78, 204, 163, 0.12);
  border-radius: 10px;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  text-align: center;
}

.reef-quicknav-card:hover {
  background: rgba(78, 204, 163, 0.08);
  border-color: rgba(78, 204, 163, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.reef-qn-icon {
  font-size: 22px;
}

.reef-qn-label {
  font-size: 7px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

/* Quick commands panel */
.reef-commands-panel {
  background: rgba(10, 18, 35, 0.9);
  border: 1px solid rgba(78, 204, 163, 0.2);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-body);
}

.reef-commands-header {
  background: rgba(78, 204, 163, 0.08);
  border-bottom: 1px solid rgba(78, 204, 163, 0.15);
  padding: 12px 18px;
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.12em;
}

.reef-command-list {
  padding: 8px 0;
}

.reef-command-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(78, 204, 163, 0.06);
  transition: background var(--transition-fast);
}

.reef-command-row:last-child {
  border-bottom: none;
}

.reef-command-row:hover {
  background: rgba(78, 204, 163, 0.04);
}

.reef-command {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--success);
  background: rgba(78, 204, 163, 0.08);
  border: 1px solid rgba(78, 204, 163, 0.18);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast);
  user-select: all;
}

.reef-command:hover {
  background: rgba(78, 204, 163, 0.15);
}

.reef-command-desc {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

/* ────────────────────────────────────────────────────────────
   LATEST ANNOUNCEMENT PREVIEW
   ──────────────────────────────────────────────────────────── */
.reef-latest-section {
  padding: 80px 0;
  background: rgba(15, 52, 96, 0.08);
  border-top: 1px solid rgba(78, 204, 163, 0.08);
}

.reef-latest-card {
  background: rgba(22, 33, 62, 0.8);
  border: 1px solid rgba(78, 204, 163, 0.2);
  border-left: 3px solid var(--success);
  border-radius: 8px;
  padding: 28px 30px;
  max-width: 820px;
}

.reef-latest-loading {
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  padding: 20px 0;
}

.reef-latest-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.reef-latest-label {
  font-size: 8px;
  color: var(--success);
  letter-spacing: 0.1em;
}

.reef-latest-date {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.reef-latest-title {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.reef-latest-body {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* ────────────────────────────────────────────────────────────
   FOOTER CREST
   ──────────────────────────────────────────────────────────── */
.reef-footer-crest {
  padding: 48px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 25, 0.8) 100%);
  border-top: 1px solid rgba(78, 204, 163, 0.1);
  text-align: center;
}

.reef-footer-crest-inner {
  max-width: 600px;
  margin: 0 auto;
}

.reef-footer-logo {
  font-size: 14px;
  color: var(--success);
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}

.reef-footer-phase {
  font-size: 8px;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.reef-footer-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(78, 204, 163, 0.25), transparent
  );
  margin: 16px auto;
  max-width: 300px;
}

.reef-footer-motto {
  font-size: 12px;
  color: rgba(160, 160, 176, 0.55);
  font-family: var(--font-body);
  font-style: italic;
  margin: 0;
}

/* ────────────────────────────────────────────────────────────
   KINGDOM DEVELOPMENT FRAMING (phase lore guidance)
   ──────────────────────────────────────────────────────────── */
.reef-phase-lore {
  padding: 80px 0;
  border-top: 1px solid rgba(78, 204, 163, 0.08);
}

.reef-phase-lore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 36px;
}

@media (max-width: 768px) {
  .reef-phase-lore-grid {
    grid-template-columns: 1fr;
  }
}

.reef-lore-block {
  background: rgba(22, 33, 62, 0.6);
  border: 1px solid rgba(78, 204, 163, 0.1);
  border-radius: 10px;
  padding: 24px;
}

.reef-lore-block-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.reef-lore-block-title {
  font-size: 10px;
  color: var(--success);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.reef-lore-block-body {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* ────────────────────────────────────────────────────────────
   SCROLL REVEAL ANIMATION (reef elements)
   ──────────────────────────────────────────────────────────── */
.reef-step-card,
.reef-kingdom-card,
.reef-lore-block,
.reef-quicknav-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.reef-step-card.visible,
.reef-kingdom-card.visible,
.reef-lore-block.visible,
.reef-quicknav-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Elements that should not fade in (always visible) */
.reef-phase-banner,
.reef-hero,
.reef-ceremony-strip,
.reef-map-frame,
.reef-decree-parchment {
  opacity: 1 !important;
  transform: none !important;
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .reef-wedding-widget {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    margin: 32px auto 0;
    max-width: 260px;
  }

  .reef-hero {
    flex-direction: column;
    padding-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .reef-hero {
    min-height: auto;
    padding: 60px 20px 40px;
  }

  .reef-hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .reef-steps-grid {
    grid-template-columns: 1fr;
  }

  .reef-kingdoms-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reef-quicknav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reef-decree-parchment {
    padding: 32px 24px;
  }

  .reef-ceremony-inner {
    flex-direction: column;
    text-align: center;
  }

  .reef-ceremony-left {
    flex-direction: column;
    text-align: center;
  }

  .reef-ceremony-right {
    justify-content: center;
  }

  .reef-map-embed-wrap {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .reef-kingdoms-grid {
    grid-template-columns: 1fr;
  }

  .reef-quicknav-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .reef-audio-player {
    bottom: 12px;
    right: 12px;
  }

  .reef-audio-label {
    display: none;
  }
}
