/* JoyCat: the blue and green are taken from the cat’s #0789FF and #00F23C mark.
   For text and controls, use shade variants tested against each surface. */
:root {
  color-scheme: dark;
  --background: #070b11;
  --chrome: #080e17;
  --surface: #0d1723;
  --surface-raised: #15283b;
  --field: #0a1523;
  --selected: #14324c;
  --media: #070f19;
  --text: #f1f7fc;
  --muted: #acc0d4;
  --line: #293f56;
  --line-control: #4a647e;
  --accent: #7cc6ff;
  --accent-light: #a2d8ff;
  --headline-accent: #68bdff;
  --blue: #61baff;
  --cta: #65baff;
  --cta-hover: #a1d6ff;
  --cta-text: #071827;
  --status: #42f276;
  --status-ink: #a9f7be;
  --status-fill: #0e231a;
  --status-line: #24593b;
  --stars: #ffd479;
  --starfield: url("/assets/tifinagh-blue-wide.svg");
}
body { background-color: var(--background); background-image: var(--starfield); }
@media (max-width: 680px) {
  :root { --starfield: url("/assets/tifinagh-blue-narrow.svg"); }
}
@media print, (forced-colors: active) { body { background-image: none; } }

.site-header, .site-footer { background: var(--chrome); }
.nav a svg { color: var(--accent); }
.nav a:hover, .footer-inner a:hover { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: .55rem; flex: none; justify-self: end; }
.language-switch { border-color: var(--line-control); }
.language-switch :is([aria-current]:not([aria-current="false"]), [aria-pressed="true"], .active, .is-active) {
  background: var(--selected);
  color: var(--accent-light);
}
@media (max-width: 1030px) {
  .header-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .45rem 1rem; padding-block: .56rem; }
  .nav { grid-area: 2 / 1 / auto / -1; justify-content: flex-start; }
  .header-tools { grid-area: 1 / 2; }
}
@media (max-width: 380px) {
  .header-tools { gap: .35rem; }
  .brand-name { font-size: .91rem; }
  .brand-mark { inline-size: 41px; }
}

.hero h1 :where(span, strong, em) { color: var(--headline-accent); }
.availability { color: var(--status-ink); background: var(--status-fill); border-color: var(--status-line); }
.availability::before { background: var(--status); box-shadow: none; border-radius: 1px; }
.button-primary, .skip-link, .video-play { background: var(--cta); color: var(--cta-text); }
.button-primary:hover, .video-play:hover { background: var(--cta-hover); }
.button-secondary, .filters > :is(button, a) { border-color: var(--line-control); background: var(--surface); }
.button-secondary:hover, .project-card:is(:hover,:focus-within), .filters > :is(button,a):hover { border-color: var(--blue); background: var(--surface-raised); }
.filters > :is([aria-current]:not([aria-current="false"]),[aria-pressed="true"],.active,.is-active) {
  background: var(--selected);
  border-color: var(--line-control);
  color: var(--accent-light);
}
.text-link { text-decoration-color: var(--accent); }
.text-link:hover { color: var(--text); text-decoration-color: currentColor; }
.tag, .tags > li, .offerings-grid li, .service-icon, .review-avatar, .review-source { background: var(--selected); color: var(--accent-light); border-color: var(--line); }
.service-icon { border-radius: 6px; }
.tag, .tags > li { border-radius: 6px; }
.project-placeholder { color: var(--accent); background: var(--surface-raised); }
.offerings { background: var(--surface); border-color: var(--line); }
.process-card, .about-portrait { border-top-color: var(--line-control); }
.field :is(input, select, textarea) { background-color: var(--field); border-color: var(--line-control); color: var(--text); }
.field :is(input, textarea)::placeholder { color: var(--muted); }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23598aad' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
}
.detail-hero, .project-media, .gallery img { background: var(--media); border-color: var(--line); }
.review-avatar--logo { background: #f7fbfd; }
.review-source--upwork { background: #f2fff0; }
.review-source--mostaql { background: #f5fbff; }
.review-stars { color: var(--stars); }
.studio-replay { color: var(--text); background: var(--surface); border: 1px solid var(--line-control); }
.studio-replay:hover { background: var(--selected); }
@media (min-width: 1200px) {
  .section-rail::before { background: var(--line-control); }
  .section-rail a { background: var(--chrome); border-color: var(--line-control); color: var(--accent); }
  .section-rail a:is(:hover, :focus-visible, [aria-current="location"]) { background: var(--cta); color: var(--cta-text); border-color: var(--blue); }
  .section-rail a > span { background: var(--chrome); border-color: var(--line-control); color: var(--text); }
}

/* Keep decorative section bands from adding horizontal scrolling. */
:root { scrollbar-color: #354b62 var(--background); }
html, body { overflow-x: clip; }

/* Section bands stay behind the original content and leave anchors untouched. */
main:has(>.hero) > :is(.hero,.section) {
  position: relative;
  isolation: isolate;
}
main:has(>.hero) > :is(.hero,.section)::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: 0 -100vw;
  background-image: var(--starfield), linear-gradient(138deg,var(--band-from, #070b11),var(--band-to, #091421));
  background-size: 1440px auto, 100% 100%;
  background-position: center top;
  background-repeat: repeat, no-repeat;
}
main:has(>.hero) > .hero { --band-from: #06090e; --band-to: #0a121d; }
main:has(>.hero) > #client-work { --band-from: #080f19; --band-to: #101c2b; }
main:has(>.hero) > #work { --band-from: #060b13; --band-to: #0b1827; }
main:has(>.hero) > #services { --band-from: #08151e; --band-to: #102128; }
main:has(>.hero) > #about { --band-from: #0a1420; --band-to: #131e29; }
main:has(>.hero) > #process { --band-from: #0a111a; --band-to: #0d1622; }
main:has(>.hero) > #achievements { --band-from: #091018; --band-to: #152124; }
main:has(>.hero) > #reviews { --band-from: #070f18; --band-to: #101d2b; }
main:has(>.hero) > #contact { --band-from: #070c13; --band-to: #0d1d28; }
@media (max-width: 680px) {
  main:has(>.hero) > :is(.hero,.section)::before { background-size: 100vw auto, 100% 100%; }
}
@media print, (forced-colors: active) {
  main:has(>.hero) > :is(.hero,.section)::before { display: none; }
}
