/* =========================================================
   Kirkeby Designs — site.css
   Bright, playful, honest. No external fonts, no trackers.
   ========================================================= */

:root {
  --forest: #136d48;
  --forest-deep: #0d4f34;
  --paper: #fffbf3;
  --paper-2: #f6efe1;
  --ink: #15171c;
  --ink-soft: #2b2f38;
  --muted: #5b5f6b;
  --white: #ffffff;

  --lime: #d4ff3a;
  --coral: #ff6b4a;
  --sky: #8fd0ff;
  --grape: #c3aefc;
  --sun: #ffd23f;
  --mint: #7ef0c1;

  --radius: 18px;
  --radius-sm: 10px;
  --border: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 9px 9px 0 var(--ink);

  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(rgba(21,23,28,.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- marker highlight ---------- */
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .42em;
  background: var(--lime); z-index: -1; border-radius: 4px; transform: rotate(-1.2deg);
}
.mark.coral::after { background: var(--coral); opacity: .55; }
.mark.sky::after { background: var(--sky); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,251,243,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; text-decoration: none; }
.brand img { width: 230px; height: auto; transition: transform .25s; }
.brand:hover img { transform: translateY(-1px) scale(1.02); }
.brand small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .68rem; color: var(--muted); letter-spacing: .06em; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; align-items: center; }
.nav a { display: inline-block; padding: .45rem .75rem; white-space: nowrap; border-radius: 999px; text-decoration: none; font-weight: 600; border: 2px solid transparent; }
.nav a:hover { border-color: var(--ink); background: var(--white); }
.nav a[aria-current="page"] { background: var(--forest); color: var(--paper); border-color: var(--ink); }
.nav .btn { margin-left: .35rem; }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 700 1rem/1 var(--font-body);
  padding: .9rem 1.3rem; border: var(--border); border-radius: 999px;
  background: var(--lime); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.btn.ghost { background: var(--white); }
.btn.dark { background: var(--forest); color: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.btn.small { padding: .55rem .95rem; font-size: .92rem; }
.nav .btn.small { padding: .5rem .9rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  background: var(--white); border: var(--border); border-radius: 999px; padding: .5rem .85rem; margin-bottom: 1.4rem;
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,74,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,107,74,0); } }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--ink-soft); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.4rem; font: .85rem var(--font-mono); color: var(--muted); }

/* swap machine */
.swap-machine { position: relative; }
.swap-card {
  background: var(--white); border: var(--border); border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 1.6rem; position: relative;
}
.swap-card .label { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.swap-row { display: flex; align-items: center; gap: .9rem; margin: .4rem 0 1.1rem; }
.chip-big {
  flex: 1; border: var(--border); border-radius: 14px; padding: .9rem 1rem;
  font: 800 1.15rem var(--font-display); text-align: center; transition: opacity .35s, transform .35s;
}
.chip-big.from { background: var(--paper-2); text-decoration: line-through; text-decoration-color: var(--coral); text-decoration-thickness: 3px; }
.chip-big.to { background: var(--lime); }
.swap-arrow { font-size: 1.6rem; font-weight: 800; flex: none; }
.swap-why { min-height: 3.3em; color: var(--ink-soft); margin: 0; transition: opacity .35s; }
.swap-card.flip .chip-big, .swap-card.flip .swap-why { opacity: 0; transform: translateY(6px); }
.swap-dots { display: flex; gap: .4rem; margin-top: 1.1rem; }
.swap-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); cursor: pointer; }
.swap-dots button[aria-pressed="true"] { background: var(--ink); }

.sticker {
  position: absolute; font: 800 .85rem/1.1 var(--font-display); text-align: center;
  border: var(--border); border-radius: 50%; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); z-index: 2;
}
.sticker.s1 { width: 104px; height: 104px; background: var(--sun); top: -42px; right: -18px; transform: rotate(12deg); }
.sticker.s2 { width: 84px; height: 84px; background: var(--grape); bottom: -38px; right: 38px; transform: rotate(-10deg); font-size: .78rem; }

/* ---------- marquee ---------- */
.marquee { background: var(--forest); color: var(--paper); border-block: var(--border); overflow: hidden; padding: .85rem 0; }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: scroll 38s linear infinite; font: 600 .95rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.marquee-track span { display: inline-flex; align-items: center; gap: 2.5rem; white-space: nowrap; }
.marquee-track span::after { content: "✦"; color: var(--lime); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.alt { background: var(--paper-2); border-block: var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section-head p { max-width: 52ch; color: var(--ink-soft); margin: 0; }
.kicker { font: 600 .8rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--forest); display: block; margin-bottom: .6rem; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem; transition: transform .18s, box-shadow .18s; position: relative;
}
a.card { text-decoration: none; display: block; }
.card.lift:hover, a.card:hover { transform: translate(-3px,-3px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); margin: 0; }

.swap-tile .from { font: 600 .82rem var(--font-mono); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--coral); }
.swap-tile .to { font: 800 1.35rem var(--font-display); margin: .2rem 0 .5rem; }
.swap-tile .icon { width: 52px; height: 52px; border: var(--border); border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem; }

.bg-lime { background: var(--lime); } .bg-coral { background: var(--coral); } .bg-sky { background: var(--sky); }
.bg-grape { background: var(--grape); } .bg-sun { background: var(--sun); } .bg-mint { background: var(--mint); }

.tag {
  display: inline-block; font: 600 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .05em;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: .35rem .6rem; background: var(--paper);
}
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag.os { background: var(--mint); } .tag.free { background: var(--sun); } .tag.paid { background: var(--grape); } .tag.self { background: var(--sky); }
.badge-soon { position: absolute; top: 1rem; right: 1rem; font: 700 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; background: var(--sun); border: 1.5px solid var(--ink); padding: .3rem .55rem; border-radius: 999px; transform: rotate(4deg); }

/* principles */
.num { font: 800 1rem var(--font-mono); width: 44px; height: 44px; display: grid; place-items: center; border: var(--border); border-radius: 50%; margin-bottom: 1rem; }

/* CTA band */
.cta-band {
  background: var(--coral); border: var(--border); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center;
}
.cta-band h2 { margin-bottom: .4rem; }
.cta-band p { margin: 0; font-size: 1.1rem; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.page-hero p { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button {
  font: 600 .92rem var(--font-body); padding: .55rem 1rem; border: var(--border); border-radius: 999px; background: var(--white);
  cursor: pointer; transition: transform .12s, background .12s;
}
.filters button:hover { transform: translateY(-2px); }
.filters button[aria-pressed="true"] { background: var(--forest); color: var(--paper); }
.sw-card[hidden] { display: none; }
.sw-card .replaces { font: 600 .8rem var(--font-mono); color: var(--muted); margin-bottom: .3rem; }
.sw-card .replaces s { text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.sw-card .visit { display: inline-flex; margin-top: 1.1rem; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ink); }
.sw-card .visit:hover { border-color: var(--coral); }

/* prose pages */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.note {
  background: var(--white); border: var(--border); border-left: 10px solid var(--lime); border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm);
}

/* contact */
.contact-card { text-align: center; padding: 2.5rem 1.5rem; }
.contact-card .big { font: 800 clamp(1.3rem, 3vw, 2rem) var(--font-display); word-break: break-word; }

/* ---------- footer ---------- */
.site-footer { background: var(--forest-deep); color: #d9dbe1; padding: 3.5rem 0 2rem; margin-top: 4rem; border-top: var(--border); }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.2rem; }
.foot-grid h4 { color: var(--paper); font-size: 1rem; margin-bottom: .9rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer .brand { margin-bottom: 1.2rem; }
.site-footer .brand img { width: 260px; }
.site-footer .brand small { color: #a9d3bd; }
.foot-bottom { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid #2e6b51; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font: .82rem var(--font-mono); color: #a9d3bd; }
.disclose-mini { font-size: .9rem; color: #cfe5d9; max-width: 46ch; }

/* 404 */
.lost { text-align: center; padding: 6rem 0; }
.lost .code { font: 800 clamp(6rem, 20vw, 12rem)/1 var(--font-display); -webkit-text-stroke: 3px var(--ink); color: var(--lime); text-shadow: 8px 8px 0 var(--ink); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .swap-machine { max-width: 520px; margin-top: 1.5rem; }
  .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .nav a { padding: .4rem .55rem; font-size: .95rem; }
  .brand img { width: 190px; }
  .brand small { display: none; }
}
@media (max-width: 760px) {
  .brand img { width: 180px; }
  .brand small { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .4rem; font: 700 .95rem var(--font-body);
    border: var(--border); background: var(--white); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; box-shadow: var(--shadow-sm);
  }
  .nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); border-bottom: var(--border); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.4rem; gap: .3rem; }
  .nav a { display: block; }
  .nav .btn { margin: .4rem 0 0; justify-content: center; }
  .grid.g3, .grid.g4, .grid.g2 { grid-template-columns: 1fr; }
  .sticker.s1 { width: 86px; height: 86px; right: -6px; top: -36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Long-form articles (author resources)
   ========================================================= */
.article-wrap { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.article { max-width: 860px; }
.article .crumb { font: .82rem var(--font-mono); color: var(--muted); margin: 0 0 1.2rem; }
.article .crumb a { color: var(--muted); }
.article h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .2rem 0 .7rem; }
.article h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.6rem 0 .8rem; }
.article h3 { font-size: 1.2rem; margin: 1.6rem 0 .4rem; }
.article .meta { font: .85rem var(--font-mono); color: var(--muted); margin-bottom: 1.4rem; }
.article .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: none; }
.article ol, .article ul { padding-left: 1.3rem; }
.article li { margin: .3rem 0; }
.article .answer {
  background: var(--lime); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem; margin: 1.8rem 0;
}
.article .answer strong:first-child { display: block; font: 700 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.article .answer a { font-weight: 700; }
.article .note { font-size: .95rem; border-left-color: var(--sky); }
.article .tbl { overflow-x: auto; margin: 1.2rem 0 1.6rem; border: var(--border); border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow-sm); }
.article table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 620px; }
.article th, .article td { text-align: left; padding: .7rem .9rem; border-bottom: 1.5px solid #e6e0d2; vertical-align: top; }
.article th { background: var(--forest); color: var(--paper); font: 600 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.article tbody tr:nth-child(even) td { background: #fbf8f1; }
.article tr:last-child td { border-bottom: 0; }
.article .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1.2rem 0 1.6rem; }
.article .card { padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.article .card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.article .card h3 { margin-top: 0; }
.article .card p { font-size: .95rem; margin: .3rem 0 .7rem; }
.article .tag { margin: 0 .25rem .3rem 0; }
.article .tag.free { background: var(--mint); }
.article .cta {
  background: var(--sky); border: var(--border); border-radius: 22px; box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem; margin: 2.4rem 0; font-size: 1.05rem;
}
.article .cta strong { font: 800 1.3rem var(--font-display); }
.article .cta .btn { margin-top: .9rem; background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--coral); }
.article details { background: var(--white); border: var(--border); border-radius: var(--radius-sm); padding: .8rem 1.1rem; margin: .7rem 0; }
.article details[open] { box-shadow: var(--shadow-sm); }
.article summary { cursor: pointer; font-weight: 700; }
.article details p { margin: .7rem 0 .2rem; }
.article .template { background: var(--white); border: 2px dashed var(--ink); border-radius: var(--radius-sm); padding: .4rem 1.4rem 1rem; }
.article .disclose { font-size: .9rem; color: var(--muted); border-top: 2px solid var(--ink); margin-top: 3rem; padding-top: 1.1rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.subnav a { font: 600 .88rem var(--font-body); padding: .45rem .9rem; border: var(--border); border-radius: 999px; background: var(--white); text-decoration: none; }
.subnav a:hover { background: var(--lime); }
.subnav a[aria-current="page"] { background: var(--forest); color: var(--paper); }

/* "Made by us" promo band */
.madeby {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center;
  background: var(--grape); border: var(--border); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
}
.madeby .pill { display: inline-block; font: 700 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; padding: .35rem .7rem; margin-bottom: 1rem; }
.madeby h2 { margin-bottom: .5rem; }
.madeby p { font-size: 1.08rem; }
.madeby .actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.madeby ul.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.madeby ul.feat li { background: var(--white); border: var(--border); border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.madeby ul.feat strong { display: block; font-family: var(--font-display); }
.madeby ul.feat span { font-size: .93rem; color: var(--ink-soft); }
@media (max-width: 980px) { .madeby { grid-template-columns: 1fr; } }
.tag.ours { background: var(--forest); color: var(--paper); border-color: var(--ink); }
