@import "../fonts/fonts.css";

/* ==========================================================================
   MAREA CREATIVE ECOSYSTEM — DESIGN SYSTEM & STYLES
   Style: Premium minimalist creative studio, restrained editorial design
   Base Palette: Deep Midnight Navy (#0D1725) & Marea Brand Accents
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces & Backgrounds */
  --bg-primary: #0D1725;
  --bg-darker: #080E18;
  --bg-deepest: #05080E;
  --bg-elevated: rgba(255, 255, 255, 0.035);
  --bg-elevated-hover: rgba(255, 255, 255, 0.065);
  --bg-card: rgba(13, 23, 37, 0.65);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.24);

  /* Typography Colors */
  --text-main: #F4F2EE;
  --text-bright: #FFFFFF;
  --text-muted: #9AA7B7;
  --text-whisper: #5E6D82;

  /* Brand Accents from Marea Emblem */
  --accent-peach: #F8A88B;
  --accent-coral: #E26D5C;
  --accent-rose: #E58A9F;
  --accent-violet: #8C82D1;
  --accent-azure: #6FA8DC;
  --accent-cream: #FAF6EE;

  /* Typography Tokens */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* Spacing & Layout */
  --container-max: 1240px;
  --container-narrow: 880px;
  --container-text: 680px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-deep: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 50px rgba(140, 130, 209, 0.15);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Document Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  selection-background-color: rgba(248, 168, 139, 0.25);
}

::selection {
  background: rgba(248, 168, 139, 0.28);
  color: var(--text-bright);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Accessibility Focus States — Strictly Respects Element Curvature */
:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
  border-radius: inherit;
}

.nav-back:focus-visible,
.lang-btn:focus-visible,
.btn-subtle-store:focus-visible,
.synthesis-app-pill:focus-visible {
  border-radius: var(--radius-pill);
}

.btn-editorial-explore:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  color: var(--text-bright);
}

.flow-mini-card:focus-visible {
  border-radius: var(--radius-md);
}

.satellite-link:focus-visible {
  border-radius: 18px;
}

/* Tactile Active States for Rounded Interactive Elements */
.nav-back:active,
.lang-btn:active,
.flow-mini-card:active,
.btn-editorial-explore:active,
.btn-subtle-store:active,
.synthesis-app-pill:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.satellite-link:active .satellite-icon-wrap {
  transform: scale(0.94);
  transition-duration: 0.1s;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-text {
  max-width: var(--container-text);
}

/* Ambient Subtle Lighting Atmosphere */
.ambient-lighting {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: paint;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  will-change: transform;
}

.ambient-orb-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  left: 20%;
  background: radial-gradient(circle, var(--accent-peach) 0%, transparent 70%);
  animation: ambientFloat1 32s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  width: 750px;
  height: 750px;
  top: 40%;
  right: -200px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
  animation: ambientFloat2 40s ease-in-out infinite alternate;
}

.ambient-orb-3 {
  width: 550px;
  height: 550px;
  bottom: 10%;
  left: -150px;
  background: radial-gradient(circle, var(--accent-azure) 0%, transparent 70%);
  animation: ambientFloat3 36s ease-in-out infinite alternate;
}

@keyframes ambientFloat1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-30px, 40px, 0) scale(1.08); }
  100% { transform: translate3d(20px, -20px, 0) scale(0.96); }
}

@keyframes ambientFloat2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -30px, 0) scale(0.94); }
  100% { transform: translate3d(-20px, 30px, 0) scale(1.05); }
}

@keyframes ambientFloat3 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -30px, 0) scale(1.06); }
  100% { transform: translate3d(-30px, 20px, 0) scale(0.95); }
}

/* ==========================================================================
   NAVIGATION BAR
   Minimalist studio header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              backdrop-filter 0.3s ease,
              border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(13, 23, 37, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}

.site-header.header-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
}

.site-header:focus-within {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.nav-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
}

.nav-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.nav-back:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  transform: translateX(-2px);
}

.nav-brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--text-bright);
  opacity: 0.95;
  transition: opacity var(--transition-fast);
}

.nav-brand:hover {
  opacity: 1;
}

.nav-brand-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.lang-btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   SCENE 01 — IDENTITY
   Full screen, center emblem, unhurried presence
   ========================================================================== */
.scene-identity {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 1;
}

.identity-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.identity-emblem-wrap {
  position: relative;
  width: clamp(140px, 22vw, 220px);
  height: clamp(140px, 22vw, 220px);
  margin-bottom: clamp(28px, 4vw, 44px);
  display: grid;
  place-items: center;
}

.identity-emblem-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(248, 168, 139, 0.16) 0%,
    rgba(140, 130, 209, 0.10) 36%,
    rgba(111, 168, 220, 0.05) 56%,
    transparent 72%
  );
  filter: blur(40px);
  pointer-events: none;
  animation: emblemPulse 8s ease-in-out infinite alternate;
}

@keyframes emblemPulse {
  0% { transform: scale(0.96); opacity: 0.75; }
  100% { transform: scale(1.06); opacity: 1; }
}

.identity-emblem {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
  animation: emblemFloat 10s ease-in-out infinite alternate;
}

@keyframes emblemFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.identity-title {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em; /* optical alignment for tracking */
  color: var(--text-bright);
  text-transform: uppercase;
  margin-bottom: clamp(12px, 2vw, 20px);
  line-height: 1.1;
}

.identity-tagline {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.5;
}

.identity-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-whisper);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.identity-scroll-hint:hover {
  opacity: 1;
}

.scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--text-whisper) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--text-bright);
  animation: scrollDown 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(-100%); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}

/* ==========================================================================
   SCENE 02 — CREATIVE WORLD
   Philosophy & Synthesis of 5 Creative Disciplines
   ========================================================================== */
.scene-world {
  position: relative;
  padding: clamp(100px, 15vh, 180px) 0 clamp(80px, 12vh, 140px);
  z-index: 1;
}

.world-statement {
  text-align: center;
  margin-bottom: clamp(54px, 8vw, 96px);
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-peach);
  margin-bottom: 20px;
}

.world-heading {
  font-size: clamp(30px, 4.8vw, 56px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  max-width: 820px;
  margin: 0 auto clamp(24px, 3vw, 36px);
}

.world-disciplines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 32px);
  list-style: none;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.03em;
}

.discipline-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  transition: color var(--transition-fast);
}

.discipline-item:not(:last-child)::after {
  content: "·";
  color: var(--text-whisper);
  font-weight: 300;
}

.discipline-item.active,
.discipline-item:hover {
  color: var(--text-bright);
}

/* Connective Flow Bridge */
.world-flow-bridge {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding-top: clamp(20px, 4vw, 40px);
}

.flow-cards-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.flow-mini-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-smooth);
}

.flow-mini-card:hover {
  background: var(--bg-elevated-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.flow-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.flow-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-bright);
}

.flow-aspect {
  font-size: 11px;
  color: var(--text-whisper);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   SCENE 03 — THE FIVE APPS
   Distinct bespoke presentations for each application
   ========================================================================== */
.scene-apps {
  position: relative;
  z-index: 1;
}

.app-chapter {
  position: relative;
  padding: clamp(90px, 14vh, 160px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* App Header & Metainfo */
.app-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.app-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-peach);
  text-transform: uppercase;
}

.app-badge-separator {
  width: 24px;
  height: 1px;
  background: var(--border-light);
}

.app-title-group {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.app-name {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.app-tagline {
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 300;
  line-height: 1.35;
  color: var(--text-muted);
}

.app-description {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 32px;
}

/* App Actions & Links */
.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.btn-editorial-explore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-left: -12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-editorial-explore:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
}

.btn-editorial-arrow {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  opacity: 0.75;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn-editorial-explore:hover .btn-editorial-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

.btn-subtle-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.btn-subtle-store:hover {
  color: var(--text-bright);
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

/* Device Presentation Framing */
.device-frame-tablet {
  position: relative;
  background: #090F19;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: 10px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.device-frame-tablet:hover {
  transform: translateY(-4px);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.device-frame-tablet img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

.device-frame-tablet-portrait {
  max-width: 440px;
  margin: 0 auto;
}

.device-frame-mobile img {
  width: 100%;
  height: auto;
  display: block;
}

.device-frame-mobile {
  position: relative;
  background: #090F19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  padding: 8px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.device-frame-mobile:hover {
  transform: translateY(-4px);
}

.device-frame-mobile img {
  border-radius: 28px;
  width: 100%;
  display: block;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   App 01: Marea Color Specific Composition
   Split layout: Editorial palette text left + wide tablet palette canvas
   with layered floating mobile contrast card
   -------------------------------------------------------------------------- */
.chapter-color .app-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.color-stage {
  position: relative;
}

.color-stage-glow {
  position: absolute;
  top: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 168, 139, 0.22) 0%, rgba(140, 130, 209, 0.15) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.color-floating-card {
  position: absolute;
  bottom: -40px;
  left: -30px;
  width: clamp(160px, 20vw, 220px);
  z-index: 2;
}

.color-swatches-strip {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.color-swatch-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: transform var(--transition-fast);
}

.color-swatch-chip:hover {
  transform: scale(1.15);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   App 02: Marea Type Specific Composition
   Inverted layout: Massive typography stage on left, editorial text on right
   -------------------------------------------------------------------------- */
.chapter-type .app-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.type-stage {
  position: relative;
}

.type-stage-glow {
  position: absolute;
  top: 20%;
  left: -5%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 130, 209, 0.24) 0%, rgba(111, 168, 220, 0.12) 55%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.type-detail-floating {
  position: absolute;
  top: -30px;
  right: -25px;
  width: clamp(200px, 24vw, 280px);
  background: #090F19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.type-detail-floating img {
  border-radius: 8px;
}

.type-specimen-notes {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--text-whisper);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   App 03: Marea Page Specific Composition
   Editorial layers: Wide artboard spread with overlapping portrait companion
   -------------------------------------------------------------------------- */
.chapter-page .app-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.page-stage {
  position: relative;
}

.page-stage-glow {
  position: absolute;
  bottom: 0%;
  right: 5%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 109, 92, 0.20) 0%, rgba(248, 168, 139, 0.14) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.page-floating-feed {
  position: absolute;
  top: -35px;
  left: -35px;
  width: clamp(160px, 20vw, 220px);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   App 04: Marea Grid Specific Composition
   Photographic mosaic & tactile moodboards
   -------------------------------------------------------------------------- */
.chapter-grid .app-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.grid-stage {
  position: relative;
}

.grid-stage-glow {
  position: absolute;
  top: 15%;
  left: 0%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 168, 220, 0.22) 0%, rgba(140, 130, 209, 0.14) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.grid-floating-moodboard {
  position: absolute;
  bottom: -35px;
  right: -25px;
  width: clamp(170px, 21vw, 230px);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   App 05: Marea Canvas Specific Composition
   Infinite spatial study, relational notes, materials & connectors
   -------------------------------------------------------------------------- */
.chapter-canvas .app-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.canvas-stage {
  position: relative;
}

.canvas-stage-glow {
  position: absolute;
  top: 10%;
  right: 0%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 168, 139, 0.18) 0%, rgba(140, 130, 209, 0.18) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.canvas-floating-flow {
  position: absolute;
  bottom: -40px;
  left: -30px;
  width: clamp(165px, 20vw, 225px);
  z-index: 2;
}

/* ==========================================================================
   SCENE 04 — ONE CREATIVE WORLD
   Ecosystem synthesis: 5 icons around central Marea emblem
   ========================================================================== */
.scene-synthesis {
  position: relative;
  padding: clamp(120px, 18vh, 200px) 0 clamp(80px, 12vh, 140px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  z-index: 1;
}

.synthesis-statement {
  max-width: 780px;
  margin: 0 auto clamp(48px, 6vw, 72px);
}

.synthesis-heading {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 16px;
}

.synthesis-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto;
}

/* Constellation Ring */
.synthesis-constellation {
  position: relative;
  width: min(100%, 580px);
  aspect-ratio: 1 / 1;
  margin: 0 auto clamp(48px, 6vw, 72px);
  display: grid;
  place-items: center;
}

.constellation-orbit {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.constellation-center {
  position: relative;
  width: clamp(110px, 18vw, 150px);
  height: clamp(110px, 18vw, 150px);
  z-index: 3;
}

.constellation-center-glow {
  position: absolute;
  inset: -25%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(248, 168, 139, 0.20) 0%, rgba(140, 130, 209, 0.12) 45%, transparent 70%);
  filter: blur(28px);
}

.constellation-center-logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

/* 5 Satellites Arranged in 72-degree Radial Distribution */
.constellation-satellites {
  position: absolute;
  inset: 0;
  list-style: none;
}

.satellite-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(64px, 10vw, 84px);
  height: clamp(64px, 10vw, 84px);
  margin-top: calc(-1 * clamp(64px, 10vw, 84px) / 2);
  margin-left: calc(-1 * clamp(64px, 10vw, 84px) / 2);
  transition: transform var(--transition-smooth);
}

.satellite-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  text-decoration: none;
}

.satellite-icon-wrap {
  position: relative;
  width: clamp(52px, 8vw, 68px);
  height: clamp(52px, 8vw, 68px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.satellite-icon-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.satellite-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.satellite-item:hover .satellite-icon-wrap {
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(140, 130, 209, 0.25);
}

.satellite-item:hover .satellite-label {
  color: var(--text-bright);
}

/* Positions around 38% radius circle */
/* Color: -90 deg (Top) */
.satellite-color { transform: translate(0, -180px); }
/* Type: -18 deg (Top Right) */
.satellite-type  { transform: translate(171px, -55px); }
/* Page: 54 deg (Bottom Right) */
.satellite-page  { transform: translate(106px, 145px); }
/* Grid: 126 deg (Bottom Left) */
.satellite-grid  { transform: translate(-106px, 145px); }
/* Canvas: 198 deg (Top Left) */
.satellite-canvas{ transform: translate(-171px, -55px); }

@media (max-width: 640px) {
  .synthesis-constellation {
    width: 320px;
    height: 320px;
  }
  .satellite-color { transform: translate(0, -115px); }
  .satellite-type  { transform: translate(110px, -35px); }
  .satellite-page  { transform: translate(68px, 92px); }
  .satellite-grid  { transform: translate(-68px, 92px); }
  .satellite-canvas{ transform: translate(-110px, -35px); }
}

/* Apps Grid Directory Links (Clean editorial list before Dedication) */
.synthesis-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.synthesis-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.synthesis-app-pill:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.synthesis-app-pill img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* ==========================================================================
   SCENE 05 — THE DEDICATION
   The Emotional Culmination: Slowed rhythm, deep void, delicate reveal
   Strictly NO standard footer after this scene.
   ========================================================================== */
.scene-dedication {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(140px, 20vh, 220px) 24px clamp(80px, 12vh, 120px);
  background: radial-gradient(
    ellipse at 50% 60%,
    rgba(14, 21, 33, 0.95) 0%,
    var(--bg-deepest) 70%
  );
  overflow: hidden;
  z-index: 2;
}

.dedication-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, transparent 100%);
  pointer-events: none;
}

.dedication-container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dedication-prelude {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: clamp(48px, 8vw, 76px);
  font-weight: 300;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

.dedication-pause {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto clamp(48px, 8vw, 76px);
}

.dedication-statement {
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-bright);
}

.dedication-accent {
  font-weight: 500;
  background: linear-gradient(135deg, var(--text-bright) 20%, var(--accent-peach) 70%, var(--accent-rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 8px;
}

/* Subtle Backlit Emblem Accent */
.dedication-emblem-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin-top: clamp(64px, 10vw, 96px);
  display: grid;
  place-items: center;
}

.dedication-emblem-glow {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 168, 139, 0.3) 0%, rgba(140, 130, 209, 0.2) 50%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: emblemPulse 6s ease-in-out infinite alternate;
}

.dedication-emblem {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-mask-image: radial-gradient(circle at center, #000 50%, rgba(0, 0, 0, 0.4) 62%, transparent 74%);
  mask-image: radial-gradient(circle at center, #000 50%, rgba(0, 0, 0, 0.4) 62%, transparent 74%);
  opacity: 0.88;
}

.dedication-whisper {
  margin-top: clamp(40px, 6vw, 60px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-whisper);
  opacity: 0.45;
}

/* ==========================================================================
   SCROLL REVEAL MOTION & STAGGER
   Progressive opacity and vertical elevation
   ========================================================================== */
.reveal-init {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* Parallax subtle floating elements */
.parallax-layer {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ==========================================================================
   RESPONSIVE ADAPTATIONS
   Tailored viewports for 1440px+, Tablet (768px-1024px), Mobile (320px-430px)
   ========================================================================== */

/* Large screens (>= 1200px) */
@media (min-width: 1200px) {
  .color-floating-card {
    left: -44px;
    bottom: -32px;
  }
  .type-detail-floating {
    right: -36px;
    top: -30px;
  }
  .page-floating-feed {
    left: -44px;
    top: -30px;
  }
  .grid-floating-moodboard {
    right: -36px;
    bottom: -32px;
  }
  .canvas-floating-flow {
    left: -44px;
    bottom: -32px;
  }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .chapter-color .app-layout,
  .chapter-type .app-layout,
  .chapter-page .app-layout,
  .chapter-grid .app-layout,
  .chapter-canvas .app-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .chapter-type .app-layout,
  .chapter-grid .app-layout {
    /* Place text first, stage second on single column */
    display: flex;
    flex-direction: column;
  }

  .chapter-type .app-content,
  .chapter-grid .app-content {
    order: 1;
  }

  .chapter-type .type-stage,
  .chapter-grid .grid-stage {
    order: 2;
  }

  .flow-cards-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .flow-mini-card:nth-child(4),
  .flow-mini-card:nth-child(5) {
    grid-column: span 1;
  }

  .color-stage-glow,
  .type-stage-glow,
  .page-stage-glow,
  .grid-stage-glow,
  .canvas-stage-glow {
    max-width: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Mobile Devices (<= 767px) — 20% vertical compression for balanced pacing */
@media (max-width: 767px) {
  :root {
    --section-gap: 64px;
    --chapter-gap: 68px;
  }

  .site-header {
    padding: 10px 0;
  }

  .nav-back span {
    display: none;
  }

  .nav-back {
    padding: 6px 10px;
  }

  .scene-world {
    padding: 72px 0 44px;
  }

  .app-chapter {
    padding: 44px 0;
  }

  .scene-synthesis {
    padding: 68px 0 48px;
  }

  .flow-cards-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .flow-mini-card:nth-child(5) {
    grid-column: span 2;
  }

  .color-floating-card,
  .type-detail-floating,
  .page-floating-feed,
  .grid-floating-moodboard,
  .canvas-floating-flow {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 250px;
    margin: 14px auto 0;
  }

  .type-detail-floating {
    margin-top: 14px;
  }

  .color-stage-glow,
  .type-stage-glow,
  .page-stage-glow,
  .grid-stage-glow,
  .canvas-stage-glow {
    width: 260px;
    height: 260px;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(50px);
  }

  .synthesis-constellation {
    margin-bottom: 24px;
  }

  .dedication-statement {
    font-size: 24px;
  }

  .dedication-prelude {
    font-size: 17px;
  }
}

/* Small Mobile (320px - 380px) */
@media (max-width: 380px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .identity-title {
    font-size: 32px;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .app-name {
    font-size: 28px;
  }

  .app-tagline {
    font-size: 16px;
  }

  .btn-subtle-store {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   Respect users who prefer non-animated experience
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .ambient-orb,
  .identity-emblem-glow,
  .identity-emblem,
  .dedication-emblem-glow {
    animation: none !important;
  }

  .reveal-init {
    opacity: 1 !important;
    transform: none !important;
  }
}
