/* Condensed bold face for the tile wordmark, as in the DEC logo. */
@font-face {
  font-family: "Tile Condensed";
  src: local("HelveticaNeue-CondensedBold"), local("Helvetica Neue Condensed Bold"),
    local("ArialNarrow-Bold"), local("Arial Narrow Bold");
  font-weight: 700;
}

:root {
  --paper: #faf9f7;
  --paper-alt: #f3f1ed;
  --ink: #242321;
  --muted: #645849;
  --accent: #1c1c1b; /* ink: tiles, stats, headings, buttons */
  --accent-deep: #1c1c1b;
  --accent-hover: #0b0b0a;
  --secondary: #d6a72b;
  --rule: #b8ad98;
  --cream: #f4e8cb;
  --body-font: "IBM Plex Sans", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip; /* the full-width hero can include the scrollbar width */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.45;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 1200px;
  margin: auto;
  padding: 0 32px;
}

/* Header & Navigation */
header {
  padding: 20px 0 16px;
  margin-bottom: 40px;
}

nav {
  display: flex;
  align-items: center;
  gap: 23px;
  flex-wrap: wrap;
  font: 600 13px var(--body-font);
}

.nav-toggle {
  display: none;
}

nav a {
  text-decoration: none;
}

nav .nav-end {
  margin-left: auto;
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero & PDP-8 Front Panel: one centered column (wordmark, text, buttons, panel). */
.hero {
  display: grid;
  justify-items: center;
  row-gap: 32px;
  width: min(100%, 680px);
  margin-inline: auto;
  padding-bottom: 48px;
}

.hero h1 {
  container-type: inline-size;
  width: 100%;
  margin: 0;
}

.hero-details {
  text-align: center;
}

/* Wide: panel to the right of the wordmark, from the tile tops to the subtitle baseline.
   Panel height is about 75px + 0.909 * width; tile top to baseline is 0.3516 * wordmark width.
   The panel column solves for equal heights with a 28px gap (about 2 tile gaps). */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr calc(0.2789 * min(100vw - 64px, 1136px) - 66.9px);
    align-items: start;
    column-gap: 28px;
    width: 100%;
  }

  .hero .panel {
    width: 100%;
  }

  .hero-details {
    grid-column: 1 / -1; /* centered on the page, like the stats */
  }
}

.hero-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.6cqi;
}

/* Near DEC logo proportions (0.44), but less tall. */
.hero-tiles span {
  display: grid;
  place-items: center;
  aspect-ratio: 0.56;
  background: var(--accent-deep);
  color: var(--paper);
  font: 700 18cqi / 1 "Tile Condensed", Arial, sans-serif;
}

.hero-subtitle {
  display: block;
  margin: 3cqi -0.3em 0 0; /* offset the trailing letter spacing */
  font: 600 5.4cqi / 1 var(--body-font);
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap; /* no wrap while the web font loads */
}

.hero-tagline {
  margin: 0 0 8px;
  font-size: 24px;
}

.date {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.cta {
  /* Ink face on a mid-gray edge, so the edge shows on a dark key. */
  --cta-top: #444441;
  --cta-face: var(--accent-deep);
  --cta-edge: #3a3834;
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--cta-edge);
  border-radius: 7px;
  background: linear-gradient(var(--cta-top), var(--cta-face));
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    inset 0 1px rgb(255 255 255 / 35%),
    0 4px var(--cta-edge),
    0 6px 10px rgb(36 35 33 / 30%);
  transition: filter 140ms ease;
}

.cta:hover {
  filter: brightness(1.1);
}

.cta-secondary {
  --cta-top: #ffffff;
  --cta-face: #e4e0d8;
  --cta-edge: #9b958a;
  color: var(--ink);
}

.cta-secondary:hover {
  filter: brightness(1.03);
}

.cta-small {
  display: block;
  width: fit-content;
  margin: 18px auto 4px;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 13px;
}

.cta:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px rgb(255 255 255 / 35%),
    0 1px var(--cta-edge),
    0 2px 3px rgb(36 35 33 / 25%);
}

.cta:focus-visible {
  outline-offset: 6px;
}

/* Front Panel Console */
.panel {
  position: relative;
  justify-self: center;
  container-type: inline-size; /* panel text scales with the panel */
  width: min(100%, 328px);
  padding: 5px;
  border: 1px solid #8e8b84;
  border-radius: 3px;
  background: linear-gradient(#d4d2cc, #b9b6af);
  box-shadow: 0 1px 2px #27241d40, 0 8px 20px -8px #27241d50;
  color: var(--cream);
  font-family: monospace;
}

.panel-face {
  padding: 5cqi; /* scales with the panel, so the band text fits */
  border: 1px solid #0c0c0b;
  border-radius: 2px;
  background: #161615;
  box-shadow: inset 0 1px 3px #000;
}

.panel-band {
  display: grid;
  border: 1px solid #e6bf95;
  background: #c2591b; /* band orange */
  color: #f7e2c8;
  font-family: "Eurostile", "Microgramma", "Avenir Next", Futura, Arial, sans-serif;
}

.panel-name {
  padding: 0.12em 0.35em 0.08em;
  color: #fff;
  font-size: 9cqi;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
}

.panel-sub {
  overflow: hidden;
  padding: 2px 0.6em 3px;
  border-top: 2px solid #ecd2b1;
  background: #d27a45; /* switch orange */
  font-size: 2.8cqi;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.monitor {
  position: relative;
  margin: clamp(6px, 0.8vw, 10px) 0;
  padding: clamp(4px, 0.8vw, 9px);
  border: 1px solid #55554b;
  border-radius: 14px;
  background: #0c0f0b;
  box-shadow: inset 0 3px 8px #000, 0 1px #99978255;
}

.monitor canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 500 / 235;
  border-radius: 8px;
  background: #0b0f0a;
}

.monitor::before {
  content: "";
  position: absolute;
  inset: clamp(4px, 0.8vw, 9px);
  border-radius: 8px;
  /* Faint graticule: 10 columns of square cells (screen is 500 x 235). */
  background-image:
    linear-gradient(to right, #9cff6a12 1px, transparent 1px),
    linear-gradient(to bottom, #9cff6a12 1px, transparent 1px);
  background-size: 10% 21.28%;
  pointer-events: none;
}

.monitor::after {
  content: "";
  position: absolute;
  inset: clamp(4px, 0.8vw, 9px);
  border-radius: 8px;
  background: radial-gradient(ellipse at center, #b8ff8a0c, transparent 60%, #00000080);
  pointer-events: none;
}

.panel-regs {
  display: grid;
  gap: clamp(6px, 1vw, 10px);
  padding: 0 4%;
}

.panel-reg {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  font-size: 3.4cqi;
}

/* Line up the label with the lamps, below the group bar. */
.panel-label {
  padding-top: calc(2px + clamp(6px, 1vw, 10px));
  color: #d6d4ce;
  font: 600 3.4cqi / 1 var(--body-font);
  letter-spacing: 0.03em;
}

.panel-lamps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(3px, 0.6vw, 7px);
  width: 100%;
}

.panel-lamps > span {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  padding-top: clamp(6px, 1vw, 10px);
  border-top: 2px solid #b9b8b2;
}

.panel-regs i {
  width: 3cqi; /* scales with the panel, so the gaps stay open */
  aspect-ratio: 1;
  border-radius: 22%;
  background: #241c17;
  box-shadow: inset 0 1px 1px #000;
  transition: background-color 0.1s;
}

.panel-regs i.on {
  background: #e8783a;
  box-shadow: 0 0 3px #e8783a66;
}

.panel-ops {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: 100%;
  padding-top: clamp(6px, 1vw, 10px);
  border-top: 2px solid #b9b8b2;
}

.panel-ops > span {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #d6d4ce;
  font: 600 2.5cqi / 1 var(--body-font);
}

.panel-replay {
  /* Lower right corner of the black face, inside the frame. */
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4a4844; /* faint on the black face */
}

.panel-replay:hover {
  color: #b9b6af;
}

.panel-replay svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Stats Bar */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 160px));
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px; /* plus the section top padding: 48px, as above */
}

.stats div {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  aspect-ratio: 1.618; /* golden ratio */
  border-radius: 4px;
  padding: 12px;
  background: var(--accent-deep);
  color: #e9e6df;
  text-align: center;
}

.stats b {
  font: 600 30px / 1 var(--body-font);
}

.stats small {
  font: 11px var(--body-font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Content Sections */
.section {
  padding: 36px 0;
}

/* Content below the hero is narrower than the page. */
.section,
footer {
  max-width: 820px;
  margin-inline: auto;
}

.section h2 {
  color: var(--accent-deep);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0 0 20px;
}

.intro p {
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 12px;
}

.intro p:last-child {
  margin-bottom: 0;
}

.section-note {
  font: 13px var(--body-font);
  color: var(--muted);
  margin: -10px 0 22px;
}

/* Handbook Cards (Registration, CFP, Schedule, Venue, Sponsors) */
.handbook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  display: flex; /* so the button can sit at the bottom */
  flex-direction: column;
  background: var(--paper-alt);
  padding: 22px;
}

.card > .cta-small {
  margin-top: auto; /* buttons line up across the cards in a row */
}

.card h3 {
  margin: 0 0 12px;
  color: var(--accent-deep);
  font-size: 20px;
}

.card p {
  font: 14px var(--body-font);
  line-height: 1.7;
  margin: 0 0 12px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-meta {
  font: 700 11px monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.handbook-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font: 14px var(--body-font);
  line-height: 1.75;
}

.handbook-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.handbook-list strong {
  font-weight: 700;
}

.handbook-list a {
  color: var(--accent-deep);
}

.handbook-list span {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font: 600 11px / 1.4 var(--body-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.venue-map {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 12px;
  border: 1px solid var(--rule);
}

.inline-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-deep);
}

/* Footer */
footer {
  padding: 26px 0 46px;
  font: 12px var(--body-font);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}


@media (max-width: 700px) {
  .wrap {
    padding: 0 18px;
  }

  header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 12px 0 10px;
    margin-bottom: 18px;
  }

  .nav-toggle {
    display: block;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--ink);
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 8px 0 4px;
    font-size: 16px;
  }

  .nav-toggle[aria-expanded="true"] + nav {
    display: flex;
  }

  nav .nav-end {
    margin-left: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 160px));
  }

  .handbook-grid {
    grid-template-columns: 1fr;
  }
}
