/* =========================================================
   WDS Desktop Realism Layer — cinematic / physical / dense
   Desktop-first (≥1024px). Mobile keeps base theme intact.
   ========================================================= */

:root {
  --wds-navy: #0B1F3A;
  --wds-navy-deep: #061427;
  --wds-gold: #B8954A;
  --wds-gold-light: #F5E6C8;
  --wds-ink: #05080f;
  --wds-mist: rgba(226, 232, 240, 0.92);
  --wds-shadow-deep: 0 40px 80px rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.35);
  --wds-shadow-lift: 0 28px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(184, 149, 74, 0.18);
  --wds-specular: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 42%);
}

/* Film grain + vignette — desktop only, sits above content */
@media (min-width: 1024px) {
  body.wds-realism::before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    animation: wds-grain 0.5s steps(2) infinite;
  }

  body.wds-realism::after {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 9989;
    background:
      radial-gradient(ellipse 85% 70% at 50% 40%, transparent 40%, rgba(5, 8, 15, 0.45) 100%),
      linear-gradient(to bottom, rgba(5, 8, 15, 0.15) 0%, transparent 12%, transparent 88%, rgba(5, 8, 15, 0.35) 100%);
  }

  @keyframes wds-grain {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-1%, 1%); }
    50% { transform: translate(1%, -1%); }
    75% { transform: translate(-1%, -1%); }
    100% { transform: translate(0, 0); }
  }

  /* Richer global grade */
  body.wds-realism {
    background:
      radial-gradient(ellipse 120% 80% at 50% -10%, #14213a 0%, transparent 55%),
      radial-gradient(ellipse 60% 50% at 100% 50%, rgba(184, 149, 74, 0.04) 0%, transparent 50%),
      #070b14;
    color: var(--wds-mist);
  }

  /* ——— Nav: thicker glass, gold hairline ——— */
  body.wds-realism .navbar.scrolled {
    background: linear-gradient(180deg, rgba(6, 20, 39, 0.92) 0%, rgba(6, 20, 39, 0.78) 100%);
    backdrop-filter: blur(28px) saturate(1.35);
    -webkit-backdrop-filter: blur(28px) saturate(1.35);
    border-bottom: 1px solid rgba(184, 149, 74, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }

  body.wds-realism .nav-logo-wrap {
    width: 52px;
    height: 52px;
    box-shadow:
      0 0 0 1.5px rgba(184, 149, 74, 0.9),
      0 0 24px rgba(184, 149, 74, 0.35),
      inset 0 0 12px rgba(255, 255, 255, 0.08);
  }

  body.wds-realism .company-name {
    font-size: 1.15rem;
    letter-spacing: 0.14em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  }

  body.wds-realism .nav-links a {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }

  body.wds-realism .btn-rfq {
    box-shadow:
      0 0 0 1px rgba(245, 230, 200, 0.25),
      0 8px 24px rgba(184, 149, 74, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
    letter-spacing: 0.1em;
  }

  /* ——— Hero: photographic depth ——— */
  body.wds-realism .hero {
    min-height: 100vh;
    isolation: isolate;
  }

  body.wds-realism .hero-bg video.hero-video-bg,
  body.wds-realism .hero-bg img {
    filter: brightness(0.55) contrast(1.18) saturate(1.08);
    transform: scale(1.04);
  }

  body.wds-realism .hero-overlay {
    background:
      linear-gradient(105deg, rgba(5, 8, 15, 0.88) 0%, rgba(5, 8, 15, 0.45) 48%, rgba(5, 8, 15, 0.55) 100%),
      radial-gradient(ellipse 70% 60% at 70% 50%, transparent 0%, rgba(5, 8, 15, 0.5) 100%);
    z-index: 1 !important;
  }

  body.wds-realism .hero-content {
    text-align: left;
    max-width: 820px;
    margin-left: 8%;
    margin-right: auto;
    padding-top: 4vh;
  }

  body.wds-realism .hero h1 {
    font-size: clamp(3.2rem, 5.2vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.4),
      0 18px 50px rgba(0, 0, 0, 0.65);
  }

  body.wds-realism .hero-sub {
    margin-left: 0;
    margin-right: 0;
    font-size: 1.15rem;
    line-height: 1.75;
    color: rgba(226, 232, 240, 0.82);
    max-width: 640px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  }

  body.wds-realism .status-badge {
    background: rgba(6, 20, 39, 0.55);
    border: 1px solid rgba(184, 149, 74, 0.35);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.16em;
  }

  body.wds-realism .btn-primary {
    background: linear-gradient(180deg, #d4af37 0%, #b8954a 55%, #8f7338 100%);
    box-shadow:
      0 12px 28px rgba(184, 149, 74, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  }

  body.wds-realism .btn-secondary {
    background: rgba(10, 15, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }

  body.wds-realism .scroll-indicator {
    letter-spacing: 0.22em;
    opacity: 0.75;
    font-size: 0.65rem;
  }

  /* ——— Trust bar: metal strip ——— */
  body.wds-realism .trust-bar {
    background: linear-gradient(180deg, #1a2744 0%, #121c32 100%);
    border-top: 1px solid rgba(184, 149, 74, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 22px 0;
  }

  body.wds-realism .trust-container span {
    color: rgba(226, 232, 240, 0.72);
    letter-spacing: 0.14em;
  }

  /* ——— Capability cards: physical objects ——— */
  body.wds-realism .capabilities {
    background:
      radial-gradient(ellipse 80% 50% at 10% 0%, rgba(20, 40, 80, 0.45) 0%, transparent 55%),
      radial-gradient(ellipse 50% 40% at 90% 80%, rgba(184, 149, 74, 0.06) 0%, transparent 50%),
      #070b14;
    padding: 140px 0 120px;
  }

  body.wds-realism .capabilities-grid {
    gap: 28px;
    perspective: 1400px;
  }

  body.wds-realism .cap-card {
    background: linear-gradient(165deg, #1a2744 0%, #0f1729 55%, #0a101c 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: var(--wds-shadow-deep);
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.45s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
  }

  body.wds-realism .cap-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--wds-specular);
    opacity: 0.55;
    pointer-events: none;
    z-index: 2;
  }

  body.wds-realism .cap-card:hover {
    transform: translateY(-14px) rotateX(2deg);
    border-color: rgba(184, 149, 74, 0.55);
    box-shadow: var(--wds-shadow-lift);
  }

  body.wds-realism .cap-img {
    height: 280px;
    position: relative;
  }

  body.wds-realism .cap-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 16, 28, 0.95) 0%, transparent 55%);
    pointer-events: none;
    z-index: 1;
  }

  body.wds-realism .cap-img img,
  body.wds-realism .cap-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.08) saturate(1.05) brightness(0.92);
    transition: transform 1.1s cubic-bezier(0.23, 1, 0.32, 1), filter 0.5s ease;
  }

  body.wds-realism .cap-card:hover .cap-img img,
  body.wds-realism .cap-card:hover .cap-img video {
    transform: scale(1.08);
    filter: contrast(1.12) saturate(1.12) brightness(1);
  }

  body.wds-realism .cap-info {
    padding: 32px 32px 40px;
    position: relative;
    z-index: 1;
  }

  body.wds-realism .cap-info h3 {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
  }

  body.wds-realism .cap-info p {
    color: rgba(148, 163, 184, 0.95);
    line-height: 1.7;
  }

  /* Live media badge */
  body.wds-realism .live-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f4f4f5;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
  }

  body.wds-realism .live-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3b3b;
    box-shadow: 0 0 8px #ff3b3b;
    animation: pulse 1.6s infinite;
  }

  /* ——— Process filmstrip ——— */
  body.wds-realism .process-strip {
    padding: 0 0 100px;
    background: #070b14;
  }

  body.wds-realism .process-strip .section-container {
    width: 92%;
    max-width: 1480px;
  }

  body.wds-realism .process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  body.wds-realism .process-tile {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--wds-shadow-deep);
    background: #0a101c;
  }

  body.wds-realism .process-tile video,
  body.wds-realism .process-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.1) saturate(1.05) brightness(0.88);
    transition: transform 1.2s ease, filter 0.4s ease;
  }

  body.wds-realism .process-tile:hover video,
  body.wds-realism .process-tile:hover img {
    transform: scale(1.06);
    filter: contrast(1.14) saturate(1.12) brightness(1);
  }

  body.wds-realism .process-tile .label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 16px 16px;
    background: linear-gradient(to top, rgba(5, 8, 15, 0.95) 0%, transparent 100%);
    font-family: Orbitron, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wds-gold-light);
  }

  body.wds-realism .process-tile .label small {
    display: block;
    margin-top: 4px;
    font-family: Inter, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.9);
    text-transform: none;
  }

  /* ——— Statement: true cinematic panel ——— */
  body.wds-realism .statement {
    height: 72vh;
    min-height: 480px;
    background: none;
    position: relative;
    overflow: hidden;
  }

  body.wds-realism .statement-media {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  body.wds-realism .statement-media video,
  body.wds-realism .statement-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.42) contrast(1.15) saturate(1.05);
  }

  body.wds-realism .statement::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(5, 8, 15, 0.88) 0%, rgba(5, 8, 15, 0.55) 50%, rgba(5, 8, 15, 0.75) 100%),
      radial-gradient(ellipse at center, transparent 20%, rgba(5, 8, 15, 0.5) 100%);
  }

  body.wds-realism .statement-content {
    max-width: 980px;
  }

  body.wds-realism .statement-content h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.6rem);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.45;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  }

  /* ——— Contact / forms: forged metal panel ——— */
  body.wds-realism .rfq-form {
    background:
      linear-gradient(165deg, rgba(26, 39, 68, 0.95) 0%, rgba(10, 16, 28, 0.98) 100%);
    border: 1px solid rgba(184, 149, 74, 0.22);
    box-shadow: var(--wds-shadow-deep);
    border-radius: 14px;
    position: relative;
  }

  body.wds-realism .rfq-form::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--wds-specular);
    opacity: 0.35;
    pointer-events: none;
  }

  body.wds-realism .rfq-form input,
  body.wds-realism .rfq-form textarea,
  body.wds-realism .custom-select {
    background: rgba(5, 8, 15, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  body.wds-realism .rfq-form input:focus,
  body.wds-realism .rfq-form textarea:focus {
    border-color: rgba(184, 149, 74, 0.65);
    box-shadow: 0 0 0 3px rgba(184, 149, 74, 0.15), inset 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  /* ——— Subpage heroes ——— */
  body.wds-realism .subpage-hero {
    height: 58vh;
    min-height: 420px;
  }

  body.wds-realism .subpage-hero .hero-bg img,
  body.wds-realism .subpage-hero .hero-bg video {
    filter: brightness(0.45) contrast(1.18) saturate(1.08);
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.wds-realism .subpage-hero .hero-overlay {
    background:
      linear-gradient(to top, rgba(5, 8, 15, 0.92) 0%, rgba(5, 8, 15, 0.35) 55%, rgba(5, 8, 15, 0.5) 100%);
  }

  body.wds-realism .subpage-hero h1 {
    font-size: clamp(2.8rem, 4.5vw, 4rem);
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  }

  /* ——— Asset frames: real photography depth ——— */
  body.wds-realism .asset-frame,
  body.wds-realism .detail-visual img,
  body.wds-realism .story-visual img {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 40px 80px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(184, 149, 74, 0.12),
      inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    filter: contrast(1.06) saturate(1.04);
  }

  body.wds-realism .detail-visual,
  body.wds-realism .story-visual {
    position: relative;
  }

  body.wds-realism .detail-visual::after,
  body.wds-realism .story-visual::after {
    content: "";
    position: absolute;
    inset: 8% -4% -4% 8%;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(184, 149, 74, 0.25), rgba(0, 209, 255, 0.08));
    z-index: -1;
    filter: blur(0);
    opacity: 0.5;
  }

  /* ——— Missile cards ——— */
  body.wds-realism .missile-card {
    background: linear-gradient(165deg, #142038 0%, #0a1220 100%);
    border: 1px solid rgba(184, 149, 74, 0.28);
    border-radius: 12px;
    box-shadow: var(--wds-shadow-deep);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  }

  body.wds-realism .missile-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--wds-shadow-lift);
    border-color: rgba(184, 149, 74, 0.7);
  }

  body.wds-realism .missile-card img {
    height: 240px;
    filter: contrast(1.1) saturate(1.08) brightness(0.9);
    transition: transform 0.9s ease, filter 0.4s ease;
  }

  body.wds-realism .missile-card:hover img {
    transform: scale(1.06);
    filter: contrast(1.12) saturate(1.12) brightness(1);
  }

  /* ——— Footer ——— */
  body.wds-realism footer {
    background: linear-gradient(180deg, #080c16 0%, #030508 100%);
    border-top: 1px solid rgba(184, 149, 74, 0.18);
  }

  body.wds-realism .footer-top img {
    filter: drop-shadow(0 8px 24px rgba(184, 149, 74, 0.35));
  }

  /* ——— Reveal on scroll ——— */
  body.wds-realism .wds-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1), transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
  }

  body.wds-realism .wds-reveal.is-in {
    opacity: 1;
    transform: none;
  }

  /* ——— Section headers ——— */
  body.wds-realism .section-header h2,
  body.wds-realism .detail-text h2,
  body.wds-realism .story-text h2 {
    letter-spacing: 0.04em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }

  body.wds-realism .pre-title {
    letter-spacing: 0.22em;
    color: var(--wds-gold);
  }

  /* Proof strip under trust bar */
  body.wds-realism .proof-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.wds-realism .proof-metrics .cell {
    background: #0a101c;
    padding: 36px 24px;
    text-align: center;
  }

  body.wds-realism .proof-metrics .k {
    font-family: Orbitron, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    color: var(--wds-gold-light);
    margin-bottom: 8px;
  }

  body.wds-realism .proof-metrics .v {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
  }
}

/* Tablet: light touch only */
@media (min-width: 768px) and (max-width: 1023px) {
  body.wds-realism .cap-img {
    height: 220px;
  }
  body.wds-realism .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
