/* ==========================================================================
   THE ROYAL™ — Real Estate Brand Architecture & Demand Growth Strategy
   Sector 04: Real Estate & Developments Architecture
   
   Palette:
   - Deep Midnight Canvas: #081220
   - Elevated Surface:     #0C1A2E
   - Card Base:            #0F223D
   - Card Alt:             #132A4A
   - Sovereign Teal:       #00A896
   - Teal Glow:            rgba(0, 168, 150, 0.35)
   - Sky Blue Accent:      #38BDF8
   - Champagne Gold:       #C3A66B
   ========================================================================== */

:root {
  --re-bg: #081220;
  --re-surface: #0C1A2E;
  --re-card: #0F223D;
  --re-card-alt: #132A4A;
  --re-teal: #00A896;
  --re-teal-glow: rgba(0, 168, 150, 0.35);
  --re-sky: #38BDF8;
  --re-gold: #C3A66B;
  --re-text: #FFFFFF;
  --re-muted: #94A3B8;
  --re-border: rgba(0, 168, 150, 0.28);
  --re-border-subtle: rgba(255, 255, 255, 0.1);
  --re-font-sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --re-radius-sm: 6px;
  --re-radius-md: 12px;
  --re-radius-lg: 18px;
  --re-radius-full: 9999px;
  --re-transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

body.re-body {
  background-color: var(--re-bg);
  color: var(--re-text);
  font-family: var(--re-font-sans);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(0, 168, 150, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(0, 168, 150, 0.05) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
}

/* Hero Section */
.re-hero {
  padding: 140px 60px 70px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.re-hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.re-hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: brightness(0.55) saturate(1.25);
}

.re-hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 30%, rgba(8, 18, 32, 0.35) 0%, rgba(8, 18, 32, 0.94) 80%);
}

.re-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.re-hero-content {
  position: relative;
  z-index: 2;
}

.re-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.re-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.re-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--re-radius-full);
  background: rgba(0, 168, 150, 0.15);
  border: 1px solid var(--re-teal);
  color: var(--re-teal);
}
.re-badge.gold {
  background: rgba(195, 166, 107, 0.15);
  border-color: var(--re-gold);
  color: var(--re-gold);
}
.re-badge.sky {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--re-sky);
  color: var(--re-sky);
}

.re-title {
  font-size: clamp(34px, 5.2vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.re-title em {
  font-style: italic;
  color: var(--re-teal);
  font-weight: 300;
}

.re-hero-word {
  display: inline-block;
  will-change: transform, opacity;
}

.re-positioning {
  font-size: clamp(19px, 2.2vw, 30px);
  color: var(--re-teal);
  font-style: italic;
  margin-bottom: 28px;
  max-width: 960px;
  line-height: 1.4;
  border-left: 3px solid var(--re-sky);
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(0, 168, 150, 0.08) 0%, transparent 100%);
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 0 8px 8px 0;
}

.re-desc {
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 900px;
  margin-bottom: 36px;
}

/* 3D Skyline Canvas Card */
.re-skyline-card {
  background: rgba(12, 26, 46, 0.85);
  border: 1px solid var(--re-border);
  border-radius: var(--re-radius-lg);
  padding: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.re-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: var(--re-radius-md);
  overflow: hidden;
  background: rgba(4, 12, 24, 0.9);
}

#reSkylineCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Container Standard */
.re-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}

/* Strategic Shift Grid */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 40px 0 70px;
}
.shift-card {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.shift-card:hover {
  transform: translateY(-4px);
  border-color: var(--re-teal);
  box-shadow: 0 12px 30px var(--re-teal-glow);
}
.shift-from {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #EF4444;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.shift-arrow {
  color: var(--re-teal);
  font-size: 16px;
  margin: 4px 0;
}
.shift-to {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}
.shift-desc {
  font-size: 13px;
  color: var(--re-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* Section Styling */
.re-section {
  padding: 90px 0;
  border-top: 1px solid var(--re-border-subtle);
  position: relative;
}
.re-section-title {
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: #FFFFFF;
}
.re-section-subtitle {
  font-size: 16px;
  color: var(--re-teal);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 12px;
}

/* Persona Tabs */
.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 40px;
}
.persona-btn {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  color: var(--re-text);
  padding: 14px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}
.persona-btn.active, .persona-btn:hover {
  background: var(--re-teal);
  color: #081220;
  border-color: var(--re-teal);
  box-shadow: 0 4px 20px var(--re-teal-glow);
}

.persona-display {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
#personaContent {
  view-transition-name: re-persona-content;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}
.persona-box {
  background: rgba(8, 18, 32, 0.6);
  border: 1px solid var(--re-border-subtle);
  border-radius: 10px;
  padding: 20px;
}
.persona-box-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--re-sky);
  margin-bottom: 10px;
}
.persona-box-val {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* Message Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.pillar-card {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  border-radius: 14px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--re-teal);
}
.pillar-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--re-teal);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pillar-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #FFFFFF;
}
.pillar-sub {
  font-size: 14px;
  font-style: italic;
  color: var(--re-sky);
  margin-bottom: 16px;
}
.pillar-points {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pillar-points li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.pillar-points li::before {
  content: '✔';
  color: var(--re-teal);
  font-weight: 800;
  font-size: 12px;
}

/* Channel Architecture */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.channel-card {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  border-radius: 12px;
  padding: 28px;
}
.channel-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 168, 150, 0.15);
  color: var(--re-teal);
  margin-bottom: 14px;
}
.channel-name {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}
.channel-role {
  font-size: 13px;
  font-style: italic;
  color: var(--re-sky);
  margin-bottom: 14px;
}
.channel-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

/* Content Engines */
.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.engine-card {
  background: linear-gradient(180deg, var(--re-card) 0%, var(--re-card-alt) 100%);
  border: 1px solid var(--re-border);
  border-radius: 14px;
  padding: 30px;
  position: relative;
}
.engine-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--re-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.engine-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
}
.engine-quote {
  font-size: 14px;
  font-style: italic;
  color: var(--re-teal);
  border-left: 2px solid var(--re-teal);
  padding-left: 12px;
  margin-bottom: 16px;
}
.engine-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.engine-list li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.engine-list li::before {
  content: '▪';
  color: var(--re-sky);
  font-size: 14px;
}

/* Content Engine Interactive Video Mockup Cards */
.re-media-mockup {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--re-border-subtle);
  cursor: pointer;
  transition: var(--re-transition);
}
.re-media-mockup:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--re-teal);
  box-shadow: 0 10px 25px var(--re-teal-glow);
}
.re-media-mockup video,
.re-media-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.re-media-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 168, 150, 0.9);
  color: #081220;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 0 20px var(--re-teal-glow);
  transition: var(--re-transition);
}
.re-media-mockup:hover .re-media-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: #FFFFFF;
}

/* Demand Funnel 7 Stages */
.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}
.funnel-item {
  background: var(--re-card);
  border: 1px solid var(--re-border);
  border-radius: 12px;
  padding: 22px 30px;
  display: grid;
  grid-template-columns: 80px 220px 1fr 200px;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}
.funnel-item:hover {
  border-color: var(--re-teal);
  transform: translateX(6px);
  box-shadow: 0 4px 20px var(--re-teal-glow);
}
.funnel-step {
  font-size: 22px;
  font-weight: 900;
  color: var(--re-teal);
  letter-spacing: -0.02em;
}
.funnel-phase {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}
.funnel-detail {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}
.funnel-outcome {
  font-size: 12px;
  font-weight: 700;
  color: var(--re-sky);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}

/* Interactive Calculator & Proposal Desk */
.interactive-card {
  background: linear-gradient(180deg, var(--re-card) 0%, #0A1626 100%);
  border: 1px solid var(--re-border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-top: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--re-sky);
}
.form-group input, .form-group select, .form-group textarea {
  background: rgba(8, 18, 32, 0.85);
  border: 1px solid var(--re-border);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--re-teal);
  box-shadow: 0 0 10px var(--re-teal-glow);
}

.calc-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: rgba(0, 168, 150, 0.08);
  border: 1px solid var(--re-border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}
.calc-metric-box {
  text-align: center;
}
.calc-metric-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--re-teal);
  margin-bottom: 4px;
}
.calc-metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--re-muted);
}

.re-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--re-teal);
  color: #081220;
  font-size: 14px;
  font-weight: 800;
  padding: 16px 32px;
  border-radius: var(--re-radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 6px 24px var(--re-teal-glow);
}
.re-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px var(--re-teal-glow);
  background: #02c5b0;
}

/* ==========================================================================
   01 — VIEW TRANSITIONS API
   ========================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   02 — CSS SCROLL-DRIVEN ANIMATIONS
   ========================================================================== */
@supports (animation-timeline: view()) {
  .funnel-item {
    animation: reFunnelSlideGlow auto ease-in-out both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }
  .shift-card {
    animation: reShiftParallax auto ease-in-out both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }
}

@keyframes reFunnelSlideGlow {
  from {
    opacity: 0.6;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reShiftParallax {
  from {
    opacity: 0.6;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   03 — CONTAINER QUERIES & SHAPE MASKS
   ========================================================================== */
.shift-grid,
.pillar-grid,
.engine-grid,
.channel-grid {
  container-type: inline-size;
  container-name: reGrid;
}

@container reGrid (min-width: 480px) {
  .shift-card, .pillar-card, .engine-card {
    padding: 28px;
  }
}
@container reGrid (min-width: 768px) {
  .shift-card, .pillar-card, .engine-card {
    padding: 34px;
  }
  .pillar-title, .engine-title {
    font-size: 22px;
  }
}

.re-arch-polygon {
  clip-path: polygon(0% 16px, 16px 0%, calc(100% - 16px) 0%, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0% calc(100% - 16px));
}

/* ==========================================================================
   07 — SKELETON SHIMMER LOADING
   ========================================================================== */
.re-skeleton-shimmer {
  background: linear-gradient(90deg, rgba(12, 26, 46, 0.8) 25%, rgba(0, 168, 150, 0.15) 50%, rgba(12, 26, 46, 0.8) 75%);
  background-size: 200% 100%;
  animation: reShimmer 2.2s infinite ease-in-out;
}
@keyframes reShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (max-width: 900px) {
  .re-hero, .re-container {
    padding-left: 24px;
    padding-right: 24px;
  }
  .re-hero-grid {
    grid-template-columns: 1fr;
  }
  .funnel-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
