/* Multitude home: the choice between the two divisions, as two large squares in the centre.
   Each square carries its division's line from the client brief. */

.home { min-height: 100svh; display: flex; flex-direction: column; }
.home main { flex: 1; display: flex; }

.split {
  /* as big as fits beside each other and inside the viewport height */
  --sq: min(540px, 44vw, calc(100svh - var(--header-h) - 96px));
  flex: 1; display: grid; place-items: center;
  padding: clamp(24px, 4vh, 48px) var(--gutter) clamp(32px, 6vh, 64px);
}
.split-pair { display: grid; grid-template-columns: repeat(2, var(--sq)); gap: clamp(16px, 2.4vw, 36px); }

.split-panel {
  position: relative; isolation: isolate; overflow: hidden;
  width: var(--sq); aspect-ratio: 1;
  display: flex; align-items: flex-end; color: var(--paper);
}
.split-media, .split-media picture, .split-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.split-media { z-index: -2; background: var(--ink-raised); }
.split-media img { object-fit: cover; transition: transform 900ms var(--ease-out); }
.split-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(5, 39, 48, 0.92) 0%, rgba(6, 30, 44, 0.55) 45%, rgba(6, 30, 44, 0) 75%);
}
.split-panel::after {
  /* the other square dims on hover, so the choice reads clearly */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--ink); opacity: 0; transition: opacity 400ms ease;
}

.split-content {
  position: relative; z-index: 1;
  display: grid; gap: 12px; justify-items: start; width: 100%;
  padding: clamp(20px, 2.6vw, 36px);
}
.split-title {
  font-size: clamp(1.75rem, 0.9rem + 2.2vw, 2.75rem);
  font-weight: 500; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance;
}
.split-meta { font-size: var(--fs-small); color: var(--on-ink-2); }
.split-cta {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 4px;
  font-size: var(--fs-small); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--on-ink-line); transition: border-color 300ms ease;
}
.split-cta .icon { width: 20px; height: 20px; transition: transform 300ms var(--ease-out); }
.split-panel:focus-visible { outline-offset: 6px; }

@media (hover: hover) and (pointer: fine) {
  .split-pair:hover .split-panel:not(:hover)::after { opacity: 0.45; }
  .split-panel:hover .split-media img { transform: scale(1.05); }
  .split-panel:hover .split-cta { border-color: var(--paper); }
  .split-panel:hover .split-cta .icon { transform: translateX(4px); }
}

/* Start frame for the intro (squares closed like the letterbox) so nothing flashes before main.js runs;
   the fallback opens them anyway if scripts fail. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.motion-ready) .split-panel { clip-path: inset(50% 0 50% 0); animation: split-fallback 0s 2.5s forwards; }
}
@keyframes split-fallback { to { clip-path: inset(0 0 0 0); } }

/* Phones and narrow tablets: the squares stack */
@media (max-width: 699px) {
  .split { --sq: min(100%, 460px); }
  .split-pair { grid-template-columns: var(--sq); width: 100%; justify-content: center; }
  .split-panel { width: 100%; }
}
