/* FederAstro, "One night": the Equipment page. The sky is fixed at 19:20, nautical dusk, while the
   kit goes out (script.js draws it, STATIC_T.equipment = 140). Loaded after style.css. */

.page-equipment {
  --rail: 0px;
  /* the sky at 19:20 (t = 140), the same table script.js uses on the home page */
  --sky-top: #0d1533; --sky-mid: #19234e; --sky-glow: #39305a; --sky-low: #65416a;
  --stars: .32; --redlight: 0;
  --chart-bg: #07080c;
}
.page-equipment .top .wordmark { display: inline-flex; }
.page-equipment main [id] { scroll-margin-top: 24px; }

/* ------------------------------------------------------------------ head */
.eq-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px);
  padding: clamp(28px, 6vh, 64px) 0 0; align-items: end;
}
.eq-head .crumbs { grid-column: 1 / -1; }
.eq-head h1 { grid-column: 1 / span 7; font-size: clamp(2.5rem, 4.8vw, 4.3rem); line-height: .94; margin-top: .9rem; }
.eq-head .sub { grid-column: 8 / span 5; margin: 0; color: var(--ink-2); }

/* the setup as a short log: what goes out, in order; each line jumps to its section */
.setup { grid-column: 1 / -1; margin-top: clamp(1.8rem, 5vh, 3rem); }
.setup__cap { font: 400 .62rem/1.4 var(--f-mono); font-stretch: 82%; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); margin: 0 0 .5rem; }
.setup ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 28px); }
.setup a {
  display: flex; flex-direction: column; gap: .3rem; min-height: 44px; padding: .65rem 0 .2rem; text-decoration: none; color: var(--ink);
  background: linear-gradient(rgba(237, 230, 217, .38), rgba(237, 230, 217, .38)) 0 0 / 100% 1px no-repeat;
}
.setup time { font: 500 .82rem/1 var(--f-mono); font-stretch: 82%; color: var(--accent); font-variant-numeric: tabular-nums; }
.setup span { font: 600 .95rem/1.2 var(--f-body); font-stretch: 92%; }
.setup a:hover { background-image: linear-gradient(var(--accent), var(--accent)); color: #fff; }
.setup a:hover span { text-decoration: underline; text-decoration-color: var(--accent); }

/* ------------------------------------------------------------------ sections */
.eq {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px);
  margin-top: clamp(4.5rem, 14vh, 9rem); padding-top: 1.2rem; align-items: start;
}
.eq__head { grid-column: 1 / span 4; position: relative; }
.eq h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: .98; margin-top: 1rem; }
.eq__intro { color: var(--ink-2); margin: 1rem 0 0; font-size: 1rem; max-width: 30rem; }
.eq > .kit, .eq > .scopes, .eq > .pc { grid-column: 5 / span 8; }

.note--pier { margin-top: 2.2rem; }
.note--pier svg { margin-left: .3rem; vertical-align: top; }

/* a spec sheet: one ruled line per part */
.kit { list-style: none; margin: 0; padding: 0; }
.kit__row {
  display: grid; grid-template-columns: 8.5rem minmax(0, 15rem) minmax(0, 1fr); column-gap: clamp(14px, 2vw, 28px);
  align-items: baseline; padding: .95rem 0 1rem;
  background: linear-gradient(var(--rule), var(--rule)) 0 0 / 100% 1px no-repeat;
}
.kit__row:first-child { padding-top: .2rem; background: none; }
.kit__role { margin: 0; font: 400 .64rem/1.9 var(--f-mono); font-stretch: 82%; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.kit__row h3 { font: 800 1.3rem/1.15 var(--f-display); letter-spacing: -.005em; }
.kit__text { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
.kit__data { grid-column: 3; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font: 400 .72rem/1.4 var(--f-mono); font-stretch: 82%; color: var(--ink-2); }
.kit__data b { font-weight: 500; color: var(--ink); font-size: .9rem; margin-right: .25rem; }
.kit__row--filters .bands { grid-column: 3; }
.kit__row--filters .pass { grid-column: 2 / -1; }

.bands { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; }
.bands li { display: flex; align-items: baseline; gap: .5rem; margin: 0; }
.bands b { font: 800 1.05rem/1 var(--f-display); }
.bands span { font: 400 .68rem/1.4 var(--f-mono); font-stretch: 82%; color: var(--ink-2); }
.bands__ha b { color: var(--ha-ink); } .bands__oiii b { color: var(--oiii-ink); } .bands__sii b { color: var(--sii-ink); }
.bands__lrgb b { color: var(--ink); letter-spacing: .04em; }

/* the passbands: drawn by equipment.js on a hand-ruled wavelength axis */
.pass { margin: 1.2rem 0 0; min-height: 1px; text-shadow: none; }
.pass svg { display: block; width: 100%; height: auto; overflow: visible; }
.pass text { font-family: var(--f-mono); font-stretch: 82%; }

/* ------------------------------------------------------------------ telescopes */
.scopes { list-style: none; margin: 0; padding: 0; }
.scope {
  display: grid; grid-template-columns: minmax(0, 12rem) 6.5rem minmax(0, 1fr); column-gap: clamp(14px, 2vw, 28px);
  align-items: start; padding: 1.05rem 0 1.15rem;
  background: linear-gradient(var(--rule), var(--rule)) 0 0 / 100% 1px no-repeat;
}
.scope:first-child { padding-top: .2rem; background: none; }
.scope__name h3 { font: 800 1.45rem/1.05 var(--f-display); display: flex; align-items: center; gap: .6rem; }
.scope__name h3::before { content: ""; width: 18px; height: 2px; background: var(--c); flex: none; transform: rotate(-3deg); }
.scope__name p { margin: .45rem 0 0; font-size: .86rem; line-height: 1.4; color: var(--ink-2); }
.scope__fl { margin: 0; display: flex; flex-direction: column; }
.scope__fl b { font: 200 2.6rem/.9 var(--f-mono); font-stretch: 75%; letter-spacing: -.04em; color: var(--c); font-variant-numeric: tabular-nums; }
.scope__fl span { font: 400 .62rem/1.4 var(--f-mono); font-stretch: 82%; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-top: .35rem; }
.scope__spec { margin: 0; display: grid; grid-template-columns: 4.3rem 5.6rem 8.4rem minmax(0, 1fr); gap: .2rem .9rem; }
.scope__spec div { min-width: 0; }
.scope__spec dt { white-space: nowrap; font: 400 .62rem/1.5 var(--f-mono); font-stretch: 82%; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.scope__spec dd { margin: .15rem 0 0; font: 400 .86rem/1.3 var(--f-mono); font-stretch: 85%; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.scope__note { grid-column: 3; margin: .7rem 0 0; font-size: .92rem; color: var(--ink-2); }
/* the column labels read once, on the first row, like a table head; still there for screen readers below */
.scope + .scope .scope__spec dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scope + .scope .scope__fl span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scope + .scope .scope__spec dd { margin-top: 0; }

/* ------------------------------------------------------------------ three fields on the Wizard */
.fields .eq__head { grid-column: 1 / span 5; grid-row: 1; }
.chart { grid-column: 1 / span 9; grid-row: 2; margin-top: 2rem; }
.chart__plot { position: relative; background: var(--chart-bg); min-height: 120px; }
.chart__plot svg { display: block; width: 100%; height: auto; }
.chart__nojs { padding: 1.2rem; margin: 0; color: var(--ink-2); font-size: .9rem; }
.chart figcaption { max-width: 46rem; }
.chart__side { grid-column: 10 / span 3; grid-row: 2; margin-top: 2rem; align-self: start; padding-top: 1.2rem; }

.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); align-items: baseline; column-gap: .5rem; padding: .7rem 0 .65rem; background: linear-gradient(var(--rule), var(--rule)) 0 0 / 100% 1px no-repeat; }
.legend li::before { content: ""; height: 10px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); align-self: center; }
.legend b { font: 800 1.15rem/1 var(--f-display); color: var(--ink); }
.legend span { grid-column: 2; font: 400 .74rem/1.5 var(--f-mono); font-stretch: 82%; color: var(--ink-2); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.note--wizard { margin-top: 1.6rem; font-size: 1.55rem; line-height: 1.1; }
.note--wizard svg { display: block; margin: 0 0 .3rem -.2rem; }
.note--wizard a { color: #F6C08F; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.note--wizard a:hover { color: #fff; }

/* the chart, drawn by equipment.js (pixel units, so text never scales) */
.fov .grid { fill: none; stroke: rgba(237, 230, 217, .17); stroke-width: 1; }
.fov .grid-lab { font: 400 9.5px var(--f-mono); font-stretch: 80%; fill: rgba(237, 230, 217, .62); }
.fov .fig { fill: none; stroke: rgba(237, 230, 217, .34); stroke-width: 1; stroke-linecap: round; }
.fov .star { fill: #EDE6D9; }
.fov .star-lab { font: 400 20px var(--f-hand); fill: rgba(237, 230, 217, .78); }
.fov .edge-lab { font: 400 15px var(--f-hand); fill: rgba(237, 230, 217, .7); }
.fov .edge-arrow { fill: none; stroke: rgba(237, 230, 217, .55); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.fov .moon { fill: rgba(237, 230, 217, .06); stroke: rgba(237, 230, 217, .75); stroke-width: 1.2; stroke-dasharray: 4 3.5; }
.fov .moon-lab { font: 400 19px var(--f-hand); fill: rgba(237, 230, 217, .8); }
.fov .wiz { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.fov .wiz-lab { font: 500 9.5px var(--f-mono); font-stretch: 80%; fill: #F0A06E; letter-spacing: .04em; }
.fov .f { fill: none; stroke-width: 1.7; stroke-linejoin: round; }
.fov .f-halo { fill: none; stroke: var(--chart-bg); stroke-width: 4.5; stroke-linejoin: round; opacity: .8; }
.fov .f-lab { font: 500 11.5px var(--f-mono); font-stretch: 82%; letter-spacing: .03em; paint-order: stroke; stroke: var(--chart-bg); stroke-width: 3.5px; stroke-linejoin: round; }

/* the reveal: as the chart comes into view the three fields are drawn on, wide to close, each
   label written after its outline. Without JS, or with reduced motion, they are simply there. */
.fov.is-armed .f, .fov.is-armed .f-halo { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.fov.is-armed .f-lab { opacity: 0; }
.fov.is-armed.is-on .f, .fov.is-armed.is-on .f-halo { stroke-dashoffset: 0; transition: stroke-dashoffset 1.15s cubic-bezier(.55, .05, .25, 1) var(--d, 0s); }
.fov.is-armed.is-on .f-lab { opacity: 1; transition: opacity .5s ease calc(var(--d, 0s) + 1s); }
.chart__side .note--wizard { transition: opacity .6s ease 3.1s; }
.fields.is-armed:not(.is-on) .note--wizard { opacity: 0; }
.fields.is-armed .note--wizard:focus-within { opacity: 1; transition: none; }

/* ------------------------------------------------------------------ the desk */
.pc { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); column-gap: clamp(16px, 2.4vw, 36px); align-items: start; }
.pc__side h3 { font: 800 1.45rem/1.05 var(--f-display); }
.pc__side p { margin: .7rem 0 0; color: var(--ink-2); font-size: .95rem; }
.pc__specs { margin: 0; }
.pc + .pc { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.pc__specs div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline; padding: .65rem 0 .6rem; background: linear-gradient(var(--rule), var(--rule)) 0 0 / 100% 1px no-repeat; }
.pc__specs div:first-child { background: none; padding-top: .15rem; }
.pc__specs dt { font: 400 .64rem/1.9 var(--f-mono); font-stretch: 82%; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.pc__specs dd { margin: 0; font-size: 1rem; }

.page-equipment .after { margin-top: clamp(4rem, 12vh, 8rem); }

/* ------------------------------------------------------------------ smaller screens */
/* the four figures need about 30rem side by side; below 1400 px they go under the name */
@media (max-width: 1399px) {
  .scope { grid-template-columns: minmax(0, 1fr) 7rem; row-gap: .8rem; }
  .scope__spec { grid-column: 1 / -1; }
  .scope__note { grid-column: 1 / -1; margin-top: 0; }
  .scope + .scope .scope__spec dt, .scope + .scope .scope__fl span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .scope + .scope .scope__spec dd { margin-top: .15rem; }
}

@media (max-width: 1023px) {
  .eq-head, .eq { grid-template-columns: minmax(0, 1fr); }
  .eq-head > *, .eq > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .eq-head .sub { margin-top: 1rem; }
  .setup ol { grid-template-columns: minmax(0, 1fr); }
  .setup a { flex-direction: row; align-items: baseline; gap: 1rem; padding: .7rem 0 .55rem; }
  .setup time { width: 3.2rem; flex: none; }
  .eq { margin-top: 4.5rem; }
  .eq > .kit, .eq > .scopes, .eq > .pc { margin-top: 1.6rem; }
  .eq > .pc + .pc { margin-top: 2rem; }
  .note--pier { margin-top: 1.2rem; }
  .chart { margin-top: 1.4rem; }
  .chart__side { margin-top: 1.2rem; padding-bottom: 0; }
  .legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; }
  .legend li { grid-template-columns: 1fr; }
  .legend li::before { width: 1.4rem; margin-bottom: .45rem; }
  .legend span { grid-column: 1; }
  .note--wizard { margin-top: 1.1rem; }
}

@media (max-width: 700px) {
  .kit__row { grid-template-columns: minmax(0, 1fr); row-gap: .3rem; }
  .kit__row > * { grid-column: 1 !important; }
  .kit__text { margin-top: .2rem; }
  .kit__row--filters .bands { margin-top: .4rem; }
  .scope { grid-template-columns: minmax(0, 1fr) auto; }
  .scope__fl { text-align: right; }
  .scope__fl b { font-size: 2.2rem; }
  .scope__spec { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .6rem; }
  .pc { grid-template-columns: minmax(0, 1fr); row-gap: 1.2rem; }
  .pc__specs div { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .legend b { font-size: 1rem; }
  .legend span { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fov.is-armed .f, .fov.is-armed .f-halo { stroke-dashoffset: 0; }
  .fov.is-armed .f-lab, .fields.is-armed:not(.is-on) .note--wizard { opacity: 1; }
}
