/* The Physical Cloud: site styles. Colours taken from the channel banner and logo. */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #07131A;        /* page background, from the banner */
  --deep: #0C1E27;         /* raised bands */
  --line: rgba(68, 229, 210, 0.16);
  --line-soft: rgba(238, 244, 243, 0.10);
  --text: #EEF4F3;         /* the logo's cloud white */
  --muted: #93A7AD;
  --dim: #56686E;
  --signal: #44E5D2;       /* the logo's server bars */
  --todo: #F5D547;
  --measure: 40rem;
  --wide: 76rem;
}

* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: rgba(238, 244, 243, 0.35); }
a:hover { text-decoration-color: var(--signal); color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--text); color: var(--night); padding: 0.5rem 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--measure); }
.wrap.prose { max-width: var(--wide); }
.wrap.prose > * { max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; line-height: 1.6; }
ul.plain { list-style: none; padding: 0; margin: 0; }

h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.6; color: var(--text); }

/* Header */
.site-head { padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.site-head.over { position: absolute; inset: 0 0 auto 0; z-index: 5; border-bottom: 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; font-size: 0.98rem; }
.brand:hover { color: var(--text); }
.brand img { width: 48px; height: auto; }
.site-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.95rem; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--signal); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.7rem 1.3rem; border-radius: 6px; background: var(--signal); color: var(--night); font-weight: 700; font-size: 0.98rem; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--text); color: var(--night); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(238, 244, 243, 0.35); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--signal); color: var(--signal); }
.btn.is-pending { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-soft); cursor: default; }

/* Hero */
.hero {
  position: relative;
  min-height: min(82vh, 46rem);
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  background:
    radial-gradient(ellipse 60% 55% at 30% 50%, rgba(68, 229, 210, 0.07), transparent 70%),
    radial-gradient(ellipse 45% 60% at 78% 45%, rgba(68, 229, 210, 0.05), transparent 70%),
    var(--night);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; width: 100%; }
.lockup { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.75rem); margin: 0 0 1.5rem; }
.lockup img { width: clamp(96px, 13vw, 176px); height: auto; filter: drop-shadow(0 0 22px rgba(68, 229, 210, 0.28)); }
.lockup .word { display: flex; flex-direction: column; text-transform: uppercase; font-weight: 800; line-height: 0.92; letter-spacing: -0.005em; text-shadow: 0 0 28px rgba(238, 244, 243, 0.18); }
.lockup .w1 { font-size: clamp(1.55rem, 3.6vw, 2.85rem); }
.lockup .w2 { font-size: clamp(2.35rem, 5.6vw, 4.4rem); }
.tagline { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 400; letter-spacing: 0.02em; margin-bottom: 1.25rem; }
.hero .lede { max-width: 34rem; color: rgba(238, 244, 243, 0.86); font-size: clamp(1.02rem, 1.5vw, 1.15rem); }
.hero-map { margin: 0; justify-self: end; width: 100%; max-width: 30rem; }
.hero-map figcaption { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }

/* The layer map: the site's one signature element */
.layer-map { width: 100%; height: auto; overflow: visible; }
.layer-map rect { fill: none; stroke-width: 1.4; }
.layer-map text { font-size: 11px; font-weight: 600; fill: var(--dim); letter-spacing: 0.01em; }
.layer-map .num { font-weight: 800; }
.ring.is-dim rect { stroke: rgba(238, 244, 243, 0.14); }
.ring.is-lit rect { stroke: var(--signal); }
.ring.is-lit text { fill: var(--text); }
.ring.is-lit .num, .ring.is-current .num { fill: var(--signal); }
.ring.is-current rect { stroke: var(--signal); stroke-width: 2.6; filter: drop-shadow(0 0 5px rgba(68, 229, 210, 0.7)); }
.ring.is-current text { fill: var(--text); font-weight: 700; }
.ring.is-fence rect { stroke-dasharray: 5 4; }
.layer-map .rack rect, .layer-map .rack line { fill: none; stroke: rgba(238, 244, 243, 0.3); stroke-width: 1.2; }
.layer-map.is-small text { font-size: 12px; }

.layer-map.is-animated .ring, .layer-map.is-animated .rack { opacity: 0; animation: ring-in 0.55s ease-out forwards; }
.layer-map.is-animated .ring:nth-child(1) { animation-delay: 0.10s; }
.layer-map.is-animated .ring:nth-child(2) { animation-delay: 0.22s; }
.layer-map.is-animated .ring:nth-child(3) { animation-delay: 0.34s; }
.layer-map.is-animated .ring:nth-child(4) { animation-delay: 0.46s; }
.layer-map.is-animated .ring:nth-child(5) { animation-delay: 0.58s; }
.layer-map.is-animated .ring:nth-child(6) { animation-delay: 0.70s; }
.layer-map.is-animated .ring:nth-child(7) { animation-delay: 0.82s; }
.layer-map.is-animated .ring:nth-child(8) { animation-delay: 0.94s; }
.layer-map.is-animated .rack { animation-delay: 1.10s; }
@keyframes ring-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.layer-map.is-animated .ring, .layer-map.is-animated .rack { transform-origin: 200px 200px; transform-box: view-box; }
@media (prefers-reduced-motion: reduce) {
  .layer-map.is-animated .ring, .layer-map.is-animated .rack { opacity: 1; animation: none; }
}

/* Sections */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band { background: var(--deep); border-block: 1px solid var(--line-soft); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 5vw, 5rem); }
.col-head h2 { margin-top: 0; }
.rules { padding-left: 1.2rem; }
.rules li { margin-bottom: 0.6rem; }

/* Episode route: a walk from the fence inward */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px; background: linear-gradient(to bottom, var(--signal), rgba(68, 229, 210, 0.15) 55%, rgba(238, 244, 243, 0.08)); }
.stop { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1.25rem; padding-bottom: 2rem; position: relative; }
.stop:last-child { padding-bottom: 0; }
.marker { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; background: var(--night); box-shadow: inset 0 0 0 1.5px var(--signal); color: var(--signal); position: relative; }
.band .marker { background: var(--deep); }
.stop h3 { margin: 0 0 0.35rem; font-size: 1.3rem; }
.stop h3 a { text-decoration: none; }
.stop p:last-child { margin-bottom: 0; color: var(--muted); }
.stop-label { font-size: 0.85rem; font-weight: 600; color: var(--signal); margin: 0.55rem 0 0.2rem; }
.stop.is-ahead { padding-bottom: 1.1rem; }
.stop.is-ahead .marker { box-shadow: inset 0 0 0 1px rgba(238, 244, 243, 0.18); color: var(--dim); }
.stop.is-ahead .stop-label { color: var(--dim); margin-top: 0.1rem; }
.stop.is-ahead h3 { color: var(--muted); font-size: 1.05rem; font-weight: 600; }

/* Page and episode heads */
.page-head { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 1rem; }
.ep-head { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 1rem; }
.ep-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.ep-head .lede { max-width: var(--measure); }
.ep-map { margin: 0; }
.ep-body { padding-top: 0; }
.ep-body .prose > h2:first-child { margin-top: 2.5rem; }

/* Lists inside episode pages */
.takeaways { list-style: none; padding: 0; margin: 0; }
.takeaways li { position: relative; padding: 0.55rem 0 0.55rem 2rem; font-weight: 600; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: 1.1rem; height: 5px; border-radius: 1px; background: var(--signal); }
.job-links { list-style: none; padding: 0; margin: 0; }
.job-links li { padding: 0.8rem 0; border-top: 1px solid var(--line-soft); }
.job-links li:last-child { border-bottom: 1px solid var(--line-soft); }
.job-links a { font-weight: 700; display: block; }
.job-links .muted { display: block; font-size: 0.95rem; }
.docs { list-style: none; padding: 0; margin: 0; }
.docs li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line-soft); }
.docs li:last-child { border-bottom: 1px solid var(--line-soft); }
.status { flex: none; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 0.15rem 0.6rem; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(238, 244, 243, 0.18); }
.sources { list-style: none; padding: 0; margin: 0; }
.sources li { padding: 0.8rem 0; border-top: 1px solid var(--line-soft); }
.sources li:last-child { border-bottom: 1px solid var(--line-soft); }
.sources .claim { margin: 0 0 0.25rem; font-weight: 600; }
.sources .small { margin: 0; color: var(--muted); }
.disclosure { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.layer-strip { display: none; }
.layer-list { display: none; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.layer-list li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.45rem 0; border-top: 1px solid var(--line-soft); font-weight: 600; }
.layer-list .num { width: 1.5rem; font-weight: 800; color: var(--dim); }
.layer-list .is-lit .num, .layer-list .is-current .num { color: var(--signal); }
.layer-list .is-dim { color: var(--muted); font-weight: 500; }
.jump { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; padding: 1.25rem 0; border-block: 1px solid var(--line); font-size: 0.92rem; }
.jump ul { list-style: none; padding: 0; margin: 0; }
.jump li { margin: 0.3rem 0; line-height: 1.35; }
.jump a { text-decoration: none; color: var(--muted); }
.jump a:hover { color: var(--signal); }
.jump .jump-h { margin: 0 0 0.4rem; font-weight: 700; }
.jump .jump-h a { color: var(--text); }
.wrap.prose > .jump { max-width: none; }
.thumb { width: 100%; max-width: 26rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin: 0.4rem 0 0.6rem; }
.hero.has-photo .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(7, 19, 26, 0.92) 0%, rgba(7, 19, 26, 0.55) 45%, rgba(7, 19, 26, 0.25) 70%), linear-gradient(to bottom, rgba(7, 19, 26, 0.5), transparent 30%, transparent 70%, var(--night)); }
.hero.has-photo .wrap { position: relative; z-index: 1; }
.hero.has-photo .hero-map { background: rgba(7, 19, 26, 0.72); padding: 1.25rem; border-radius: 10px; }
.campus-band { padding: 0 0 2.5rem; background: var(--night); }
.campus-band img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 825; object-fit: cover; }
@media (max-width: 700px) { .campus-band img { aspect-ratio: 2 / 3; } }
.campus-caption { margin-top: 0.8rem; margin-bottom: 0; font-size: 0.88rem; color: var(--muted); }
.todo { background: var(--todo); color: #1d1a05; padding: 0.7rem 1rem; border-radius: 4px; font-size: 0.95rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a, .pager > span { display: flex; flex-direction: column; text-decoration: none; font-weight: 700; }
.pager .next { text-align: right; align-items: flex-end; }

/* Careers Guide */
.jobs { padding-bottom: 5rem; }
.job-group { padding: 0; }
.job-group h2 { margin-top: 2.5em; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.job { padding: 1.4rem 0 1.2rem; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 1.5rem; }
.job:target { box-shadow: -1.5rem 0 0 -1.25rem var(--signal); }
.job h3 { margin-bottom: 0.6rem; }
.job dl { margin: 0; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.35rem 1.25rem; }
.job dt { font-size: 0.85rem; font-weight: 600; color: var(--signal); padding-top: 0.2rem; }
.job dd { margin: 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--line-soft); padding: 3.5rem 0 2rem; background: var(--night); font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; }
.foot-brand { display: flex; gap: 0.9rem; align-items: flex-start; }
.foot-brand img { width: 64px; height: auto; margin-top: 0.2rem; }
.foot-brand p { font-weight: 700; margin: 0; }
.foot-brand .muted { font-weight: 400; }
.foot-h { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 0.6rem; letter-spacing: 0; }
.site-foot li { margin-bottom: 0.35rem; }
.site-foot a { text-decoration: none; }
.foot-note { margin-top: 2.5rem; }

/* Narrow screens */
@media (max-width: 860px) {
  .hero { padding-top: 8.5rem; min-height: 0; }
  .hero-grid, .two-col, .ep-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-map { justify-self: start; max-width: 24rem; }
  .ep-map { display: none; }
  .layer-strip { display: block; margin: 0.5rem 0 0; font-size: 0.95rem; font-weight: 700; color: var(--signal); }
  .layer-list { display: block; }
  .hero-map figcaption { display: none; }
  .jump { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .job dl { grid-template-columns: minmax(0, 1fr); }
  .job dt { padding-top: 0.6rem; }
}
@media (max-width: 480px) {
  .site-nav { gap: 1.1rem; font-size: 0.9rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .docs li { flex-direction: column; gap: 0.35rem; }
}

/* Social icons and Subscribe */
.site-foot .plain a { display: inline-flex; align-items: center; }
.site-foot .icon { display: inline-block; width: 1.05em; height: 1.05em; fill: currentColor; margin-right: 0.55em; flex: none; }
.site-foot a .icon { opacity: 0.85; }
.site-foot a:hover .icon, .site-foot a:focus-visible .icon { opacity: 1; }
.site-foot a.is-yt { color: var(--signal); font-weight: 700; }
.col-head .btn.ghost { margin-top: 0.4rem; }

/* Drawings */
.wrap.prose > .drawing { max-width: none; }
.drawing { margin: 1.5rem 0 1.25rem; }
.drawing img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.drawing a:hover img, .drawing a:focus-visible img { border-color: var(--signal); }
.drawing figcaption { margin-top: 0.6rem; }
.docs li:has(.doc-thumb) { justify-content: flex-start; align-items: center; }
.docs li:has(.doc-thumb) > span:not(.status) { flex: 1; }
.docs .doc-thumb { flex: none; width: 140px; margin-right: 1rem; }
.docs .doc-thumb img { display: block; width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 640px) { .docs .doc-thumb { width: 96px; } }
