/* ---------- Fonts ---------- */
@font-face {
  font-family: "Fira Code";
  src: local("Fira Code Regular"), local("FiraCode-Regular"),
       url("Font/FiraCode-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fira Code";
  src: local("Fira Code Bold"), local("FiraCode-Bold"),
       url("Font/FiraCode-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* =========================================================
   MOBILE (default, mobile first)
   ========================================================= */
* { box-sizing: border-box; margin: 0; }

html { overflow: hidden; }

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 5vh 6vw;
  font-family: "Fira Code", monospace;
  font-variant-ligatures: none;
  background: #fff;
  color: #000;
}

img { display: block; }

/* ---------- Background skeleton ---------- */
.body-bg {
  position: absolute;
  top: -234px;
  width: 130vw;
  height: 130vh;
  background: url("images/IN ROCK LP -023.png") bottom / 100% auto no-repeat;
  z-index: 0;            /* FIX: was 3, it covered the links */
  pointer-events: none;  /* FIX: clicks go through it */
}

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.logo { height: 9vh; }
.social { display: flex; gap: 2vw; }
.social img { height: 6vh; transition: transform .2s; }
.social a:hover img { transform: rotate(-10deg); }

/* ---------- Main ---------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
}

.to-inrock { margin-top: 50px; }

.archive-rock {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: min(8.5vw, 4.4vh);
  font-weight: 400;
  line-height: 1.15;
}

.badge {
  padding: 2vh 2vw;
  border: 2px solid #000;
  background: #fff;
  text-align: center;
  transform: rotate(1.5deg);
}

.lead {
  font-size: min(4.2vw, 2.2vh);
  margin-top: 2vh;
}

/* ---------- Form ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5vw;
  margin-top: 12vh;
}

.form input,
.form button {
  height: 7vh;
  font: inherit;
  font-size: min(4.2vw, 2.2vh);
  border: 2px solid #000;
  border-radius: 0;
}

.form input { padding: 0 4vw; }
.form input::placeholder { color: #000; opacity: 1; } /* black like the design, not grey */

.form button {
  flex: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}
.form input,
.form button { transition: border-color .2s, background .2s, color .2s, transform .1s; }

.form button:hover { background: #fff; color: #000; }
.form button:active { transform: scale(.96); } /* press effect */

.message {
  height: 3vh;
  margin-top: 1vh;
  font-size: min(3.5vw, 1.8vh); /* FIX: was 1vw, too tiny to read on phones */
}

/* ---------- Footer: bomb + grunge ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-left: -6vw; /* same as body padding */
}

.bomb {
  position: absolute;
  right: 4vw;
  bottom: -3vh;
  z-index: 2;
  height: 30vh;
  width: auto; /* FIX: was 60vw x 60vw, it squashed the bomb */
}

.grunge {
  position: relative;
  margin-bottom: -64px;
  width: 100vw;
  height: 14vh;
  background: url("images/IN ROCK LP -03.png") bottom / 100% auto no-repeat;
  pointer-events: none;
}

/* =========================================================
   TABLET (680px and up)
   ========================================================= */
@media (min-width: 680px) {
  /* ---- Tablet controls: change these numbers ---- */
  :root {
    --bg-size: 95vw;    /* skeleton size: bigger number = bigger skeleton */
    --bg-top: -4vh;     /* skeleton up/down */
    --bg-left: 10vw;     /* skeleton left/right */
    --footer-x: 0px;    /* bomb + grunge left(-) / right(+) */
    --footer-y: 0px;    /* bomb + grunge up(-) / down(+) */
  }
 
  .logo { height: 11vh; }
  .social img { height: 7vh; }
 
  .body-bg {
    top: var(--bg-top);
    left: var(--bg-left);
    width: var(--bg-size);
    height: calc(var(--bg-size) * 1.8); 
    background-position: top center;
    background-size: contain;
  }
 
  h1 { font-size: min(6.5vw, 5vh); }
  .badge { font-size: min(2.6vw, 2vh); }
  .lead { font-size: min(3vw, 2.4vh); max-width: 75vw; }
 
  .form { flex-direction: row; gap: 2vw; margin-top: 8vh; }
  .form input { flex: 2; min-width: 0; padding: 0 2vw; }
  .form button { flex: 1; }
 
  .bomb { height: 32vh; right: -90px; }
  .grunge { height: 12vh; margin-bottom: -9vh; }
}
 
/* =========================================================
   LAPTOP (920px and up) — layout like the design
   ========================================================= */
@media (min-width: 920px) {
  :root { --footer-x: 0px; --footer-y: 0px; }
  .logo { height: 14vh; }
  .social img { height: 8vh; }
 
  .body-bg { top: -5vh; left: 22vw; width: 55vw; height: 200vh; }
 
  .to-inrock { margin-top: 8vh; }
 
  h1 { font-size: min(4.4vw, 6vh); }
  .badge { font-size: min(1.8vw, 2.6vh); }
  .lead { font-size: min(1.9vw, 2.8vh); max-width: 62vw; }
 
  .form { max-width: 64vw; margin-top: 7vh; }
  .form input,
  .form button { height: min(6vw, 9vh); font-size: min(1.7vw, 2.6vh); }
 
  .message { font-size: min(1.2vw, 1.8vh); }
 
  .bomb { height: 40vh; right: -150px;}
  .grunge { height: 14vh; margin-bottom: -12vh;}
}
 
/* =========================================================
   DESKTOP (1200px and up)
   ========================================================= */
@media (min-width: 1200px) {
  .logo { height: 16vh; }
 
.body-bg { top: -10vh; left: 22vw; width: 55vw; height: 200vh; }

  h1 { font-size: min(3.6vw, 6.5vh); }
  .badge { font-size: min(1.5vw, 2.6vh); }
  .lead { font-size: min(1.6vw, 2.8vh); max-width: 60vw; }
 
  .form { max-width: 60vw; }
  .form input,
  .form button { height: min(5vw, 9vh); font-size: min(1.4vw, 2.6vh); }
 
  .message { font-size: min(1vw, 1.8vh); }
 
  .bomb { height: 45vh; }
  .grunge { height: 15vh; margin-bottom: -40vh;}
}
/* =========================================================
   ERROR (empty or wrong e-mail)
   ========================================================= */
:root { --red: #e10600; }

/* red field that shakes */
.form.is-error input {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red); /* a bit thicker red border */
  animation: shake .4s ease;
}
.form.is-error input::placeholder { color: var(--red); }

/* red message that slides in */
.message.is-error {
  color: var(--red);
  font-size: min(4vw, 2.1vh);
  animation: slide-in .3s ease;
}
@media (min-width: 680px)  { .message.is-error { font-size: min(2.2vw, 2.2vh); } }
@media (min-width: 920px)  { .message.is-error { font-size: min(1.5vw, 2.4vh); } }
@media (min-width: 1200px) { .message.is-error { font-size: min(1.3vw, 2.4vh); } }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .form.is-error input,
  .message.is-error { animation: none; }
}