/* Fidget Digit Studios L.L.C. — site styles */

/* Archivo, self-hosted. Variable font: the wdth axis is used throughout this
   sheet (wdth 100-118), so the static weights would not substitute. Italic is
   not downloaded because nothing on the site uses it. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-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: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-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;

  --paper:      #ffffff;
  --paper-alt:  #f6f6f9;
  --ink:        #14142b;
  --ink-soft:   #55556e;
  --rule:       #e2e2ea;

  --pink:   #f0407a;
  --amber:  #f5a623;
  --teal:   #12a594;
  --blue:   #3d5afe;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-variation-settings: 'wdth' 100, 'wght' 400;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: var(--measure); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-variation-settings: 'wdth' 118, 'wght' 720;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; font-variation-settings: 'wdth' 110, 'wght' 700; line-height: 1.3; }

p { margin: 0 0 1.1em; }

.lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
}

.small { font-size: 0.9rem; color: var(--ink-soft); }

/* On a variable font, font-variation-settings on body outranks the browser's
   default font-weight:bold, so <b> and <strong> render at body weight unless the
   axis is set here too. */
b, strong { font-variation-settings: 'wdth' 100, 'wght' 700; font-weight: 700; }
.credit { margin-top: 1.5rem; }

/* ---------- Header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-variation-settings: 'wdth' 118, 'wght' 750;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark .dots { display: inline-flex; gap: 3px; }
.mark .dots i {
  width: 9px; height: 9px; border-radius: 50%;
  display: block;
}
.mark .dots i:nth-child(1) { background: var(--pink); }
.mark .dots i:nth-child(2) { background: var(--amber); }
.mark .dots i:nth-child(3) { background: var(--teal); }

.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-variation-settings: 'wdth' 100, 'wght' 550;
  padding-block: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: var(--ink); color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 340px; }
}

.hero h1 { margin-bottom: 0.35em; }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-variation-settings: 'wdth' 100, 'wght' 620;
  font-size: 0.97rem;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Sections ---------- */

.band { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--rule); }
.band.tint { background: var(--paper-alt); }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: 2.5rem;
}

.col { border-top: 5px solid var(--ink); padding-top: 1rem; }
.col:nth-child(1) { border-top-color: var(--pink); }
.col:nth-child(2) { border-top-color: var(--amber); }
.col:nth-child(3) { border-top-color: var(--teal); }
.col p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Feature / product ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.ticks { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.ticks li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.75rem;
  align-items: start;
}
.ticks li::before {
  content: '';
  width: 13px; height: 13px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  margin-top: 0.42em;
}
.ticks li:nth-child(4n+1)::before { background: var(--pink); }
.ticks li:nth-child(4n+2)::before { background: var(--amber); }
.ticks li:nth-child(4n+3)::before { background: var(--teal); }
.ticks li:nth-child(4n+4)::before { background: var(--blue); }

.status {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 0.3rem 0.7rem;
  font-size: 0.87rem;
  font-variation-settings: 'wdth' 100, 'wght' 620;
  margin-bottom: 1.2rem;
}

/* ---------- Products ---------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem); }

.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  /* More room between rows than columns, so a card's button stands clear of the next card. */
  gap: 3.5rem clamp(1.75rem, 4vw, 3rem);
}
/* Three products: one row once there is room, so none sits alone. */
@media (min-width: 900px) { .products { grid-template-columns: repeat(3, 1fr); } }

.product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 5px solid var(--ink);
  padding-top: 1.5rem;
}
.product:nth-child(1) { border-top-color: var(--pink); }
.product:nth-child(2) { border-top-color: var(--teal); }
.product:nth-child(3) { border-top-color: var(--amber); }

/* Icon beside the name and its one-line description. */
.product-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.product-head h2, .product-head h3 { margin: 0; }
.product-head .kind { margin: 0.2em 0 0; line-height: 1.35; }

.product h2 { font-size: 1.6rem; }
.product .kind { color: var(--ink-soft); font-variation-settings: 'wdth' 100, 'wght' 550; }
.product p:not(.kind):not(.small) { color: var(--ink-soft); }
/* The button sits on the same line in every card, however long the description. */
.product .btn { margin-top: auto; }

.product-icon { width: 56px; height: 56px; border-radius: 13px; flex: none; display: block; }
.product-icon.placeholder { border: 2px dashed var(--rule); }
.product.upcoming .status { border-style: dashed; }

/* ---------- Contact ---------- */

.facts { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.facts li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.facts b { font-variation-settings: 'wdth' 100, 'wght' 650; min-width: 9rem; }

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(2.5rem, 6vw, 4rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.4rem; }
.legal h3 { margin-top: 1.8rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.5em; }

mark.fill {
  background: #ffe9b8;
  border-bottom: 2px solid var(--amber);
  padding: 0 0.2em;
  color: var(--ink);
}

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: baseline; }
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ---------- Hero artwork ---------- */

.hero-art .fillshape { opacity: 0; animation: ink-in 0.6s ease-out forwards; }
.hero-art .fillshape:nth-of-type(1) { animation-delay: 0.15s; }
.hero-art .fillshape:nth-of-type(2) { animation-delay: 0.35s; }
.hero-art .fillshape:nth-of-type(3) { animation-delay: 0.55s; }

@keyframes ink-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-art svg { transform-box: fill-box; }
.hero-art .fillshape { transform-origin: center; transform-box: fill-box; }

@media (prefers-reduced-motion: reduce) {
  .hero-art .fillshape { opacity: 1; animation: none; }
  * { transition: none !important; }
}

/* ---------- Skip link ---------- */

/* Keyboard users land on the header nav on every page; this lets them jump the
   repeated nav straight to the content. Off-screen until focused. */
.skip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateY(-130%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  font-variation-settings: 'wdth' 100, 'wght' 620;
}
.skip:focus { transform: translateY(0); }

/* ---------- Print ---------- */

/* The privacy policy and terms are the pages people actually print. Drop the
   furniture, keep the words, and spell out link targets that paper cannot follow. */
@media print {
  .site-head,
  .site-foot,
  .skip,
  .actions,
  .hero-art { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.5;
  }

  .band,
  .legal,
  .hero { padding-block: 0.6rem; border-top: 0; }

  .band.tint { background: none; }

  a { color: #000; text-decoration: underline; }
  .legal a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }

  /* Review highlights are a working tool, not something to put on paper. */
  mark.fill { background: none; color: #000; border-bottom: 1px solid #999; }

  h1, h2, h3 { break-after: avoid; }
  li, p { break-inside: avoid; }
}
