/* app.p10node.com — the directory page.
   Same ink/red/Overpass system as oss.p10node.com, so the two read as one
   house. The app pages under /croptext/ and /smartrotate/ keep their own
   product identity and do not load this file. */

/* ── tokens ──────────────────────────────────────────────────── */
:root {
  --ink: #111114;
  --ink-soft: #4a4a52;
  --paper: #ffffff;
  --gray: #f0eeea;
  --gray-line: #ddd9d2;
  --red: #cd1f1f;
  --red-dark: #8d1212;
  --line: 3px solid var(--ink);
  --sans: "Overpass", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Inconsolata", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1140px;
}

*, *::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-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.04; font-weight: 800; }

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

.arrow { width: 17px; height: 17px; flex: none; transition: transform .18s ease; }

a:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 0 5px;
  white-space: nowrap;
}

/* ── header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--line);
}

.header-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
  padding-right: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand img { border-radius: 50%; border: 2px solid var(--ink); }
.brand-slash { color: var(--red); margin-inline: 4px; }
.brand-text em { font-style: normal; font-weight: 400; font-family: var(--mono); }

.menu { display: flex; align-items: stretch; }

.menu-link {
  display: flex;
  align-items: center;
  padding-inline: 18px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color .15s ease, background .15s ease;
}

.menu-link:hover { color: var(--ink); background: var(--gray); }

.menu-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-inline: 24px;
  margin-left: 12px;
  border-left: var(--line);
  border-right: var(--line);
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  transition: background .16s ease;
}

.menu-btn:hover { background: var(--red-dark); }
.menu-btn:hover .arrow { transform: translateX(4px); }

/* ── hero ────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 1px 1px, var(--gray-line) 1px, transparent 0) 0 0 / 26px 26px;
  border-bottom: var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
  padding-block: 78px 84px;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  margin-bottom: 30px;
}

.hero-copy p { margin: 0 0 18px; max-width: 62ch; color: #26262c; }

.footnote {
  font-size: 15.5px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--gray-line);
  padding-top: 16px;
}

.footnote em { color: var(--ink); font-style: italic; }

/* The facts panel is the one place on the page with a drop shadow, so it
   reads as a physical card pinned next to the copy rather than a fourth
   column of text. */
.hero-facts {
  border: var(--line);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--red);
}

.hero-facts dl { margin: 0; }

.hero-facts div {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-line);
}

.hero-facts div:last-child { border-bottom: 0; }

.hero-facts dt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-facts dd {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

/* ── sections ────────────────────────────────────────────────── */
.apps { background: var(--gray); padding-block: 62px 84px; }
.principles { padding-block: 62px 84px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 40px;
  border-bottom: var(--line);
}

.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }

.count {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ── app cards ───────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--line);
  padding: 26px 26px 0;
  transition: transform .18s ease, box-shadow .18s ease;
}

a.card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 var(--red);
}

a.card:hover .card-cta { background: var(--red); color: #fff; }
a.card:hover .arrow { transform: translateX(4px); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.tag-quiet { background: transparent; color: var(--ink-soft); border-color: var(--gray-line); }

.card h3 { font-size: 1.75rem; }

.tagline {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 17px;
  color: var(--red);
  letter-spacing: -0.015em;
}

.card-body {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 26px;
  padding: 0;
}

.specs li {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--gray-line);
  background: var(--gray);
  padding: 2px 9px;
}

/* Pushed to the bottom so cards of unequal copy still line their footers up. */
.card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: auto -26px 0;
  padding: 16px 26px;
  border-top: var(--line);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  transition: background .16s ease, color .16s ease;
}

.card-ghost .card-body { margin-bottom: 26px; }

.card-ghost {
  background: transparent;
  border-style: dashed;
  border-color: var(--gray-line);
}

.card-ghost h3, .card-ghost .tagline { color: var(--ink-soft); }
.card-ghost .card-cta { border-top-color: var(--gray-line); border-top-style: dashed; }
.card-ghost .card-cta:hover { background: var(--ink); color: #fff; }
.card-ghost .card-cta:hover .arrow { transform: translateX(4px); }

.ghost-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--gray-line);
  border-radius: 14px;
  font-size: 30px;
  font-weight: 300;
  color: var(--gray-line);
  line-height: 1;
}

/* ── principles ──────────────────────────────────────────────── */
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
}

.rules article {
  padding: 4px 32px 0;
  border-left: 1px solid var(--gray-line);
}

.rules article:first-child { padding-left: 0; border-left: 0; }

.rule-no {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
}

.rules h3 { margin: 10px 0 12px; font-size: 1.25rem; line-height: 1.2; }
.rules p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); }

/* ── footer ──────────────────────────────────────────────────── */
.site-footer { border-top: var(--line); background: var(--ink); color: #d9d9de; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-block: 34px 40px;
}

.site-footer .brand { color: #fff; font-size: 18px; }
.site-footer .brand img { border-color: #fff; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}

.footer-links a { color: #d9d9de; transition: color .15s ease; }
.footer-links a:hover { color: #fff; }

.legal {
  width: 100%;
  margin: 0;
  font-size: 14px;
  color: #8b8b95;
}

/* ── responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 42px; padding-block: 54px 60px; }
  .hero-facts { box-shadow: 8px 8px 0 var(--red); }
  .rules article { padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--gray-line); }
  .rules article:first-child { padding-top: 4px; border-top: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .menu-link { display: none; }
  .menu-btn { padding-inline: 18px; border-right: 0; }
  .card { padding: 22px 22px 0; }
  .card-cta { margin-inline: -22px; padding-inline: 22px; }
}

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