/* ==========================================================================
   Zyneta Labs Inc. — zynetalabs.com
   Direction: Terminal. The prompt is the mark; every product is another
   command under the same shell.

   Palette and type follow brand-kit/README.md. Where a brand colour did not
   clear WCAG AA as small text, an AA-safe sibling is used for type only and
   the pure brand value is kept for large/decorative use. Noted inline.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand, exactly as specified in the kit */
  --ink: #0d0d0d;
  --signal: #12a150;
  --paper: #f5f5f0;
  --comment: #7a7a70;

  /* AA-safe siblings, for small text only.
     --signal on paper is 3.08:1 (large text only), --signal-deep is 4.97:1.
     --comment on paper is 3.96:1, --comment-deep is 4.92:1. */
  --signal-deep: #0a7a3d;
  --comment-deep: #6b6b61;

  /* Soft type colours. Referenced directly from inline styles in the HTML,
     so the names must not change. */
  --ink-soft: #4a4a44;
  --paper-soft: #b8b8ae;

  /* Rules and fields */
  --line-ink: rgba(13, 13, 13, 0.14);
  --line-paper: rgba(245, 245, 240, 0.16);
  --field-ink: rgba(245, 245, 240, 0.04);

  /* Type */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  /* Measure and rhythm */
  --wrap: 1100px;
  --gutter: 24px;
  --band-y: 104px;

  /* Ground-relative tokens. Components read these, so the same component
     renders correctly on paper and on ink. Overridden by .band--ink. */
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-mute: var(--comment-deep);
  --ground: var(--paper);
  --line: var(--line-ink);
  --accent: var(--signal-deep);
  --field: transparent;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: 1.16rem;
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Visible keyboard focus everywhere, on both grounds. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.muted {
  color: var(--fg-mute);
}

.lede {
  font-size: 1.12rem;
  max-width: 60ch;
}

/* Skip link — offscreen until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

/* --------------------------------------------------------------------------
   3. Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 245, 240, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-ink);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.masthead__logo {
  display: block;
  flex: none;
  line-height: 0;
}

/* Lockup is 2121x288. Height-driven so the ratio is never fought. */
.masthead__logo img {
  height: 25px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
}

.nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color 0.15s ease;
}

/* Nav items are commands: a prompt character that lights up on hover. */
.nav a::before {
  content: ">";
  color: transparent;
  margin-right: 3px;
  transition: color 0.15s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--signal);
  transition: right 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::before,
.nav a[aria-current="page"]::before {
  color: var(--signal);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  right: 0;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

/* Solid sits on both grounds — signal green carries its own contrast. */
.btn--solid {
  background: var(--signal);
  color: var(--ink);
  border-color: var(--signal);
}

.btn--solid:hover {
  background: #15b95c;
  border-color: #15b95c;
}

/* Ghost is used on paper. */
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(13, 13, 13, 0.04);
}

/* Ink is the inverse, for light bands. */
.btn--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--ink:hover {
  background: #262626;
  border-color: #262626;
}

/* On an ink ground a ghost button needs the light border. */
.band--ink .btn--ghost {
  color: var(--paper);
  border-color: var(--line-paper);
}

.band--ink .btn--ghost:hover {
  border-color: var(--paper);
  background: rgba(245, 245, 240, 0.06);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* --------------------------------------------------------------------------
   5. Hero and page headers
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(64px, 11vw, 118px) clamp(56px, 9vw, 96px);
}

.pagehead {
  padding-block: clamp(56px, 9vw, 96px) clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line-ink);
}

/* The command line above the headline. */
.hero__cmd {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--fg-mute);
  margin-bottom: 22px;
}

.prompt {
  color: var(--accent);
  margin-right: 6px;
}

/* Cursor block: cap height x 0.45 wide, per the brand rules. */
.cursor {
  display: inline-block;
  width: 0.34em;
  height: 0.72em;
  margin-left: 0.1em;
  background: var(--signal);
  translate: 0 0.02em;
  animation: blink 1.15s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero__lede {
  margin-top: 26px;
  font-size: clamp(1.06rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 58ch;
}

.pagehead p {
  margin-top: 24px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   6. Bands
   -------------------------------------------------------------------------- */

.band {
  padding-block: var(--band-y);
  background: var(--ground);
  color: var(--fg);
}

.band--tight {
  padding-block: clamp(60px, 8vw, 82px);
}

/* Ink ground: flip the ground-relative tokens and every component follows. */
.band--ink {
  --fg: var(--paper);
  --fg-soft: var(--paper-soft);
  --fg-mute: var(--paper-soft);
  --ground: var(--ink);
  --line: var(--line-paper);
  --accent: var(--signal);
  --field: var(--field-ink);
}

.band__head {
  max-width: 66ch;
  margin-bottom: 52px;
}

.band__head h2 {
  margin-top: 14px;
}

.band__head p {
  margin-top: 22px;
  color: var(--fg-soft);
  font-size: 1.06rem;
}

.band--ink h2,
.band--ink h3 {
  color: var(--paper);
}

/* Section labels are set as code comments, in the comment grey. */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--fg-mute);
}

.eyebrow::before {
  content: "// ";
  color: var(--accent);
}

.eyebrow--dark {
  color: var(--paper-soft);
}

/* --------------------------------------------------------------------------
   7. Arms — the two-sides-of-the-shop grid
   -------------------------------------------------------------------------- */

.arms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.arm {
  background: var(--ground);
  padding: 38px 34px 42px;
}

.arm__tag {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.arm h3 {
  margin-top: 18px;
  font-size: 1.32rem;
}

.arm p {
  margin-top: 16px;
  color: var(--fg-soft);
}

/* --------------------------------------------------------------------------
   8. ls — the product table
   Used on the ink band (index) and the paper band (projects), so every
   colour here is ground-relative.
   -------------------------------------------------------------------------- */

.ls {
  border: 1px solid var(--line);
  font-family: var(--mono);
}

.ls__head,
.ls__row {
  display: grid;
  grid-template-columns: 150px 108px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px 22px;
}

.ls__head {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  background: var(--field);
  border-bottom: 1px solid var(--line);
}

.ls__row {
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.ls__row:last-child {
  border-bottom: 0;
}

a.ls__row:hover {
  background: var(--field, rgba(13, 13, 13, 0.03));
}

.ls__name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--fg);
}

a.ls__row:hover .ls__name {
  color: var(--accent);
}

.ls__status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  justify-self: start;
  line-height: 1.4;
}

.ls__status--live {
  color: var(--accent);
}

.ls__status--soon {
  color: var(--fg-mute);
}

/* Descriptions read as prose, so drop back to the sans face. */
.ls__desc {
  font-family: var(--sans);
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--fg-soft);
}

.go {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
}

a.ls__row:hover .go {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   9. Stacks, items, two-col
   -------------------------------------------------------------------------- */

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 5vw, 64px);
}

.stack {
  display: grid;
  gap: 34px;
  align-content: start;
}

/* A stack that is the only child of a band gets two columns of its own. */
.band > .wrap > .stack {
  grid-template-columns: repeat(2, 1fr);
  gap: 34px clamp(28px, 5vw, 64px);
}

.item {
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.item h3 {
  color: var(--fg);
}

.item p {
  margin-top: 12px;
  color: var(--fg-soft);
  font-size: 0.99rem;
}

/* --------------------------------------------------------------------------
   10. Prose — the about page body
   -------------------------------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: 1.6rem;
  margin-top: 52px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.prose a {
  color: var(--signal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   11. Feature — the highlighted product block
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.feature__art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--field);
}

.feature__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Kept for any product that does not have a logo yet. */
.feature__art--placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--fg-mute);
}

.feature h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */

.mailto {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.2vw, 1.85rem);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--signal);
  word-break: break-word;
}

.mailto:hover {
  color: var(--signal-deep);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--paper-soft);
  padding-block: 58px;
  border-top: 1px solid var(--line-paper);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer img {
  height: 23px;
  width: auto;
}

.footer__legal {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--comment);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
}

.footer__links a {
  color: var(--paper-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__links a:hover {
  color: var(--signal);
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  :root {
    --band-y: 72px;
  }

  .arms,
  .two-col,
  .band > .wrap > .stack {
    grid-template-columns: 1fr;
  }

  .feature {
    grid-template-columns: 1fr;
  }

  .feature__art {
    max-width: 168px;
  }

  /* The ls table stops being a table and becomes stacked records. */
  .ls__head {
    display: none;
  }

  .ls__row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px;
  }

  .ls__status {
    justify-self: start;
  }
}

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

  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-block: 14px;
  }

  .masthead__logo img {
    height: 22px;
  }

  .nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .arm {
    padding: 30px 24px 34px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 26px;
  }
}

/* --------------------------------------------------------------------------
   15. Motion and print
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* A solid block still reads as a cursor without the blink. */
  .cursor {
    opacity: 1;
  }
}

@media print {
  .masthead,
  .skip,
  .hero__actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .band--ink {
    --fg: #000;
    --fg-soft: #333;
    --ground: #fff;
  }
}
