/* Sqwark Industries LLC — company profile page.
   Static CSS, no build step, no JS. See DESIGN.md for the rules this implements.

   Type ladder:  display (Mochiy Pop One) → heading (Newsreader) →
                 body (Inter) → label (IBM Plex Mono).
   Spacing:      named 4px scale only (--s-1 … --s-32). No arbitrary paddings.
   Colour:       one anchor hue (teal). Everything else is ink, paper, hairline. */

/* ---------- fonts (self-hosted, latin subset, from Google Fonts) ---------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;              /* variable */
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mochiy Pop One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/mochiy-pop-one-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Newsreader, optical size 36 cut — headings only, so the display optical size
   is the right one. Two static weights instead of the variable file (46 KB the
   pair, vs 132 KB for the opsz+wght variable). */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/newsreader-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/newsreader-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  /* colour — teal is the only hue that carries meaning. The four project
     accents appear as 48px ticks and nothing else. */
  --teal:      #00C8BC;   /* decoration only: ticks, rules, focus ring */
  --teal-ink:  #0B7C74;   /* the same accent darkened to pass AA as text / button bg */
  --teal-deep: #0A6F68;   /* button + link hover */
  --amber:     #FFAE00;   /* project tick only */
  --lime:      #7AF400;   /* project tick only */
  --blue:      #1A5799;   /* project tick only */
  --red:       #FF0000;   /* reserved; currently unused (see DESIGN.md) */

  --ink:       #0F172A;   /* body text          — 16.9:1 on paper */
  --ink-soft:  #475569;   /* secondary text     —  7.5:1 on paper */
  --ink-mute:  #64748B;   /* mono micro-labels  —  4.8:1 on paper, 4.6:1 on --paper-alt */
  --paper:     #FFFFFF;
  --paper-alt: #F8FAFC;
  --line:      #E2E8F0;
  --line-ink:  #253248;   /* hairline on the ink footer */

  /* spacing — 4px scale. Nothing outside this list. */
  --s-1:  0.25rem;   /*  4 */
  --s-2:  0.5rem;    /*  8 */
  --s-3:  0.75rem;   /* 12 */
  --s-4:  1rem;      /* 16 */
  --s-5:  1.25rem;   /* 20 */
  --s-6:  1.5rem;    /* 24 */
  --s-8:  2rem;      /* 32 */
  --s-10: 2.5rem;    /* 40 */
  --s-12: 3rem;      /* 48 */
  --s-14: 3.5rem;    /* 56 */
  --s-16: 4rem;      /* 64 */
  --s-20: 5rem;      /* 80 */
  --s-24: 6rem;      /* 96 */
  --s-32: 8rem;      /* 128 */

  /* derived layout steps — still only ever named scale values */
  --pad:         var(--s-10);
  --section-pad: var(--s-24);
  --header-h:    72px;

  /* type */
  --font:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Mochiy Pop One', 'Inter', system-ui, sans-serif;
  --serif:   'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* exponential ease-out */
}

@media (max-width: 1000px) {
  :root { --pad: var(--s-8); --section-pad: var(--s-20); }
}

@media (max-width: 700px) {
  :root { --pad: var(--s-5); --section-pad: var(--s-16); --header-h: 64px; }
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-24);
  -webkit-text-size-adjust: 100%;
  /* paints the canvas, so any area past the end of <body> (short pages,
     overscroll) reads as an extension of the footer rather than bare white */
  background: var(--ink);
}

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

img { max-width: 100%; height: auto; }

p { text-wrap: pretty; }

a { color: var(--teal-ink); }
a:hover { color: var(--teal-deep); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: var(--s-3) var(--s-4);
  z-index: 20;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- label: the mono voice ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: 0 0 var(--s-5);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow .num { color: var(--teal-ink); }

.eyebrow .tick {
  width: var(--s-6);
  height: 1px;
  background: var(--line);
}

.eyebrow .sep { color: #CBD5E1; }

/* section folio: number, then a hairline that runs out to the column edge */
.section-head .eyebrow { margin-bottom: var(--s-6); }
.section-head .eyebrow .tick { flex: 1; width: auto; }

/* ---------- header (masthead) ---------- */

.brandbar {
  height: 3px;
  background: var(--teal);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  min-height: var(--header-h);
}

.brand { display: inline-flex; }
.brand img { display: block; height: 34px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: var(--s-2);
}

.site-nav .n {
  color: var(--teal-ink);
  margin-right: var(--s-2);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--teal-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover { color: var(--teal-ink); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- hero ---------- */

.hero {
  padding-block: var(--s-24) var(--s-20);
  overflow: hidden;   /* the mark is allowed to sit past the right gutter */
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  gap: var(--s-12);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  max-width: 14ch;
}

.dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.18em;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: baseline;
}

.lede {
  margin: var(--s-6) 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-6) var(--s-8);
  margin: var(--s-10) 0 0;
}

.button {
  display: inline-block;
  background: var(--teal-ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: var(--s-3) var(--s-6);
  border-radius: 6px;
  transition: background-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.button:hover {
  background: var(--teal-deep);
  color: #fff;
  transform: translateY(-1px);
}

.link-mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s-1);
  transition: border-color 0.4s var(--ease);
}

.link-mono:hover { border-bottom-color: var(--teal-ink); }

.hero-art {
  justify-self: end;
  margin-right: calc(-1 * var(--s-10));
}

.hero-art img {
  display: block;
  width: clamp(200px, 24vw, 320px);
  height: auto;
}

/* ---------- section frame ---------- */

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
}

.section--alt { background: var(--paper-alt); }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-intro {
  margin: var(--s-4) 0 0;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* 01 — head parked on the left, content set wide on the right */

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--s-16);
}

.split .section-head {
  position: sticky;
  top: calc(var(--header-h) + var(--s-12));
  align-self: start;
}

.rows { display: block; }

.row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: var(--s-6);
  padding-block: var(--s-8);
  border-top: 1px solid var(--line);
}

.row:last-child { padding-bottom: 0; }

.row h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding-top: var(--s-1);
}

.row p {
  margin: 0;
  color: var(--ink-soft);
}

/* 02 — head top-left, index indented past it */

.projects {
  list-style: none;
  margin: var(--s-16) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s-16);
}

.project {
  position: relative;
  padding: var(--s-6) 0 var(--s-12);
  border-top: 1px solid var(--line);
}

/* the closing row carries no trailing padding — the section does */
.project:nth-child(n + 3) { padding-bottom: 0; }

/* the only place the secondary palette appears: a 48px tick on the hairline */
.project::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: var(--s-12);
  height: 2px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.project:hover::before { width: var(--s-20); }

.project--amber { --accent: var(--amber); }
.project--teal  { --accent: var(--teal); }
.project--blue  { --accent: var(--blue); }
.project--lime  { --accent: var(--lime); }

.project-cat {
  margin: 0 0 var(--s-2);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.project h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.project p {
  margin: var(--s-3) 0 0;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* 03 — the whole section is biased right, folio number left at the margin */

.section--offset .section-head h2,
.section--offset .company-grid { margin-left: 16.6667%; }

.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--s-12);
  margin-top: var(--s-12);
}

.statement {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  max-width: 22em;
}

.statement + p {
  margin: var(--s-8) 0 0;
  max-width: 32rem;
  color: var(--ink-soft);
}

.facts {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.facts > div {
  padding-block: var(--s-3);
  border-top: 1px solid var(--line);
}

.facts > div:last-child { border-bottom: 1px solid var(--line); }

.facts dt {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.facts dd {
  margin: var(--s-1) 0 0;
  color: var(--ink);
}

.facts dd a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.4s var(--ease);
}

.facts dd a:hover { border-bottom-color: var(--teal-ink); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #CBD5E1;
  padding-block: var(--s-12);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.footer-mark { display: block; width: 28px; height: 28px; }

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: #8FA0B5;
}

.footer-meta a {
  color: #CBD5E1;
  text-decoration: none;
  border-bottom: 1px solid var(--line-ink);
  padding-bottom: var(--s-1);
  transition: border-color 0.4s var(--ease);
}

.footer-meta a:hover { color: #fff; border-bottom-color: var(--teal); }

.site-footer :focus-visible { outline-color: var(--teal); }

/* ---------- 404 ---------- */

.notfound {
  padding-block: var(--s-32) var(--s-24);
  border-bottom: 1px solid var(--line);
}

.notfound h1 { max-width: 12ch; }
.notfound .lede { max-width: 30rem; }

@media (max-width: 700px) {
  .notfound { padding-block: var(--s-16); }
}

/* ---------- motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(var(--s-2)); }
  to   { opacity: 1; transform: none; }
}

@keyframes settle {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.hero-copy > * {
  animation: rise 0.7s var(--ease) both;
}
.hero-copy > :nth-child(1) { animation-delay: 0.02s; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.14s; }
.hero-copy > :nth-child(4) { animation-delay: 0.20s; }

.hero-art { animation: settle 0.9s var(--ease) 0.1s both; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; gap: var(--s-10); }
  .split .section-head { position: static; }
  .projects { column-gap: var(--s-12); }
  .section--offset .section-head h2,
  .section--offset .company-grid { margin-left: 0; }
}

@media (max-width: 900px) {
  .hero { padding-block: var(--s-20) var(--s-16); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-12); }
  .hero-art { justify-self: end; margin-right: 0; }
  .hero-art img { width: 176px; }
  h1 { max-width: 18ch; }
  .company-grid { grid-template-columns: 1fr; }
  .statement { max-width: 28em; }
}

@media (max-width: 700px) {
  .site-nav { display: none; }
  .brand img { height: 30px; }
  .row { grid-template-columns: 1fr; gap: var(--s-2); padding-block: var(--s-6); }
  .projects { grid-template-columns: 1fr; }
  .project, .project:nth-child(n + 3) { padding-bottom: var(--s-8); }
  .project:last-child { padding-bottom: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s-6); }
}

/* below ~360px the hero eyebrow wraps; a separator stranded at the end of a
   line reads as a typo, so drop it and let the gap do the work */
@media (max-width: 360px) {
  .eyebrow .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-copy > *, .hero-art { opacity: 1; transform: none; }
  /* the hover affordances that were motion become plain state changes */
  .site-nav a:hover::after { transform: scaleX(1); }
  .project:hover::before { width: var(--s-20); }
}
