/* madebyfwd — a fwdworks studio
   Look borrowed from the wmojito overview: big display type, lime marker
   highlights, hand-drawn underlines, handwritten asides, faint big icons. */

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --fg: #0a0a0a;
  --muted: #737373;
  --line: rgb(10 10 10 / 0.1);
  --line-strong: rgb(10 10 10 / 0.3);
  --soft: rgb(10 10 10 / 0.045);
  --lime: #a3e635;
  --marker: rgb(163 230 53 / 0.6);
  --brand: #16a34a;
  --amber: #d97706;
  --violet: #5b4bc4;
  --radius: 0.75rem;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);
  --font-hand: "Caveat Brush", cursive;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c;
    --card: #161616;
    --fg: #f5f5f5;
    --muted: #a3a3a3;
    --line: rgb(245 245 245 / 0.1);
    --line-strong: rgb(245 245 245 / 0.3);
    --soft: rgb(245 245 245 / 0.05);
    --marker: rgb(163 230 53 / 0.35);
    --brand: #22c55e;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }

/* ---------- type helpers ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hand {
  font-family: var(--font-hand);
  color: color-mix(in oklab, var(--fg) 70%, transparent);
}

/* lime highlighter over the lower half of the text */
.marker {
  background: linear-gradient(transparent 45%, var(--marker) 45% 90%, transparent 90%);
  padding: 0 0.25rem;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* hand-drawn underline: <span class="mark">word<svg>…</svg></span> */
.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--fg);
}
.mark svg {
  position: absolute;
  left: 0;
  bottom: -0.3em;
  width: 100%;
  height: 0.45em;
  color: var(--lime);
  pointer-events: none;
  overflow: visible;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--soft);
  color: var(--fg);
  white-space: nowrap;
}
.pill.solid { background: var(--fg); color: var(--bg); }
.pill .dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.pill.live .dot { background: var(--brand); }
.pill.beta .dot { background: var(--amber); }
.pill.idea .dot { background: var(--violet); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}
.wordmark b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.wordmark b span { color: var(--brand); }

.site-header nav { display: flex; gap: 1.25rem; font-size: 0.95rem; font-weight: 500; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--fg); }
@media (max-width: 520px) { .site-header nav a.hide-sm { display: none; } }

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

.hero { padding: 3rem 0 2rem; margin-bottom: 0; }
@media (min-width: 768px) { .hero { padding: 5rem 0 2.5rem; } }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  margin: 0;
  max-width: 15ch;
}
/* secondary headline: ~40% of the H1 */
.hero-sub {
  margin: 1.5rem 0 0;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--fg);
}
.hero .lede {
  margin: 1.1rem 0 0;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero .lede strong { color: var(--fg); font-weight: 600; }
.hero .hand {
  display: block;
  margin: 1.5rem 0 0;
  font-size: 1.6rem;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.25rem;
  font-weight: 600;
}
.hero-links a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.hero-links a:hover { text-decoration-color: var(--fg); }
.hero-links span { color: var(--muted); }

/* ---------- figure strip ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) { .figures { grid-template-columns: repeat(4, 1fr); } }

.figure {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
  padding: 1rem 1.1rem;
}
.figure .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.figure .label { margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.figure .ghost {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  width: 4rem;
  height: 4rem;
  transform: translateY(-50%);
  color: var(--fg);
  opacity: 0.07;
  pointer-events: none;
}

/* ---------- sections ---------- */

section { margin-bottom: 4.5rem; }

.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0.35rem 0 0; }
.section-lede { margin: 0.75rem 0 0; max-width: 44rem; font-size: 1.1rem; color: var(--muted); }
.section-head .hand { font-size: 1.35rem; margin: 0.5rem 0 0; }

/* ---------- app cards ---------- */

.apps { display: grid; gap: 1rem; }
@media (min-width: 768px) { .apps { grid-template-columns: repeat(2, 1fr); } }

.app {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card);
  border-radius: 1rem;
  box-shadow: 0 0 0 1px var(--line);
  padding: 1.5rem;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.app:hover { box-shadow: 0 0 0 1px var(--line-strong); transform: translateY(-2px); }

.app.featured { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .app.featured { padding: 2rem; }
  .app.featured .app-name { font-size: 2.4rem; }
  .app.featured .app-tag { font-size: 1.35rem; }
}

.app-top { display: flex; align-items: center; gap: 1rem; }
.app-logo {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 0.9rem;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.app-logo picture { display: contents; }
.app-logo img { width: 100%; height: 100%; object-fit: contain; }
.app-logo.pad img { width: 70%; height: 70%; }

.app-name { font-size: 1.6rem; margin: 0; white-space: nowrap; }
.app-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: -0.25rem; }

.app-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}
.app-desc { margin: 0; color: var(--muted); max-width: 40rem; }

.app-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
}
.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.app:hover .app-link { text-decoration: underline; text-underline-offset: 3px; }
.app-note { font-family: var(--font-hand); font-size: 1.2rem; color: var(--muted); }

.app .ghost {
  position: absolute;
  right: -0.75rem;
  top: -0.75rem;
  width: 8rem;
  height: 8rem;
  color: var(--fg);
  opacity: 0.05;
  pointer-events: none;
}

/* ---------- lab ---------- */

.lab {
  border: 1px solid color-mix(in oklab, var(--fg) 15%, transparent);
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 768px) { .lab { padding: 1.5rem; grid-template-columns: repeat(2, 1fr); } }

.lab-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
  padding: 1rem;
  text-decoration: none;
}
.lab-item .app-logo { width: 2.75rem; height: 2.75rem; border-radius: 0.7rem; }
.lab-item h3 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lab-item p { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- principles ---------- */

.principles { display: grid; gap: 1rem; }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(3, 1fr); } }

.principle {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.principle .chip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  background: var(--lime);
  color: #0a0a0a;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}
.principle h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.principle p { margin: 0; color: var(--muted); font-size: 0.95rem; }

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

.contact {
  background: var(--fg);
  color: var(--bg);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .contact { padding: 2.75rem; flex-direction: row; align-items: center; justify-content: space-between; }
}
.contact h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0; }
.contact .marker { background: none; padding: 0; color: var(--lime); }
@media (prefers-color-scheme: dark) { .contact .marker { color: #4d7c0f; } }
.contact p { margin: 0.5rem 0 0; opacity: 0.7; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--lime);
  color: #0a0a0a;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
}
.btn:hover { filter: brightness(1.05); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 2rem 0 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: var(--fg); }

@media (max-width: 520px) {
  .site-header nav { gap: 1rem; white-space: nowrap; }
}

/* ---------- hero + about (avatar card on the right) ---------- */

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 3rem;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; padding: 3rem 0 4rem; }
}
.hero-grid .hero { padding: 0; margin: 0; }

.about {
  position: relative;
  background: var(--card);
  border-radius: 1.25rem;
  box-shadow: 0 0 0 1px var(--line);
  padding: 1.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 520px) and (max-width: 899px) {
  .about { flex-direction: row; align-items: center; gap: 1.5rem; }
}

.avatar { margin: 0; flex: none; width: 7.5rem; }

.avatar img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.about h2 { font-size: 1.6rem; margin: 0 0 0.5rem; }
.about-text > p:not(.hand) { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.95rem; }
.about-text strong { color: var(--fg); font-weight: 600; }
.about .hand { margin: 0.6rem 0 0; font-size: 1.3rem; display: inline-block; }

/* avatar pops out of the top of the founder card (desktop) */
@media (min-width: 900px) {
  .hero-grid { align-items: end; }
  .about { margin-top: 4.5rem; padding-top: 0; }
  .about .avatar { width: 7.5rem; margin-top: -4rem; align-self: center; }
}
@media (max-width: 519px) { .about .avatar { align-self: center; } }
/* soften the straight crop line at the bottom of the shirt */
.avatar img {
  -webkit-mask-image: linear-gradient(#000 80%, transparent);
  mask-image: linear-gradient(#000 80%, transparent);
}

/* ---------- build log (GitHub activity) ---------- */

.log-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; }
.gh-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.gh-link:hover { color: var(--fg); }
.icon.sm { width: 1rem; height: 1rem; }

.gh-card {
  background: var(--card);
  border-radius: 1.25rem;
  box-shadow: 0 0 0 1px var(--line);
  padding: 1.25rem;
}
@media (min-width: 768px) { .gh-card { padding: 1.75rem 2rem; } }
.gh-total { margin: 0 0 1rem; font-size: 1.15rem; color: var(--muted); }
.gh-total strong { color: var(--fg); font-family: var(--font-display); font-weight: 800; }
.gh-scroll { overflow-x: auto; padding-bottom: 0.25rem; }

.gh-graph {
  --cell: minmax(10px, 1fr);
  display: grid;
  grid-template-columns: 2rem repeat(var(--weeks, 53), var(--cell));
  grid-template-rows: auto repeat(7, auto);
  gap: 3px;
  min-width: 640px;
  font-size: 0.75rem;
  color: var(--muted);
}
.gh-graph.has-start { padding-top: 1.9rem; }
.gh-graph i { aspect-ratio: 1; border-radius: 3px; display: block; }
.gh-month { grid-row: 1; white-space: nowrap; overflow: visible; padding-bottom: 0.2rem; }
.gh-day { grid-column: 1; align-self: center; line-height: 1; }
.gh-start {
  grid-row: 1;
  align-self: start;
  margin-top: -1.9rem;
  white-space: nowrap;
  font-size: 1.2rem;
  color: var(--fg);
  justify-self: start;
  transform: translateX(-0.15rem);
}

.gh-graph .pad, .gh-legend .pad { background: transparent; }
.l0 { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.l1 { background: color-mix(in oklab, var(--lime) 50%, var(--card)); }
.l2 { background: color-mix(in oklab, var(--lime) 70%, var(--card)); }
.l3 { background: var(--lime); }
.l4 { background: var(--brand); }

.gh-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 1rem; font-size: 0.8rem; color: var(--muted); }
.gh-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }
.gh-legend span:first-child { margin-right: 0.25rem; }
.gh-legend span:last-child { margin-left: 0.25rem; }

.gh-card:not(.gh-ready) .gh-legend { visibility: hidden; }
.gh-card:not(.gh-ready) .gh-scroll { min-height: 8rem; }
.gh-card.gh-failed .gh-total span::after { content: " — see them on GitHub ↗"; }

/* ---------- newsletter signup ---------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:root { --signup-bg: #e6e7e1; --signup-edge: var(--line-strong); }
@media (prefers-color-scheme: dark) { :root { --signup-bg: #1f1f1f; --signup-edge: var(--line-strong); } }

/* The form, in the hero and in the bar */
.signup-form { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 0 1 24rem; }
.signup-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--card);
  border: 0;
  box-shadow: 0 0 0 1px var(--line-strong);
  border-radius: 999px;
  padding: 0.55rem 1rem;
}
.signup-form input[type="email"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.signup-form button {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--lime);
  color: #0a0a0a;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
}
.signup-form button:hover { filter: brightness(1.05); }
.signup-form button:disabled { opacity: 0.6; cursor: wait; }
.signup-msg { flex-basis: 100%; margin: 0; font-size: 0.85rem; color: var(--muted); }
.signup-msg:empty { display: none; }
.signup-msg.ok { color: var(--brand); font-weight: 600; }

/* The mail icon with its live dot */
.signup-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--lime);
  color: #0a0a0a;
}
.signup-icon .icon { width: 1.3rem; height: 1.3rem; }
.signup-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--ring, var(--signup-bg));
  animation: signup-ping 2s ease-out infinite;
}
@keyframes signup-ping {
  0% { box-shadow: 0 0 0 2px var(--ring, var(--signup-bg)), 0 0 0 2px rgb(22 163 74 / 0.6); }
  70%, 100% { box-shadow: 0 0 0 2px var(--ring, var(--signup-bg)), 0 0 0 9px rgb(22 163 74 / 0); }
}
@media (prefers-reduced-motion: reduce) { .signup-icon::after { animation: none; } }

/* Quick signup at the top of the hero */
.quick-signup { align-items: center; max-width: 30rem; margin: -2.6rem 0 3.35rem; --ring: var(--bg); }
.quick-signup .signup-icon { width: 2.4rem; height: 2.4rem; }
.quick-signup .signup-icon .icon { width: 1.15rem; height: 1.15rem; }
.quick-signup input[type="email"] { flex-basis: 10rem; }

/* The bar at the bottom */
.signup {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: min(60rem, calc(100% - 2rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 3rem 0.9rem 1.1rem;
  background: var(--signup-bg);
  color: var(--fg);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--signup-edge), 0 10px 30px rgb(0 0 0 / 0.12);
}
.signup[hidden] { display: none; }
body:has(.signup:not([hidden])) { padding-bottom: 9rem; }
.signup-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; flex: 1 1 22rem; }
.signup-text p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.signup-text strong { color: var(--fg); }
.signup-text .pill { background: var(--soft); }
.signup-short { display: none; }
.signup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.signup-close:hover { color: var(--fg); background: var(--soft); }
@media (max-width: 520px) {
  .signup { bottom: 1rem; width: calc(100% - 1rem); gap: 0.5rem 0.75rem; padding: 0.7rem 2.5rem 0.7rem 0.8rem; }
  .signup-icon { width: 2.25rem; height: 2.25rem; }
  .signup-icon .icon { width: 1.1rem; height: 1.1rem; }
  .signup-long, .signup-text .pill { display: none; }
  .signup-short { display: inline; }
  .signup-text { flex: 1 1 0; min-width: 0; }
  .signup-text p { font-size: 0.9rem; }
  .signup .signup-form { flex-basis: 100%; }
  .signup-form input[type="email"] { flex-basis: 8rem; padding: 0.45rem 0.85rem; font-size: 0.9rem; }
  .signup-form button { padding: 0.45rem 0.95rem; font-size: 0.9rem; }
  .signup-close { top: 0.3rem; right: 0.3rem; }
  body:has(.signup:not([hidden])) { padding-bottom: 9rem; }
}
