/* Off the Clock portfolio: shared styles. Brand colors from Branding/BRAND.md.
   Mobile-first: base rules are for phones, @media (min-width) rules add the wider layouts. */
:root {
  --ink: #161224;
  --cream: #faf2de;
  --orange: #ff8c28;
  --yellow: #ffd83c;
  --cyan: #50e6ff;
  --purple: #6432aa;
  --navy: #141840;
  --dark: #201a32;

  --bg: var(--navy);
  --surface: #1c1d4a;
  --surface-2: var(--dark);
  --line: #34307a;
  --text: var(--cream);
  --muted: #d3cbe3;
  --accent: var(--orange);
  --heading: var(--yellow);

  --pixel-font: "Press Start 2P", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono-font: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  --max: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body-font);
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

h1, h2 {
  font-family: var(--pixel-font);
  color: var(--heading);
  line-height: 1.55;
  font-weight: 400;
  text-shadow: 3px 3px 0 var(--purple);
  margin: 0 0 .8em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.05rem, 4.2vw, 1.75rem); }
h2 { font-size: clamp(.9rem, 3vw, 1.25rem); }
h3 { font-size: 1.15rem; line-height: 1.35; margin: 0 0 .45em; color: var(--cream); }
p { margin: 0 0 1em; }
code { font-family: var(--mono-font); font-size: .9em; background: var(--ink); color: var(--cyan); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 12px; z-index: 10; font-weight: 700; }
.skip:focus { left: 8px; }

/* Header / nav */
.site-header { background: var(--ink); border-bottom: 4px solid var(--purple); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--yellow); text-decoration: none; font-family: var(--pixel-font); font-size: .75rem; padding: 4px 0; }
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 12px; }
.site-nav a { color: var(--cream); text-decoration: none; font-weight: 600; font-size: .88rem; padding: 4px 0; border-bottom: 3px solid transparent; }
@media (min-width: 420px) { .site-nav { gap: 2px 16px; } .site-nav a { font-size: .95rem; } }
.site-nav a:hover { color: var(--yellow); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--orange); }
@media (min-width: 760px) {
  .site-header { position: sticky; top: 0; z-index: 5; }
  .brand { font-size: .8rem; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 6px; font-weight: 700; text-decoration: none; line-height: 1.3;
  background: var(--orange); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--purple);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: var(--yellow); color: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--purple); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero {
  background:
    radial-gradient(2px 2px at 12% 22%, #ffd83c 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 14%, #50e6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 62%, #faf2de 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 78%, #50e6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 60% 40%, #faf2de 50%, transparent 51%),
    radial-gradient(2px 2px at 6% 58%, #faf2de 50%, transparent 51%),
    var(--navy);
}
.hero-inner { display: grid; gap: 8px; padding-top: 32px; padding-bottom: 36px; text-align: center; justify-items: center; }
.hero-mascot { width: 192px; height: 192px; margin: -8px 0 -16px; }
.hero h1 { margin-bottom: .7em; }
.pitch { font-size: clamp(1.05rem, 2.6vw, 1.25rem); max-width: 36em; margin: 0 auto 1.2em; }
.hero .btn-row { justify-content: center; }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips li { background: var(--ink); border: 1px solid var(--purple); color: var(--cream); border-radius: 999px; padding: 3px 12px; font-size: .88rem; }
.stripes { height: 20px; background: linear-gradient(#3c2068 0 25%, #542480 25% 50%, #7a2c98 50% 75%, #a83a9e 75%); }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1fr 320px; align-items: center; text-align: left; justify-items: start; gap: 32px; padding-top: 56px; padding-bottom: 64px; }
  .hero-mascot { width: 320px; height: 320px; margin: 0; order: 2; }
  .pitch { margin-left: 0; }
  .hero .btn-row, .hero .chips { justify-content: flex-start; }
}

/* Sections */
.section { padding: 52px 0; scroll-margin-top: 72px; }
.section.alt { background: var(--surface-2); }
.section-intro { color: var(--muted); max-width: 46em; margin-bottom: 28px; }
.page-head { padding: 40px 0 8px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 48em; }
.more { margin-top: 28px; }
.note { margin-top: 24px; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); }
.note p:last-child { margin: 0; }
.note strong { color: var(--cream); }

/* Selected work */
.projects { display: grid; gap: 22px; }
.project { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; }
.project-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.project-body { padding: 18px 18px 20px; }
.project-body > p { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.tag { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); background: var(--cyan); border-radius: 4px; padding: 2px 8px; }
.tag.engine { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.highlight { background: var(--ink); border-left: 5px solid var(--yellow); border-radius: 6px; padding: 12px 14px; margin: 0 0 16px; font-size: .97rem; }
.highlight strong { display: block; color: var(--yellow); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.project-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-weight: 700; font-size: .95rem; }
@media (min-width: 820px) {
  .project { grid-template-columns: 5fr 6fr; align-items: center; }
  .project-media { padding: 20px 0 20px 20px; }
  .project-media img { border-radius: 6px; box-shadow: 5px 5px 0 var(--ink); }
  .project:nth-child(even) .project-media { order: 2; padding: 20px 20px 20px 0; }
  .project-body { padding: 22px 26px 24px; }
}

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps > li { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: step; }
.steps > li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--pixel-font); color: var(--orange); font-size: .8rem; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Teaser cards (case studies, services) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s; }
.card:hover, .card:focus-within { border-color: var(--orange); }
.card .kicker { color: var(--cyan); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5em; }
.card h3 a { color: var(--cream); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

.offer { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 16px; }
.offer p { margin: 0; }
.offer .more { margin-top: 18px; }
.offer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.offer-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.offer-list span { color: var(--muted); white-space: nowrap; }
@media (min-width: 820px) { .offer { grid-template-columns: 1fr 1fr; align-items: center; padding: 26px; } }

/* Contact */
.contact-box { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 18px 22px; align-items: center; flex-wrap: wrap; }
.contact-box img { width: 96px; height: 96px; border-radius: 8px; }
.contact-box > div { flex: 1 1 260px; }
.contact-box p { margin: 0 0 .7em; }
.email { font-family: var(--mono-font); font-size: 1.02rem; overflow-wrap: anywhere; }

/* Case studies page */
.toc { padding-left: 1.3em; margin: 18px 0 0; display: grid; gap: 8px; }
.toc a { font-weight: 600; }
.case { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px clamp(16px, 4vw, 34px); margin: 28px 0; scroll-margin-top: 80px; }
.case h2 { margin-bottom: .4em; }
.case .kicker { color: var(--cyan); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4em; }
.case h3 { color: var(--orange); margin-top: 1.4em; }
.case ul, .case ol { padding-left: 1.3em; }
.case li { margin-bottom: .5em; }
.case .result { background: var(--ink); border-left: 5px solid var(--yellow); padding: 12px 16px; border-radius: 6px; }
.case .result p:last-child { margin: 0; }
.case-cover { margin: 12px 0 8px; max-width: 640px; }
.case-cover img { border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.skills { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.skills li { margin: 0; background: var(--ink); border: 1px solid var(--purple); color: var(--cream); border-radius: 999px; padding: 3px 12px; font-size: .88rem; }
.links { font-size: .95rem; color: var(--muted); }

/* Services page */
.fit-list { columns: 2 280px; column-gap: 32px; padding-left: 1.2em; margin: 0; }
.fit-list li { margin-bottom: .5em; break-inside: avoid; }
.menu-groups { display: grid; gap: 16px; }
@media (min-width: 640px) { .menu-groups { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .menu-groups { grid-template-columns: repeat(3, 1fr); } }
.menu-groups > div { background: var(--surface); border-left: 6px solid var(--orange); border-radius: 6px; padding: 14px 16px; }
.menu-groups ul { padding-left: 1.2em; margin: .4em 0 0; color: var(--muted); font-size: .95rem; }
.menu-groups li { margin-bottom: .35em; }
.packages { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .packages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .packages { grid-template-columns: repeat(4, 1fr); } }
.packages > li { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.packages .fit { color: var(--cream); margin-bottom: .6em; }
.packages ul { padding-left: 1.2em; margin: 0 0 1em; color: var(--muted); font-size: .95rem; }
.packages li li { margin-bottom: .3em; }
.price { margin: auto 0 0; padding-top: 12px; border-top: 2px dashed var(--line); color: var(--muted); font-size: .95rem; }
.price strong { display: block; font-family: var(--pixel-font); font-weight: 400; color: var(--yellow); font-size: .9rem; line-height: 1.8; }
.launch { margin-top: 24px; background: var(--ink); border: 2px solid var(--yellow); border-radius: var(--radius); padding: 18px 20px; }
.launch h3 { color: var(--yellow); }
.launch p:last-child { margin: 0; }
.flow, .never { padding-left: 1.3em; max-width: 48em; }
.flow li, .never li { margin-bottom: .6em; }

/* Footer */
.site-footer { background: var(--ink); border-top: 4px solid var(--purple); padding: 28px 0; color: var(--muted); font-size: .92rem; }
.site-footer p { margin: 0 0 .6em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 0 0 12px; }
.footer-links a { color: var(--cream); font-weight: 600; }

/* 404 */
.notfound { text-align: center; padding: 64px 0; }
.notfound img { margin: 0 auto 16px; width: 128px; height: 128px; }
.notfound .btn-row { justify-content: center; }
