/* hagedornworks.se — shared stylesheet.
   Deliberately dependency-free: system fonts only, no external requests
   (no Google Fonts, no analytics) so the privacy policy's "no third-party
   tracking" statement is also true of this website. */

:root {
  --bg: #ffffff;
  --fg: #14171c;
  --muted: #5b6472;
  --accent: #2563eb;
  --border: #e3e6eb;
  --card: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1217;
    --fg: #e8ebf0;
    --muted: #9aa3b0;
    --accent: #6ea0ff;
    --border: #262c36;
    --card: #171c24;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/chakra-petch-600.woff2") format("woff2");
}

/* GRID9 wordmark, same as in the app: Chakra Petch 600, wide tracking, blue 9 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--fg);
  text-decoration: none;
}
.brand .wm {
  font-family: "Chakra Petch", "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.13em;
  line-height: 1;
}
.brand .wm b { color: var(--accent); font-weight: 600; }
.brand .brand-sub { color: var(--muted); font-size: 0.95rem; font-weight: 500; letter-spacing: 0.02em; }

nav.site a {
  margin-right: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav.site a:last-child { margin-right: 0; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--accent); }

main { padding: 2rem 0 3rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.25rem; }
h2 { font-size: 1.25rem; margin: 2.2rem 0 0.4rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.3rem; }

p, ul, ol { margin: 0.6rem 0; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.25rem 0; }

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

.meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.5rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.2rem 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.97rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 600; font-size: 0.88rem; }

footer.site {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site a { color: var(--muted); }

/* ---------------------------------------------------------------- marketing
   Used by body.marketing pages (landing, how it works, features). The legal
   pages keep the narrow reading column above. */

body.marketing .wrap { max-width: 62rem; }

body.marketing main { padding-top: 2.5rem; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }

.fine { color: var(--muted); font-size: 0.88rem; }

em { font-style: italic; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.btn.disabled {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: default;
}

/* hero */
.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero h1 { font-size: 2.1rem; line-height: 1.15; margin-bottom: 1rem; }
.hero h1 em { color: var(--accent); font-style: normal; }

/* generic card grid */
.grid3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1rem 0 2rem;
}

.grid3 .card { margin: 0; }
.grid3 .card h3 { margin-top: 0; }

/* text + picture rows */
.split, .step {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin: 3rem 0;
}

.step {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.step-n {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step h2, .split h2 { margin-top: 0.2rem; }

.note {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.example {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
}

.example span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 0.4rem;
}

/* screenshots and loops: phone proportions, never wider than their column */
figure.shot { margin: 0; text-align: center; }

figure.shot img,
figure.shot video {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 24rem;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

figure.shot figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }

/* visible placeholder until the real media exists */
figure.shot.ph .ph-inner {
  margin: 0 auto;
  width: 100%;
  max-width: 18rem;
  aspect-ratio: 9 / 19.5;
  max-height: 32rem;
  border-radius: 22px;
  border: 2px dashed var(--border);
  background: var(--card);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  text-align: center;
}

figure.shot.ph .ph-inner span { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
figure.shot.ph .ph-inner b { color: var(--fg); font-size: 1rem; }
figure.shot.ph .ph-inner small { font-size: 0.82rem; }

/* comparison table */
table.compare td { text-align: center; width: 6.5rem; font-size: 1.1rem; }
table.compare thead th:not(:first-child) { text-align: center; }
table.compare tbody th { color: var(--fg); font-weight: 500; font-size: 0.97rem; }

/* closing call-to-action */
.cta {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.25rem;
  margin: 3rem 0 1rem;
}

.cta h2 { margin-top: 0; }
.cta p { margin-left: auto; margin-right: auto; max-width: 36rem; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
  .hero h1 { font-size: 2.7rem; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .split, .step { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .step:nth-of-type(even) .step-text { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  figure.shot video { animation: none; }
}

/* ---------------------------------------------------------------- learn / guides */
.pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.hero-media { margin: 1.5rem 0 1rem; }

/* a step without a picture stays in a readable column */
.step.solo { grid-template-columns: 1fr; }
.step.solo .step-text { max-width: 42rem; }

.guides .guide {
  display: block;
  text-decoration: none;
  color: var(--fg);
}
.guides .guide:hover { border-color: var(--accent); }
.guides .guide h3 { margin-top: 0.2rem; }
.guides .guide .step-n { margin-bottom: 0.2rem; }

.learn-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin: 3rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* little candidate-cell illustrations (always dark, like the app) */
.cellrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
}
.cellfig { display: inline-flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
.cellfig small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.cellrow .arrow, .ladder .arrow { color: var(--muted); }

.tcell {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 5.6rem;
  height: 5.6rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: #11151c;
  border: 1px solid #2a313c;
}
.tcell.snyder { background: #2a2113; border-color: #b7791f; }
.tcell i { font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; }
.tcell i.snyder { color: #fbbf24; }
.tcell i.auto { color: #9aa3b0; }

/* the hint ladder as a row of rungs */
.ladder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.9rem 0;
}
.rung {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--card);
}
.rung.on { border-color: var(--accent); color: var(--accent); }
.rung.apply { background: var(--accent); border-color: var(--accent); color: #fff; }

/* the solving loop */
ol.flow {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  counter-reset: flow;
}
ol.flow li {
  margin: 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
ol.flow li:not(:last-child)::after { content: "\2192"; margin-left: 0.55rem; color: var(--muted); }
ol.flow li:last-child { border-color: var(--accent); color: var(--accent); }

@media (min-width: 760px) {
  .hero-media figure.shot video { max-width: 16rem; }
}

/* close-ups inside the step text, and click-to-enlarge links */
a.zoom { display: block; cursor: zoom-in; }
figure.detail { margin: 1.1rem 0; }
figure.detail img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
figure.detail figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.zoomhint { opacity: 0.8; }
@media (min-width: 900px) {
  figure.shot img, figure.shot video { max-width: 26rem; }
  .hero-media figure.shot video { max-width: 16rem; }
}


/* ---------------------------------------------------------------- DRAFT landing */
body.marketing main:has(.dhero) { padding-top: 0; }
.dwrap { max-width: 62rem; }
.dcenter { text-align: center; }
.dsec { padding: 3.5rem 0; }
.dsec h2 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 0.8rem; }
.dlead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.dlead.dcenter { margin: 0 auto 2rem; }
.dkicker { font-family: "Chakra Petch", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin: 0 0 0.8rem; }

/* hero: always dark, like the app */
.dhero {
  background: radial-gradient(60rem 28rem at 50% 105%, rgba(37, 99, 235, 0.35), transparent 70%), #0b0f14;
  color: #e8ebf0;
  text-align: center;
  padding: 4rem 0 0;
  overflow: hidden;
}
.dhero h1 { font-size: 2.3rem; line-height: 1.12; margin: 0 0 1.1rem; letter-spacing: -0.01em; }
.dhero h1 em { color: #6ea0ff; font-style: normal; }
.dhero h1 br { display: none; }
.dhero .dkicker { color: #6ea0ff; }
.dhero .dlead { color: #aab3c0; margin: 0 auto 1.6rem; }
.dhero .btn.disabled { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #e8ebf0; }
.dfine { color: #8791a0; font-size: 0.88rem; margin: 0.9rem 0 0; }
.dsec .dfine, .dfinal .dfine { color: var(--muted); }
.dhero-media { margin-top: 2.5rem; }
.dhero-media figure.shot video {
  max-width: 17rem;
  border-radius: 28px 28px 0 0;
  border-bottom: 0;
  box-shadow: 0 0 80px rgba(37, 99, 235, 0.35);
}

.dcards .card { background: var(--card); border: 0; border-radius: 18px; padding: 1.4rem; }

/* tabs */
.dpills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 2rem; }
.dpills button {
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  padding: 0.5rem 1.05rem; border-radius: 999px;
  background: var(--card); color: var(--fg); border: 1px solid var(--border);
}
.dpills button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.dpanel { display: grid; gap: 1.5rem; align-items: center; justify-items: center; margin-bottom: 2.5rem; }
.dpanel[hidden] { display: none; }
.dpanel-text h3 { font-size: 1.45rem; margin: 0 0 0.5rem; }
.dpanel-text p { color: var(--muted); margin: 0; }
.dphone { display: block; width: 100%; max-width: 22rem; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18); }
html:not(.js) .dpanel[data-later] { display: grid; }

.dpair { display: grid; gap: 1.5rem; justify-items: center; }
.dpair img { display: block; width: 100%; max-width: 19rem; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14); }
.dpair figure { margin: 0; text-align: center; }
.dpair figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.6rem; }

.dguides { display: grid; gap: 0.9rem; }
.dguide { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.1rem 1.2rem; border-radius: 16px; background: var(--card); color: var(--fg); text-decoration: none; }
.dguide:hover { outline: 2px solid var(--accent); }
.dguide span:last-child { color: var(--muted); font-size: 0.93rem; }

.dstory { max-width: 38rem; margin: 0 auto; text-align: center; padding: 2rem 1.5rem; border-radius: 20px; background: var(--card); }
.dfinal { text-align: center; padding-bottom: 5rem; }

@media (min-width: 760px) {
  .dhero { padding-top: 5.5rem; }
  .dhero h1 { font-size: 3.4rem; }
  .dhero h1 br { display: inline; }
  .dpanel { grid-template-columns: 1fr 1fr; gap: 3rem; justify-items: stretch; }
  .dpanel .zoom { justify-self: center; }
  .dpair { grid-template-columns: 1fr 1fr; }
  .dguides { grid-template-columns: repeat(3, 1fr); }
}

/* page-title band on the marketing sub-pages (same look as the landing hero) */
.dband { padding: 3rem 0 3rem; }
.dband.has-media { padding-bottom: 0; }
.dband h1 { font-size: 2.1rem; margin-bottom: 0.9rem; }
.dband .dlead { margin-bottom: 0; }
.dband.has-media .dlead { margin-bottom: 1.6rem; }
.dband .dhero-media { margin-top: 1.8rem; }
.dafter { padding-top: 2.5rem; }
@media (min-width: 760px) {
  .dband h1 { font-size: 2.8rem; }
}

/* story page */
.story { max-width: 40rem; margin: 0 auto; }
.story h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
.story h2:first-child { margin-top: 0; }
.story p { font-size: 1.05rem; line-height: 1.7; }
.story .signoff { font-weight: 600; margin-top: 1.5rem; }
.story .hook { font-size: 1.25rem; line-height: 1.6; font-weight: 500; }

/* site root: company page */
.brand.plain { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; }
.dapp {
  display: grid; gap: 1.5rem; align-items: center;
  padding: 1.75rem 1.5rem 0; overflow: hidden;
  border-radius: 24px; text-decoration: none; color: #e8ebf0;
  background: radial-gradient(40rem 22rem at 80% 100%, rgba(37, 99, 235, 0.35), transparent 70%), #0b0f14;
}
.dapp:hover { outline: 2px solid var(--accent); }
.dapp-text { padding-bottom: 1.5rem; }
.dapp .dwm { color: #e8ebf0; font-family: "Chakra Petch", system-ui, sans-serif; font-weight: 600; font-size: 1.6rem; letter-spacing: 0.13em; margin: 0 0 0.8rem; line-height: 1; }
.dapp .dwm b { color: #6ea0ff; font-weight: 600; }
.dapp h2 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 0.8rem; color: #fff; }
.dapp h2 em { color: #6ea0ff; font-style: normal; }
.dapp p { color: #aab3c0; margin: 0 0 1rem; }
.dapp p.dwm { color: #e8ebf0; }
.dapp .btn { color: #fff; }
.dapp .dfine { color: #8791a0; }
.dapp-img { display: block; width: 100%; max-width: 20rem; justify-self: center; height: auto; border-radius: 22px 22px 0 0; border: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 0; }
@media (min-width: 760px) {
  .dapp { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; padding: 2.5rem 3rem 0; }
  .dapp h2 { font-size: 2rem; }
}
