/* Surfing Dog — clean 80s.
   Warm cream + charcoal, with 80s brand-colour accents:
   Nintendo red, Walkman blue, sunset yellow/orange, teal. */
:root {
  --paper:    #F4EEE2;
  --card:     #FFFDF8;
  --ink:      #1A1A1A;
  --ink-soft: #6B6760;
  --line:     #E7DECC;

  --red:    #E4002B;  /* Nintendo red   */
  --orange: #FF7A1A;  /* sunset         */
  --yellow: #FFC222;  /* Walkman yellow */
  --teal:   #0FA3A3;
  --blue:   #2C54D4;  /* Sony blue      */
  --red-dk: #B30022;
  --blue-dk:#1E3DA0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* full-bleed 80s accent stripe pinned to the very top */
.topstripe { display: flex; height: 4px; position: sticky; top: 0; z-index: 50; }
.topstripe i, .stripe i { flex: 1; }
.topstripe i:nth-child(1), .stripe i:nth-child(1) { background: var(--red); }
.topstripe i:nth-child(2), .stripe i:nth-child(2) { background: var(--orange); }
.topstripe i:nth-child(3), .stripe i:nth-child(3) { background: var(--yellow); }
.topstripe i:nth-child(4), .stripe i:nth-child(4) { background: var(--teal); }
.topstripe i:nth-child(5), .stripe i:nth-child(5) { background: var(--blue); }

.page { max-width: 880px; margin: 0 auto; padding: 0 24px 56px; }

/* ---- top nav ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.navlink { color: var(--ink); text-decoration: none; }
.navlink:hover { color: var(--red); }
.topbar a { color: inherit; text-decoration: none; }

/* ---- hero ---- */
.site { text-align: center; padding: 48px 0 34px; }
.logo {
  display: block;
  margin: 4px auto 12px;
  width: 132px; height: auto;
}
.brand {
  font-family: 'Pixelify Sans', 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 4.5vw, 32px);
  letter-spacing: 1px;
  line-height: 1;
  color: var(--ink);
  /* keep the pixel font crisp — no anti-aliasing */
  -webkit-font-smoothing: none;
  font-smooth: never;
}
.stripe {
  display: flex;
  width: 150px;
  height: 7px;
  margin: 16px auto 0;
  border-radius: 5px;
  overflow: hidden;
}
.tag {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 16px;
}

/* ---- content panel ---- */
.screen {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px 38px;
  box-shadow: 0 20px 44px -28px rgba(40, 30, 10, 0.4);
}
.screen-title {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.screen h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.blurb { font-size: 18px; color: var(--ink-soft); margin-bottom: 26px; }
.hint  { font-family: 'Space Mono', monospace; font-size: 14px; color: var(--ink-soft); margin: 14px 0; }
.screen a { color: var(--blue); }
code { font-family: 'Space Mono', monospace; font-size: 0.9em; background: #F0E9D8; padding: 1px 6px; border-radius: 5px; }

/* ---- app cartridges ---- */
.cartridges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.cart {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px 16px;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cart::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
}
.cart:nth-child(5n+1)::before { background: var(--red); }
.cart:nth-child(5n+2)::before { background: var(--blue); }
.cart:nth-child(5n+3)::before { background: var(--yellow); }
.cart:nth-child(5n+4)::before { background: var(--teal); }
.cart:nth-child(5n+5)::before { background: var(--orange); }
.cart:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px rgba(40,30,10,.5); }
.cart-title { font-size: 18px; font-weight: 700; }
.cart-tag   { font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-soft); }
.cart-cta   { font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700; color: var(--blue); margin-top: 4px; }
.cart.soon  { opacity: .55; filter: grayscale(.5); pointer-events: none; }
.cart-logo  { width: 46px; height: auto; margin-bottom: 4px; }

/* ---- fact list (order status, receipts) ---- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.fact { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: none; }
.fact .k { font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.fact .v { font-size: 16px; font-weight: 500; text-align: right; }
.fact .v.fresh { color: var(--teal); font-weight: 700; }

/* ---- buttons & forms ---- */
.btn {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--red-dk);
  transition: transform .06s ease, box-shadow .06s ease;
}
.btn:hover  { transform: translateY(1px); box-shadow: 0 2px 0 var(--red-dk); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.blue   { background: var(--blue); box-shadow: 0 3px 0 var(--blue-dk); }
.btn.blue:hover { box-shadow: 0 2px 0 var(--blue-dk); }
.btn.small  { font-size: 13px; padding: 9px 16px; }

.stack-form, .gen-form { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.gen-form { flex-flow: row wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 7px; font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }

input[type=text], input[type=email], select {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  padding: 11px 13px;
  min-width: 240px;
}
select { min-width: 170px; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44,84,212,.16); }

/* ---- generic name list (for apps) ---- */
.namelist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; margin: 6px 0; }
.namelist li { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; font-weight: 500; }
.upsell { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---- empty state (no apps yet) ---- */
.empty-state { text-align: center; padding: 16px 0 6px; }
.slots { display: flex; gap: 18px; justify-content: center; margin-bottom: 20px; }
.slot {
  width: 44px; height: 56px;
  border: 2.5px solid var(--c, var(--ink-soft));
  border-radius: 6px;
  position: relative;
  opacity: .8;
}
.slot::before {
  content: "";
  position: absolute; top: 9px; left: 9px; right: 9px; height: 11px;
  border: 2.5px solid var(--c, var(--ink-soft));
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.empty-line { font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }

/* ---- footer ---- */
footer {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
footer.appfoot { display: flex; justify-content: space-between; align-items: center; text-align: left; }

/* ---- app header (bare pages: small logo + name OUTSIDE the white card) ---- */
.apphead { text-align: center; padding: 30px 0 20px; }
.apphead-link { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.applogo { width: 96px; height: auto; image-rendering: pixelated; }
.appname {
  font-family: 'Pixelify Sans', 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: .5px;
  -webkit-font-smoothing: none; font-smooth: never;
}

@media (max-width: 480px) {
  .page { padding: 0 16px 40px; }
  .screen { padding: 24px 20px 28px; border-radius: 14px; }
  .brand { letter-spacing: -1px; }
}
