/* Indie Desert Studio — indiedesert.com
   Tokens are this site's own (see DESIGN.md). It does not use
   shared/css/design-tokens.css, which holds The Baker's palette. */

/* Fonts are served from this site, not Google Fonts, so a visit contacts no
   one but the host. Latin subsets as Google serves them; Karla is one
   variable file for 400, 500 and 700. Licences: fonts/OFL-*.txt. */
@font-face {
  font-family: 'Alfa Slab One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/alfa-slab-one-latin.woff2) format('woff2');
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/karla-latin-var.woff2) format('woff2');
}

:root {
  --paper: #F4E7C9;
  --paper-2: #EEDCB4;
  --card: #FBF3E1;
  --ink: #4A2A1E;
  --ink-2: #7A5544;
  --line: #D9C08F;
  --on-ink: #F8EBCF;
  --terra: #C2603B;
  --terra-text: #9E4527;
  --teal: #2B7F7A;
  --teal-text: #1D6460;
  --mustard: #E2A33A;
  --sun-a: rgba(226, 163, 58, .28);
  --sun-b: rgba(226, 163, 58, 0);

  --display: 'Alfa Slab One', Rockwell, 'Roboto Slab', Georgia, serif;
  --body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --track: .12em;
  --radius-sm: 8px;
  --radius-card: 16px;
  --radius-icon: 20px;
  --pill: 999px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1512;
    --paper-2: #271B16;
    --card: #2B1F19;
    --ink: #F2E2C2;
    --ink-2: #C9AE8E;
    --line: #4A362A;
    --on-ink: #1E1512;
    --terra: #E07C55;
    --terra-text: #E07C55;
    --teal: #5DB5AD;
    --teal-text: #5DB5AD;
    --mustard: #EDB451;
    --sun-a: rgba(237, 180, 81, .16);
    --sun-b: rgba(237, 180, 81, 0);
  }
}

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

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

body {
  margin: 0;
  padding-inline: 16px;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}

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

a { color: var(--teal-text); text-underline-offset: 3px; }

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

.wrap { max-width: 1040px; margin: 0 auto; }

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 44px; height: 44px; border-radius: 50%; flex: none; }

.brand-name {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand-short { display: none; }

.site-nav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover { color: var(--terra-text); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 48px;
  align-items: center;
  padding-block: 56px;
  /* The sunburst reaches 8% past the badge; where the badge column meets
     the gutter, that would scroll the page sideways. Its edge is faded out,
     so clipping it shows nothing. */
  overflow-x: clip;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--terra-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 4.8vw, 54px);
  line-height: 1.06;
}

.lede {
  max-width: 32em;
  margin: 0 0 32px;
  color: var(--ink-2);
  font-size: 19px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--pill);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--ink); color: var(--on-ink); }
.btn-outline { color: var(--ink); }

.badge-stage {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
}

.sunburst {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--sun-a) 0deg 6deg, var(--sun-b) 6deg 12deg);
  -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%);
  mask: radial-gradient(circle, #000 35%, transparent 70%);
  animation: spin 120s linear infinite;
}

.badge-stage img {
  position: relative;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--paper);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */

.section {
  padding-block: 56px;
  border-top: 2px solid var(--ink);
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.15;
}

.sub {
  max-width: 40em;
  margin: 0 0 32px;
  color: var(--ink-2);
}

/* App cards: one per app. A second card stacks under the first. */

.app-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
}

.app-icon { width: 84px; height: 84px; border-radius: var(--radius-icon); }

.tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border: 1.5px solid var(--teal);
  border-radius: var(--pill);
  color: var(--teal-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.app h3 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; }
.app p { margin: 0; color: var(--ink-2); }

.app-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.stores { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stores a { display: block; border-radius: var(--radius-sm); }
.stores .app-store { width: 132px; height: 44px; }
/* Google's badge carries its own transparent margin; this size matches
   Apple's badge visually, as on The Baker's site. */
.stores .google-play { width: 137px; height: 53px; margin-block: -4.5px; }

/* The lab */

.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.lab .sub { margin-bottom: 0; }

.panel {
  padding: 24px;
  background: var(--paper-2);
  border-radius: var(--radius-card);
}

.panel p { margin: 0 0 12px; }
.panel p:last-child { margin: 0; }

/* Contact: one column per entry, however many there are. */

.contact {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
}

.contact div { padding-top: 12px; border-top: 2px solid var(--ink); }

.contact dt {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.contact dd {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 24px 48px;
  border-top: 2px solid var(--ink);
  color: var(--ink-2);
  font-size: 14px;
}

.site-footer p { margin: 0; }

/* Text pages (privacy, 404) */

.prose { max-width: 40em; padding-block: 48px 56px; }
.prose h1 { font-size: clamp(34px, 4.8vw, 54px); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }

/* Narrow screens */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 32px 48px; }
  .badge-stage { order: -1; max-width: 220px; }
  .app { grid-template-columns: auto minmax(0, 1fr); }
  .app-links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .lab { grid-template-columns: 1fr; gap: 24px; }
  .contact { grid-auto-flow: row; grid-auto-columns: auto; }
  .site-nav li:not(:last-child) { display: none; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 16px; }
  /* Icon above the text, and a little less padding, so the status tag
     keeps to one line down to 320 px. */
  .app { grid-template-columns: 1fr; padding: 16px; }
  .tag { padding-inline: 8px; }
}

/* Where even 16 px crowds Contact, the one-word brand stands in. The full
   name stays in the link for screen readers. */
@media (max-width: 400px) {
  .brand-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .sunburst { animation: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
