/* Base: color and font variables, the page shell, the header, the statement above the cabinet, and the lock button. */

/* Rules a standalone page needs (a hosted preview may supply its own). */
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

/* Layout: masthead, centred statement, then one lit bay holding the cabinet — a dark teal room with a single red-oxide signal. */
:root {
  color-scheme: dark;
  /* palette, from the reference still */
  --aztec: #071516;
  --casal: #28565d;
  --ming: #2b6e7c;
  --paradiso: #448690;
  --oxide: #76190e;
  /* derived tints */
  --mist: #d3e3e3;
  --glow: #7fb8c0;
  --ember: #c8341d;
  --oxide-hi: #8f2415;
  --paper: #e6eeec;
  --ink: #0b2226;
  /* roles */
  --bg: var(--aztec);
  --fg: var(--mist);
  --accent: var(--paradiso);
  --muted: rgba(211, 227, 227, 0.62);
  --faint: rgba(211, 227, 227, 0.4);
  --line: rgba(211, 227, 227, 0.12);
  --accent-line: rgba(68, 134, 144, 0.4);
  --floor: rgba(0, 0, 0, 0.6);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --file: #8fbcc1;
  --file-hi: #a6cdd1;
}
* {
  box-sizing: border-box;
}
html {
  height: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  height: 100%;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-synthesis: none;
}

/* ---------- page shell (from the Case Cabinet design) ---------- */
#page {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
  padding-inline: clamp(16px, 3vw, 40px);
  background:
    radial-gradient(circle at 50% 74%, rgba(68, 134, 144, 0.22), transparent 30rem),
    radial-gradient(circle at 6% 96%, rgba(118, 25, 14, 0.26), transparent 26rem),
    linear-gradient(115deg, #0a1c1e 0%, var(--aztec) 55%, #081a1c 100%);
}
#page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(211, 227, 227, 0.028) 1px, transparent 1px);
  background-size: 100% 78px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1380px, 100%);
  height: 76px;
  margin: 0 auto;
  flex: none;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: inherit;
  display: inline-flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.brand-mark b {
  transform: rotate(-45deg);
  color: var(--glow);
  font: 500 13px var(--display);
}
.brand-name {
  display: grid;
}
.brand strong {
  font: 500 18px var(--display);
  letter-spacing: 0.02em;
}
.brand small,
.security-note {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.security-note svg {
  width: 16px;
  fill: none;
  stroke: var(--glow);
  stroke-width: 1.5;
}
.brand:focus-visible,
#btn:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 4px;
}

.hero {
  width: min(1380px, 100%);
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.copy {
  flex: none;
  display: grid;
  align-items: start;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(18px, 3.2vh, 34px) 0 6px;
  text-align: center;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.copy > div {
  grid-area: 1/1;
  transition:
    opacity 0.5s ease 0.32s,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.32s,
    visibility 0s linear 0.32s;
}
.copy > .open-copy,
#page.archive-open .copy > .locked-copy {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s,
    visibility 0s linear 0.3s;
}
#page.archive-open .copy > .open-copy {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.7s ease 0.35s,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s,
    visibility 0s;
}
.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--glow);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow i {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--accent);
}
.copy h1 {
  margin: 0;
  font: 500 clamp(30px, 3.4vw, 44px)/1.08 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.copy h1 em {
  color: var(--accent);
  font-weight: 500;
}
.intro {
  max-width: 700px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.eyebrow b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.open-copy .eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
}

/* the bay: rule above, cabinet stage, actions below */
.bay {
  flex: 1;
  min-height: 0;
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
#page.archive-open .status-light {
  background: var(--glow);
  box-shadow: 0 0 9px var(--glow);
}
#btn {
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--glow);
  font: 600 9px var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
#btn:hover {
  color: var(--mist);
}
@media (prefers-reduced-motion: reduce) {
  .copy,
  .copy > div {
    transition: none !important;
  }
}

@media (max-height: 780px) and (min-width: 821px) {
  .site-header {
    height: 60px;
  }
  .intro {
    display: none;
  }
}
@media (max-width: 820px) {
  .site-header {
    height: 68px;
  }
  .security-note {
    display: none;
  }
}
@media (max-width: 520px) {
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 16px;
  }
  .copy h1 {
    font-size: 28px;
  }
  .open-copy .eyebrow > span:first-child,
  .open-copy .eyebrow > i {
    display: none;
  }
  .intro {
    font-size: 13px;
  }
}
