/* fikka.dev. Denim and stitching: fikka is a pocket. The stitching is reserved for the things that hold
   your data (the pocket in the hero); everything else is plain. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/schibsted-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/schibsted-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #f2f4f7;
  --ink: #171c2b;
  --dim: #4f5870;
  --faint: #7a8296;
  --denim: #24325c;
  --denim-deep: #1b2647;
  --faded: #c7d0e2;
  --stitch: #e3ae3a;
  --card: #fbfcfd;
  --line: #d9dfea;
  --link: #2c47a8;
  --focus: #2c47a8;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131a2c;
    --ink: #e8ebf2;
    --dim: #aab3c7;
    --faint: #7f899f;
    --denim: #2e3e70;
    --denim-deep: #26345f;
    --faded: #3a4876;
    --card: #1c2439;
    --line: #2b3550;
    --link: #a9bcff;
    --focus: #f0c35a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--font);
  font-kerning: normal;
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 750; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--card); color: var(--ink); z-index: 1; }
.skip:focus { left: 8px; }

/* header and footer */
.top, .foot, main > section, .prose-wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.wordmark { color: var(--ink); font-weight: 850; font-size: 26px; letter-spacing: -.04em; text-decoration: none; }
.wordmark .logo { display: block; height: 32px; width: auto; }
.logo-ink { fill: var(--denim); }
.logo-dot { fill: var(--stitch); }
@media (prefers-color-scheme: dark) { .logo-ink { fill: var(--ink); } }
.wordmark.small { font-size: inherit; letter-spacing: -.02em; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 16px; }
.topnav a { color: var(--dim); text-decoration: none; font-weight: 550; }
.topnav a:hover, .topnav a[aria-current] { color: var(--ink); }
.topnav .signin { color: var(--ink); padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 999px; }
.topnav .signin:hover { background: var(--ink); color: var(--paper); }

.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 28px;
  margin-top: 96px; padding-block: 28px 40px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--dim);
}
.foot p { margin: 0; }
.foot nav { display: flex; gap: 20px; }
.foot nav a { color: var(--dim); }

/* buttons */
.button {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--denim); color: #fff; font-weight: 650; font-size: 17px; text-decoration: none;
}
.button:hover { background: var(--denim-deep); }
.button.quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.button.quiet:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 88px);
  align-items: center; padding-block: clamp(32px, 7vw, 96px) clamp(56px, 8vw, 112px);
}
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 820; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
.lede { margin: 28px 0 32px; max-width: 34em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--dim); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* the pocket */
.pocket {
  --r: 34px;
  position: relative; margin: 0; padding: 30px 26px 34px;
  border-radius: 6px 6px var(--r) var(--r);
  background-color: var(--denim);
  /* twill: the diagonal weave of denim, barely there */
  background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .035) 0 2px, transparent 2px 5px);
  color: #fff;
}
.pocket::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  border: 2px dashed var(--stitch); border-radius: 3px 3px calc(var(--r) - 9px) calc(var(--r) - 9px);
}
.pocket figcaption { position: relative; margin-top: 18px; font-size: 15px; line-height: 1.45; color: #dfe5f3; }

.app {
  position: relative; padding: 16px 18px 18px; border-radius: 14px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 1px 0 rgb(0 0 0 / .08), 0 10px 24px -12px rgb(8 14 34 / .55);
}
.app-bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.app-name { font-weight: 750; font-size: 20px; letter-spacing: -.01em; }
.app-build { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.items, .bin-items { list-style: none; margin: 0; padding: 0; }
.items li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; border-bottom: 1px solid var(--line); font-size: 17px;
}
.items li:last-child { border-bottom: 0; }
.items-empty { margin: 14px 0 4px; color: var(--faint); font-size: 16px; }

:where(.pocket) button {
  font: inherit; cursor: pointer; border: 0; background: none; color: inherit;
  border-radius: 999px; min-height: 32px;
}
.del { padding: 4px 10px; font-size: 14px; color: var(--faint); }
.del:hover { color: var(--ink); background: var(--line); }
.ship {
  display: block; width: 100%; margin-top: 14px; padding: 9px 14px;
  font-size: 15px; font-weight: 650;
  box-shadow: inset 0 0 0 1.5px var(--line); color: var(--dim);
}
.ship:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.ship:disabled { opacity: .45; cursor: default; }

.bin {
  position: relative; margin-top: 14px; padding: 12px 16px 10px; border-radius: 12px;
  background: rgb(255 255 255 / .09); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14);
}
.bin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-weight: 700; font-size: 16px; }
.bin-items li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 6px 0; border-top: 1px solid rgb(255 255 255 / .12); font-size: 15.5px; }
.bin-items small { grid-column: 1; grid-row: 2; color: #b9c3dc; font-size: 13px; }
.bin-items .restore { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.restore, .restore-all {
  padding: 4px 12px; font-size: 14px; font-weight: 650;
  background: var(--stitch); color: #1d1606;
}
.restore:hover, .restore-all:hover { background: #f0c35a; }

@keyframes leave { to { opacity: 0; transform: translateY(14px); } }
@keyframes back { from { background: rgb(227 174 58 / .35); } }
.items li.leaving { animation: leave .26s ease-in forwards; }
.items li.back { animation: back 1.2s ease-out; }

/* steps: an actual sequence, so numbered */
.steps h2, .promises h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 32px; }
.steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 12px;
  font-size: 44px; font-weight: 820; line-height: 1; color: var(--denim); letter-spacing: -.03em;
}
@media (prefers-color-scheme: dark) { .steps li::before { color: var(--stitch); } }
.steps h3 { font-size: 21px; margin-bottom: 8px; }
.steps p { color: var(--dim); font-size: 17px; margin: 0; }

.promises { margin-top: clamp(72px, 9vw, 128px); }
.promises dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.promises dl > div { padding: 22px 0 26px; border-top: 1.5px solid var(--ink); }
.promises dt { font-weight: 750; font-size: 21px; letter-spacing: -.01em; margin-bottom: 8px; }
.promises dd { margin: 0; color: var(--dim); max-width: 34em; }

.status { margin-top: clamp(56px, 7vw, 96px); }
.status p { max-width: 40em; margin: 0; font-size: 19px; color: var(--dim); }
.status strong { color: var(--ink); }

/* docs, blog and pages */
.prose-wrap { padding-top: clamp(24px, 5vw, 56px); }
.prose-wrap.with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.docnav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.docnav a { padding: 5px 10px; border-radius: 8px; color: var(--dim); text-decoration: none; }
.docnav a:hover { color: var(--ink); background: var(--line); }
.docnav a[aria-current] { color: var(--ink); font-weight: 650; background: var(--line); }
.prose { max-width: var(--measure); }
.prose h1 { font-size: clamp(34px, 4.4vw, 50px); letter-spacing: -.03em; margin-bottom: 24px; }
.prose h2 { font-size: 28px; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 21px; margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose code { font-family: var(--mono); font-size: .86em; padding: .1em .3em; border-radius: 4px; background: var(--line); }
.prose pre { overflow-x: auto; padding: 16px 18px; border-radius: 10px; background: var(--denim-deep); color: #e8ecf6; font-size: 15px; line-height: 1.5; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose blockquote { margin: 0 0 1em; padding-left: 18px; border-left: 3px solid var(--stitch); color: var(--dim); }
.prose table { border-collapse: collapse; margin-bottom: 1em; font-size: 16px; }
.prose th, .prose td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.meta { color: var(--faint); font-size: 16px; margin-top: -12px; }
.index { list-style: none; margin: 32px 0 0; padding: 0; max-width: var(--measure); }
.index li { padding: 18px 0; border-top: 1px solid var(--line); }
.index a { font-size: 21px; font-weight: 700; color: var(--ink); text-decoration: none; }
.index a:hover { text-decoration: underline; }
.index time { display: block; color: var(--faint); font-size: 15px; }
.index p { margin: 6px 0 0; color: var(--dim); }
.empty { color: var(--faint); margin-top: 24px; }
.draft { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--stitch); color: #1d1606; font-size: 14px; font-weight: 650; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .pocket { max-width: 460px; }
  .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose-wrap.with-side { grid-template-columns: 1fr; gap: 24px; }
  .docnav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .steps ol, .promises dl { grid-template-columns: 1fr; }
  .pocket { padding: 26px 20px 30px; }
  .top { padding-block: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
