/*
  skfauzdar.com/apps/ - the app index.

  Its own identity on purpose. Angel Numbers is violet, Manrope and soft
  gradients; this is warm paper, a serif masthead and near-black ink. The only
  colour on the page comes from the apps themselves - each row carries its own
  --accent, so the shelf stays neutral and the products do the talking.
*/

:root {
  --paper: #faf8f5;
  --card: #ffffff;
  --sunk: #f2efe9;
  --ink: #17140f;
  --ink-2: #46403a;
  --ink-3: #6f675f;
  --ink-4: #9a9187;
  --line: #e6e0d6;
  --line-2: #d5cec2;
  --accent: #17140f;

  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.1875rem;
  --t-xl: clamp(1.375rem, 1.9vw, 1.75rem);
  --t-2xl: clamp(1.75rem, 3vw, 2.5rem);
  --t-3xl: clamp(2.5rem, 6.2vw, 4.75rem);

  --s-1: .5rem; --s-2: .75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;  --s-6: 3rem;   --s-7: 4.5rem; --s-8: 6.5rem;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .68, .28, 1);
  --shadow-1: 0 1px 2px rgba(30, 22, 10, .04), 0 10px 26px -18px rgba(30, 22, 10, .3);
  --shadow-2: 0 2px 6px rgba(30, 22, 10, .05), 0 30px 60px -34px rgba(30, 22, 10, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--t-md);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Nothing behind the page but a breath of warmth at the very top. The ruled
   grid that used to live here read as lined notebook paper and fought every
   card on the page for attention. A background you can point at is a
   background that is too loud. */
.sky {
  position: fixed; inset: 0 0 auto; height: 60vh; z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, #fdfcfa, rgba(253, 252, 250, 0));
}

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 40px); }

h1, h2, h3 { margin: 0; color: var(--ink); }
p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }
a { color: var(--ink); text-underline-offset: 3px; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  transform: translateY(-200%);
  background: var(--ink); color: var(--paper); font-weight: 600;
  padding: 12px 18px; border-radius: 0 0 10px 0; text-decoration: none;
}
.skip:focus { transform: none; }

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

/* ============================================================== header */

header.top { border-bottom: 1px solid var(--line); background: rgba(250, 248, 245, .9);
             backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
             position: sticky; top: 0; z-index: 40; }
.bar { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand span {
  font-family: var(--serif); font-size: 1.5rem; letter-spacing: -.01em; color: var(--ink);
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }

.bar nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.bar nav a.link {
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-3);
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.bar nav a.link:hover { color: var(--ink); background: var(--sunk); }
.bar nav a.link[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--sunk); }

/* =========================================================== masthead */

section { padding-block: clamp(var(--s-5), 5vw, var(--s-7)); }
.masthead { padding-block: clamp(var(--s-5), 4.5vw, var(--s-6)) clamp(var(--s-5), 5vw, var(--s-7)); }

.eyebrow {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-4); margin: 0 0 var(--s-3);
}

h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--ink-3); }

.lede {
  margin-top: var(--s-4); max-width: 56ch;
  font-size: var(--t-lg); line-height: 1.55; color: var(--ink-3);
}

.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3) var(--s-5);
  margin: var(--s-6) 0 0; padding-top: var(--s-4);
  border-top: 1px solid var(--line); max-width: 620px;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats dt {
  font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); font-weight: 600;
}
.stats dd { margin: 4px 0 0; font-size: var(--t-md); font-weight: 600; color: var(--ink); }

/* =============================================================== apps */

#list { padding-top: 0; }
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }

.app {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(var(--s-4), 4vw, var(--s-6));
  box-shadow: var(--shadow-1);
  display: grid; gap: var(--s-4);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.app:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--line-2); }

/* Identity and prose on the left, the facts and the two buttons in a rail on
   the right. Source order is head, description, actions - which is also the
   order it stacks in on a phone, so nothing has to be re-ordered by CSS. */
@media (min-width: 880px) {
  .app {
    grid-template-columns: minmax(0, 1fr) 272px;
    grid-template-areas: "head aside" "body aside";
    align-content: start;
    column-gap: clamp(var(--s-5), 4vw, var(--s-6));
  }
  .app-head { grid-area: head; }
  .app-body { grid-area: body; }
  .app-aside {
    grid-area: aside; align-self: start;
    padding-left: var(--s-5); border-left: 1px solid var(--line);
  }
}

/* The app's own colour, used once, as a rule down its left edge. */
.app::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent); opacity: .85;
}

.app-head { display: flex; align-items: center; gap: var(--s-3); }
.num {
  flex: 0 0 auto; align-self: flex-start; padding-top: 5px;
  font-family: var(--serif); font-size: 1.1rem; line-height: 1;
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.app-icon {
  width: 76px; height: 76px; border-radius: 20px; flex: 0 0 auto; margin-left: 4px;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.app h2 {
  font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl);
  line-height: 1.05; letter-spacing: -.015em;
}
.app .tag { margin: 3px 0 0; font-size: var(--t-sm); font-weight: 600; color: var(--accent); }
.app .meta { margin: 4px 0 0; font-size: var(--t-xs); color: var(--ink-4); }

.app-body { display: grid; gap: var(--s-3); align-content: start; }
.blurb { font-size: var(--t-md); color: var(--ink-2); max-width: 62ch; }
.why {
  font-size: var(--t-sm); color: var(--ink-3); max-width: 62ch;
  padding-left: var(--s-3); border-left: 2px solid var(--line);
}

.app-aside { display: grid; gap: var(--s-3); align-content: start; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; }
.facts li {
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  background: var(--sunk); border-radius: 7px; padding: 6px 11px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
@media (min-width: 880px) { .actions .btn { width: 100%; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: var(--t-sm);
  text-decoration: none; padding: 12px 20px; border-radius: 11px;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), color .18s var(--ease);
}
/* Written out for every state - a button must never inherit its colour. */
a.btn-solid, a.btn-solid:link, a.btn-solid:visited {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 8px 18px -10px rgba(23, 20, 15, .8);
}
a.btn-solid:hover, a.btn-solid:focus-visible {
  background: #000; color: var(--paper); transform: translateY(-2px);
  box-shadow: 0 14px 26px -12px rgba(23, 20, 15, .9);
}
a.btn-line, a.btn-line:link, a.btn-line:visited {
  background: transparent; color: var(--ink); border-color: var(--line-2);
}
a.btn-line:hover, a.btn-line:focus-visible { background: var(--sunk); color: var(--ink); transform: translateY(-2px); }

.pkg {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--ink-4);
  overflow-wrap: anywhere;
}

/* =============================================================== next */

.next { padding-top: 0; }
.split {
  display: grid; gap: var(--s-4);
  padding-top: clamp(var(--s-5), 5vw, var(--s-6));
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .split { grid-template-columns: 260px 1fr; gap: var(--s-6); } }
.split h2 {
  font-family: var(--serif); font-weight: 400; font-size: var(--t-xl);
  letter-spacing: -.01em; line-height: 1.15;
}
.split p { font-size: var(--t-sm); color: var(--ink-3); max-width: 62ch; }
.write { margin-top: var(--s-3); font-weight: 500; color: var(--ink-2) !important; }
.write a { color: var(--ink); font-weight: 600; }

/* ============================================================= footer */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: var(--s-4);
  padding-block: var(--s-5) var(--s-6);
}
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--s-3) var(--s-6); font-size: var(--t-sm);
}
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.foot-nav a { color: var(--ink-3); text-decoration: none; font-weight: 500; }
.foot-nav a:hover { color: var(--ink); }

/* The developer's own accounts, and only here - an individual app's page has
   no business advertising its author's Instagram. Set in words rather than
   brand marks: six logos in a row is a sticker album, six words is a list. */
.social {
  margin-left: auto; display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px var(--s-3); font-size: var(--t-xs);
}
.social-label {
  color: var(--ink-4); letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; margin-right: 2px;
}
.social a {
  color: var(--ink-3); text-decoration: none; font-weight: 600;
  padding-bottom: 1px; border-bottom: 1px solid transparent;
}
.social a:hover { color: var(--ink); border-bottom-color: var(--line-2); }

/* Boilerplate last, one line each, never run together into a paragraph. */
.smallprint {
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.disclaimer {
  max-width: 76ch;
  font-size: var(--t-xs); line-height: 1.65; color: var(--ink-3);
}
.disclaimer b { color: var(--ink-2); font-weight: 600; }

.legal {
  display: grid; gap: 3px; margin-top: var(--s-4);
  font-size: 12px; line-height: 1.5; color: var(--ink-4);
}

/* ========================================================= responsive */

@media (max-width: 760px) {
  /* Stack the two footer rows instead of letting the social list drift to the
     right edge on its own line. */
  .social { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  .app-head { gap: 10px; }
  .app-icon { width: 60px; height: 60px; border-radius: 16px; margin-left: 0; }
  .num { font-size: .95rem; padding-top: 3px; }
  .actions .btn { flex: 1 1 auto; }
  .bar { height: 58px; }
  .bar nav a.link { padding: 8px 9px; }
}

@media (max-width: 380px) {
  .bar nav a.link { padding: 8px 7px; font-size: var(--t-xs); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
