/* ============================================================
   LILBRO — THE LAPPY EDITION
   "Strong Bad modern era": keeps the pixel personality,
   dials the phosphor down to a friendly mint, and puts
   readability first for a 50–70yo quilting audience.
   ------------------------------------------------------------
   Fonts (Google Fonts):
   <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=VT323&display=swap" rel="stylesheet">

   Font roles:
     Press Start 2P      — display: headings, buttons, labels (small doses!)
     Atkinson Hyperlegible — body copy (designed for low-vision readers)
     VT323               — decorative terminal flourishes only
                           (footer tagline, item card labels)

   Accessibility choices baked in:
     - Warm charcoal background, not pure black (less eye strain,
       less glare for older eyes)
     - Body copy is near-white with a faint green cast, NOT green
     - Green/mint reserved for accents, borders, buttons
     - Large body text (1.15rem+) and generous line height
     - Big tap targets on nav and buttons
     - Faint scanlines only — atmosphere, not obstacle
   ============================================================ */

/* ============================================================
   RESET
============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================
   DESIGN TOKENS
============================================================ */

:root {
  /* Warm charcoal surfaces — easier on eyes than #000 */
  --bg: #16181a;
  --surface: #1d2124;
  --surface-light: #262b2f;

  /* Text: near-white body, green is decoration not communication */
  --text-main: #eef4ee;
  --text-soft: #bcc9bc;
  --text-muted: #8a9a8a;

  /* Mint accent (the tamed phosphor) */
  --mint: #93e2a8;
  --mint-dim: #63a377;
  --mint-dark: #17301f;

  /* The SBEmail title-card red, warmed up and softened */
  --coral: #e2606a;
  --coral-dark: #7a3038;

  /* Attention gold */
  --gold: #f2c94c;

  --border: var(--mint-dim);
  --border-strong: var(--mint);

  /* Hard pixel edges — the personality lives here */
  --pixel-shadow: 4px 4px 0 rgba(0, 0, 0, 0.85);

  --scanline: repeating-linear-gradient(
    to bottom,
    rgba(147, 226, 168, 0.025),
    rgba(147, 226, 168, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );

  --speed: 0.1s;

  /* Type */
  --font-display: "Press Start 2P", monospace;
  --font-body: "Atkinson Hyperlegible", "Verdana", sans-serif;
  --font-terminal: "VT323", monospace;
}

/* ============================================================
   BASE
============================================================ */

body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  /* The whole site is a centered, showcase-style layout.
     Individual components opt OUT where needed (forms,
     item names inside cards). Centering at the root means
     pages stay aligned even where wrappers are missing. */
  text-align: center;
}

/* Whisper-quiet CRT scanlines. Atmosphere only. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--scanline);
  z-index: 9999;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text-main);
  text-decoration-thickness: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-inline: auto; /* centered images even in loose markup */
}

.img-main {
  max-width: 100%;
  height: 50vh;
  display: block;
  margin-inline: auto; /* centered images even in loose markup */
}

/* Display type — kept modest in size; pixel fonts read big.
   Green for punch, but headings also carry near-white weight
   via color where it matters. */
h1,
h2,
h3,
legend,
.main-nav a {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--mint);
  letter-spacing: 0.02em;
}

/* Consistent breathing room under every display heading */
h1,
h2,
h3 {
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.85rem; }

p a,
li a {
  font-family: var(--font-body); /* links inside prose stay readable */
}

/* Keyboard parity with hover effects — thick, obvious outlines */
a:focus-visible,
.btn-primary:focus-visible,
.order-form button:focus-visible,
.oc-btn:focus-visible,
.main-nav a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Dot separator lines:  - • - • - • -
   Works with OR without the class (bare dot paragraphs get
   centered + letter-spaced; class adds the max-width trim). */
.dots {
  max-width: 320px;
  margin: 1rem auto;
  color: var(--mint-dim);
  letter-spacing: 0.35em;
  white-space: nowrap;
  overflow: hidden;
}

/* ============================================================
   TERMINAL WINDOW CHROME — soft-retro framed window
============================================================ */

.terminal-window {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem auto 2rem;
  background: var(--surface);
  border: 3px solid var(--mint-dim);
  box-shadow: var(--pixel-shadow);
  position: relative;
}

/* Title bar: warm coral band — the email intro card, mellowed */
.terminal-window::before {
  content: "LILBRO.EXE";
  display: block;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-terminal);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.25rem;
  margin: -2rem -2rem 1.5rem;
  border-bottom: 3px solid var(--coral-dark);
  line-height: 1.4;
}

/* ============================================================
   HEADER & LOGO
============================================================ */

header {
  background: var(--bg);
  text-align: center;
  padding: 1.5rem 1rem 0.75rem;
}

.logo-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.logo-badge img {
  max-width: 340px;
  width: 100%;
  height: auto;
  margin-bottom: 0.25rem;
}

/* ============================================================
   NAVIGATION — big friendly tap targets
   NOTE: pixel fonts read ~40% smaller than normal fonts at the
   same rem value, so nav runs larger than it looks.
============================================================ */

.main-nav {
  background: var(--bg);
  text-align: center;
  padding: 0.25rem 1rem;
}

.main-nav ul {
  list-style: none;
}

.main-nav li {
  display: inline-block;
  margin: 0 0.5rem;
}

.main-nav a {
  display: inline-block;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--mint);
  padding: 0.85rem 1.25rem;
  letter-spacing: 0.02em;
}

.main-nav a:hover {
  color: var(--bg);
  background: var(--mint);
}

.main-nav a::before {
  content: "> ";
  color: var(--text-muted);
}

/* ============================================================
   SECTIONS
============================================================ */

.section {
  padding: 2rem 1.5rem;
  text-align: center;
}

.section p {
  max-width: 700px;
  margin: 0.75rem auto 0;
  color: var(--text-soft);
}

.bg-main {
  background: var(--bg);
}

/* ============================================================
   HERO
============================================================ */

.hero {
  background: var(--bg);
  padding: 4rem 1.5rem 4rem;
  padding-top: 1rem;
}

.hero p {
  max-width: 650px;
  margin: 1.5rem auto 0;
  color: var(--text-soft);
  font-size: 1.25rem;
}

.cta-note {
  margin-top: 2rem;
  color: var(--text-soft);
}

/* Highlighter ink for feature keywords */
.cta-note strong,
.section strong {
  color: var(--mint);
  font-weight: 700;
}

/* h1 intentionally hidden — logo image carries the branding.
   Kept in markup for semantics/accessibility. */
.hero h1 {
  display: none;
}

/* ============================================================
   BUTTONS — chunky pixel keys, gentle palette
   Centered by the root text-align + fit-content sizing:
   the box hugs its text (no more text escaping the border)
   and sits mid-page regardless of parent markup.
============================================================ */

.btn-primary,
.order-form button,
.oc-btn {
  display: block;
  width: fit-content;
  margin: 2rem auto 0;
  padding: 1rem 1.75rem;
  background: var(--mint);
  color: #10241a !important;
  border: 3px solid var(--mint);
  box-shadow: inset 2px 2px 0 #d7f5de,
              inset -2px -2px 0 #4c9463,
              var(--pixel-shadow);
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em; /* trimmed — pixel font + tracking overflows */
  text-decoration: none;
  cursor: pointer;
  transition: var(--speed) ease;
}

.btn-primary:hover,
.order-form button:hover,
.oc-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 2px 2px 0 #fbeec2,
              inset -2px -2px 0 #a8862e,
              var(--pixel-shadow);
  color: #241c05 !important;
}

/* "Pressed key" — a gentle nudge instead of a jolt */
.btn-primary:active,
.order-form button:active,
.oc-btn:active {
  transform: translate(3px, 3px);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Secondary variant: outlined */
.oc-btn.oc-secondary {
  background: var(--surface);
  color: var(--mint) !important;
  box-shadow: var(--pixel-shadow);
}

.oc-btn.oc-secondary:hover {
  background: var(--mint-dark);
  color: var(--mint) !important;
  box-shadow: var(--pixel-shadow);
}

/* Full-width links variant (confirmation screen) */
.order-confirmation-card .oc-btn {
  width: 100%;
}

/* ============================================================
   OFFERINGS
============================================================ */

.offerings-intro {
  margin-bottom: 2.5rem;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.offering-block {
  background: var(--surface-light);
  border: 3px solid var(--mint-dim);
  box-shadow: var(--pixel-shadow);
  padding: 1.75rem;
  text-align: center;
}

.offering-block:hover {
  border-color: var(--mint);
}

.offering-block h2 {
  margin-bottom: 1rem;
}

.offerings-list {
  list-style: none;
  line-height: 1.9;
  color: var(--text-soft);
}

/* ============================================================
   ORDER FORM — roomy and legible
   Left-aligned content zone inside the centered page.
============================================================ */

.order-form {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: left;
  background: var(--surface);
  border: 3px solid var(--mint-dim);
}

.order-form label {
  display: block;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  padding: 0.85rem;
  background: var(--surface-light);
  color: var(--text-main);
  border: 2px solid var(--mint-dim);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(147, 226, 168, 0.25);
}

.order-form textarea {
  resize: vertical;
}

/* Scoped specificity beats .order-form input without !important */
.order-form .qty-select {
  width: 110px;
}

/* The submit button returns to the centered world */
.order-form button {
  text-align: center;
}

/* ============================================================
   PRODUCT CATALOG
============================================================ */

.order-items {
  margin-top: 2rem;
  width: 100%;
  padding: 1.5rem;
  background: var(--surface);
  border: 3px solid var(--mint-dim);
  text-align: center;
}

.order-items legend {
  color: #fff;
  background: var(--coral);
  padding: 0.55rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  border: 2px solid var(--coral-dark);
  margin-inline: auto;
}

.item-group {
  margin-top: 1.5rem;
}

.item-group h3 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* [ LIKE THIS ] */
.item-group h3::before {
  content: "[ ";
  color: var(--text-muted);
}

.item-group h3::after {
  content: " ]";
  color: var(--text-muted);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ---- Item card -------------------------------------------- */

.item-card {
  background: var(--surface-light);
  border: 3px solid var(--mint-dim);
  padding: 1rem;
  text-align: center;

  /* Grid children default to min-width:auto — without this,
     long names/images blow out their column. */
  min-width: 0;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.item-card:hover {
  border-color: var(--mint);
  box-shadow: var(--pixel-shadow);
}

/* Terminal-flavored label band (VT323 — decorative role) */
.item-card::before {
  content: "CATALOG ITEM";
  display: block;
  margin: -1rem -1rem 0.9rem;
  padding: 0.4rem;
  background: var(--mint-dark);
  color: var(--mint);
  font-family: var(--font-terminal);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
}

/* Image well: fixed box, image scales to fit inside it.
   Desktop sizing scales with viewport width. */
.image-container {
  width: 100%;
  height: 16vw;
  max-height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: var(--bg);
  border: 2px solid var(--mint-dark);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* swap to "cover" for edge-to-edge cropping */
  margin: 0; /* opt out of the global auto-centering margin */
}

.item-name {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-main); /* names are info, not decoration */
  letter-spacing: 0.03em;
}

/* Qty select opt-out of the global centered-margin img/input flow */
.order-form .qty-select,
.order-form select,
.order-form input,
.order-form textarea {
  margin: 0;
}

/* ============================================================
   ORDER CONFIRMATION
============================================================ */

.order-confirmation-wrapper {
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.order-confirmation-card {
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  background: var(--surface);
  border: 3px solid var(--mint);
  box-shadow: var(--pixel-shadow);
  text-align: center;
}

.oc-order-number {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 2px dashed var(--mint-dim);
}

.oc-order-number strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.oc-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* ============================================================
   FOOTER
============================================================ */

footer {
  padding: 2rem 1rem;
  text-align: center;
  border-top: 3px solid var(--mint-dim);
  color: var(--text-soft);
}

/* ANY image in the footer is a small centered credit thumbnail —
   linked or not. Fixes the oversized duplicate logo. */
footer img {
  display: inline-block;
  width: auto;
  max-width: 140px;
  height: auto;
  margin: 0.75rem auto 0;
}

footer .footer-logo {
  display: inline-block;
  height: 1.2em;      /* matches the height of one text line */
  width: auto;        /* keeps the aspect ratio */
  vertical-align: middle; /* sits nicely on the text line */
  margin: 0 0.35rem;  /* a little air around it */
  max-width: none;    /* override the blanket footer img cap */
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .terminal-window {
    padding: 1rem;
  }

  .terminal-window::before {
    margin: -1rem -1rem 1.5rem;
  }

  .main-nav li {
    display: block;
    margin: 0.5rem 0;
  }

  .logo-badge img {
    max-width: 240px;
  }

  .offering-block {
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
  }

  .order-form {
    padding: 1rem;
  }

  /* Image well: square until it hits the hard cap of 1/3 of the
     viewport height — guarantees no card towers on short screens. */
  .image-container {
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 33vh;
  }

  .image-container img {
    max-height: 33vh;
  }
}

@media (max-width: 480px) {
  .item-grid {
    grid-template-columns: 1fr;
  }

  .item-name {
    font-size: 0.75rem;
  }
}

/* ============================================================
   ACCESSIBILITY — honor reduced-motion preference
============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
