/*
  Styles for the marketing page (marketing/index.html).
  The palette and the three typefaces are the app's own, from src/assets/main.css,
  so the page and its screenshots read as one thing.
*/

:root {
  --bg: #f7f4ec;
  --panel: #f0ede3;
  --card: #ede9dc;
  --rule: #241f18;
  --line: rgba(24, 22, 20, 0.32);
  --hair: rgba(24, 22, 20, 0.2);
  --ink: #1a1713;
  --muted: rgba(26, 23, 19, 0.68);
  --gold: #9a7414;
  --gold-deep: #6b4f0d;
  --danger: #b02a19;

  --blackletter: 'UnifrakturCook', 'EB Garamond', Georgia, serif;
  --serif: 'EB Garamond', Georgia, serif;
  --ui: 'Barlow Condensed', 'Trebuchet MS', sans-serif;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin: 0;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--gold-deep);
  text-underline-offset: 0.18em;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--bg);
  padding: 0.5rem 1rem;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem var(--gutter);
  border-bottom: 3px solid var(--rule);
  background: var(--bg);
}

.wordmark {
  font-family: var(--blackletter);
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.masthead nav {
  display: flex;
  gap: 0.25rem;
}

.masthead nav a {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease-out;
}

.masthead nav a:hover {
  border-bottom-color: var(--gold);
}

/* ---------- hero ---------- */

main {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-top: 0;
}

.kicker {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gold-deep);
  margin: 0 0 1rem;
}

h1 {
  font-family: var(--blackletter);
  font-weight: 700;
  font-size: clamp(3rem, 7.2vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
}

.lede {
  font-size: 1.375rem;
  line-height: 1.55;
  max-width: 34ch;
  margin: 1.5rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin: 0;
}

/* The button copies the app's primary action: gold slab, hard offset shadow. */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.4rem;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  font-size: 1.1875rem;
  text-decoration: none;
  border: 2px solid var(--gold-deep);
  box-shadow: 3px 3px 0 var(--rule);
  transition-property: scale, box-shadow;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

.button:active {
  scale: 0.96;
  box-shadow: 1px 1px 0 var(--rule);
}

.quiet-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/*
  The reminder slips: the one piece of motion on the page.
  They land one after another, as the app raises them when a Quarter Day is planned.
*/
.slips {
  list-style: none;
  margin: 0;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rule);
  box-shadow: 4px 4px 0 rgba(24, 22, 20, 0.12);
  display: grid;
  gap: 0.75rem;
}

.slip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border-left: 4px solid var(--gold);
  font-size: 1.0625rem;
  line-height: 1.5;
  animation: slip-in 420ms cubic-bezier(0.2, 0, 0, 1) both;
}

.slip p {
  margin: 0;
}

.slip cite {
  font-family: var(--ui);
  font-style: normal;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.slip-danger {
  border-left-color: var(--danger);
}

.slip-quiet {
  border-left-color: var(--line);
  color: var(--muted);
}

.slip:nth-child(1) { animation-delay: 250ms; }
.slip:nth-child(2) { animation-delay: 550ms; }
.slip:nth-child(3) { animation-delay: 850ms; }
.slip:nth-child(4) { animation-delay: 1150ms; }

@keyframes slip-in {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slip {
    animation: none;
  }
}

/* ---------- screenshots ---------- */

figure {
  margin: 0;
}

figure a {
  display: block;
}

figure img {
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
  box-shadow: 6px 6px 0 rgba(24, 22, 20, 0.14);
}

figcaption {
  font-style: italic;
  color: var(--muted);
  font-size: 1.0625rem;
  margin-top: 0.9rem;
  max-width: var(--measure);
}

.hero-shot {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.hero-shot img {
  border-top: 3px solid var(--rule);
}

/* The screenshot as a video poster: the whole image is the button, with a
   stamped label in the app's gold so it reads as playable, not as a link. */
.poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 160ms ease;
}

.poster:hover img,
.poster:focus-visible img {
  filter: brightness(0.94);
}

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

.poster-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0 1.5rem 0 1.1rem;
  background: var(--gold);
  color: #fff;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--rule);
  box-shadow: 3px 3px 0 var(--rule);
  transition: scale 120ms ease;
}

.poster:hover .poster-badge,
.poster:focus-visible .poster-badge {
  scale: 1.04;
}

/* ---------- the demo video dialog ---------- */

.demo {
  width: min(1120px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  padding: 0;
  border: 2px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--rule);
}

.demo::backdrop {
  background: rgba(26, 23, 19, 0.78);
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  border-bottom: 2px solid var(--rule);
}

.demo-bar p {
  margin: 0;
  font-family: var(--ui);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.demo-close:hover,
.demo-close:focus-visible {
  border-color: var(--rule);
  background: var(--panel);
}

.demo-frame {
  aspect-ratio: 16 / 9;
  background: #000;
}

.demo-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-fallback {
  margin: 0;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- section headings ---------- */

main > section > h2,
.bare h2 {
  font-family: var(--blackletter);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.05;
}

main > section {
  border-top: 3px solid var(--rule);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

/* ---------- the problem ---------- */

.problem-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2rem;
}

.problem-pair > div {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.problem h3 {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.25;
}

.problem-pair p {
  margin: 0.75rem 0 0;
  max-width: 42ch;
}

.problem-answer {
  font-size: 1.5rem;
  line-height: 1.45;
  max-width: 40ch;
  margin: 2.5rem 0 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--gold);
}

/* ---------- features ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
  border-bottom: 1px solid var(--line);
}

.feature:first-of-type {
  margin-top: 1rem;
}

.feature-flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.feature-flip .feature-text {
  order: 2;
}

.feature h3 {
  font-family: var(--blackletter);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.05;
}

.feature-lede {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.6rem 0 1.25rem;
}

.feature ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.feature li {
  padding-left: 1.1rem;
  position: relative;
  max-width: 48ch;
}

/* The app's small gold hexagon, as the list marker. */
.feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--gold);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.shot-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}

.shot-strip figcaption {
  font-size: 1rem;
}

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-top: 3px solid var(--rule);
  background: var(--panel);
}

.promise {
  padding: 1.5rem 1.5rem 1.75rem;
}

.promise + .promise {
  border-left: 1px solid var(--line);
}

.promise h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
}

.promise p {
  margin: 0.6rem 0 0;
  font-size: 1.0625rem;
}

/* ---------- ships bare ---------- */

.bare {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.bare-words p {
  max-width: 50ch;
  margin: 1.25rem 0 0;
}

/* An empty sheet: each content slot drawn as a blank, dashed box. */
.empty-sheet {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.empty-sheet li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.7rem 1rem;
  border: 1.5px dashed var(--line);
}

.slot-name {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1.1875rem;
}

.slot-state {
  font-style: italic;
  color: var(--muted);
  text-align: right;
}

.empty-sheet .slot-full {
  border: 2px solid var(--rule);
  background: var(--panel);
  margin-top: 0.4rem;
}

.slot-full .slot-state {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

/* ---------- copyright ---------- */

.notice p {
  max-width: 60ch;
  margin: 1.25rem 0 0;
}

.notice p:first-of-type {
  border-left: 4px solid var(--danger);
  padding-left: 1.25rem;
  font-size: 1.25rem;
}

.colophon {
  border-top: 3px solid var(--rule);
  padding: 2rem var(--gutter) 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.colophon p {
  max-width: calc(76rem - 2 * var(--gutter));
  margin: 0 auto 0.6rem;
}

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .hero,
  .feature,
  .bare,
  .feature-flip {
    grid-template-columns: 1fr;
  }

  .feature-flip .feature-text {
    order: 0;
  }

  .promises {
    grid-template-columns: 1fr;
  }

  .promise + .promise {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .shot-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.125rem;
  }

  .masthead nav a {
    padding: 0 0.5rem;
  }

  .problem-pair {
    grid-template-columns: 1fr;
  }

  .slip {
    grid-template-columns: 1fr;
  }
}
