/* Square One site: Clockwork Meadows colours (parchment, ink, brass, meadow greens). */
:root {
  --meadow: #7E9A56;
  --meadow-d: #5E8044;
  --meadow-l: #A9BC78;
  --paper: #FBF0DA;
  --paper-2: #F7F3E6;
  --ink: #3A2410;
  --ink-2: #6E4E37;
  --brass: #E9BF5C;
  --brass-d: #8A5A1C;
  --brass-l: #F8DA86;
  --link: #7A4A12;
  --edge: rgba(58, 36, 16, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --meadow: #2F4022;
    --meadow-d: #1F2B17;
    --meadow-l: #43572F;
    --paper: #2A2116;
    --paper-2: #33281B;
    --ink: #F7EBD3;
    --ink-2: #D2BC98;
    --link: #F8DA86;
    --edge: rgba(248, 218, 134, 0.22);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--meadow-l) 0%, var(--meadow) 45%, var(--meadow-d) 100%) fixed;
  color: var(--ink);
  font: 500 18px/1.6 "Nunito", system-ui, sans-serif;
  padding: 32px 16px 48px;
}

.sheet {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 3px solid var(--brass-d);
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--brass), 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 28px 28px 32px;
}

header.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--edge);
}
header.brand img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
header.brand a { color: inherit; text-decoration: none; }
.title {
  font: 800 30px/1.1 "Alegreya", Georgia, serif;
  margin: 0;
}
.subtitle {
  font: 800 15px/1.2 "Nunito", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 4px 0 0;
}

h1, h2 { font-family: "Alegreya", Georgia, serif; font-weight: 800; line-height: 1.2; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 22px; margin: 28px 0 8px; }
p, ul { margin: 0 0 14px; }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }
.muted { color: var(--ink-2); font-size: 16px; }
a { color: var(--link); font-weight: 700; }

.hero { text-align: center; padding: 8px 0 4px; }
.hero img { width: 160px; height: 160px; border-radius: 34px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.hero h1 { font-size: 44px; margin: 18px 0 0; }
.hero .subtitle { font-size: 17px; }
.hero p.lead { font-size: 20px; margin: 18px auto 0; max-width: 34em; }

/* Screenshots: a row on wide screens, a sideways scroll on phones. */
.shots {
  display: flex;
  gap: 12px;
  margin: 24px -4px 6px;
  padding: 4px 4px 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: 1 0 0;
  min-width: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1300;
  border-radius: 14px;
  border: 2px solid var(--brass-d);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  scroll-snap-align: center;
}

/* How it was made: notes pinned along a brass rail. */
.sheet.wide { max-width: 860px; }
.rail {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0 0 0 34px;
  position: relative;
}
.rail::before {
  content: "";
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brass-d), var(--brass-l) 45%, var(--brass) 60%, var(--brass-d));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.note {
  position: relative;
  background: var(--paper-2);
  border: 2px solid var(--edge);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin: 0 0 26px;
  box-shadow: 0 3px 10px rgba(58, 36, 16, 0.12);
  transform: rotate(-0.4deg);
}
.note:nth-child(even) { transform: rotate(0.4deg); }
/* the rivet that pins each note to the rail */
.note::before {
  content: "";
  position: absolute;
  left: -33px; top: 20px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--brass-l), var(--brass) 55%, var(--brass-d));
  border: 2px solid var(--brass-d);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.note h2 { margin: 2px 0 6px; }
.note p { margin: 0 0 12px; }
.when {
  display: inline-block;
  background: #6B4423;
  color: #FFF4DC;
  font: 900 13px/1 "Nunito", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}
.frame {
  margin: 4px 0 0;
  padding: 7px;
  background: linear-gradient(180deg, #8A5A32, #5E3B1E);
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(248, 218, 134, 0.35), 0 3px 8px rgba(0, 0, 0, 0.22);
  max-width: 300px;
}
.frame img { display: block; width: 100%; height: auto; border-radius: 5px; }
.note > .frame:has(img[width="900"]) { max-width: 560px; }
.pair { display: flex; gap: 12px; }
.pair .frame { flex: 1 1 0; min-width: 0; max-width: 260px; }
/* Wide screens: words on the left, the picture on the right. */
@media (min-width: 760px) {
  .note:not(.wide) {
    display: grid;
    grid-template-columns: 1fr 230px;
    column-gap: 22px;
    align-items: start;
  }
  .note:not(.wide) > .when, .note:not(.wide) > h2, .note:not(.wide) > p { grid-column: 1; }
  .note:not(.wide) > .when { justify-self: start; }
  .note:not(.wide) > .frame, .note:not(.wide) > .pair { grid-column: 2; grid-row: 1 / span 4; }
  .note.two { grid-template-columns: 1fr 340px; }
  .note.two .pair .frame { max-width: none; }
}

.button {
  display: inline-block;
  background: linear-gradient(180deg, var(--brass-l), var(--brass) 55%, #B98428);
  color: #3A2410;
  border: 2px solid var(--brass-d);
  border-radius: 999px;
  padding: 12px 26px;
  min-height: 48px;
  font: 900 18px/1.3 "Nunito", system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--brass-d);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brass-d); }

.card {
  background: var(--paper-2);
  border: 2px solid var(--edge);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
}

footer {
  max-width: 720px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 15px;
  color: #FFF8E6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Apple's badge: unmodified artwork, clear space of a quarter of its height, at least 40 px tall. */
.store-badge { margin: 16px 0 4px; }
.store-badge a { display: inline-block; }
.store-badge img { display: block; height: 48px; width: auto; }
footer .credit { font-size: 12px; opacity: 0.85; margin-top: 6px; }
footer a { color: #FFF8E6; margin: 0 10px; display: inline-block; padding: 8px 0; }

@media (max-width: 480px) {
  body { padding: 16px 16px 32px; font-size: 17px; }
  .sheet { padding: 20px 18px 24px; }
  .hero h1 { font-size: 36px; }
  .hero img { width: 128px; height: 128px; border-radius: 28px; }
  .button { padding: 12px 18px; font-size: 16px; }
  .shots img { flex: 0 0 62%; }
}
