/* HardCorps Design
   Replaces the old frameset (LEFTSIDE / top / content / bottom) and the
   LEFTSIDE.swf Flash navigation with a single CSS layout. */

:root {
  --purple: #9966ff;
  --yellow: #ffcc00;
  --link: #ffff33;
  --card: #9999cc;
  --card-head: #003399;
}

html { background: #000; }

body {
  margin: 0;
  background: #000;
  color: #fff;
  font: 13px/1.4 Arial, Helvetica, sans-serif;
}

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

/* ---------- Layout: left art panel + right content column ---------- */

.site {
  display: grid;
  grid-template-columns: 450px 1fr;
}

/* The left panel is the artwork rendered from LEFTSIDE.swf.
   Nav positions are in cqw so they scale with the panel on small screens. */
.art {
  position: relative;
  width: 450px;
  aspect-ratio: 3 / 4;
  background: #000 url(../images/leftside.png) 0 0 / 100% auto no-repeat;
  container-type: inline-size;
}

.art h1 { margin: 0; }

.art .logo {
  position: absolute;
  left: 3cqw; top: 0;
  width: 39cqw; height: 19cqw;
}

.nav { margin: 0; padding: 0; list-style: none; }

.nav a {
  position: absolute;
  right: calc(9 / 450 * 100cqw);
  top: calc(var(--y) / 450 * 100cqw);
  padding: 1.2cqw 0 1.2cqw 2cqw;
  margin-top: -1.2cqw;
  font: 400 calc(11 / 450 * 100cqw)/1 "Orbitron", "Eurostile", sans-serif;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--yellow);
}

.nav a:focus-visible { outline: 1px dotted var(--yellow); outline-offset: 2px; }

/* Brief nod to the old Flash intro, on the landing page only. */
.intro .nav a {
  animation: nav-in 0.5s ease-out both;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}

@keyframes nav-in {
  from { opacity: 0; transform: translateX(2em); }
}

@media (prefers-reduced-motion: reduce) {
  .intro .nav a { animation: none; }
}

/* Right column: black strip, blue bar, then the purple content "frame"
   lined up with the purple band in the artwork (y 111 to 457). */
.topbar {
  height: 56px;
  margin: 50px 0 5px;
  background: url(../images/topbar_bkg.gif) repeat-x;
}

.content {
  box-sizing: border-box;
  height: 346px;
  overflow: auto;
  padding: 8px;
  background: var(--purple);
}

.content > :first-child { margin-top: 0; }

/* ---------- Content styles ---------- */

.content a { color: var(--link); }
.content a:visited { color: #fff; }

.content h2 {
  margin: 0 0 1em;
  font-size: 16px;
}

.content p { margin: 0 0 1em; }
.content ul { margin: 0 0 1em; padding-left: 40px; }

.lead { font-weight: bold; }

/* Gallery cards */
.content .gallery { margin: 0; padding: 0; list-style: none; }

.card {
  box-sizing: border-box;
  width: 300px;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 2px;
  border: 3px solid var(--yellow);
  background: var(--card);
}

.card h3 {
  margin: 0 0 2px;
  padding: 5px;
  background: var(--card-head);
  font-size: 13px;
}

.card h3 a,
.card h3 a:visited { color: #fff; }
.card h3 a:hover { color: var(--yellow); }

.card .body {
  display: grid;
  grid-template-columns: 35% 1fr;
  gap: 2px;
  padding: 5px;
}

.card img { display: block; }
.card p { margin: 0; }

/* Home: image buttons with hover swap */
.content .image-nav { margin: 5px 0 0 30px; padding: 0; list-style: none; }
.image-nav a { position: relative; display: block; width: 237px; }
.image-nav img { display: block; }
.image-nav .on { position: absolute; inset: 0; opacity: 0; }
.image-nav a:hover .on,
.image-nav a:focus-visible .on { opacity: 1; }

/* Contact form */
.contact-form {
  display: grid;
  grid-template-columns: 77px 222px;
  gap: 6px 8px;
  align-items: start;
}

.contact-form label { text-align: right; font-weight: bold; padding-top: 2px; }
.contact-form input,
.contact-form textarea {
  box-sizing: border-box;
  width: 100%;
  font: 13px Arial, Helvetica, sans-serif;
}
.contact-form button { grid-column: 2; justify-self: end; }
.contact-form .form-note { grid-column: 2; justify-self: end; margin: 0; font-size: 12px; }

/* ---------- Small screens: stack the panel above the content ---------- */

@media (max-width: 760px) {
  .site { display: block; }

  .art {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    aspect-ratio: 450 / 457;
  }

  .topbar { display: none; }

  .content {
    height: auto;
    overflow: visible;
    padding: 16px;
  }

  .contact-form { grid-template-columns: 1fr; }
  .contact-form label { text-align: left; }
  .contact-form button,
  .contact-form .form-note { grid-column: 1; }
  .content .image-nav { margin-left: 0; }
}
