/* ==========================================================================
   ABLE TEKNOLOJİ — Architectural Monolith & Dual-Polarity Index
   ========================================================================== */

:root {
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-curtain: cubic-bezier(0.77, 0, 0.175, 1);
  --frame-inset: clamp(12px, 2vw, 26px);
}

/* Dark Polarity (Default — Obsidian) */
:root,
[data-theme="dark"] {
  --bg: #0b0b0d;
  --bg-elevated: rgba(20, 20, 24, 0.86);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --ink: #f4f4f5;
  --ink-secondary: #a1a1aa;
  --ink-muted: #676771;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --btn-primary-bg: #f4f4f5;
  --btn-primary-ink: #0b0b0d;
  --btn-primary-hover: #ffffff;
  --glow-color: rgba(255, 255, 255, 0.055);
  --status-dot: #34d399;
  --shadow-panel: 0 32px 80px rgba(0, 0, 0, 0.65);
}

/* Light Polarity (Alabaster) */
[data-theme="light"] {
  --bg: #f5f5f4;
  --bg-elevated: rgba(255, 255, 255, 0.9);
  --surface: rgba(0, 0, 0, 0.03);
  --surface-hover: rgba(0, 0, 0, 0.065);
  --ink: #141417;
  --ink-secondary: #52525b;
  --ink-muted: #8b8b95;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.18);
  --btn-primary-bg: #141417;
  --btn-primary-ink: #f5f5f4;
  --btn-primary-hover: #000000;
  --glow-color: rgba(0, 0, 0, 0.045);
  --status-dot: #059669;
  --shadow-panel: 0 32px 80px rgba(0, 0, 0, 0.14);
}

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

html,
body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.55s var(--ease-luxury), color 0.55s var(--ease-luxury);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* ==========================================================================
   Cinematic Dual-Polarity Intro Curtain
   ========================================================================== */

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: auto;
  overflow: hidden;
}

.intro-overlay.is-hidden {
  display: none;
}

.intro-half {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.95s var(--ease-curtain);
}

.intro-half--dark {
  background-color: #141416;
  color: #f4f4f5;
}

.intro-half--light {
  background-color: #f5f5f4;
  color: #141417;
}

.intro-half__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
}

.intro-logo {
  height: clamp(36px, 5vw, 56px);
  width: auto;
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  animation: introLogoIn 0.85s var(--ease-luxury) 0.28s forwards;
}

.intro-half--light .intro-logo {
  animation-delay: 0.42s;
}

.intro-polarity-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  opacity: 0;
  transform: translateY(10px);
  animation: introTagIn 0.7s var(--ease-luxury) 0.55s forwards;
}

.intro-half--light .intro-polarity-tag {
  animation-delay: 0.65s;
}

.intro-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: center;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(160, 160, 170, 0.75) 25%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(160, 160, 170, 0.75) 75%,
    transparent 100%
  );
  animation: beamDraw 0.75s var(--ease-luxury) 0.08s forwards;
  transition: opacity 0.35s ease;
}

.intro-hud {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4.5vh, 46px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 20px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 22, 26, 0.92), rgba(10, 10, 12, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  color: #f4f4f5;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  opacity: 0;
  animation: introHudIn 0.65s var(--ease-luxury) 0.18s forwards;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-luxury);
}

.intro-hud__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intro-hud__diamond {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: #f4f4f5;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.intro-hud__brand {
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.intro-hud__divider {
  color: rgba(255, 255, 255, 0.32);
}

.intro-hud__sub {
  color: rgba(244, 244, 245, 0.72);
  letter-spacing: 0.16em;
}

.intro-hud__counter {
  color: #ffffff;
  font-weight: 500;
  min-width: 34px;
  text-align: right;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.intro-hud__bar {
  position: relative;
  height: 1.5px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.intro-hud__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #ffffff);
  border-radius: 999px;
}

@keyframes introHudIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.intro-skip {
  position: absolute;
  top: clamp(18px, 3vh, 32px);
  right: clamp(18px, 3vw, 36px);
  background: rgba(20, 20, 24, 0.68);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.intro-skip:hover {
  background: rgba(20, 20, 24, 0.9);
  transform: translateY(-1px);
}

/* Exit state */
.intro-overlay.is-exiting {
  pointer-events: none;
}

.intro-overlay.is-exiting .intro-half--dark {
  transform: translateY(-100%);
}

.intro-overlay.is-exiting .intro-half--light {
  transform: translateY(100%);
}

.intro-overlay.is-exiting .intro-beam,
.intro-overlay.is-exiting .intro-hud,
.intro-overlay.is-exiting .intro-skip {
  opacity: 0;
}

@keyframes beamDraw {
  from {
    transform: translateX(-50%) scaleY(0);
  }
  to {
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes introLogoIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes introTagIn {
  to {
    opacity: 0.72;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Theme Switch Curtain
   ========================================================================== */

.theme-curtain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
}

/* ==========================================================================
   Ambient Background & Architectural Frame
   ========================================================================== */

.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    640px circle at var(--mx, 50%) var(--my, 45%),
    var(--glow-color),
    transparent 65%
  );
  transition: opacity 0.4s ease;
}

.arch-frame {
  position: fixed;
  inset: var(--frame-inset);
  z-index: 2;
  border: 1px solid var(--border);
  border-radius: 2px;
  pointer-events: none;
  transition: border-color 0.55s var(--ease-luxury);
}

.arch-tick {
  position: absolute;
  width: 9px;
  height: 9px;
}

.arch-tick::before,
.arch-tick::after {
  content: "";
  position: absolute;
  background: var(--border-strong);
  transition: background-color 0.55s var(--ease-luxury);
}

.arch-tick::before {
  width: 9px;
  height: 1px;
  top: 4px;
  left: 0;
}

.arch-tick::after {
  width: 1px;
  height: 9px;
  top: 0;
  left: 4px;
}

.arch-tick--tl { top: -5px; left: -5px; }
.arch-tick--tr { top: -5px; right: -5px; }
.arch-tick--bl { bottom: -5px; left: -5px; }
.arch-tick--br { bottom: -5px; right: -5px; }

/* ==========================================================================
   Full-Viewport Main Shell (Zero Scroll, Balanced Breathing Room)
   ========================================================================== */

.viewport-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100dvh;
  padding: calc(var(--frame-inset) + clamp(14px, 2.2vh, 26px))
    calc(var(--frame-inset) + clamp(16px, 3vw, 40px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
}

/* Staggered Entry Reveal */
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.85s var(--ease-luxury),
    transform 0.85s var(--ease-luxury);
  transition-delay: calc(var(--d, 0) * 75ms);
}

.reveal-item[data-delay="0"] { --d: 0; }
.reveal-item[data-delay="1"] { --d: 1; }
.reveal-item[data-delay="2"] { --d: 2; }
.reveal-item[data-delay="3"] { --d: 3; }
.reveal-item[data-delay="4"] { --d: 4; }
.reveal-item[data-delay="5"] { --d: 5; }
.reveal-item[data-delay="6"] { --d: 6; }
.reveal-item[data-delay="7"] { --d: 7; }
.reveal-item[data-delay="8"] { --d: 8; }

body.is-ready .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Top Header Rail
   ========================================================================== */

.top-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-secondary);
}

.brand-meta__code {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.brand-meta__sep {
  width: 18px;
  height: 1px;
  background: var(--border-strong);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--surface-hover), var(--surface));
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .status-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.status-badge__label {
  position: relative;
  z-index: 1;
}

.status-badge__scan {
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  transform: translateX(-140%) skewX(-18deg);
  animation: badgeScan 3.8s var(--ease-luxury) infinite;
  pointer-events: none;
}

[data-theme="light"] .status-badge__scan {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
}

@keyframes badgeScan {
  0% { transform: translateX(-160%) skewX(-18deg); }
  55%, 100% { transform: translateX(340%) skewX(-18deg); }
}

.status-beacon {
  position: relative;
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.status-beacon__core {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--status-dot);
  box-shadow: 0 0 8px var(--status-dot);
}

.status-beacon__ring {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--status-dot);
  transform: rotate(45deg);
  opacity: 0.5;
  animation: beaconPulse 2.4s var(--ease-luxury) infinite;
}

@keyframes beaconPulse {
  0% {
    transform: rotate(45deg) scale(0.85);
    opacity: 0.75;
  }
  70%, 100% {
    transform: rotate(45deg) scale(1.9);
    opacity: 0;
  }
}

/* Polarity Segmented Toggle */
.polarity-switch {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.polarity-switch__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 108px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.polarity-switch:hover .polarity-switch__track {
  border-color: var(--border-strong);
}

.polarity-switch__option {
  position: relative;
  z-index: 2;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--ink-muted);
  transition: color 0.35s var(--ease-luxury);
}

[data-theme="dark"] .polarity-switch__option--dark,
[data-theme="light"] .polarity-switch__option--light {
  color: var(--btn-primary-ink);
  font-weight: 500;
}

.polarity-switch__thumb {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--btn-primary-bg);
  transition: transform 0.42s var(--ease-luxury), background-color 0.42s var(--ease-luxury);
}

[data-theme="light"] .polarity-switch__thumb {
  transform: translateX(100%);
}

/* ==========================================================================
   Hero Centerpiece
   ========================================================================== */

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(8px, 1.5vh, 20px) 0;
}

.logo-stage {
  margin-bottom: clamp(18px, 2.8vh, 28px);
  perspective: 900px;
}

.logo-wrapper {
  position: relative;
  height: clamp(50px, 7.2vh, 80px);
  aspect-ratio: 512 / 235;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease-luxury);
  will-change: transform;
}

.brand-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.45s var(--ease-luxury), transform 0.55s var(--ease-luxury);
}

[data-theme="dark"] .brand-logo--white {
  opacity: 1;
  transform: scale(1);
}

[data-theme="dark"] .brand-logo--dark {
  opacity: 0;
  transform: scale(0.985);
}

[data-theme="light"] .brand-logo--white {
  opacity: 0;
  transform: scale(0.985);
}

[data-theme="light"] .brand-logo--dark {
  opacity: 1;
  transform: scale(1);
}

/* Precision Rule */
.precision-rule {
  position: relative;
  width: 56px;
  height: 1px;
  background: var(--border-strong);
  overflow: hidden;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.precision-rule__pulse {
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, var(--ink), transparent);
  animation: ruleSweep 3.2s var(--ease-luxury) infinite;
}

@keyframes ruleSweep {
  0% { transform: translateX(-120%); }
  65%, 100% { transform: translateX(260%); }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.15vw, 11.5px);
  letter-spacing: 0.28em;
  color: var(--ink-muted);
  margin-bottom: clamp(10px, 1.6vh, 16px);
}

.hero-title {
  font-size: clamp(2rem, 4.6vw, 3.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: clamp(12px, 1.8vh, 18px);
}

.hero-subtitle {
  font-size: clamp(0.86rem, 1.22vw, 1.03rem);
  font-weight: 300;
  line-height: 1.64;
  color: var(--ink-secondary);
  max-width: 62ch;
  margin-bottom: clamp(18px, 2.8vh, 28px);
}

/* Readiness Progress Meter */
.readiness-bar {
  width: min(320px, 82vw);
  margin-bottom: clamp(22px, 3.2vh, 34px);
}

.readiness-bar__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.readiness-bar__track {
  position: relative;
  height: 2px;
  width: 100%;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.readiness-bar__fill {
  position: relative;
  height: 100%;
  width: 82%;
  background: var(--ink);
  border-radius: 999px;
  overflow: hidden;
  animation: progressBreath 4s ease-in-out infinite;
}

.readiness-bar__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 100%
  );
  animation: shimmerSlide 2.6s ease-in-out infinite;
}

[data-theme="light"] .readiness-bar__fill::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.85) 50%,
    transparent 100%
  );
}

@keyframes progressBreath {
  0%, 100% { width: 80%; }
  50% { width: 85%; }
}

@keyframes shimmerSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(160%); }
}

/* Hero Action & Delicate Executive Phone Button */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn-executive {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  border: 1px solid var(--border-strong);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow: hidden;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition:
    transform 0.35s var(--ease-luxury),
    background-color 0.25s ease,
    box-shadow 0.35s var(--ease-luxury);
}

[data-theme="light"] .btn-executive {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-executive:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1.5px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn-executive:active {
  transform: translateY(0) scale(0.985);
}

.btn-executive__sheen {
  position: absolute;
  inset: 0;
  width: 36%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  transform: translateX(-160%) skewX(-20deg);
  transition: transform 0.75s var(--ease-luxury);
  pointer-events: none;
}

[data-theme="light"] .btn-executive__sheen {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
}

.btn-executive:hover .btn-executive__sheen {
  transform: translateX(360%) skewX(-20deg);
}

.btn-executive__icon,
.btn-executive__label,
.btn-executive__arrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.btn-executive__arrow {
  transition: transform 0.3s var(--ease-luxury);
}

.btn-executive:hover .btn-executive__arrow {
  transform: translateX(2.5px);
}

/* ==========================================================================
   Bottom Footer Rail
   ========================================================================== */

.bottom-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.footer-left {
  white-space: nowrap;
}

.vision-pillars {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-secondary);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.pillar-sep {
  width: 1px;
  height: 10px;
  background: var(--border-strong);
  opacity: 0.55;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.replay-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

/* ==========================================================================
   Minimalist Contact Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 6, 8, 0.65);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-luxury);
}

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

.modal-backdrop.is-open {
  opacity: 1;
}

.modal-panel {
  width: min(460px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: clamp(22px, 3.5vw, 30px);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.35s var(--ease-luxury);
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-secondary);
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-secondary);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-muted);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: #ef4444;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.modal-direct-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.modal-direct-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.modal-success {
  text-align: center;
  padding: 16px 6px 6px;
}

.modal-success__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--status-dot);
}

.modal-success h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-success p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Compact Laptops)
   ========================================================================== */

@media (max-width: 820px) {
  .brand-meta__sep,
  .brand-meta__desc,
  .vision-pillars {
    display: none;
  }

  .intro-overlay {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .intro-beam {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
    transform: translateY(-50%) scaleX(0);
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(160, 160, 170, 0.75) 25%,
      rgba(255, 255, 255, 0.95) 50%,
      rgba(160, 160, 170, 0.75) 75%,
      transparent 100%
    );
    animation: beamDrawHorizontal 0.75s var(--ease-luxury) 0.08s forwards;
  }

  .intro-overlay.is-exiting .intro-half--dark {
    transform: translateX(-100%);
  }

  .intro-overlay.is-exiting .intro-half--light {
    transform: translateX(100%);
  }

  .intro-hud {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    padding: 9px 14px;
    max-width: calc(100vw - 28px);
    font-size: 9px;
    letter-spacing: 0.12em;
    animation: introHudInMobile 0.65s var(--ease-luxury) 0.18s forwards;
  }

  .intro-hud__sub {
    display: none;
  }
}

@keyframes introHudInMobile {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes beamDrawHorizontal {
  from {
    transform: translateY(-50%) scaleX(0);
  }
  to {
    transform: translateY(-50%) scaleX(1);
  }
}

@media (max-width: 480px) {
  .top-rail {
    gap: 8px;
  }

  .brand-meta {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .top-controls {
    gap: 6px;
  }

  .status-badge {
    padding: 5px 9px;
    font-size: 8.5px;
    letter-spacing: 0.14em;
    gap: 6px;
  }

  .polarity-switch__track {
    min-width: 90px;
  }

  .polarity-switch__option {
    padding: 4px 8px;
    font-size: 9px;
  }

  .bottom-rail {
    font-size: 9.5px;
    letter-spacing: 0.04em;
    gap: 8px;
  }

  .footer-right {
    gap: 8px;
  }

  .replay-btn {
    padding: 4px 7px;
    font-size: 9.5px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn-executive {
    width: auto;
    padding: 0 16px;
    gap: 8px;
    height: 38px;
    font-size: 0.78rem;
  }
}

@media (max-height: 540px) {
  html,
  body {
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .precision-rule__pulse,
  .readiness-bar__fill,
  .readiness-bar__fill::after,
  .status-badge__scan,
  .status-beacon__ring {
    animation: none !important;
  }
}
