/* Sky page. Fonts, nav and buttons come from styles.css; this file only adds the sky. */
:root { --cloud: var(--cream); --shade: 52,64,140; }

body.sky {
  height: 100svh;
  overflow: hidden;
  color: var(--cream);
  /* brand sky: blue at the top, soft blue, fading into cream */
  background: linear-gradient(180deg, var(--blue) 0%, #9DAEEC 30%, var(--blue-soft) 60%, #DCE1EE 82%, var(--cream) 100%);
  -webkit-font-smoothing: antialiased;
}
/* night: the same sky after sunset, with stars and moonlit clouds */
:root[data-theme="dark"] body.sky { background: linear-gradient(180deg, #070B1F 0%, #111B48 45%, #1A2863 75%, #10152E 100%); }
:root[data-theme="dark"] { --cloud: #2A3872; }
:root[data-theme="dark"] .sun { opacity: .35; filter: saturate(0); }
.stars--fixed { position: fixed; }

/* soft sun glow */
.sun {
  position: fixed;
  top: -18vmax;
  right: -12vmax;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245,240,231,.8), rgba(245,240,231,.3) 45%, transparent 70%);
  pointer-events: none;
}


/* ---------- canvas ---------- */
.canvas {
  position: fixed;
  inset: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline: none;
}
.canvas.is-dragging { cursor: grabbing; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--back { z-index: 1; }
.layer--items { z-index: 3; }
.layer--front { z-index: 50; }

.sky-title {
  position: absolute;
  inset: 0;
  z-index: 4; /* cards float underneath the words */
  display: grid;
  place-content: center;
  text-align: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.sky-title__eyebrow {
  font: 13px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
  text-shadow: 0 1px 8px rgba(var(--shade),.5);
}
.sky-title h1 {
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 124px);
  line-height: .95;
  letter-spacing: -.045em;
  text-shadow: 0 2px 28px rgba(var(--shade),.45), 0 1px 3px rgba(var(--shade),.35);
}

/* floating project cards */
.float {
  position: absolute;
  left: 0; top: 0;
  pointer-events: auto;
  will-change: transform;
}
.float__card {
  display: block;
  width: var(--w);
  padding: 4px;
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 30px 50px -30px rgba(var(--shade),.55), 0 2px 0 rgba(var(--shade),.08);
  cursor: inherit;
  animation: bob var(--bob, 7s) ease-in-out var(--delay, 0s) infinite alternate;
  transition: box-shadow .4s;
}
.float__card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  -webkit-user-drag: none;
}
@keyframes bob {
  from { transform: translateY(-10px) rotate(calc(var(--tilt) * -1)); }
  to   { transform: translateY(10px) rotate(var(--tilt)); }
}
.float__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translate(-50%, -4px);
  white-space: nowrap;
  font: 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--surface);
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .25s, transform .3s cubic-bezier(.34,1.6,.5,1);
  pointer-events: none;
}
.float:hover .float__label,
.float__card:focus-visible + .float__label { opacity: 1; transform: translate(-50%, 0); }
.float:hover .float__card { box-shadow: 0 40px 60px -30px rgba(var(--shade),.7), 0 2px 0 rgba(var(--shade),.08); }
.float__card:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 4px; }

/* project tiles from the home carousel: the same floating card and hover pill as the posters.
   The tile keeps its own frame; the carousel's dark label pill is swapped for the hover pill. */
.float__card--prod { width: auto; padding: 0; background: none; box-shadow: none; }
.float__card--prod .shot { height: var(--ph); margin: 0; rotate: none; transform: none; cursor: inherit; box-shadow: 0 30px 50px -30px rgba(var(--shade),.55), 0 2px 0 rgba(var(--shade),.08); }
.float:hover .float__card--prod { box-shadow: none; }
.float:hover .float__card--prod .shot { box-shadow: 0 40px 60px -30px rgba(var(--shade),.7), 0 2px 0 rgba(var(--shade),.08); }
.float__card--prod:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 4px; border-radius: 16px; }
.float .prod__tag { display: none; }
/* opened in the lightbox: a big copy of the tile, still playing */
.lightbox__prod { display: grid; place-items: center; }
.lightbox img[hidden] { display: none; }
.lightbox__prod .shot { height: var(--ph); margin: 0; transform: none; }
.lightbox__prod .prod__tag { display: none; }

/* clouds: overlapping soft ellipses */
.cloud {
  position: absolute;
  left: 0; top: 0;
  width: var(--w);
  aspect-ratio: 2.6;
  background:
    radial-gradient(ellipse 24% 46% at 30% 58%, var(--cloud) 97%, transparent),
    radial-gradient(ellipse 26% 58% at 52% 44%, var(--cloud) 97%, transparent),
    radial-gradient(ellipse 20% 44% at 72% 58%, var(--cloud) 97%, transparent),
    radial-gradient(ellipse 46% 30% at 50% 74%, var(--cloud) 97%, transparent);
  filter: blur(var(--blur, 6px));
  opacity: var(--o, .9);
  will-change: transform;
}

/* ---------- hint ---------- */
.sky-hint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  background: rgba(245,240,231,.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity .6s;
}
.sky-hint.is-gone { opacity: 0; }
.sky-hint__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }

/* ---------- lightbox ---------- */
.lightbox {
  margin: auto;
  max-width: min(92vw, 900px);
  max-height: 92svh;
  padding: 12px 12px 16px;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(var(--shade),.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[open] { animation: pop .45s cubic-bezier(.34,1.5,.5,1); }
@keyframes pop { from { transform: scale(.9) translateY(20px); opacity: 0; } }
.lightbox img { display: block; max-width: 100%; max-height: calc(92svh - 80px); border-radius: 12px; margin: 0 auto; }
.lightbox__caption { margin-top: 12px; font: 13px var(--mono); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 16px; }
.lightbox__caption span { color: var(--muted); }
.lightbox__close {
  position: absolute;
  top: -16px; right: -16px;
  width: 46px; height: 46px;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .float__card { animation: none; transform: rotate(var(--tilt)); }
  .sky-hint__dot { animation: none; }
  .lightbox[open] { animation: none; }
}
