/* carlill.com site styles. Colours come only from tokens.css (generated by carlill-design). */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* Semantic layer: the site theme is Moss. Pages refer only to these names. */
:root {
  --bg: var(--cd-site-moss-bg);
  --surface: var(--cd-site-moss-surface);
  --ink: var(--cd-site-moss-ink);
  --muted: var(--cd-site-moss-muted);
  --line: var(--cd-site-moss-line);
  --accent: var(--cd-site-moss-accent);
  --accent-soft: var(--cd-site-moss-accent-soft);
  --accent-ink: var(--cd-site-moss-accent-ink);
  --on-accent: var(--cd-site-moss-on-accent);

  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* Each app page swaps in its own accent family. Add one block per app. */
.app-renskrift {
  --accent: var(--cd-app-renskrift-accent);
  --accent-soft: var(--cd-app-renskrift-soft);
  --accent-ink: var(--cd-app-renskrift-ink);
  --on-accent: var(--cd-app-renskrift-on-accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a, .app-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px;
}
.site-nav a[aria-current="page"], .app-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.app-nav { border-bottom: 1px solid var(--line); }
.app-nav .wrap { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; padding-bottom: 8px; }

/* Type */
h1, h2, h3 { line-height: 1.15; font-weight: 600; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.02em; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--muted); max-width: 620px; }
.muted { color: var(--muted); }

/* Layout blocks */
.section { padding: clamp(56px, 9vw, 112px) 0; display: flex; flex-direction: column; gap: 24px; }
.section + .section { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.hero { display: flex; flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero > * { flex: 1 1 420px; min-width: 0; }

/* Components */
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.button:hover { color: var(--on-accent); filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.card {
  display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.card:hover { border-color: var(--accent); color: var(--ink); }
.card .meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.app-card { flex-direction: row; gap: 20px; align-items: flex-start; }
.app-icon { flex: none; width: 72px; height: 72px; border-radius: 16px; background: var(--accent-soft); }
.app-icon.large { width: 112px; height: 112px; border-radius: 26px; }

.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }

.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--muted); border-radius: var(--radius); color: var(--muted);
  font-family: var(--mono); font-size: 13px; padding: 16px; background: var(--accent-soft);
}
.screenshot { aspect-ratio: 4 / 3; }
.store-badge { width: 168px; height: 56px; border-radius: 10px; background: transparent; text-decoration: none; }

.features { border-top: 1px solid var(--line); padding-top: 32px; }
.features .num { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.summary { padding: 24px 28px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }

/* Long-form documents (privacy, press) */
.doc { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.toc { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; font-size: 15px; }
.toc a { color: var(--ink); text-decoration: none; min-height: 36px; display: flex; align-items: center; border-left: 1px solid var(--line); padding-left: 14px; }
.toc a:hover { border-left-color: var(--accent); }
.prose { flex: 999 1 560px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 40px; }
.prose section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.prose h2 { font-size: 24px; }
.prose ul { margin: 0; padding-left: 1.2em; }

dl.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 24px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer strong { color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--ink); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.site-footer .legal { width: 100%; }

/* Screenshots and galleries */
img.app-icon { display: block; object-fit: cover; }
figure { margin: 0; }
.shot { display: flex; flex-direction: column; gap: 10px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.shot figcaption { font-size: 15px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.gallery.phones { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); max-width: 840px; margin: 0 auto; width: 100%; }
.gallery.phones img { border-radius: 28px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px; }
.split p { color: var(--muted); }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; padding-left: 16px; color: var(--accent); font-size: 22px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; color: var(--muted); }
