/*
 * File:     kikoworks/02_website/base.css
 * Project:  KikoWorks
 * Purpose:  Shared styles for every site page: colours, fonts, header, footer.
 * Author:   John Francis Sagadraca
 * Created:  2026-10-03 (first commit)
 * Notes:    Published at /base.css. Loaded first; page styles build on it.
 */
/* KikoWorks — shared base for every site page.
   Design tokens, fonts, reset, header, footer, and eyebrow labels.
   Linked first by: kikoworks.html, privacy.html, 404.html (with kikoworks.css),
   05_portfolio/portfolio.html (with portfolio.css), and the case pages (with case.css).
   Deploys to /base.css via build_site.sh. Fonts are self-hosted from fonts/ (OFL). */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans.woff2") format("woff2");
}

:root {
  --paper: #f3f6fb;       /* cool white */
  --paper-soft: #e6ecf5;
  --surface: #ffffff;
  --ink: #0b1a2e;
  --navy: #123a6e;        /* deep blue: primary */
  --navy-deep: #071a33;   /* dark HUD bands */
  --blue: #1f5fd1;        /* links and buttons on light */
  --cyan: #4cc9f0;        /* glow and HUD lines, dark bands only */
  --accent: #1a55c4;      /* text accents */
  --mango: #f2b632;       /* "arc gold": highlights, focus */
  --mango-soft: #fbe3a4;
  --mango-shade: #c38a14;
  --on-dark: #c9d6ea;     /* body text on dark bands */
  --muted: #47566b;
  --dusty: #66758a;
  --line: #d5deea;
  --shadow: 11 26 46;     /* rgb channels of --ink, for shadows */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: var(--display);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

::selection {
  background: var(--mango-soft);
  color: var(--ink);
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: -9999px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  left: 10px;
}

:focus-visible {
  outline: 3px solid var(--mango);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* ── HUD parts (shared by every page) ──
   Dark bands, corner brackets, and readout labels. The homepage hero and
   contact, the /work/ intro, and each case page's intro use them. */
/* A dark band: deep navy, a faint blueprint grid, and a soft cyan glow. */
.hud-band {
  position: relative;
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, rgb(76 201 240 / 22%), transparent 70%),
    linear-gradient(rgb(76 201 240 / 7%) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgb(76 201 240 / 7%) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--navy-deep);
  color: white;
}

.hud-band .eyebrow {
  color: var(--cyan);
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgb(76 201 240 / 20%), 0 0 12px var(--cyan);
}

/* Corner brackets, like a targeting frame. --hud-gap sets how far they sit
   outside the box; motion.js animates it so they "lock on". */
.hud-frame {
  position: relative;
}

.hud-frame::after {
  --c: var(--cyan);
  --l: 18px;
  --w: 2px;
  position: absolute;
  z-index: 2;
  inset: calc(var(--hud-gap, 8px) * -1);
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  content: "";
  opacity: var(--hud-o, 1);
  pointer-events: none;
}

/* Section labels read like instrument readouts: "02  Work". */
.readout {
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid currentColor;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid rgb(76 201 240 / 22%);
  padding: 16px 0;
  background: var(--navy-deep);
  color: white;
}

.nav-wrap,
.brand,
.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
}

.nav-wrap {
  justify-content: space-between;
  gap: 28px;
}

.brand {
  gap: 10px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  background: var(--navy);
  box-shadow: inset 0 -4px 0 var(--mango);
  color: white;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-header nav,
.site-footer nav {
  gap: 24px;
}

.site-header nav a,
.site-footer nav a {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover,
.site-header nav a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--mango);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
}

.site-header .brand {
  color: white;
}

.site-header .brand-mark {
  background: white;
  color: var(--navy);
}

.site-header nav a:not(.nav-cta) {
  color: var(--on-dark);
}

.site-header nav a:not(.nav-cta):hover,
.site-header nav a[aria-current] {
  color: white;
}

.site-header nav .nav-cta {
  border-radius: 999px;
  padding: 7px 15px;
  background: var(--mango);
  color: var(--ink);
}

.site-header nav .nav-cta:hover {
  background: white;
  color: var(--ink);
  text-decoration: none;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 42px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 44px;
}

.footer-brand {
  font-size: 1.08rem;
}

.footer-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-grid > p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .shell {
    width: calc(100% - 32px);
  }

  .nav-wrap {
    align-items: flex-start;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
    padding-top: 6px;
  }

  .site-header nav a {
    font-size: 0.84rem;
  }

  .site-header nav .nav-cta {
    padding: 2px 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid nav {
    flex-wrap: wrap;
  }

  .footer-grid > p {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .brand > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
