/* Desktop layout — fully independent of mobile (styles.css).
   Activates at >= 1024px. Mobile DOM lives in .mobile-only, desktop in .desktop-only. */

.desktop-only { display: none; }

@media (min-width: 1024px) {
  html, body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .mobile-only { display: none !important; }

  .desktop-only {
    display: block;
    width: 100vw;
    /* Height tracks the scaled canvas so scroll appears naturally when
       the canvas is taller than the viewport. */
    height: calc(100vw * 840 / 1440);
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }
  .desktop-only::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('assets/img/dh-pattern.png') center / 80% auto no-repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
  }

  .d-canvas {
    width: 1440px;
    height: 840px;
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -720px;
    transform-origin: top center;
    /* Scale canvas to fill viewport width — grows on big screens (less
       margin), shrinks on narrow ones. --d-scale is set by script.js
       (CSS calc(100vw / 1440) produces a vw-unit length, not a scalar,
       so scale() rejects it). */
    transform: scale(var(--d-scale, 1));
    z-index: 1;
  }

  /* Hero (top-left) — top tuned so the paragraph's vertical centre lines up
     with the pills (.d-pills) and badge (.d-badge), both centred on y≈119. */
  .d-hero {
    position: absolute;
    left: 54px;
    top: 32px;
    width: 313px;
  }
  .d-spark { width: 33px; height: 33px; display: block; }
  .d-hero p {
    margin: 17px 0 0;
    color: #f4f4f4;
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    line-height: 25px;
    font-weight: 400;
    text-wrap: balance;
  }

  /* Social pills (top-center) */
  .d-pills {
    position: absolute;
    left: 484px;
    top: 93px;
    display: flex;
    gap: 12px;
  }
  .d-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 4px 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 100px;
    text-decoration: none;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    /* Glossy highlights at top and bottom of the pill (matches mobile .soc::before). */
    box-shadow:
      inset 0 4px 1.5px -2.5px rgba(255, 255, 255, 0.75),
      inset 0 -4px 1.5px -2.5px rgba(255, 255, 255, 0.65);
    transition: background 0.2s;
  }
  .d-pill:hover { background: rgba(255, 255, 255, 0.18); }
  .d-pill-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
  }
  .d-pill-icon svg { width: 24px; height: 24px; display: block; }

  /* Rotating badge (top-right) */
  .d-badge {
    position: absolute;
    left: 1231px;
    top: 50px;
    width: 138px;
    height: 138px;
  }
  .d-badge svg { width: 100%; height: 100%; overflow: visible; display: block; }
  .d-badge-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: dSpin 22s linear infinite;
  }
  @keyframes dSpin { to { transform: rotate(360deg); } }

  /* designhere logo (center) */
  .d-logo {
    position: absolute;
    left: 386px;
    top: 207px;
    width: 666px;
    height: 305px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .d-logo .logo-svg,
  .d-logo svg { width: 100%; height: 100%; display: block; }

  /* Cards — use the same self-contained mobile SVGs (background + illustration
     + text + star are all baked-in). Desktop only positions/rotates them. */
  .d-card {
    position: absolute;
    transform-origin: 50% 50%;
    --d-card-rot: 0deg;
    transform: rotate(var(--d-card-rot));
  }
  /* Override .reveal/.reveal.in transforms from styles.css so rotation
     is preserved while reveal animation still plays. Higher specificity
     (3 classes) wins over .reveal.in (2 classes). */
  .d-card.reveal {
    transform: translateY(48px) scale(.965) rotate(var(--d-card-rot));
  }
  .d-card.reveal.in {
    transform: translateY(0) scale(1) rotate(var(--d-card-rot));
  }
  .d-card > svg {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Mobile SVGs carry a built-in tilt baked into the artwork
     (-3.28° / +6.71° / -5.96°). The CSS rotation adds to it so the net
     visual angle matches the Figma desktop frames (-2.22° / +3.21° / +2.68°). */
  .d-card-1 { --d-card-rot: 1.06deg;  left: 62px;   top: 363px; width: 337px; }
  .d-card-2 { --d-card-rot: -3.50deg; left: 499px;  top: 492px; width: 391px; }
  .d-card-3 { --d-card-rot: 8.64deg;  left: 1039px; top: 361px; width: 361px; }

  @media (prefers-reduced-motion: reduce) {
    .d-badge-spin { animation: none; }
  }
}
