/* sd.allahabadi.dev home page only (generated by .claude/sd-platform-kb/tools/sd_landing.py).
   One screen, no scroll, no top bar: the two halves are the navigation. Frontend left, Backend right on
   every screen shape (phones too), divided by a vertical line, over one garden scene drawn by
   sd-landing.js (research: .claude/sd-platform-kb/research/landing-scene.md).
   The scene is a picture with its own light, so it is the same in both themes.
   Versioned by content hash in the generator. */

body.sd-home { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }

.sd-home .sdl-split {
  --ink-fe: #16181d; --ink-be: #ffffff;
  position: relative; flex: 1 1 0; min-height: 0; width: 100%; overflow: clip;
  container: sdl / size; background: #0b1d36;
}
/* the stage is a child of the container, so its type can follow the container's shape */
.sdl-stage { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.sdl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* ---------- the two halves: each is one link ---------- */
.sdl-half {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  min-width: 0; min-height: 0; padding: max(14px, 7cqh) 4cqw 0; text-align: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* without the scene (no JavaScript, or before it starts) the halves carry a painted version of it */
.sdl-fe { color: var(--ink-fe); background: linear-gradient(180deg, #5aaef0 0%, #a6d8f5 34%, #d6ecf1 56%, #ffd79a 66%, #4f9e42 70%, #3d8a35 72%, #4a2f1b 72.3%, #24160c 100%); }
.sdl-be { color: var(--ink-be); background: linear-gradient(180deg, #0b1d36 0%, #0d2a46 71.8%, #7fe8ff 72%, #120e14 72.3%, #0a0709 100%); }
.has-scene .sdl-fe, .has-scene .sdl-be { background: none; }

.sdl-half-in { display: flex; flex-direction: column; align-items: center; gap: max(4px, 1.4cqh); transition: transform .45s var(--ease); }
.sdl-half h2 {
  margin: 0; font: 800 min(5.4cqw, 8.6cqh, 4.6rem)/1 var(--font-display); letter-spacing: -0.025em; text-wrap: balance;
}
/* "Frontend" / "system design" on two lines; a tall half (below) puts each word on its own line */
.sdl-half h2 span { display: block; }
.sdl-half h2 span:nth-child(2), .sdl-half h2 span:nth-child(3) { display: inline; }
/* plain words on the scene, no box: a tight shadow only separates the letters from the detail behind them */
.sdl-fe h2, .sdl-fe .sdl-n { text-shadow: 0 1px 2px rgb(255 255 255 / .55), 0 0 10px rgb(255 255 255 / .35); }
.sdl-be h2, .sdl-be .sdl-n { text-shadow: 0 1px 2px rgb(4 10 22 / .8), 0 0 10px rgb(4 10 22 / .5); }
.sdl-n {
  display: inline-flex; align-items: center; gap: .35em;
  font: 700 max(15px, min(1.75cqw, 3.4cqh, 1.35rem))/1.2 var(--font-body); white-space: nowrap;
  text-decoration: none; text-decoration-thickness: 2px; text-underline-offset: .22em;
}
.sdl-n svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }

/* hover or keyboard focus lifts the half (the scene brightens it and dims the other, sd-landing.js) */
.sdl-half:hover .sdl-half-in, .sdl-half:focus-visible .sdl-half-in { transform: translateY(max(-10px, -1.6cqh)); }
.sdl-half:hover .sdl-n svg, .sdl-half:focus-visible .sdl-n svg { transform: translateX(5px); }
.sdl-half:hover .sdl-n, .sdl-half:focus-visible .sdl-n { text-decoration-line: underline; }
.sdl-half:focus-visible { outline: none; }
.sdl-fe:focus-visible { box-shadow: inset 0 0 0 4px var(--ink-fe), inset 0 0 0 7px #ffffff; }
.sdl-be:focus-visible { box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 0 7px #08142a; }
.sdl-half:active .sdl-n { transform: scale(.97); }

/* ---------- "Pick your path": bottom centre, over the soil ---------- */
.sdl-pick {
  position: absolute; z-index: 2; left: 50%; bottom: max(10px, 5cqh); transform: translateX(-50%);
  display: flex; align-items: center; gap: .5em; margin: 0; pointer-events: none; white-space: nowrap;
  font: 800 max(18px, min(3.3cqw, 6.2cqh, 2.7rem))/1.1 var(--font-display); letter-spacing: -0.01em; color: #ffffff;
  text-shadow: 0 2px 18px rgb(0 0 0 / .85), 0 0 3px rgb(0 0 0 / .7);
}
.sdl-pick-t { display: inline-block; }
.sdl-pick-t > span { display: inline-block; animation: sdl-rise .9s var(--ease) both; animation-delay: calc(var(--i) * 45ms + .25s); }
.sdl-arw { display: inline-grid; width: 1.1em; height: 1.1em; flex: none; }
.sdl-arw svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 6px rgb(0 0 0 / .8)); }
.sdl-arw-a svg { animation: sdl-out-a 2.6s var(--ease) 1.2s infinite; }
.sdl-arw-b svg { animation: sdl-out-b 2.6s var(--ease) 1.2s infinite; }
@keyframes sdl-rise { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
@keyframes sdl-out-a { 0%, 100% { transform: none; opacity: 1; } 45% { transform: translateX(-.35em); opacity: .55; } }
@keyframes sdl-out-b { 0%, 100% { transform: none; opacity: 1; } 45% { transform: translateX(.35em); opacity: .55; } }

/* ---------- Sound: off until pressed (browsers allow sound only after a press) ---------- */
.sdl-sound {
  position: absolute; z-index: 3; right: max(12px, 2cqw); bottom: max(12px, 2.4cqh);
  display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 10px 12px;
  border: 0; border-radius: 8px; background: none; color: #ffffff; cursor: pointer;
  font: 700 1rem/1 var(--font-body); text-shadow: 0 1px 2px rgb(4 10 22 / .8), 0 0 10px rgb(4 10 22 / .5);
  -webkit-tap-highlight-color: transparent;
}
.sdl-sound[hidden] { display: none; }
.sdl-sound svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgb(4 10 22 / .8)); }
.sdl-sound .sdl-sound-off path:first-child, .sdl-sound .sdl-sound-on path:first-child { fill: currentColor; }
.sdl-sound .sdl-sound-on, .sdl-sound[aria-pressed="true"] .sdl-sound-off { display: none; }
.sdl-sound[aria-pressed="true"] .sdl-sound-on { display: block; }
.sdl-sound:hover, .sdl-sound:focus-visible { outline: 1.5px solid rgb(255 255 255 / .55); outline-offset: 0; }
.sdl-sound:focus-visible { outline: 2px solid #ffffff; }

/* a narrow screen: the word "Sound" stays the button's name but only the icon shows, and "Pick your
   path" moves up so the two can never touch */
@container sdl (width < 640px) {
  .sdl-sound-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sdl-pick { bottom: calc(max(12px, 2.4cqh) + 44px + 10px); }
}

/* ---------- a tall screen: still left/right, each half a tall column, so the type follows the half ---------- */
@container sdl (aspect-ratio < 1) {
  .sdl-half { padding: max(18px, 6cqh) 10px 0; }
  .sdl-half h2 { font-size: min(9.4cqw, 6cqh, 2.6rem); line-height: 1.02; }
  .sdl-half h2 span, .sdl-half h2 span:nth-child(2), .sdl-half h2 span:nth-child(3) { display: block; }
  .sdl-n { font-size: max(15px, min(4.4cqw, 2.3cqh, 1.15rem)); }
  .sdl-pick { font-size: max(18px, min(6cqw, 3.4cqh, 2.1rem)); }
  .sdl-half-in { gap: max(4px, 1cqh); }
  .sdl-fe { background: linear-gradient(180deg, #5aaef0 0%, #a6d8f5 28%, #d6ecf1 46%, #ffd79a 56%, #4f9e42 60%, #3d8a35 62%, #4a2f1b 62.3%, #24160c 100%); }
  .sdl-be { background: linear-gradient(180deg, #0b1d36 0%, #0d2a46 61.8%, #7fe8ff 62%, #120e14 62.3%, #0a0709 100%); }
  .has-scene .sdl-fe, .has-scene .sdl-be { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sdl-pick-t > span, .sdl-arw-a svg, .sdl-arw-b svg { animation: none; }
  .sdl-half-in, .sdl-n svg { transition: none; }
}
