/* Doodle Lab website. Follows the Doodle Lab logo kit: cream paper with an ink dot pattern,
   chunky ink outlines, hard offset shadows, Luckiest Guy for display and Fredoka for text. */

@font-face {
  font-family: "Luckiest Guy";
  src: url("fonts/luckiest-guy-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700; /* variable font */
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #ff5a5a;
  --yellow: #ffd400;
  --blue: #4aa3ff;
  --green: #3ccf6e;
  --orange: #ff8f1f;
  --purple: #b36bff;
  --ink: #1a1a1a;
  --cream: #fff7e0;

  --page: var(--cream);
  --dots: var(--ink);
  --card: #ffffff;
  --text: var(--ink);
  --line: var(--ink);
  --glass: #ffffff;
  --muted: #3d3d3d;
  --tag-shadow: var(--ink);

  --display: "Luckiest Guy", "Fredoka", system-ui, sans-serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

/* Dark: per the kit's "on dark" board, ink becomes white and shadows become white. */
@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--ink);
    --dots: #4a4a4a;
    --card: #2c2c2c;
    --text: #ffffff;
    --line: #ffffff;
    --glass: #2c2c2c;
    --muted: #d6d6d6;
    --tag-shadow: var(--blue);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--page);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px);
  background-size: 8px 8px;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--card); color: var(--text);
  border: 3px solid var(--line); padding: 8px 14px; font-weight: 700;
}
.skip:focus { top: 12px; }

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

/* ---------- Shared chunky pieces ---------- */

.box {
  background: var(--card);
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--line);
}

.mark { overflow: visible; }
.mark .o { stroke: var(--line); stroke-linejoin: round; }
.mark .glass { fill: var(--glass); }
.mark .bubble { fill: var(--glass); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 2.75rem);
  letter-spacing: 1px;
}
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

.site-header { padding-top: 16px; }
.bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 1px;
  line-height: 1;
  padding-top: 3px;
}
.brand svg { width: 34px; height: 34px; margin-top: -3px; }
.bar nav { margin-left: auto; }
.nav {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}
.nav a {
  display: block;
  padding: 6px 12px;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid transparent;
}
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--line);
}

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

.hero {
  text-align: center;
  padding: 40px 0 24px;
}
.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lockup .mark { width: 132px; height: 132px; }

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  margin: 0;
  font-size: clamp(3.6rem, 19vw, 7rem);
  line-height: 0.9;
  letter-spacing: 2px;
  -webkit-text-stroke: 3px var(--line);
  text-shadow: 6px 6px 0 var(--line);
}
.wordmark .row { display: flex; justify-content: center; }
.wordmark .row + .row { padding-left: 0.55em; }
.wordmark span span { display: inline-block; }
.c-red { color: var(--red); }
.c-yellow { color: var(--yellow); }
.c-blue { color: var(--blue); }
.c-green { color: var(--green); }
.c-orange { color: var(--orange); }
.c-purple { color: var(--purple); }

.tag {
  display: inline-block;
  margin: 28px 0 0;
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--tag-shadow);
  padding: 8px 20px;
  transform: rotate(-2deg);
}

.lede {
  max-width: 34em;
  margin: 28px auto 0;
  font-size: 1.15rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}
.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #ffffff;
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--blue);
  padding: 10px 18px;
  text-align: left;
  line-height: 1.15;
}
.store-soon svg { width: 28px; height: 28px; flex: none; }
.store-soon small { display: block; font-size: 0.8rem; font-weight: 500; opacity: 0.9; }
.store-soon strong { font-size: 1.15rem; }

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.platforms li {
  background: var(--card);
  border: 3px solid var(--line);
  padding: 4px 12px;
  font-weight: 700;
}

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

.section { padding: 40px 0; }
.section-head { text-align: center; margin-bottom: 24px; }
.section-head p { max-width: 36em; margin: 0 auto; }

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature {
  position: relative;
  padding: 18px 18px 16px 76px;
  min-height: 92px;
}
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); }
.chip {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1;
  padding-top: 4px;
}
.bg-red { background: var(--red); }
.bg-yellow { background: var(--yellow); }
.bg-blue { background: var(--blue); }
.bg-green { background: var(--green); }
.bg-orange { background: var(--orange); }
.bg-purple { background: var(--purple); }

/* Promise tiles: ink text on palette colours (all at least 5:1 contrast). */
.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.promises li {
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--line);
  color: var(--ink);
  padding: 16px 12px;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.1rem, 4.4vw, 1.5rem);
  letter-spacing: 0.5px;
  line-height: 1.1;
  display: grid;
  place-items: center;
  min-height: 92px;
}
.promises li:nth-child(odd) { transform: rotate(-1.5deg); }
.promises li:nth-child(even) { transform: rotate(1.5deg); }
.promises-note { text-align: center; margin: 24px auto 0; max-width: 34em; }

/* ---------- Screenshots ---------- */

.shots {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.shot { margin: 0; }
.shot figcaption { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.window { padding: 0; overflow: hidden; }
.window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 3px solid var(--line);
  background: var(--card);
}
.window-bar::before {
  content: "";
  width: 14px; height: 14px;
  border: 3px solid var(--line);
  flex: none;
}
.window-bar span {
  flex: 1;
  height: 3px;
  background: var(--line);
}
.window img { width: 100%; height: auto; }

.devices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.phones { display: grid; gap: 24px; }
.device img {
  width: 100%;
  height: auto;
  border: 6px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--line);
  background: var(--ink);
}

/* ---------- Text pages (privacy, support) ---------- */

.page-head { text-align: center; padding: 40px 0 8px; }
.page-head h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 4rem);
  letter-spacing: 2px;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--line);
  text-shadow: 4px 4px 0 var(--line);
  margin: 0;
}
.page-head h1.c-blue { color: var(--blue); }
.page-head h1.c-green { color: var(--green); }
.page-head .tag { margin-top: 18px; }

.prose {
  max-width: 760px;
  margin: 24px auto 0;
  padding: 22px 20px;
}
.prose + .prose { margin-top: 28px; }
.prose h2 { font-size: clamp(1.6rem, 5vw, 2rem); }
.prose h3 { margin-top: 1.4em; }
.prose h3:first-of-type { margin-top: 0.4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: 0.35em; }
.prose > :last-child { margin-bottom: 0; }
.prose .updated { color: var(--muted); font-size: 0.95rem; }

.big-list { list-style: none; padding: 0 !important; }
.big-list li {
  padding-left: 34px;
  position: relative;
}
.big-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 18px; height: 18px;
  border: 3px solid var(--line);
  background: var(--green);
}
.big-list li:nth-child(6n+2)::before { background: var(--yellow); }
.big-list li:nth-child(6n+3)::before { background: var(--blue); }
.big-list li:nth-child(6n+4)::before { background: var(--red); }
.big-list li:nth-child(6n+5)::before { background: var(--purple); }
.big-list li:nth-child(6n+6)::before { background: var(--orange); }

kbd {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95em;
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--line);
  padding: 0 6px;
  background: var(--card);
  white-space: nowrap;
}

table.keys { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
table.keys th, table.keys td {
  text-align: left;
  vertical-align: top;
  border-top: 2px solid var(--line);
  padding: 8px 8px 8px 0;
}
table.keys th { white-space: nowrap; }

.placeholder-inline {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--line);
  padding: 0 6px;
  font-weight: 700;
}

.credit { font-size: 0.95rem; color: var(--muted); }

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

.site-footer { padding: 48px 0 32px; }
.footer-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 16px;
  font-size: 0.95rem;
}
.footer-box nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-weight: 700;
}
.swatches { display: flex; gap: 8px; }
.swatches span {
  width: 22px; height: 22px;
  border: 3px solid var(--line);
  box-shadow: 2px 2px 0 var(--line);
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promises { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .prose { padding: 32px 36px; }
}

@media (min-width: 900px) {
  .hero { padding: 64px 0 32px; }
  .lockup { flex-direction: row; justify-content: center; gap: 36px; }
  .lockup .mark { width: 180px; height: 180px; }
  .wordmark { font-size: 7rem; text-shadow: 7px 7px 0 var(--line); }
  .wordmark .row { justify-content: flex-start; }
  .wordmark .row + .row { padding-left: 64px; }
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .devices { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .brand:hover .mark { transform: rotate(-8deg); transition: transform 0.15s; }
}

@media print {
  body { background: #fff; }
  .box, .promises li { box-shadow: none; }
  .site-header .nav, .skip { display: none; }
}

/* ---------- Readability: running text never sits directly on the dot pattern ---------- */
.lede,
.section-head p,
.promises-note {
  width: fit-content;
  max-width: min(36em, 100%);
  background: var(--card);
  border: 3px solid var(--line);
  padding: 12px 16px;
}
.section-head p { margin: 0 auto; }
.lede { margin-left: auto; margin-right: auto; }
.shot figcaption {
  display: inline-block;
  background: var(--page);
  padding: 4px 8px;
}

/* ---------- Mission: a classic desktop window, drawn in the kit's style ---------- */
.retro {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
}
.retro-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 38px;
  padding: 8px 12px;
  border-bottom: 3px solid var(--line);
  /* striped title bar, like the desktops of the late 80s and 90s */
  background:
    repeating-linear-gradient(to bottom, var(--line) 0 2px, transparent 2px 5px) content-box,
    var(--card);
}
.retro-close {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border: 3px solid var(--line);
  background: var(--card);
}
.retro-title {
  background: var(--card);
  padding: 0 10px;
  font-weight: 700;
  line-height: 22px;
}
.retro-body { padding: 24px 20px 26px; }
.retro-body h2 { padding-right: 96px; }
.retro-body .mission {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  padding: 14px 16px;
  margin: 1.4em 0;
}
.retro-body .signoff {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0;
}
.sticker {
  position: absolute;
  right: -6px;
  top: 52px;
  margin: 0;
  padding: 10px 12px 6px;
  background: var(--red);
  color: var(--ink);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.1;
  text-align: center;
  transform: rotate(6deg);
}
@media (min-width: 640px) {
  .retro-body { padding: 36px 44px 40px; }
  .retro-body h2 { padding-right: 120px; }
  .sticker { right: -18px; top: 46px; font-size: 1.2rem; }
}
.dedication {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 6px solid var(--purple);
  font-weight: 600;
  font-size: 1.1rem;
}
.dedication p { margin: 0; }
.shot-mac img {
  width: 100%;
  height: auto;
  filter: drop-shadow(5px 5px 0 var(--line));
}
