/* Jeddore — one stylesheet, no framework. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --bg: #fbfaf7;
  --ink: #0b1020;
  --muted: #585e6b;
  --line: #e4e2db;
  --accent: #2f5fe0;
  --accent-hover: #2349b8;
  --on-accent: #ffffff;
  --tint: rgb(47 95 224 / 0.06);
  --mark: #fff3b0;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Type scale, roughly 1.25 */
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);

  /* Spacing */
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4.5rem;

  --measure: 40rem;
  --gutter: 1.25rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220;
    --ink: #eceae4;
    --muted: #a3a8b5;
    --line: #262c3d;
    --accent: #8fa9ff;
    --accent-hover: #b4c5ff;
    --on-accent: #0b1020;
    --tint: rgb(143 169 255 / 0.08);
    --mark: #4a3f10;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3 {
  margin: 0;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p, ul, ol { margin: 0; }
p { text-wrap: pretty; }

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code, .mono {
  font-family: var(--mono);
  font-size: 0.85em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: var(--s-2) var(--s-3);
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: var(--s-2); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Anything still marked TODO in the data shows up loudly. */
.todo {
  background: var(--mark);
  color: var(--ink);
  padding: 0 0.2em;
  border-radius: 3px;
}

/* ---------- Header ---------- */

.site-header {
  padding-block: var(--s-4);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
}

.wordmark {
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }

.site-nav ul {
  display: flex;
  gap: var(--s-4);
  list-style: none;
  padding: 0;
}

.site-nav a {
  font-size: var(--step--1);
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ---------- Sections ---------- */

.section { padding-block: var(--s-6); }
.section + .section { border-top: 1px solid var(--line); }

.section-title {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: var(--s-4);
}

.prose > * + * { margin-top: var(--s-3); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-1); }
.prose li::marker { color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* ---------- Home ---------- */

.statement {
  padding-block: var(--s-6) var(--s-5);
}

.statement h1 {
  font-size: var(--step-3);
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: -0.022em;
  max-width: 34rem;
}

/* App catalogue */

.catalogue {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.catalogue li {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 2rem 3.5rem 1fr;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}

/* Hover tint bleeds slightly past the text column; the hairlines don't. */
.catalogue li::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--s-2));
  z-index: -1;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.catalogue li:hover::before,
.catalogue li:focus-within::before { background: var(--tint); }

.catalogue .num {
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.catalogue h3 {
  font-size: var(--step-1);
  font-weight: 650;
}

/* The name link covers the whole row, so the row is one big target. */
.catalogue h3 a { text-decoration: none; }
.catalogue h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.catalogue h3 a:focus-visible { outline: none; }
.catalogue li:has(a:focus-visible)::before {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.catalogue li:hover h3 a { color: var(--accent); }

.catalogue .summary {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.15rem;
}

.catalogue .meta {
  font-size: var(--step--1);
  margin-top: 0.15rem;
  color: var(--muted);
}

.after-list { margin-top: var(--s-4); }

.status {
  font-weight: 600;
  color: var(--ink);
}
.status--published { color: var(--accent); }

/* ---------- App icons ---------- */

.icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 22%;
  overflow: hidden;
  flex: none;
}

.icon--round { border-radius: 50%; }

.icon--lg { width: 5.5rem; height: 5.5rem; }

.monogram {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  user-select: none;
}
.icon--lg.monogram { font-size: 2.25rem; }

/* ---------- App page ---------- */

.app-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-block: var(--s-6) var(--s-4);
}

.app-head h1 { font-size: var(--step-3); }

.app-head .meta {
  margin-top: var(--s-1);
  font-size: var(--step--1);
  color: var(--muted);
}

.app-head .meta .mono { font-size: 0.95em; }

.app-intro { padding-bottom: var(--s-5); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-5);
}

/* ---------- Plain pages (support, contact, privacy, 404) ---------- */

.page-head {
  padding-block: var(--s-6) var(--s-4);
}

.page-head h1 { font-size: var(--step-3); }

.page-head .meta {
  margin-top: var(--s-1);
  font-size: var(--step--1);
  color: var(--muted);
}

.kicker {
  margin-bottom: var(--s-1);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}

.policy h2 {
  font-size: var(--step-1);
  margin-top: var(--s-5);
}

.policy h2 + * { margin-top: var(--s-2); }

.details {
  margin: var(--s-5) 0 0;
  border-top: 1px solid var(--line);
}

.details > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--s-3);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.details dt {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
  padding-top: 0.15rem;
}

.details dd { margin: 0; }

.link-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.link-list li {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.link-list .icon { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.08s ease;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button:active { transform: translateY(1px); }

.button .arrow { transition: transform 0.15s ease; }
.button:hover .arrow { transform: translateX(2px); }

.badge {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Screenshots ---------- */

.shots {
  display: flex;
  gap: var(--s-3);
  list-style: none;
  padding: 0 0 var(--s-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.shots li { flex: none; scroll-snap-align: start; }

.shots img {
  height: 26rem;
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.shots--round img {
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--ink);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--s-7);
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer .wrap {
  display: grid;
  gap: var(--s-2);
}

.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  list-style: none;
  padding: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 30rem) {
  :root { --gutter: 1rem; }

  .catalogue li {
    grid-template-columns: 3rem 1fr;
  }
  .catalogue .num { display: none; }
  .icon { width: 3rem; height: 3rem; }

  .app-head { align-items: flex-start; gap: var(--s-3); }
  .icon--lg { width: 4rem; height: 4rem; }

  .details > div { grid-template-columns: 1fr; gap: 0; }

  .shots img { height: 22rem; }
  .shots--round img { width: 11rem; height: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
