/* Midnight Gremlins site — layered on ZomBrew tokens */
@import url("./colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--fg-1);
  overflow-x: hidden;
}

/* Warm paper grain everywhere */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url("../assets/textures/paper.png") center/512px;
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* Warm lamp-spill vignette */
body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217,138,75,0.18), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(196,149,106,0.14), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(42,29,16,0.22) 100%);
  pointer-events: none;
  z-index: 2;
}

main, header, footer, section { position: relative; z-index: 3; }

/* =======================================================
   Nav
   ======================================================= */
.nav {
  position: sticky; top: 0;
  z-index: 20;
  padding: 18px 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(242,232,217,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid rgba(59,42,26,0.18);
}
.nav .brand {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--roast);
  display: flex; align-items: center; gap: 12px;
}
.nav .brand .monogram {
  width: 26px; height: 26px;
  border: 2px solid var(--roast);
  display: grid; place-items: center;
  background: var(--roast);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 13px; letter-spacing: 0;
  box-shadow: 0 2px 0 var(--ink);
}
.nav ul {
  display: flex; gap: 32px; list-style: none; margin: 0; padding: 0;
}
.nav a {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.nav a:hover { border-color: var(--saddle); color: var(--ink); }

/* =======================================================
   Hero
   ======================================================= */
.hero {
  padding: 80px 48px 96px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 42px;
}
.hero-eyebrow::after {
  content: ""; flex: 1; height: 1.5px;
  background: linear-gradient(90deg, var(--paper-dark), transparent);
  max-width: 280px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; background: var(--ember);
  border-radius: 99px;
  box-shadow: 0 0 0 3px rgba(217,138,75,0.22);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(217,138,75,0.22); }
  50% { box-shadow: 0 0 0 7px rgba(217,138,75,0.08); }
}

.hero h1.display {
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--roast);
  margin: 0 0 24px;
  font-weight: 400;
}
.hero h1.display .amp {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--saddle);
  letter-spacing: 0;
}
.hero h1.display .line-2 {
  display: block;
  padding-left: clamp(40px, 8vw, 120px);
  font-style: italic;
  color: var(--ink);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(22px, 2.2vw, 30px);
  font-style: italic;
  color: var(--fg-2);
  max-width: 640px;
  margin: 40px 0 0;
  line-height: 1.3;
  padding-left: clamp(40px, 8vw, 120px);
  border-left: 2px solid var(--saddle);
  padding: 8px 0 8px 24px;
  margin-left: clamp(40px, 8vw, 120px);
}
.hero-tagline strong {
  font-weight: 500;
  color: var(--ink);
  font-style: normal;
}

/* Decorative hero — cup with rising steam */
.hero-cup {
  position: absolute;
  right: 48px; top: 90px;
  width: 260px; height: 320px;
  pointer-events: none;
}

/* =======================================================
   Marquee
   ======================================================= */
.marquee {
  border-top: 2px solid var(--roast);
  border-bottom: 2px solid var(--roast);
  background: var(--roast);
  color: var(--cream);
  overflow: hidden;
  padding: 22px 0;
  position: relative;
  background-image: url("../assets/textures/roast.png");
  background-size: 256px;
  background-blend-mode: multiply;
}
.marquee-track {
  display: flex; gap: 48px;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 48px;
}
.marquee-track .glyph {
  color: var(--amber);
  font-size: 18px;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* =======================================================
   Sections (general)
   ======================================================= */
.section {
  padding: 120px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.section-label::before {
  content: ""; width: 32px; height: 1.5px; background: var(--saddle);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.02;
  color: var(--roast);
  margin: 0 0 40px;
  max-width: 900px;
}
.section h2 em {
  font-style: italic;
  color: var(--saddle);
}

/* =======================================================
   About — two column
   ======================================================= */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: start;
}
.about-aside {
  position: sticky; top: 120px;
}
.about-aside .polaroid {
  background: var(--paper-deep);
  background-image: url("../assets/textures/paper-deep.png");
  background-size: 256px;
  background-blend-mode: multiply;
  border: 2px solid var(--roast);
  padding: 16px 16px 52px;
  box-shadow: 0 2px 0 var(--ink), 0 18px 32px rgba(59,42,26,0.28);
  transform: rotate(-2.2deg);
  width: 280px;
  position: relative;
}
.about-aside .polaroid .frame {
  aspect-ratio: 1/1;
  background: linear-gradient(160deg, var(--floor) 0%, var(--roast) 100%);
  border: 1.5px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.about-aside .polaroid .frame::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 60% 30%, rgba(227,179,65,0.4), transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(196,149,106,0.25), transparent 50%);
}
.about-aside .polaroid .caption {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--fg-2);
}
.about-aside .polaroid .tape {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 90px; height: 24px;
  background: rgba(196,149,106,0.55);
  border: 1px solid rgba(59,42,26,0.15);
  box-shadow: 0 2px 6px rgba(59,42,26,0.2);
}

.about-aside .meta {
  margin-top: 48px;
  padding-left: 8px;
}
.about-aside .meta-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--paper-dark);
  font-family: var(--font-body);
  font-size: 15px;
}
.about-aside .meta-row .k {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.about-aside .meta-row .v {
  color: var(--fg-2);
  font-style: italic;
}

.about-body p {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 28px;
  max-width: 620px;
}
.about-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 72px;
  float: left;
  line-height: 0.85;
  margin: 6px 10px 0 0;
  color: var(--saddle);
}
.about-body p em { color: var(--ink); }

/* =======================================================
   Currently in development
   ======================================================= */
.dev {
  background: var(--roast);
  background-image: url("../assets/textures/roast.png");
  background-size: 256px;
  background-blend-mode: multiply;
  color: var(--cream);
  padding: 120px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.dev::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(227,179,65,0.12), transparent 50%);
  pointer-events: none;
}
.dev-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
}
.dev .section-label { color: var(--amber); }
.dev .section-label::before { background: var(--amber); }
.dev h2 { color: var(--cream); }
.dev h2 em { color: var(--amber); }

.dev-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  margin-top: 64px;
  align-items: start;
}
.dev-body p {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.6;
  color: var(--paper);
  max-width: 560px;
}
.dev-body p + p { margin-top: 20px; }

.dev-card {
  background: var(--chrome-panel);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink), 0 20px 40px rgba(0,0,0,0.5);
  padding: 32px;
  position: relative;
}
.dev-card::before {
  content: "";
  position: absolute;
  left: -2px; top: 22px; bottom: 22px; width: 4px;
  background: var(--amber);
}
.dev-card .card-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.dev-card h3.code-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  color: var(--cream);
  margin: 0 0 6px;
  font-weight: 400;
}
.dev-card .subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--amber);
  margin-bottom: 28px;
}

.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid rgba(242,232,217,0.09);
  font-family: var(--font-body);
  font-size: 15px;
  gap: 16px;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .k {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,232,217,0.55);
  padding-top: 2px;
}
.spec-row .v { color: var(--paper); }

.progress-wrap { margin-top: 28px; }
.progress-wrap .prog-label {
  display: flex; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,232,217,0.6);
  margin-bottom: 8px;
}
.progress-track {
  height: 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--ink);
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saddle), var(--amber));
  width: 0%;
  transition: width 1.4s var(--ease-out);
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(242,232,217,0.25), transparent);
  animation: shimmer 2.8s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Pill tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tag {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1.5px solid rgba(242,232,217,0.35);
  color: var(--paper);
  border-radius: 99px;
}
.tag.em {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

/* =======================================================
   Signup strip
   ======================================================= */
.signup {
  padding: 120px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.signup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.signup-body p {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 20px;
  max-width: 500px;
}

.envelope {
  background: var(--paper-deep);
  background-image: url("../assets/textures/paper-deep.png");
  background-size: 256px;
  background-blend-mode: multiply;
  border: 2px solid var(--roast);
  box-shadow: 0 3px 0 var(--ink), 0 16px 32px rgba(59,42,26,0.25);
  padding: 36px;
  position: relative;
}
.envelope::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 60px;
  border-bottom: 2px solid var(--roast);
  background: linear-gradient(180deg, var(--paper-dark), transparent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 60%, 0 100%);
  opacity: 0.5;
}
.envelope .label {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.envelope h3 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--roast);
  margin: 0 0 18px;
  font-weight: 400;
}
.form-row {
  display: flex; gap: 0;
  margin-top: 20px;
  position: relative;
}
.form-row input {
  flex: 1;
  background: var(--paper);
  border: 2px solid var(--roast);
  border-right: none;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(42,29,16,0.15);
  outline: none;
  transition: background 160ms var(--ease-out);
}
.form-row input::placeholder { color: var(--fg-muted); font-style: italic; }
.form-row input:focus { background: #FBF3E4; }

.btn-press {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 24px;
  border: 2px solid var(--roast);
  background: var(--saddle);
  color: var(--cream);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink), 0 6px 12px rgba(59,42,26,0.25);
  transition: transform 120ms var(--ease-out), background 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
  font-weight: 400;
  user-select: none;
  white-space: nowrap;
}
.btn-press:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink), 0 10px 18px rgba(59,42,26,0.35);
}
.btn-press:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 var(--ink);
}

.envelope .fineprint {
  font-family: var(--font-body);
  font-size: 14px; font-style: italic;
  color: var(--fg-3);
  margin-top: 14px;
}
.envelope .success {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--olive);
  margin-top: 16px;
  min-height: 30px;
  transition: opacity 400ms var(--ease-out);
}

/* =======================================================
   Contact
   ======================================================= */
.contact {
  padding: 120px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.contact-aside h2 { margin-bottom: 24px; }
.contact-aside p {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 0 28px;
}
.contact-aside .addrs {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  display: flex; flex-direction: column; gap: 10px;
  border-left: 2px solid var(--saddle);
  padding-left: 16px;
}
.contact-aside .addrs .k {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: block;
  margin-bottom: 2px;
}

.contact-card {
  background: var(--paper-deep);
  background-image: url("../assets/textures/paper-deep.png");
  background-size: 256px;
  background-blend-mode: multiply;
  border: 2px solid var(--roast);
  padding: 36px;
  box-shadow: 0 3px 0 var(--ink), 0 16px 32px rgba(59,42,26,0.25);
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.field label .req { color: var(--ember); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--paper);
  border: 2px solid var(--roast);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  box-shadow: inset 0 2px 4px rgba(42,29,16,0.12);
  outline: none;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out);
  border-radius: 0;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-body);
}
.field input:focus, .field textarea:focus, .field select:focus {
  background: #FBF3E4;
  border-color: var(--saddle);
}
.field .hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-group label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1.5px solid var(--roast);
  color: var(--fg-2);
  background: var(--paper);
  cursor: pointer;
  transition: all 160ms var(--ease-out);
  margin: 0;
}
.radio-group label.active {
  background: var(--roast);
  color: var(--cream);
  box-shadow: 0 2px 0 var(--ink);
}
.radio-group input { display: none; }

.contact-card .actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--paper-dark);
}
.contact-card .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}

.sent-state {
  text-align: center;
  padding: 36px 20px;
}
.sent-state .stamp {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid var(--olive);
  color: var(--olive);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: rotate(-6deg);
  margin-bottom: 18px;
  background: rgba(74,92,58,0.06);
}
.sent-state h3 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--roast);
  margin: 0 0 10px;
}
.sent-state p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--fg-2);
  max-width: 400px;
  margin: 0 auto;
}

/* =======================================================
   Footer
   ======================================================= */
footer {
  background: var(--roast);
  background-image: url("../assets/textures/roast.png");
  background-size: 256px;
  background-blend-mode: multiply;
  color: var(--paper);
  padding: 56px 48px 40px;
  border-top: 2px solid var(--ink);
  position: relative;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.footer-left, .footer-right {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(242,232,217,0.75);
}
.footer-right { text-align: right; font-style: italic; }
.footer-center {
  display: flex; gap: 28px;
}
.footer-center a {
  color: var(--amber);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms var(--ease-out);
}
.footer-center a:hover { border-color: var(--amber); }

/* =======================================================
   Responsive
   ======================================================= */
@media (max-width: 900px) {
  .nav { padding: 14px 24px; }
  .nav ul { gap: 18px; }
  .hero { padding: 48px 24px 72px; }
  .section, .signup, .contact { padding: 72px 24px; }
  .dev-inner { padding: 0 24px; }
  .about, .dev-grid, .signup-inner, .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-aside { position: static; }
  .hero-cup { display: none; }
  .hero h1.display .line-2 { padding-left: 0; }
  .hero-tagline { margin-left: 0; padding-left: 20px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-right { text-align: center; }
  .footer-center { justify-content: center; flex-wrap: wrap; }
}
