/* Layout: dark "workbench" theme. Full-width bands, content capped at 1120px.
   Hero = mascot + pitch, then services grid, rates strip, projects, contact. */
:root {
  --bg: #0a111d;          /* deep navy, biased toward the cyan accent */
  --bg-raised: #111b2c;
  --line: #213149;
  --fg: #e8eef7;
  --fg-dim: #9db0c8;
  --cyan: #3ec7ff;        /* circuit-trace blue from the card */
  --amber: #ffc23d;       /* "affordable rates" yellow from the card */
  --green: #7be38f;
  --magenta: #ff5fa8;

  --font-display: "Chakra Petch", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;

  --wrap: 1120px;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(48px, 8vw, 96px); }
.band + .band { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 12px;
}
.section-head { display: grid; gap: 8px; margin-bottom: 36px; max-width: 62ch; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-head p { margin: 0; color: var(--fg-dim); }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand img { height: 56px; width: auto; filter: drop-shadow(0 0 8px rgba(62,199,255,.35)); }
.site-header .wrap { min-height: 76px; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 8vw, 4.5rem); line-height: 1; color: var(--amber); }
.price small { font-size: .4em; color: var(--fg-dim); font-weight: 600; }
.price-note { font-family: var(--font-mono); color: var(--fg-dim); font-size: .95rem; }
.brand .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand .wordmark small { font-size: 0.7em; color: var(--cyan); font-weight: 600; margin-inline: 0.2em; }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.nav a { color: var(--fg-dim); text-decoration: none; font-weight: 600; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--cyan); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: 12px 20px; border-radius: 6px; text-decoration: none;
  border: 1px solid var(--cyan); color: var(--cyan); background: transparent;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--cyan); color: var(--bg); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1300; }
.btn.primary:hover { background: #ffd56f; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px); background:
  radial-gradient(60% 80% at 85% 20%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 70%),
  var(--bg); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede { font-size: 1.2rem; color: var(--fg-dim); max-width: 52ch; margin: 18px 0 28px; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--fg-dim); }
.hero-facts li::before { content: "▸ "; color: var(--cyan); }
.mascot-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 0 0 6px var(--bg-raised), 0 24px 60px rgba(0,0,0,.5); max-width: 420px; justify-self: center; }
.mascot-frame figcaption { position: absolute; left: 12px; bottom: 12px; font-family: var(--font-mono); font-size: .75rem; background: rgba(10,17,29,.85); padding: 4px 8px; border-radius: 4px; color: var(--cyan); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--bg-raised); padding: 24px; display: grid; gap: 8px; align-content: start; }
.service h3 { font-size: 1.25rem; }
.service p { margin: 0; color: var(--fg-dim); font-size: 1rem; }
.service .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--cyan); letter-spacing: .08em; }

/* ---------- Rates ---------- */
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.rate { border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; }
.rate strong { font-family: var(--font-display); font-size: 1.3rem; }
.rate span { color: var(--fg-dim); font-size: .95rem; }
.rate.amber strong { color: var(--amber); }
.rate.green strong { color: var(--green); }
.rate.cyan strong { color: var(--cyan); }
.howitworks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-family: var(--font-mono); font-size: .85rem; }
.howitworks span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--fg-dim); }

/* ---------- Projects ---------- */
.projects { display: grid; gap: 28px; }
.project { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.project:nth-child(even) .project-art { order: 2; }
.project-art { min-height: 280px; position: relative; overflow: hidden; }
.project-art img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: clamp(22px, 3.5vw, 36px); display: grid; gap: 14px; align-content: start; min-width: 0; }
.project-body h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.project-body .summary { margin: 0; color: var(--fg-dim); }
.status { justify-self: start; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }
.status.dev { color: var(--magenta); }
.status.soon { color: var(--amber); }
.status.live { color: var(--green); }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border: 2px solid var(--cyan); transform: rotate(45deg); }
.updates { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; font-size: .95rem; }
.updates h4 { margin: 0; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); font-weight: 500; }
.updates ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.updates time { font-family: var(--font-mono); font-size: .8rem; color: var(--cyan); margin-right: 8px; font-variant-numeric: tabular-nums; }

/* CSS art: pinball sunset playfield */
.art-pinball { background:
  linear-gradient(180deg, #120626 0%, #3a0c4a 38%, #ff5fa8 62%, #ffc23d 72%, #120626 72.5%); }
.art-pinball::before { /* sun */
  content: ""; position: absolute; left: 50%; top: 30%; width: 46%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: repeating-linear-gradient(180deg, #ffc23d 0 9px, transparent 9px 14px), linear-gradient(#ffd56f, #ff5fa8);
  -webkit-mask: linear-gradient(#000 0 55%, transparent 55%), repeating-linear-gradient(180deg, #000 0 10px, transparent 10px 14px);
  -webkit-mask-composite: source-over; mask-composite: add; opacity: .95; }
.art-pinball::after { /* perspective grid */
  content: ""; position: absolute; inset: 72% -40% 0; background:
  repeating-linear-gradient(90deg, rgba(62,199,255,.7) 0 2px, transparent 2px 40px),
  repeating-linear-gradient(180deg, rgba(62,199,255,.7) 0 2px, transparent 2px 22px);
  transform: perspective(240px) rotateX(55deg); transform-origin: top; }
.art-pinball .ball { position: absolute; z-index: 1; width: 44px; height: 44px; border-radius: 50%; left: 66%; top: 58%;
  background: radial-gradient(circle at 34% 30%, #fff 0 12%, #c9d6e6 30%, #4b5a70 70%, #1b2230); box-shadow: 0 8px 18px rgba(0,0,0,.6); animation: bob 6s ease-in-out infinite; }
.art-label { position: absolute; z-index: 1; left: 16px; bottom: 14px; font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; color: #fff; text-shadow: 0 0 12px var(--cyan); font-size: 1.1rem; }
@keyframes bob { 50% { transform: translate(-30px, -14px); } }

/* CSS art: puzzle book cover with a sudoku block */
.art-book { display: grid; place-items: center; background:
  repeating-linear-gradient(45deg, rgba(255,194,61,.06) 0 12px, transparent 12px 24px), #182338; padding: 28px; }
.book { width: min(220px, 70%); aspect-ratio: 6 / 9; background: linear-gradient(160deg, #1f6fd1, #133c78); border-radius: 4px 10px 10px 4px; box-shadow: -6px 0 0 #0e2c58 inset, 14px 18px 30px rgba(0,0,0,.5); padding: 14px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; color: #fff; transform: rotate(-4deg); }
.book .bt { font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1.05; }
.book .bt span { display: block; color: var(--amber); font-size: 1.25rem; }
.sudoku { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: #0e2c58; padding: 3px; align-self: center; }
.sudoku i { aspect-ratio: 1; background: #fff; color: #133c78; font: 700 .8rem/1 var(--font-mono); font-style: normal; display: grid; place-items: center; }
.book .ba { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; opacity: .85; }

/* Several book covers side by side, slightly fanned */
.art-books { display: flex; justify-content: center; align-items: center; gap: 0; }
.art-books .book-cover { width: min(46%, 230px); height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 3px 8px 8px 3px; box-shadow: 10px 14px 28px rgba(0,0,0,.55); }
.art-books .book-cover:first-child { transform: rotate(-5deg) translateX(12px); }
.art-books .book-cover:last-child { transform: rotate(4deg) translateX(-12px) translateY(8px); z-index: 1; }

/* Screenshot gallery under a project (Projects page) */
.gallery { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: clamp(18px, 3vw, 28px); display: grid; gap: 12px; }
.gallery h4 { margin: 0; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); font-weight: 500; }
.gallery ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.gallery .shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.gallery .shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s ease; }
.gallery .shot:hover img, .gallery .shot:focus-visible img { transform: scale(1.04); }
.gallery .shot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.viewer { max-width: min(1400px, 96vw); width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); }
.viewer::backdrop { background: rgba(4, 8, 15, .88); }
.viewer figure { margin: 0; }
.viewer img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain; background: #000; }
.viewer figcaption { padding: 12px 16px; color: var(--fg-dim); font-size: .95rem; }
.viewer button { position: absolute; border: 0; background: rgba(10,17,29,.75); color: var(--fg); font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.viewer button:hover { background: var(--cyan); color: var(--bg); }
.viewer .v-prev { left: 10px; top: 40%; }
.viewer .v-next { right: 10px; top: 40%; }
.viewer .v-close { right: 10px; top: 10px; font-size: 1.6rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.contact-item { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 4px; }
.contact-item .label { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.contact-item a, .contact-item .value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.contact-item a:hover { color: var(--cyan); }

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--fg-dim); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Projects page header ---------- */
.page-intro { padding-block: clamp(40px, 6vw, 72px) 0; }
.page-intro h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.page-intro p { color: var(--fg-dim); max-width: 60ch; font-size: 1.15rem; }

@media (max-width: 900px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hero .wrap, .project { grid-template-columns: minmax(0, 1fr); }
  .project:nth-child(even) .project-art { order: 0; }
  .mascot-frame { max-width: 300px; }
  .project-art { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Reviews ---------- */
.reviews { columns: 3 280px; column-gap: 16px; }
.review { break-inside: avoid; margin: 0 0 16px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 12px; }
.review blockquote { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.review figcaption { font-family: var(--font-mono); font-size: .8rem; color: var(--amber); letter-spacing: .04em; }
.review figcaption::before { content: "★★★★★  "; color: var(--amber); }
.contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* Full-body mascot cutout */
.mascot-standing { justify-self: center; height: clamp(300px, 42vw, 500px); width: auto; max-width: 100%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(62,199,255,.18)); }
@media (max-width: 760px) { .mascot-standing { height: 300px; order: -1; } }
@media (max-width: 560px) { .nav { gap: 2px 14px; font-size: .95rem; } .brand img { height: 48px; } }

/* ---------- Contact form ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-form { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field .opt { color: var(--fg-dim); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.field select optgroup { color: var(--fg-dim); }
.botcheck { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-actions .btn { border: 0; cursor: pointer; }
.form-actions .btn:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.ok { color: var(--green); }
.form-status.error { color: var(--magenta); }
.contact-side { display: grid; gap: 14px; }
.contact-side .btn { justify-self: start; font-size: 1rem; padding: 10px 16px; margin-top: 4px; }
.contact-item .small { color: var(--fg-dim); font-size: .9rem; }

/* ---------- Booking ---------- */
.booking-embed { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); overflow: hidden; }
.booking-embed.live { background: #fff; }
.booking-embed iframe { display: block; width: 100%; height: 820px; border: 0; }
.booking-fallback { padding: clamp(24px, 4vw, 44px); display: grid; gap: 12px; }
.booking-fallback h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.booking-fallback p { margin: 0 0 8px; color: var(--fg-dim); }

@media (max-width: 760px) {
  .contact-layout, .field-row { grid-template-columns: minmax(0, 1fr); }
  .booking-embed iframe { height: 900px; }
}
.review .guide { color: var(--fg-dim); margin-left: 6px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

.review-badge { margin: 4px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 2rem); color: var(--amber); line-height: 1.2; }
.review-badge .stars { letter-spacing: .08em; text-shadow: 0 0 14px rgba(255,194,61,.45); }
.section-head .review-badge, .page-intro .review-badge { color: var(--amber); }

.project-art .book-cover { width: min(240px, 70%); height: auto; object-fit: contain; border-radius: 3px 8px 8px 3px; box-shadow: -5px 0 0 rgba(0,0,0,.25) inset, 14px 18px 32px rgba(0,0,0,.55); transform: rotate(-3deg); }

.billing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 18px 0 8px; }
.bill-step { background: var(--bg-raised); padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.bill-amt { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.bill-when { font-weight: 600; }
.bill-note { color: var(--fg-dim); font-size: .95rem; }
@media (max-width: 760px) { .billing { grid-template-columns: minmax(0, 1fr); } }

/* Breadcrumb link in a project page's eyebrow ("Projects / Pinball Parallax") */
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.eyebrow a:hover { text-decoration-thickness: 2px; }
.project h3 a { color: inherit; text-decoration: none; }
.project h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
