/* "Zettel bei Abendlicht": a paper shopping note glowing in baltic light on carbon. Brand colours from
   app/lib/theme/tokens/sgart_colors.dart. One deliberate dark look for every visitor. */
:root {
  color-scheme: dark;
  --night: #12100f;
  --surface: #191716; /* carbonBlack */
  --line: #2b2825; /* neutral800 */
  --text: #f2f4ff; /* ghostWhite */
  --text-body: #e4e1dc;
  --text-quiet: #c2b9b1; /* neutral300 */
  --text-faint: #9c938b; /* neutral400 */
  --link: #7ba3cc; /* balticForDarkMode */
  --baltic: #456990;
  --glow: rgba(69, 105, 144, 0.6);
  --paper: #fffdf6;
  --paper-rule: #c9d6e6;
  --paper-margin: #e6b4b4;
  --pencil: #5c554f; /* neutral600 */
  --column: 68rem;
}

/* Inter (the app's typeface, fonts/OFL.txt) and Caveat (handwriting on the note, fonts/Caveat-OFL.txt):
   Latin subsets of the variable fonts, self-hosted. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: var(--night);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* The evening light behind the content. */
body::before {
  content: "";
  position: absolute;
  inset: -12rem -20% auto 15%;
  height: 52rem;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

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

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

/* The shared column: header, content and footer start at the same left edge. */
.bar,
.content {
  position: relative;
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* Header and footer */

.site-header,
.site-footer {
  position: sticky;
  z-index: 2;
  background: rgba(18, 16, 15, 0.82);
  backdrop-filter: blur(10px);
}

.site-header {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  bottom: 0;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.site-header .bar {
  padding-block: 0.6rem;
}

.brand {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mascot {
  grid-row: span 2;
  width: auto;
  height: 3.25rem;
}

/* The product name is the largest type in the chrome; page headings carry the page. */
.brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-claim {
  color: var(--text-quiet);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.site-footer .bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 0.7rem;
  font-size: 0.9375rem;
}

.site-footer a {
  color: var(--text-faint);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--text);
}

.site-footer a[aria-current="page"] {
  font-weight: 600;
}

/* Content */

.content {
  padding-block: 2.5rem 3rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 1.5rem 0 0.25rem;
}

/* The legal pages read as a calm document inside the same light. */
.document p,
.document ul,
.document address {
  max-width: 66ch;
  color: var(--text-body);
}

.hint {
  color: var(--text-quiet);
  font-size: 0.9375rem;
}

address {
  font-style: normal;
}

/* Start page: the shared shopping note */

.stage {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: 1rem 3rem;
}

.stage h1 {
  font-size: 1.625rem;
  line-height: 1.15;
  max-width: 20ch;
}

.lead {
  color: var(--text-quiet);
  font-size: 1.125rem;
  max-width: 36ch;
  margin: 0 0 1.75rem;
}

.availability {
  display: inline-block;
  margin: 0;
  padding: 0.6rem 1.15rem;
  border-radius: 0.75rem;
  background: var(--text);
  color: var(--surface);
  font-weight: 650;
}

.zettel {
  position: relative;
  justify-self: center;
  width: min(23rem, 100% - 2rem);
  margin: 1rem 1.5rem 2rem 0;
  padding: 1.6rem 1.6rem 1.8rem 3.2rem;
  color: var(--surface);
  background-color: var(--paper);
  background-image: linear-gradient(transparent calc(2rem - 1px), var(--paper-rule) calc(2rem - 1px));
  background-size: 100% 2rem;
  background-position: 0 1.55rem;
  border-left: 2px solid var(--paper-margin);
  line-height: 2rem;
  box-shadow:
    0 2rem 4rem -1rem rgba(0, 0, 0, 0.6),
    0 0 6rem -1rem rgba(123, 163, 204, 0.35);
  transform: rotate(-4deg);
}

.zettel p {
  margin: 0;
}

.zettel-title {
  font-family: "Caveat", "Segoe Print", cursive;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--baltic);
}

.zettel-store {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pencil);
}

.zettel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: "Caveat", "Segoe Print", cursive;
  font-size: 1.55rem;
  font-weight: 500;
}

.zettel li {
  position: relative;
}

.zettel li span {
  color: var(--pencil);
  font-size: 1.2rem;
}

.zettel li::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.55rem;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid var(--pencil);
  border-radius: 3px;
}

.zettel li.done {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: var(--baltic);
  text-decoration-thickness: 2px;
}

.zettel li.done::after {
  content: "";
  position: absolute;
  left: -1.62rem;
  top: 0.62rem;
  width: 0.35rem;
  height: 0.6rem;
  border: solid var(--baltic);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.hero-mascot {
  position: absolute;
  right: -1.8rem;
  bottom: -1.4rem;
  width: 7rem;
  height: auto;
  transform: rotate(6deg);
}

.points {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  margin-block: 1rem 4rem;
}

.points div {
  min-width: 0;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
}

.points h2 {
  font-size: 1.0625rem;
  margin: 0 0 0.3rem;
}

.points p {
  margin: 0;
  color: var(--text-quiet);
}

.points .hand {
  font-family: "Caveat", "Segoe Print", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--link);
  line-height: 1.3;
}

.shots {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-block: 1rem 2rem;
}

.shots img {
  width: min(13rem, 42vw);
  height: auto;
  padding: 0.5rem;
  border-radius: 1.9rem;
  background: var(--line);
  box-shadow: 0 2rem 5rem -1rem rgba(123, 163, 204, 0.3);
}

.shots img:first-child {
  transform: rotate(-3deg) translateY(1rem);
}

.shots img:last-child {
  transform: rotate(2deg);
}

@media (min-width: 52rem) {
  .stage {
    grid-template-columns: 1fr 1fr;
    min-height: 55dvh;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .zettel li.done::after {
    animation: tick 0.5s ease-out 0.6s both;
  }

  @keyframes tick {
    from {
      clip-path: inset(0 0 100% 0);
    }

    to {
      clip-path: inset(0);
    }
  }
}
