/* aircoded.app — collection landing
   Base: monochrome ink gallery. Color belongs to the apps only. */

@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/MartianMono-latin.woff2?v=29bf2691") 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: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/MartianMono-latin-ext.woff2?v=4e00762f") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #0f1216;
  --ink-raised: #151a21;
  --text: #e8ebf0;
  --muted: #8b94a3;
  --faint: #5b6472;
  --hairline: #252c37;

  --facet: #7fd0c4;
  --memora: #7d9bf8;
  --mixtapes: #e8a5a5;
  --ultrareaction: #f2b44c;
  --trackstone: #b58cf0;
  --pdftoword: #6aa4f8;

  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 72rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

::selection {
  background: #2c3644;
}

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

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

/* ---------- shared type roles ---------- */

.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* the spectrum hairline — one band per app in the collection */
.spectrum {
  height: 2px;
  border: 0;
  background: linear-gradient(
    90deg,
    var(--facet) 0 20%,
    var(--memora) 20% 40%,
    var(--mixtapes) 40% 60%,
    var(--ultrareaction) 60% 80%,
    var(--trackstone) 80% 100%
  );
}

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wordmark svg {
  display: block;
}

.nav-aircode {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-aircode:hover {
  color: var(--text);
}

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

.hero {
  padding-block: clamp(4rem, 12vh, 8rem) clamp(3.5rem, 9vh, 6rem);
}

.hero .label {
  margin-bottom: 2.25rem;
}

.hero-url {
  font-family: var(--mono);
  font-weight: 560;
  font-size: clamp(1.05rem, 4.1vw, 2.9rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-url .suffix {
  color: var(--faint);
  font-weight: 380;
}

/* rotating subdomain: spans stacked in one grid cell, faded in turn */
.rotator {
  display: inline-grid;
  text-align: right;
}

.rotator span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: cycle 20s infinite;
}

.rotator span:nth-child(1) { color: var(--facet); }
.rotator span:nth-child(2) { color: var(--memora); animation-delay: 4s; }
.rotator span:nth-child(3) { color: var(--mixtapes); animation-delay: 8s; }
.rotator span:nth-child(4) { color: var(--ultrareaction); animation-delay: 12s; }
.rotator span:nth-child(5) { color: var(--trackstone); animation-delay: 16s; }

/* one name holds for ~3.5s of the 4s slot, then hands over */
@keyframes cycle {
  0%, 17.5% { opacity: 1; transform: none; }
  20%, 97% { opacity: 0; }
  98% { transform: translateY(0.35em); }
  100% { opacity: 1; transform: none; }
}

.hero-lede {
  margin-top: 2.25rem;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
}

.hero-lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero .spectrum {
  margin-top: 3.5rem;
}

/* ---------- icon grid ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-bottom: clamp(3.5rem, 9vh, 6rem);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.tile-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the two web tools have wide logos, not square icons: pad them onto a plate */
.tile-art--plate {
  background: color-mix(in srgb, var(--accent) 12%, var(--ink-raised));
  padding: 18%;
}

/* the mixtapes cassette is drawn in dark ink — it needs a light plate */
.tile-art--plate-light {
  background: linear-gradient(155deg, #f6f7fa, #f1e9e9);
  border-color: transparent;
}

.tile-art--plate img {
  height: auto;
  object-fit: contain;
}

.tile-name {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.2s;
}

.tile:hover .tile-art {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}

.tile:hover .tile-name {
  color: var(--text);
}

/* pdftoword is a minor tool — present, but not competing for attention */
.tile--minor {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.tile--minor:hover {
  opacity: 1;
}

/* ---------- index header ---------- */

.index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}

/* ---------- app entries ---------- */

.app {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--hairline);
}

.app:nth-of-type(even) .app-info {
  order: 2;
}

.app-status {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.app-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.app-domain {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.app-domain a {
  text-decoration: none;
}

.app-domain .app-name {
  color: var(--accent);
}

.app-domain .suffix {
  color: var(--faint);
  font-weight: 380;
}

.app-domain a:hover .suffix {
  color: var(--muted);
}

.app-tagline {
  margin-top: 1.4rem;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 20em;
}

.app-desc {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 32em;
}

.app-cta {
  margin-top: 1.6rem;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.55em 1.3em;
  transition: background 0.2s, color 0.2s;
}

.app-cta:hover {
  background: var(--accent);
  color: var(--ink);
}

/* visual panels */

.app-visual {
  border-radius: 14px;
  overflow: hidden;
  min-height: clamp(15rem, 30vw, 21rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  transition: transform 0.35s ease;
}

.app:hover .app-visual {
  transform: translateY(-4px);
}

.app-visual--facet {
  background: #0a0d12;
  border-color: #1d242e;
}

.app-visual--facet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-visual--mixtapes {
  background:
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(26, 31, 43, 0.045) 34px 35px),
    linear-gradient(155deg, #f6f7fa, #f1e9e9);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
}

.app-visual--mixtapes img {
  width: min(78%, 21rem);
}

/* screenshots go bare — no panel, no plate. A hairline on the image itself
   keeps it off the dark page without inventing a background for it. */
.app-visual--memora,
.app-visual--ultrareaction,
.app-visual--trackstone {
  background: none;
  border: 0;
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.app-visual--memora img,
.app-visual--ultrareaction img,
.app-visual--trackstone img {
  height: auto;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.app-visual--memora img {
  width: 100%;
}

/* phone screenshots are tall — hold them back so they don't tower */
.app-visual--ultrareaction img,
.app-visual--trackstone img {
  width: min(42%, 11rem);
}

/* ---------- other tools ---------- */

.other-tools {
  padding-block: clamp(3rem, 7vw, 4.5rem);
}

.tool-list {
  list-style: none;
  margin-top: 0.5rem;
}

.tool-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}

.tool-list a {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tool-list a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tool-list .app-name {
  color: var(--accent);
}

.tool-list .suffix {
  color: var(--faint);
  font-weight: 380;
}

.tool-list a:hover .suffix {
  color: var(--muted);
}

.tool-desc {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- aircode outro ---------- */

.outro {
  padding-block: clamp(4.5rem, 11vh, 7.5rem);
  text-align: center;
}

.outro .label {
  margin-bottom: 1.75rem;
}

.outro-title {
  font-family: var(--mono);
  font-weight: 640;
  letter-spacing: -0.04em;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.25;
}

.outro-copy {
  margin: 1.4rem auto 0;
  max-width: 36em;
  color: var(--muted);
}

.outro-cta {
  margin-top: 2.4rem;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--text);
  border-radius: 999px;
  padding: 0.85em 1.8em;
  transition: background 0.2s;
}

.outro-cta:hover {
  background: #fff;
}

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

.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem 2.75rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.footer-row a {
  color: var(--muted);
  text-decoration: none;
}

.footer-row a:hover {
  color: var(--text);
}

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

@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .app:nth-of-type(even) .app-info {
    order: 0;
  }

  .app-visual {
    order: -1;
  }

  .app-visual--ultrareaction img,
  .app-visual--trackstone img {
    width: min(38%, 10rem);
  }
}

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

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

  .rotator span {
    animation: none;
  }

  .rotator span:nth-child(1) {
    opacity: 1;
  }

  .app:hover .app-visual,
  .tile:hover .tile-art {
    transform: none;
  }
}
