/* Calm-down overrides on top of the brutalist base */
.label, .hero h1 .hl, .status, .about-card, .marquee, .marquee.yellow { transform: none; }
.sticker { display: none; }
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; height: auto; max-width: 480px; margin-left: auto; }
.stack .tile, .stack .t6 { position: static; transform: none; width: auto; height: auto; aspect-ratio: 1; border-radius: 26px; }
.stack .tile:hover { transform: translate(-3px,-3px) !important; }
.marquee { margin: 0; }
.reveal { transform: translateY(12px); }
@media (max-width: 640px) { .stack { max-width: 100%; gap: 14px; } }

/* RZ-Solutions theme — device hero (three.js) + brutalist body */
@font-face { font-family: "Silkscreen"; src: url("fonts/silkscreen-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("fonts/silkscreen-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* theme — driven by the colour panel */
  --accent: #1f5c63; --bg: #f0eee9; --ink: #132a2d; --dark: #133b40; --on-accent: #ffffff;
  --paper: var(--bg); --card: color-mix(in srgb, var(--bg) 45%, #fff);
  --yellow: var(--accent); --orange: var(--accent);
  --pink: color-mix(in srgb, var(--accent) 28%, var(--card)); --green: color-mix(in srgb, var(--accent) 55%, var(--card));
  --blue: color-mix(in srgb, var(--ink) 12%, var(--bg)); --purple: color-mix(in srgb, var(--ink) 9%, var(--bg)); --cyan: color-mix(in srgb, var(--ink) 4%, var(--card));
  --muted: color-mix(in srgb, var(--ink) 62%, var(--bg)); --soft-ink: color-mix(in srgb, var(--ink) 82%, var(--bg));
  --tone: color-mix(in srgb, var(--ink) 14%, var(--bg));
  --pixel: "Silkscreen", var(--mono);
}
body { background: var(--paper); background-image: none; }

/* sticky nav appears after the hero */
body.has-hero .nav { transform: translateY(-100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); position: fixed; left: 0; right: 0; }
body.has-hero.past-hero .nav { transform: none; }

.label { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; transform: none; }
.btn { font-family: var(--pixel); font-weight: 400; }
.status, .app .kicker, .tag, .app-links a { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; }
.services-section { background: var(--dark); }
.services-section .label { background: var(--orange); }
.service, .service:nth-child(n) { box-shadow: 8px 8px 0 var(--orange); }
.service .num { font-family: var(--pixel); color: var(--orange); }
.principle .big { font-family: var(--pixel); font-weight: 700; }
.hero h1 .hl { transform: none; }
.status { transform: none; }
.about-card { transform: none; background: var(--orange); }
.about-card .avatar { background: #fff; font-family: var(--pixel); }
.marquee { transform: none; margin: 0; background: var(--dark); }
.marquee-track { font-family: var(--pixel); font-weight: 400; font-size: 1.3rem; }
.marquee-track span::after { color: var(--orange); content: "■"; }
.contact { background: var(--orange); }
footer { background: var(--dark); color: var(--bg); border-top-color: var(--dark); }
.logo-mark { background: var(--orange); font-family: var(--pixel); font-weight: 400; }
mark { background: var(--accent); color: var(--on-accent); }

/* ---------- HERO ---------- */
.ihero { padding: 0; height: 100svh; min-height: 640px; position: relative; }
.frame {
  position: relative; height: 100%; overflow: hidden;
  background: radial-gradient(120% 90% at 60% 45%, color-mix(in srgb, var(--bg) 60%, #fff) 0%, var(--bg) 60%, color-mix(in srgb, var(--bg) 92%, var(--ink)) 100%);
}
.frame::before { /* faint pixel squares in the background */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(var(--tone), var(--tone)) 8% 12% / 90px 90px no-repeat,
    linear-gradient(var(--tone), var(--tone)) 94% 74% / 120px 120px no-repeat,
    linear-gradient(var(--tone), var(--tone)) 3% 88% / 60px 60px no-repeat;
}
.pixword {
  position: absolute; margin: 0; z-index: 1; pointer-events: none;
  font-family: var(--pixel); font-weight: 700; color: #fff; line-height: .8; letter-spacing: -.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.pixword.w1 { left: 4%; top: 44%; font-size: min(13vw, 21vh); }
.pixword.w2 { right: 3%; bottom: 7%; font-size: min(7.4vw, 13vh); }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

.hui { position: absolute; inset: 0; z-index: 3; padding: clamp(18px, 3vw, 44px); pointer-events: none; }
.hui a, .hui button { pointer-events: auto; }
.hlogo { position: absolute; top: clamp(18px, 3vw, 40px); left: clamp(18px, 3vw, 44px); display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.35rem/1 var(--pixel); color: var(--ink); }
.hlogo .px { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border: 2px solid var(--orange); }
.hlogo .px i { background: var(--orange); }
.hlogo .px i:nth-child(2n) { background: transparent; border: 1.5px solid var(--orange); }
.hlogo span b { font-weight: 700; }

.hmenu { position: absolute; top: clamp(18px, 3vw, 40px); right: clamp(18px, 3vw, 44px); display: grid; gap: 6px; padding: 6px; background: var(--tone); border-radius: 10px; }
.hmenu a { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px; text-decoration: none; font: 400 1.2rem/1 var(--pixel); background: var(--card); color: var(--ink); transition: background .2s, color .2s; }
.hmenu a:first-child { background: var(--ink); color: var(--bg); }
.hmenu a:hover { background: var(--accent); color: var(--on-accent); }

.hhead { position: absolute; left: clamp(18px, 3vw, 44px); top: 24%; margin: 0; font: 600 clamp(1.9rem, 3.6vw, 3.7rem)/1.08 var(--sans); letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); }
.hhead .count { font: 400 .9rem/1 var(--pixel); vertical-align: top; margin-right: 1.2em; color: var(--muted); }
.hhead .l2 { display: block; }
.hhead .l3 { display: block; padding-left: 1.5em; }
.hhead .l1 { padding-left: .2em; }
.hhead .acc { color: var(--orange); }

.hstat { position: absolute; right: clamp(18px, 3vw, 44px); top: 31%; display: flex; align-items: baseline; gap: 12px; }
.hstat strong { font: 500 clamp(2.6rem, 4.6vw, 4.6rem)/1 var(--sans); letter-spacing: -.03em; }
.hstat span { font: 400 .95rem/1.1 var(--pixel); color: var(--muted); }

.hcopy { position: absolute; left: clamp(18px, 3vw, 44px); bottom: clamp(24px, 4vw, 52px); max-width: 520px; }
.hcopy p { margin: 0 0 22px; font-size: 1.05rem; color: var(--soft-ink); }
.hbtns { display: flex; gap: 14px; flex-wrap: wrap; }
.hbtn { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font: 400 .95rem/1 var(--pixel); padding: 8px 8px 8px 22px; height: 54px; color: #111; background: var(--tone); transition: transform .15s, box-shadow .15s; }
.hbtn.pri { background: var(--accent); color: var(--on-accent); }
.hbtn.pri i { width: 40px; height: 40px; display: grid; place-items: center; background: #fff; color: #111; font-style: normal; }
.hbtn:not(.pri) { padding-right: 22px; }
.hbtn:hover { transform: translate(-3px,-3px); box-shadow: 4px 4px 0 var(--ink); }

.hside { position: absolute; right: clamp(18px, 3vw, 44px); top: 61%; max-width: 300px; font-size: 1rem; color: var(--soft-ink); margin: 0; }

.hnotch {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 300px; height: 110px; display: grid; place-items: center; text-decoration: none;
  background: var(--dark); color: color-mix(in srgb, var(--bg) 75%, var(--dark)); text-align: center;
  clip-path: polygon(0 100%, 8% 100%, 10% 78%, 22% 78%, 24% 26%, 40% 26%, 44% 0, 56% 0, 60% 26%, 76% 26%, 78% 78%, 90% 78%, 92% 100%, 100% 100%);
  font: 400 .85rem/1.35 var(--pixel); padding-top: 26px;
}
.hnotch .mouse { display: block; margin: 0 auto 6px; width: 14px; height: 22px; border: 1.5px solid currentColor; border-radius: 8px; position: relative; }
.hnotch .mouse::after { content: ""; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; background: currentColor; transform: translateX(-50%); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; top: 4px; } 100% { opacity: 0; top: 11px; } }

.hui > * { opacity: 0; animation: fadeUp .9s cubic-bezier(.2,.8,.2,1) forwards; }
.hui > .hhead { animation-delay: .15s; } .hui > .hstat { animation-delay: .35s; } .hui > .hcopy { animation-delay: .45s; } .hui > .hside { animation-delay: .55s; } .hui > .hnotch { animation: none; opacity: 1; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hnotch { opacity: 1; }

@media (max-width: 900px) {
  .hhead { top: 15%; font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .hhead .count { display: none; }
  .hstat { top: auto; bottom: 34%; left: clamp(18px, 3vw, 44px); right: auto; }
  .hside { display: none; }
  .pixword.w1 { top: 38%; }
  .pixword.w2 { bottom: 25%; }
  .hnotch { display: none; }
  .hmenu a { width: 46px; height: 46px; }
  .hmenu a:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hui > * { opacity: 1; } }

/* text on accent surfaces */
.btn, .contact, .about-card, .logo-mark, .status, .principle.bg-yellow, .app-top.bg-yellow, .app-top.bg-orange, .services-section .label { color: var(--on-accent); }
.btn.alt { color: var(--ink); }
.contact .mail { color: var(--ink); }
.about-card .avatar { color: var(--ink); }
.services-section { color: var(--bg); }
.service { color: var(--ink); }
.marquee { color: var(--bg); }

/* ---------- Contact form ---------- */
.cform { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 640px; margin: 8px auto 0; text-align: left; }
.cform label { display: grid; gap: 6px; font: 400 .8rem/1.2 var(--pixel); color: var(--on-accent); }
.cform .full { grid-column: 1 / -1; }
.cform textarea, .cform input[type=email] {
  width: 100%; font: 400 1rem/1.5 var(--sans); color: var(--ink); background: var(--card);
  border: 3px solid var(--ink); border-radius: 10px; padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink);
}
.cform textarea:focus, .cform input:focus { outline: 3px solid var(--on-accent); outline-offset: 2px; }
.cform .check { display: flex; align-items: flex-start; gap: 10px; font: 400 .9rem/1.45 var(--sans); }
.cform .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.cform .check a { color: inherit; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cform .btn { background: var(--card); color: var(--ink); }
.cform .btn:disabled { opacity: .6; cursor: wait; }
.cform-status { font: 400 .95rem/1.4 var(--sans); }
.cform-status[data-kind=ok] { font-weight: 700; }
.cform-status[data-kind=err] { background: var(--card); color: #a1281b; padding: 6px 10px; border-radius: 6px; }
.cform select { width: 100%; height: 50px; font: 400 1rem var(--sans); color: var(--ink); background: var(--card); border: 3px solid var(--ink); border-radius: 10px; padding: 0 12px; box-shadow: 4px 4px 0 var(--ink); }
.cform-badge { margin: 4px 0 0; font: 400 .75rem/1 var(--mono); opacity: .75; }
.cform-badge a { color: var(--on-accent); }
@media (min-width: 700px) { .cform { grid-template-columns: 1fr 1fr; } }

/* pixel percent sign (Silkscreen's own % is ugly) */
.pxpct { height: .7em; width: .7em; fill: currentColor; margin-left: .12em; vertical-align: baseline; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* readable tech tags on the teal theme */
.stack-list .tag:nth-child(n) { background: var(--card); color: var(--ink); }
.stack-list .tag:nth-child(4n+1) { background: var(--accent); color: var(--on-accent); }
.stack-list .tag:nth-child(4n+3) { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
