/* ═══════════════════════════════════════════════════
   AGILEMESH — THE EBITDA POP
   Authority-grade. Spectator editorial meets Gartner data.
   Palette: cool-white #f0f2f5 | navy #0a1628 | gold #d4a84b
            teal #5a9ec0 | amber #c89030 | deep-gold #b8832a
═══════════════════════════════════════════════════ */

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

:root {
  --cream: #f0f2f5; --cream-warm: #e0e4ea; --cream-dark: #a0aab8;
  --ink: #0a1628; --ink-soft: #162032; --ink-muted: #6b7d96;
  --amber: #c89030; --amber-light: #e0a848; --amber-dark: #9a6f1a;
  --teal: #5a9ec0; --teal-dark: #3d7a9a;
  --gold: #d4a84b; --gold-light: #f0c060; --gold-dark: #b8832a;
  --red-drain: #8b2020;
  --ff-serif: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--ink); color: var(--cream);
  font-family: var(--ff-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(90, 158, 192, 0.2);
  padding: 0.85rem 2.5rem;
}
.masthead-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.masthead-logo { font-family: var(--ff-body); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em; text-transform: lowercase; }
.logo-mesh { color: var(--cream); }
.logo-accent { color: var(--teal); }
.masthead-tagline { font-size: 0.78rem; font-weight: 400; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.hero-title-section { max-width: 1100px; margin: 0 auto; padding: 7rem 2.5rem 5rem; text-align: center; }
.hero-eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
  background: rgba(90, 158, 192, 0.08); border: 1px solid rgba(90, 158, 192, 0.25);
  border-radius: 2px; padding: 0.35em 1em; margin-bottom: 2.5rem;
  animation: fadeUp 0.7s var(--ease-smooth) both; animation-delay: 0.1s;
}
.hero-headline {
  font-family: var(--ff-serif); font-size: clamp(4.5rem, 9vw, 9rem);
  font-weight: 900; line-height: 0.92; color: var(--cream);
  letter-spacing: -0.02em; margin-bottom: 2.5rem;
  animation: fadeUp 0.9s var(--ease-smooth) both; animation-delay: 0.25s;
}
.hero-headline em { font-style: italic; color: var(--gold); display: block; }
.hero-subline {
  font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 300; color: var(--cream-dark);
  max-width: 640px; margin: 0 auto 3rem; line-height: 1.75;
  animation: fadeUp 0.8s var(--ease-smooth) both; animation-delay: 0.45s;
}
.hero-subline em { font-style: normal; color: var(--gold); font-weight: 500; }
.hero-scroll-cue {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted);
  animation: scrollPulse 2.5s ease-in-out infinite, fadeUp 0.8s var(--ease-smooth) both;
  animation-delay: 0s, 0.65s;
}
@keyframes scrollPulse { 0%, 100% { opacity: 0.5; transform: translateY(0); } 50% { opacity: 1; transform: translateY(4px); } }

.building-section { padding: 0 0 4rem; position: relative; }
.building-container { max-width: 1440px; margin: 0 auto; padding: 0 2rem; position: relative; }
.split-labels { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 2rem; margin-bottom: 0.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.split-label { display: flex; align-items: center; gap: 0.55rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); }
.split-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.split-dot--red { background: #c04040; box-shadow: 0 0 5px rgba(192,64,64,0.6); }
.split-dot--amber { background: var(--gold); box-shadow: 0 0 5px rgba(212,168,75,0.6); }

.building-image-wrapper {
  position: relative; width: 100%; border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 8px 32px rgba(0,0,0,0.6), 0 24px 80px rgba(0,0,0,0.4);
  cursor: crosshair; background: #0a1020;
}
.building-img { display: block; width: 100%; height: auto; user-select: none; transition: filter 0.4s var(--ease-smooth); }
.building-image-wrapper.has-active .building-img { filter: brightness(0.75); }

.floor-hotspot { position: absolute; cursor: pointer; border: 2px solid transparent; border-radius: 2px; transition: border-color 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth); outline: none; }
.floor-hotspot::after { content: ''; position: absolute; inset: 0; background: rgba(90, 158, 192, 0); transition: background 0.25s var(--ease-smooth); border-radius: 2px; pointer-events: none; }
.floor-hotspot:hover::after, .floor-hotspot:focus::after, .floor-hotspot.active::after { background: rgba(90, 158, 192, 0.06); }
.floor-hotspot:hover, .floor-hotspot:focus, .floor-hotspot.active { border-color: rgba(90, 158, 192, 0.4); outline: none; }
.floor-hotspot--foundation:hover, .floor-hotspot--foundation:focus, .floor-hotspot--foundation.active { border-color: rgba(212, 168, 75, 0.65); }
.floor-hotspot--foundation:hover::after, .floor-hotspot--foundation:focus::after, .floor-hotspot--foundation.active::after { background: rgba(212, 168, 75, 0.08); }

.floor-pulse { position: absolute; top: 10px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(90, 158, 192, 0.7); animation: pulseRing 2.5s ease-out infinite; pointer-events: none; }
.floor-pulse--gold { background: var(--gold); box-shadow: 0 0 0 0 rgba(212, 168, 75, 0.7); animation: pulseRingGold 2.5s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(90, 158, 192, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(90, 158, 192, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(90, 158, 192, 0); } }
@keyframes pulseRingGold { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 168, 75, 0.8); } 70% { transform: scale(1.1); box-shadow: 0 0 0 12px rgba(212, 168, 75, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 168, 75, 0); } }

.floor-label { position: absolute; top: 8px; left: 10px; display: flex; align-items: center; gap: 0.5rem; opacity: 0; transform: translateX(-4px); transition: opacity 0.22s var(--ease-smooth), transform 0.22s var(--ease-smooth); pointer-events: none; }
.floor-hotspot:hover .floor-label, .floor-hotspot:focus .floor-label, .floor-hotspot.active .floor-label { opacity: 1; transform: translateX(0); }
.fl-tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream); background: rgba(10, 22, 40, 0.8); backdrop-filter: blur(4px); padding: 0.2em 0.55em; border-radius: 2px; border: 1px solid rgba(90, 158, 192, 0.3); }
.fl-tag--foundation { border-color: rgba(212, 168, 75, 0.5); background: rgba(10, 22, 40, 0.9); }
.fl-amount { font-size: 0.7rem; font-weight: 700; color: var(--gold); background: rgba(10, 22, 40, 0.8); backdrop-filter: blur(4px); padding: 0.2em 0.55em; border-radius: 2px; border: 1px solid rgba(212, 168, 75, 0.2); }
.fl-amount--foundation { color: var(--gold); font-size: 0.82rem; border-color: rgba(212, 168, 75, 0.35); }

.floor-tooltip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px) scale(0.97); width: min(480px, 88vw); background: rgba(10, 18, 36, 0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(90, 158, 192, 0.3); border-radius: 4px; padding: 1.25rem 1.5rem; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth), visibility 0s linear 0.25s; z-index: 50; box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 1px 0 rgba(90, 158, 192, 0.15) inset; }
.floor-hotspot:hover .floor-tooltip, .floor-hotspot:focus .floor-tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); transition: opacity 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth), visibility 0s; pointer-events: auto; }
.floor-tooltip--foundation { border-color: rgba(212, 168, 75, 0.45); background: rgba(8, 14, 28, 0.98); }
.ft-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; padding-bottom: 0.65rem; border-bottom: 1px solid rgba(90, 158, 192, 0.12); }
.ft-floor { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.ft-figure { font-family: var(--ff-serif); font-size: 1.1rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.ft-figure--gold { color: var(--gold-light); font-size: 1.3rem; }
.ft-body { font-size: 0.88rem; line-height: 1.65; color: var(--cream-dark); margin-bottom: 0.85rem; }
.ft-detail { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ft-kpi { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); background: rgba(90, 158, 192, 0.1); border: 1px solid rgba(90, 158, 192, 0.2); padding: 0.25em 0.65em; border-radius: 2px; }
.ft-kpi--gold { color: var(--gold); background: rgba(212, 168, 75, 0.1); border-color: rgba(212, 168, 75, 0.25); }

.annotation-drawer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; transform: translateY(100%); transition: transform 0.38s var(--ease-smooth); pointer-events: none; }
.annotation-drawer.open { transform: translateY(0); pointer-events: auto; }
.annotation-drawer-inner { background: rgba(8, 16, 32, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(90, 158, 192, 0.3); border-radius: 16px 16px 0 0; padding: 1.5rem 1.75rem 2.5rem; max-width: 640px; margin: 0 auto; position: relative; }
.drawer-close { position: absolute; top: 1rem; right: 1.25rem; background: transparent; border: none; color: var(--ink-muted); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0.2em 0.4em; border-radius: 2px; transition: color 0.2s; }
.drawer-close:hover { color: var(--cream); }

.floor-legend-section { padding: 4rem 2.5rem 2rem; max-width: 1440px; margin: 0 auto; }
.floor-legend-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; border: 1px solid rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.legend-item { padding: 1.5rem 1.25rem 1.75rem; background: rgba(255,255,255,0.02); cursor: pointer; transition: background 0.22s var(--ease-smooth), transform 0.22s var(--ease-smooth); border-right: 1px solid rgba(255,255,255,0.05); position: relative; }
.legend-item:last-child { border-right: none; }
.legend-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-smooth); }
.legend-item:hover::before, .legend-item.highlight::before { transform: scaleX(1); }
.legend-item--foundation::before { background: var(--gold); }
.legend-item:hover, .legend-item.highlight { background: rgba(90, 158, 192, 0.06); }
.legend-item--foundation:hover, .legend-item--foundation.highlight { background: rgba(212, 168, 75, 0.06); }
.legend-floor-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.5rem; }
.legend-floor-tag--gold { color: var(--gold-dark); }
.legend-amount { font-family: var(--ff-serif); font-size: clamp(1rem, 1.8vw, 1.5rem); font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 0.4rem; }
.legend-amount--gold { color: var(--gold-light); font-size: clamp(1.2rem, 2.2vw, 2rem); }
.legend-title { font-size: 0.78rem; font-weight: 600; color: var(--cream); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
.legend-desc { font-size: 0.72rem; line-height: 1.55; color: var(--ink-muted); font-weight: 300; }

.line-items-section { padding: 4rem 2.5rem; max-width: 1440px; margin: 0 auto; }
.line-items-inner { max-width: 800px; margin: 0 auto; }
.line-items-heading { font-family: var(--ff-serif); font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-weight: 700; color: var(--cream); margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.line-items-sub { font-size: 0.88rem; color: var(--ink-muted); margin-bottom: 2.5rem; line-height: 1.6; font-weight: 300; }
.line-items-table { display: flex; flex-direction: column; gap: 1px; border: 1px solid rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.line-item { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.75rem; background: rgba(255,255,255,0.02); gap: 2rem; transition: background 0.2s; border-bottom: 1px solid rgba(255,255,255,0.04); }
.line-item:last-child { border-bottom: none; }
.line-item:hover { background: rgba(90, 158, 192, 0.04); }
.li-category { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 0.25rem; }
.li-name { font-size: 1rem; font-weight: 500; color: var(--cream); }
.li-right { text-align: right; flex-shrink: 0; }
.li-range { font-family: var(--ff-serif); font-size: 1.3rem; font-weight: 700; color: var(--gold); line-height: 1; }
.li-per { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-top: 0.2rem; }
.li-source { font-size: 0.7rem; font-style: italic; color: rgba(160, 170, 184, 0.4); margin-top: 0.3rem; letter-spacing: 0.01em; }

.punchline-section { padding: 6rem 2.5rem 7rem; position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ink) 0%, #060e1c 40%, #040a14 100%); }
.punchline-section::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70vw; height: 50vh; background: radial-gradient(ellipse at center, rgba(212, 168, 75, 0.06) 0%, transparent 70%); pointer-events: none; }
.punchline-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.punchline-number-row { display: flex; align-items: center; justify-content: center; gap: 3rem; flex-wrap: wrap; margin-bottom: 5rem; }
.punchline-stat { text-align: center; }
.ps-figure { font-family: var(--ff-serif); font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 900; color: var(--cream); line-height: 1; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
.ps-figure--gold { color: var(--gold); text-shadow: 0 0 40px rgba(212, 168, 75, 0.35); }
.ps-label { font-size: 0.78rem; font-weight: 500; color: var(--ink-muted); line-height: 1.5; letter-spacing: 0.03em; }
.ps-qualifier { display: block; font-size: 0.68rem; color: var(--teal-dark); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.15rem; }
.ps-qualifier strong { color: var(--teal); font-weight: 700; }
.punchline-divider { font-family: var(--ff-serif); font-size: 2.5rem; color: rgba(255,255,255,0.12); font-weight: 300; line-height: 1; flex-shrink: 0; }
.punchline-divider--equals { color: rgba(212, 168, 75, 0.25); }
.punchline-stat--roi .ps-figure { font-size: clamp(3rem, 6vw, 5.5rem); }

.punchline-quote-wrap { text-align: center; margin-bottom: 5rem; padding: 3rem; border: 1px solid rgba(212, 168, 75, 0.15); border-radius: 4px; background: rgba(212, 168, 75, 0.02); position: relative; }
.punchline-quote-wrap::before { content: '\201C'; position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); font-family: var(--ff-serif); font-size: 6rem; line-height: 1; color: rgba(212, 168, 75, 0.12); pointer-events: none; }
.punchline-quote { font-family: var(--ff-serif); font-size: clamp(1.1rem, 2vw, 1.6rem); font-style: italic; font-weight: 400; color: var(--cream-warm); line-height: 1.6; max-width: 800px; margin: 0 auto; quotes: none; }
.punchline-quote strong { font-style: normal; font-weight: 700; color: var(--gold); }

.punchline-rating-row { display: flex; align-items: center; justify-content: center; gap: 3rem; }
.rating-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 4px; padding: 2rem 2.5rem; text-align: center; min-width: 180px; transition: transform 0.3s var(--ease-smooth); }
.rating-card:hover { transform: translateY(-4px); }
.rating-card--after { border-color: rgba(212, 168, 75, 0.3); background: rgba(212, 168, 75, 0.04); }
.rc-score { font-family: var(--ff-serif); font-size: 3rem; font-weight: 900; color: rgba(255,255,255,0.2); line-height: 1; margin-bottom: 0.5rem; }
.rc-score--gold { color: var(--gold); text-shadow: 0 0 30px rgba(212, 168, 75, 0.4); }
.rc-verdict { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.35rem; }
.rating-card--after .rc-verdict { color: var(--gold); }
.rc-note { font-size: 0.72rem; color: var(--ink-muted); font-style: italic; line-height: 1.4; }
.rating-card--after .rc-note { color: var(--cream-dark); font-style: normal; font-weight: 500; }
.rating-arrow { font-size: 2rem; color: rgba(90, 158, 192, 0.35); flex-shrink: 0; }

.site-footer { padding: 2rem 2.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-logo { font-family: var(--ff-body); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; }
.footer-dot { color: var(--teal-dark); opacity: 0.7; }
.footer-line { font-size: 0.72rem; color: var(--ink-muted); letter-spacing: 0.04em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth); }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.hero-title-section, .masthead { opacity: 1 !important; transform: none !important; }

@media (max-width: 1200px) { .floor-legend-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .masthead { padding: 0.75rem 1.5rem; } .masthead-tagline { display: none; }
  .hero-title-section { padding: 5rem 1.5rem 3.5rem; }
  .split-labels { padding: 0.65rem 1rem; } .split-label { font-size: 0.65rem; }
  .building-container { padding: 0 0.75rem; }
  .floor-tooltip { display: none; }
  .floor-legend-grid { grid-template-columns: 1fr 1fr; }
  .line-items-section, .punchline-section, .floor-legend-section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .punchline-number-row { gap: 1.5rem; } .punchline-divider { font-size: 1.8rem; }
  .punchline-quote-wrap { padding: 2rem 1.5rem; }
  .punchline-rating-row { gap: 1.5rem; }
  .line-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; } .li-right { text-align: left; }
}
@media (max-width: 600px) {
  .hero-title-section { padding: 4rem 1.25rem 3rem; }
  .floor-legend-grid { grid-template-columns: 1fr; }
  .legend-item { border-right: none; border-top: 1px solid rgba(255,255,255,0.04); }
  .punchline-number-row { flex-direction: column; gap: 1.5rem; } .punchline-divider { display: none; }
  .punchline-rating-row { flex-direction: column; gap: 1rem; } .rating-arrow { transform: rotate(90deg); }
  .split-labels { display: none; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.touch-device .floor-tooltip { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
