/* ByteAnvil: the type and spacing of ubernotched.app, plain. */
:root {
  --paper: #f1ede6;
  --card: #fbf9f5;
  --ink: #171513;
  --muted: #615a50;
  --rule: rgba(23, 21, 19, 0.12);
  /* ByteAnvil's orange: the bits in the logo, the same in light and dark */
  --ember: #e8561f;
  /* Small text in orange needs a darker shade on the light background to stay readable (4.8:1) */
  --ember-text: #b8400f;
  --button-ink: #f6f2ea;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --card: #1c1a18;
    --ink: #efebe3;
    --muted: #a39d92;
    --rule: rgba(239, 235, 227, 0.12);
    --ember-text: #e8561f;
    --button-ink: #121110;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* In the column of the body, a block only takes the width it needs without this */
.wrap { width: 100%; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* The logo from brand/make-logo.mjs: letters in the text color, the bits in the accent color. */
.brand svg { display: block; height: 24px; width: auto; }
.bit { fill: var(--ember); }


/* Type */

h1, h2, h3 { margin: 0; font-weight: 650; }

h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 12ch;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

p { margin: 0 0 14px; }

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 36em;
}

.meta { color: var(--muted); font-size: 15px; }

/* Home */

.hero { padding-top: clamp(36px, 8vw, 96px); padding-bottom: 40px; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding-bottom: 80px;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--rule);
  text-decoration: none;
}

.app:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.app:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.app img { margin-bottom: 12px; }
.app .name { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.app .tagline { color: var(--muted); }
.app .price { margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 600; color: var(--ember-text); }

/* App page */

.product img { margin-bottom: 22px; }
.product h1 { margin-bottom: 10px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 23px;
  background: var(--ink);
  color: var(--button-ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.button:hover { opacity: 0.88; }
.button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.about, .changelog {
  max-width: 40em;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}

.features { margin: 0 0 22px; padding-left: 1.2em; }
.features li { margin-bottom: 6px; }

.release { padding-top: 22px; }
.release summary { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; cursor: pointer; }
.release summary span { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.release ul { margin: 0; padding-left: 1.2em; }
.release h3 { font-size: 16px; margin: 16px 0 4px; }

/* Footer */

/* At the bottom of the window, also on a short page; the line as wide as the content above it. */
footer.wrap { margin-top: auto; padding-top: 56px; padding-bottom: 64px; } /* .wrap would set the padding to 0 */

footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--muted);
}

footer p { margin: 0; }
footer .links { display: flex; gap: 20px; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Screenshots: the windows carry their own shadow, so no frame here. */
.shots { padding: 12px 0 24px; border-top: 1px solid var(--rule); }
/* One beside the other, the next one showing at the edge so you see there's more, as in the App Store */
.shots-row {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.shots-row::-webkit-scrollbar { display: none; }
.shots figure { flex: 0 0 82%; margin: 12px 0 0; scroll-snap-align: start; }
.shots img { width: 100%; }
.shots-nav { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.shots-nav button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--rule);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.shots-nav button:hover:not(:disabled) { background: var(--muted); color: var(--paper); }
.shots-nav button:disabled { opacity: 0.35; cursor: default; }
.shots-nav button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
@media (max-width: 640px) { .shots figure { flex-basis: 92%; } }
/* Up into the window's shadow, which is about 7% of the picture's width under the window. */
.shots figcaption { max-width: 40em; margin-top: -5%; padding-left: 5.5%; font-size: 15px; color: var(--muted); }

/* Privacy and terms */
.legal { max-width: 40em; padding: clamp(32px, 6vw, 72px) 0 24px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 6px; }
.legal .lede { margin-top: 22px; }
.legal h2 { font-size: 21px; letter-spacing: -0.01em; margin: 32px 0 8px; }
.legal ul { padding-left: 1.2em; margin: 0 0 14px; }
.legal li { margin-bottom: 6px; }

.install { margin: 14px 0 0; }
