/* Countersink — countersink.superdavelab.com. The SuperDaveLab family's
   paper and type, as on Ebb's and Nexpill's pages, led by the app's clay. */

:root {
  --accent: #a84f2f;        /* the app's clay ink: links and buttons */
  --on-accent: #ffffff;
  --ink: #14232e;
  --muted: #5f6d75;
  --cream: #f5f1ea;
  --card: #fffcf7;
  --line: #e4dccf;
  --clay: #c4613f;          /* the logo's fifth stroke */
  --teal: #1a8783;          /* the logo's teal */
  --lavender: #a09eb9;
  --radius: 22px;
  --paper: #fffdf8;
  --glass: rgba(255, 252, 247, 0.82);
  --glass-line: rgba(20, 52, 75, 0.1);
  --shadow: 0 8px 20px rgba(20, 52, 75, 0.08);
  --band: rgba(255, 252, 247, 0.55);
  --wash-clay: rgba(196, 97, 63, 0.14);
  --wash-teal: rgba(26, 135, 131, 0.14);
  --wash-lavender: rgba(160, 158, 185, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e48d6d;
    --on-accent: #2b120a;
    --ink: #e8eef0;
    --muted: #93a3a9;
    --cream: #11191c;
    --card: #1a2428;
    --line: #2a373c;
    --clay: #e48d6d;
    --teal: #4fb3ad;
    --paper: #152024;
    --glass: rgba(26, 36, 40, 0.82);
    --glass-line: rgba(232, 238, 240, 0.1);
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    --band: rgba(26, 36, 40, 0.55);
    --wash-clay: rgba(228, 141, 109, 0.12);
    --wash-teal: rgba(26, 135, 131, 0.18);
    --wash-lavender: rgba(160, 158, 185, 0.1);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Soft washes of the logo's clay and teal, as on LedgerSprout's, Ebb's and
   Nexpill's pages, over a light-to-cream fade. */
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, var(--wash-clay), transparent 30%),
    radial-gradient(circle at 90% 10%, var(--wash-teal), transparent 32%),
    radial-gradient(circle at 50% 60%, var(--wash-lavender), transparent 45%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
  background-color: var(--cream);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-weight: 560;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* Header */

/* Sticky, like LedgerSprout's: the brand and the menu ride along as
   frosted pills over the page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill {
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 6px 16px 6px 6px; }
.brand img { width: 38px; height: 38px; }
.brand span { font: 600 1.45rem/1 var(--serif); }
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px; }
.site-header nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.93rem; padding: 7px 14px; border-radius: 999px; }
.site-header nav a:hover { background: var(--wash-clay); }
.site-header nav a.nav-cta { background: var(--accent); color: var(--on-accent); }
.site-header nav a.nav-cta:hover { filter: brightness(1.12); }

/* Jumping to a section shouldn't tuck its heading under the sticky bar. */
section[id], main[id] { scroll-margin-top: 90px; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 64px;
}
/* The logo and name, large, above the eyebrow: the lockup LedgerSprout's and
   GridDock's pages open with. The logo is a round badge, so its shadow
   follows the circle. */
.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 0.9rem;
}
.hero-mark {
  width: clamp(110px, 14vw, 165px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(20, 52, 75, 0.22));
}
.hero-name {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; color: var(--muted); font-size: 0.95rem; }
.hero-points li::before { content: "●"; color: var(--clay); margin-right: 8px; font-size: 0.7em; vertical-align: 2px; }
.hero-shot { justify-self: center; width: min(340px, 100%); filter: drop-shadow(0 24px 40px rgba(20, 52, 75, 0.18)); }
.hero-shot img { border-radius: 34px; border: 1px solid var(--line); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
  border: 2px solid var(--accent);
}
.btn:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn small { font-weight: 500; opacity: 0.8; }

/* Sections */

section { padding: 64px 0; }
section.alt { background: var(--band); border-block: 1px solid var(--line); }
.section-lede { color: var(--muted); max-width: 40em; margin: 0 0 36px; font-size: 1.08rem; }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.shots figure { margin: 0; }
.shots img { border-radius: 24px; border: 1px solid var(--line); }
.shots figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
section.alt .card { background: var(--cream); }
.card p { margin: 0; color: var(--muted); }
.card h3 { margin-bottom: 0.4em; }
.card .mark { display: block; width: 34px; height: 6px; border-radius: 3px; background: var(--clay); margin-bottom: 18px; }
.card:nth-child(3n + 2) .mark { background: var(--teal); }
.card:nth-child(3n + 3) .mark { background: var(--lavender); }

/* Download */

.download { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.release {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.badge {
  display: inline-block;
  background: var(--clay);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.release dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 22px 0 0; font-size: 0.92rem; }
.release dt { color: var(--muted); }
.release dd { margin: 0; }
.release code { font-size: 0.78rem; word-break: break-all; }
.steps { margin: 0; padding-left: 1.3em; }
.steps li { margin-bottom: 10px; }
.note { color: var(--muted); font-size: 0.95rem; }

/* Why Countersink exists */

section.story { padding: 0 0 56px; }
.story-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--clay);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 52em;
}
.story-card p { margin: 0 0 12px; }
.story-card p:last-child { margin-bottom: 0; }

/* FAQ: question and answer pairs, two columns on wide screens. */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 44px; }
.faq h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.faq p { margin: 0; color: var(--muted); }

/* LedgerSprout: SuperDaveLab's paid app, and what keeps Countersink free */

.promo {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 40px;
  box-shadow: var(--shadow);
}
.promo .eyebrow { color: #196741; }
.promo-title { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.promo-title img { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 6px; }
.promo-title h2 { margin: 0; }
.promo .section-lede { margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; color: var(--muted); }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: #196741; font-weight: 700; }
.price-line { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; }
.price-line span {
  font-weight: 650;
  font-size: 0.92rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(25, 103, 65, 0.1);
  color: #196741;
}
.promo .hero-cta { margin: 18px 0 10px; }
.promo-shot img {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(17, 32, 49, 0.16);
}
@media (prefers-color-scheme: dark) {
  .promo .eyebrow, .ticks li::before { color: #4ade80; }
  .price-line span { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
}

/* Footer */

.site-footer { padding: 40px 0 56px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.site-footer a { color: var(--muted); }

/* Narrow screens */

@media (max-width: 900px) {
  .hero, .download, .promo { grid-template-columns: 1fr; }
  /* The logo and name lead on phones too; the screenshot follows. */
  .hero-shot { width: min(280px, 80%); }
  .grid, .grid.four { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  /* One slim row on phones, like LedgerSprout's: just the menu. */
  .site-header .wrap { justify-content: center; }
  .brand { display: none; }
  .site-header nav { gap: 0; flex-wrap: nowrap; justify-content: center; padding: 4px; }
  .site-header nav a { padding: 6px 6px; font-size: 0.76rem; white-space: nowrap; }
  /* Six links don't fit a phone's width; LedgerSprout is still linked below. */
  .site-header nav a.nav-wide { display: none; }
  .grid, .grid.four { grid-template-columns: 1fr; }
  .promo { padding: 26px; }
  .story-card { padding: 22px; }
  section { padding: 48px 0; }
}

/* Feedback form */

.feedback { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.feedback-form {
  position: relative;
  display: grid;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.feedback-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.feedback-form label small { font-size: inherit; font-weight: 400; color: var(--muted); }
.feedback-form input,
.feedback-form textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}
.feedback-form textarea { resize: vertical; min-height: 140px; }
.feedback-form input:focus,
.feedback-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.feedback-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feedback-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-form button { justify-self: start; font: inherit; font-weight: 650; cursor: pointer; }
.feedback-form button[disabled] { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; min-height: 1.4em; font-size: 0.95rem; color: var(--muted); }
.form-status[data-kind="ok"] { color: var(--teal); font-weight: 600; }
.form-status[data-kind="error"] { color: var(--accent); font-weight: 600; }

@media (max-width: 900px) {
  .feedback { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .feedback-form { padding: 20px; }
  .feedback-form .row { grid-template-columns: 1fr; }
}
