/* Donut Auction Bot
   Strawberry glaze page, chocolate type, and a Minecraft auction menu as the centrepiece. */

/* Self-hosted fonts */
@font-face {
  font-family: "Bagel Fat One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/bagel-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: "Bagel Fat One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/bagel-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/bricolage-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: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/bricolage-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/pixelify-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: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/pixelify-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --glaze: #F4B3CB;
  --glaze-deep: #E48AAE;
  --glaze-soft: #F8CCDC;
  --choc: #3B2016;
  --choc-2: #4A2A1E;
  --choc-3: #66402F;
  --cocoa: #6A4334;
  --cream: #FFF1E6;
  --cream-muted: #D9BFB0;

  /* Minecraft UI vernacular */
  --gui: #C6C6C6;
  --gui-hi: #FFFFFF;
  --gui-lo: #555555;
  --slot: #8B8B8B;
  --slot-lo: #373737;
  --mc-gold: #FFAA00;
  --mc-green: #55FF55;
  --mc-gray: #AAAAAA;
  --mc-aqua: #55FFFF;
  --mc-yellow: #FFFF55;
  --mc-purple: #FF55FF;

  --f-display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-body: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-pixel: "Pixelify Sans", ui-monospace, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--glaze);
  color: var(--choc);
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; }
p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--choc);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--choc);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.nowrap { white-space: nowrap; }

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

h1, h2 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 6.2vw, 4.75rem);
  line-height: 0.98;
  text-wrap: balance;
  text-shadow: 0.045em 0.045em 0 var(--glaze-deep);
}
h1 span { display: block; }
h1 .h1-sub {
  margin-top: 22px;
  font-family: var(--f-body);
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--choc);
  text-shadow: none;
}

h2 {
  font-size: clamp(2.25rem, 4.4vw, 3.25rem);
  line-height: 1.02;
  text-shadow: 0.05em 0.05em 0 var(--glaze-deep);
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
}

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

.site-header { padding-block: 20px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand img { image-rendering: pixelated; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  font-weight: 600;
  font-size: 1rem;
}
.nav a { text-decoration: none; }
.nav a:not(.nav-cta):hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.nav-cta {
  padding: 8px 14px;
  background: var(--choc);
  color: var(--cream);
  box-shadow: 0 3px 0 #1F0E08;
}
.nav-cta:hover { background: var(--choc-2); }
.nav-cta:active { transform: translateY(3px); box-shadow: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 18px;
  background: var(--choc);
  color: var(--cream);
  text-decoration: none;
  box-shadow: 0 5px 0 #1F0E08;
  transition: background-color .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--choc-2); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 #1F0E08; }

.btn-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-text { display: flex; flex-direction: column; line-height: 1.05; }
.btn-small { font-size: .875rem; font-weight: 600; opacity: .85; }
.btn-big { font-family: var(--f-display); font-size: 1.625rem; letter-spacing: .01em; }

.btn-glaze {
  background: var(--glaze);
  color: var(--choc);
  box-shadow: 0 5px 0 var(--glaze-deep);
}
.btn-glaze:hover { background: var(--glaze-soft); }
.btn-glaze:active { box-shadow: 0 0 0 var(--glaze-deep); }

/* Set by script.js when a jar hasn't been uploaded yet */
.btn.is-pending,
.btn.is-pending:hover,
.btn.is-pending:active {
  cursor: not-allowed;
  background: transparent;
  color: var(--choc);
  box-shadow: none;
  transform: none;
  outline: 3px dashed currentColor;
  outline-offset: -3px;
}
.btn-glaze.is-pending,
.btn-glaze.is-pending:hover,
.btn-glaze.is-pending:active { color: var(--glaze); }
.btn.is-pending .btn-icon { display: none; }
.btn.is-pending .btn-small { opacity: 1; }

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

.hero { padding-block: clamp(24px, 5vw, 64px) var(--section); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-copy { max-width: 34rem; }

.lede {
  margin-top: 10px;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 32em;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 36px;
}

.hint {
  margin-top: 18px;
  font-size: 1rem;
  color: var(--cocoa);
  max-width: 32em;
}

/* ---------- Auction house demo ---------- */

.demo { margin: 0; min-width: 0; }

.stage {
  position: relative;
  filter: drop-shadow(10px 10px 0 var(--glaze-deep));
}

.gui {
  --b: 3px;
  background: var(--gui);
  border: var(--b) solid #000;
  padding: 12px 12px 14px;
  box-shadow: inset var(--b) var(--b) 0 var(--gui-hi), inset calc(var(--b) * -1) calc(var(--b) * -1) 0 var(--gui-lo);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.gui-title {
  font-family: var(--f-pixel);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: #3A3A3A;
  margin: 0 2px 8px;
  line-height: 1.2;
}

.slots {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.slot {
  position: relative;
  aspect-ratio: 1;
  background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--gui-hi);
  display: grid;
  place-items: center;
}

.slot svg {
  width: 72%;
  height: 72%;
  image-rendering: pixelated;
}

/* Minecraft-style hover highlight */
.slot::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(255, 255, 255, .5);
  opacity: 0;
}
.slot.is-scan::after { opacity: 1; }
.slot.is-target::after { opacity: 1; background: rgba(255, 255, 255, .55); }
.slot.is-bought::after { opacity: 1; background: rgba(85, 255, 85, .55); }
.slot.is-bought svg { animation: pop .45s steps(4, end) forwards; }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(0); }
}

.tooltip {
  position: absolute;
  z-index: 2;
  min-width: 200px;
  max-width: 260px;
  padding: 7px 10px 8px;
  background: #120612;
  border: 2px solid #100010;
  box-shadow: inset 0 0 0 2px #2A0B5E;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #CFCFCF;
  pointer-events: none;
}
.tooltip p + p { margin-top: 1px; }
.tooltip .tt-name { font-size: 1.075rem; font-weight: 700; margin-bottom: 3px; }
.tooltip .tt-gap { height: 8px; }
.tooltip .tt-bot { opacity: 0; }
.tooltip.is-checked .tt-bot { opacity: 1; }

.c-gold { color: var(--mc-gold); }
.c-green { color: var(--mc-green); }
.c-aqua { color: var(--mc-aqua); }
.c-gray { color: var(--mc-gray); }
.c-yellow { color: var(--mc-yellow); }
.c-purple { color: var(--mc-purple); }
.c-white { color: #FFFFFF; }

.hud {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 22px;
}

.chat {
  flex: 1 1 auto;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  height: calc(4 * 1.45em + 16px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chat li {
  padding: 2px 8px;
  line-height: 1.45;
  background: rgba(20, 8, 4, .9);
  color: #FFFFFF;
  animation: chat-in .18s steps(2, end);
}
.chat li:first-child { padding-top: 6px; }
.chat li:last-child { padding-bottom: 6px; }

@keyframes chat-in { from { opacity: 0; } to { opacity: 1; } }

.board {
  flex: none;
  width: 11rem;
  padding: 6px 10px 8px;
  background: rgba(20, 8, 4, .9);
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  line-height: 1.4;
}
.board p { display: flex; justify-content: space-between; gap: 8px; }
.board-title { justify-content: center !important; color: var(--mc-yellow); margin-bottom: 2px; }
.board-profit { color: var(--mc-green); }

/* ---------- How it works ---------- */

.how { padding-block: 0 var(--section); }

.section-lede {
  margin-top: 16px;
  max-width: 34em;
  font-size: 1.2rem;
}

.steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: none;
}

.step {
  position: relative;
  padding-top: 22px;
  border-top: 4px solid var(--choc);
}

.step-no {
  display: block;
  font-family: var(--f-display);
  font-size: 4rem;
  line-height: .9;
  color: var(--glaze);
  -webkit-text-stroke: 3px var(--choc);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--choc);
  margin-bottom: 18px;
}

.step p {
  margin-top: 10px;
  max-width: 28em;
  color: var(--cocoa);
}

/* ---------- FAQ ---------- */

.faq { padding-block: 0 calc(var(--section) + 40px); }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 40px clamp(40px, 6vw, 96px);
  align-items: start;
}

.faq-list { border-top: 3px solid var(--choc); }

.faq details { border-bottom: 3px solid var(--choc); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }

/* pixel plus that turns into a minus */
.faq summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--choc), var(--choc)) center / 16px 4px no-repeat,
    linear-gradient(var(--choc), var(--choc)) center / 4px 16px no-repeat;
}
.faq details[open] summary::after {
  background: linear-gradient(var(--choc), var(--choc)) center / 16px 4px no-repeat;
}

.faq details p {
  padding: 0 2px 22px;
  max-width: 36em;
  color: var(--cocoa);
}
.faq details[open] p { animation: reveal .2s ease-out; }

@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Download (chocolate) ---------- */

.download {
  position: relative;
  background: var(--choc);
  color: var(--cream);
  padding-top: calc(var(--section) + 8px);
}

/* glaze dripping over the chocolate */
.download::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='56' viewBox='0 0 240 56'%3E%3Cg fill='%23F4B3CB'%3E%3Crect width='240' height='14'/%3E%3Crect x='14' width='16' height='30' rx='8'/%3E%3Crect x='52' width='22' height='46' rx='11'/%3E%3Crect x='98' width='14' height='24' rx='7'/%3E%3Crect x='132' width='20' height='38' rx='10'/%3E%3Crect x='178' width='16' height='28' rx='8'/%3E%3Crect x='212' width='12' height='20' rx='6'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 240px 56px;
  pointer-events: none;
}

.download h2 { text-shadow: 0.05em 0.05em 0 var(--choc-3); }
.download :focus-visible { outline-color: var(--cream); }

.builds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.build {
  background: var(--choc-2);
  border: 3px solid var(--choc-3);
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.build-label {
  font-weight: 600;
  color: var(--cream-muted);
}

.build-version {
  font-family: var(--f-display);
  font-size: clamp(3.25rem, 7vw, 5rem);
  line-height: 1;
  margin-top: 4px;
  color: var(--glaze);
}

.build-file {
  margin-top: 12px;
  font-size: .95rem;
  color: var(--cream-muted);
  overflow-wrap: anywhere;
}

.build .btn { margin-top: 28px; }

.install {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 20px clamp(40px, 6vw, 96px);
}

.install h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.05;
}

.install ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.install li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 52px;
  max-width: 36em;
}
.install li + li { padding-top: 18px; border-top: 2px solid var(--choc-3); }
.install li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--glaze);
}
.install li + li::before { top: 18px; }

.path {
  font-weight: 600;
  background: var(--choc-2);
  padding: 1px 6px;
  white-space: nowrap;
}

.site-footer {
  margin-top: var(--section);
  border-top: 2px solid var(--choc-3);
  padding-block: 28px 36px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: .95rem;
  color: var(--cream-muted);
}

.brand-small { font-size: 1rem; color: var(--cream); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 40rem; }
  .demo { max-width: 600px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (max-width: 720px) {
  .faq-grid, .install { grid-template-columns: minmax(0, 1fr); }
  .builds { grid-template-columns: minmax(0, 1fr); }
  .nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .btn { flex: 1 1 100%; }
  .hud { flex-direction: column; align-items: stretch; gap: 8px; }
  .board { width: auto; display: flex; gap: 16px; justify-content: space-between; }
  .board p { gap: 6px; }
  .board-title { margin-bottom: 0; }
  .tooltip { min-width: 0; max-width: 230px; font-size: .95rem; }
  .gui { padding: 9px 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
