/* One Thing site. Colors come from the Paper theme in src/lib/theme.ts.
   --wall values are sampled from the real lock screen screenshots. */

@font-face {
  font-family: "Atkinson Next";
  src: url("/assets/fonts/atkinson-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F7F3EA;
  --surface: #EFE9DC;
  --ink: #23201C;
  --muted: #6F675B;
  --line: #DDD5C5;
  --accent: #B5481F;
  --wall: #C6C2BB;
  --wall-deep: #B3AEA5;
  --wall-ink: #1C1A16;
  --wall-soft: #45413A;
  --wall-word: #7A2C0E;
  --clock: #4F5568;
  --pin: #ECE9E2;
  --pin-ink: #1C1A16;
  --pin-soft: #5A554C;
  --pin-act: #8F3613;
  --todo: #FFE27A;
  --todo-ink: #2A2415;
  --note-size: clamp(3rem, 16.5vw, 5.5rem);
  --gutter: clamp(20px, 5vw, 64px);
  --edge: max(var(--gutter), calc((100% - 80rem) / 2));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --surface: #23211E;
    --ink: #EFEAE0;
    --muted: #9A9286;
    --line: #35322D;
    --accent: #E58B62;
    --wall: #121210;
    --wall-deep: #23211E;
    --wall-ink: #C9C4BA;
    --wall-soft: #A29B8F;
    --wall-word: #E58B62;
    --clock: #D9DCEF;
    --pin: #2A2926;
    --pin-ink: #EFEAE0;
    --pin-soft: #A9A296;
    --pin-act: #E58B62;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Next", Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 5;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* Top row. It sits where a phone has its status bar. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 7px; }
.bar nav, .foot nav { display: flex; gap: 8px; }
.bar nav a, .foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}
.bar nav { margin-right: -8px; }
.bar nav a[aria-current] { text-decoration: none; }

/* The hero. The page itself is the lock screen. */
.wall {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "bar" "time" "pin" "big" "pitch";
  align-content: start;
  gap: 16px;
  min-height: 100svh;
  padding: max(8px, env(safe-area-inset-top)) var(--edge) 40px;
  background: var(--wall);
  color: var(--wall-ink);
}
.wall .bar { grid-area: bar; }
.time { grid-area: time; padding-top: 4px; }
.pin { grid-area: pin; }
.big { grid-area: big; }
.pitch { grid-area: pitch; }

.clock {
  color: var(--clock);
  font-size: clamp(4rem, 19vw, 6.5rem);
  font-family: system-ui, Roboto, sans-serif; /* The phone's own clock face. Atkinson has a slashed zero. */
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}
.date { margin-top: 8px; font-size: 1.0625rem; }

.pin {
  padding: 14px 18px 6px;
  background: var(--pin);
  color: var(--pin-ink);
  border-radius: 26px;
  animation: pin-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms backwards;
}
@keyframes pin-in {
  from { opacity: 0; transform: translateY(-14px); }
}
.pin-app {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pin-soft);
  font-size: 0.9375rem;
}
.pin-app img { border-radius: 50%; }
.pin-text { margin-top: 6px; overflow-wrap: anywhere; }
.pin-sub { color: var(--pin-soft); font-size: 1rem; }
.pin-actions { display: flex; gap: 6px; margin: 2px 0 0 -12px; }
.pin-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--pin-act);
  font-weight: 600;
  cursor: pointer;
}
.pin-actions button:disabled { cursor: default; }
.pin-actions button:not(:disabled):hover {
  background: color-mix(in srgb, var(--pin-act) 12%, transparent);
}

.big { min-height: calc(var(--note-size) * 3.36 + 20px); padding-top: 20px; }
.note {
  font-size: var(--note-size);
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  animation: note-in 900ms ease-out 350ms backwards;
}
@keyframes note-in {
  from { opacity: 0; }
}
.note[data-len="m"] { font-size: clamp(2.5rem, 12.5vw, 4.5rem); }
.note[data-len="l"] { font-size: clamp(2rem, 9.5vw, 3.5rem); }
.status { margin-top: 14px; color: var(--wall-soft); font-size: 1.1875rem; }

.lead { font-size: 1.25rem; line-height: 1.45; max-width: 34ch; }
.pitch { padding-top: 16px; }

/* The Play placeholder. With no href it is quiet. With an href it turns into a real button. */
.play {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  margin-top: 20px;
  padding: 0 22px;
  border: 1px solid currentColor;
  border-radius: 14px;
}
.play[href] {
  border-color: transparent;
  background: var(--wall-ink);
  color: var(--wall);
  text-decoration: none;
}

.try { margin-top: 28px; max-width: 26rem; }
.try label { display: block; font-size: 1rem; }
.try input {
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: none;
  color: var(--wall-ink);
  font-size: 1.25rem;
}
.try input::placeholder { color: var(--wall-soft); opacity: 1; }
.try input:focus { outline: none; border-bottom-width: 2px; }
.hint { margin-top: 8px; color: var(--wall-soft); font-size: 1rem; }

/* Bands below the hero */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding: clamp(64px, 11vw, 136px) var(--edge);
}
h2 {
  font-size: clamp(2.5rem, 10.5vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.words { max-width: 34rem; }
.words p { margin-top: 18px; }
.aside { color: var(--muted); font-size: 1rem; }

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 20px);
}
.trio img, .phone { border-radius: clamp(14px, 3vw, 30px); }

.shots { position: relative; max-width: 25rem; padding-bottom: 28px; }
.phone { width: 78%; }
.card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 84%;
  border-radius: 22px;
  outline: 6px solid var(--bg);
}

.days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 24px);
}
.days p { margin-top: 12px; font-size: 1rem; line-height: 1.35; }
.mini {
  display: flex;
  flex-direction: column;
  justify-content: center;
  aspect-ratio: 9 / 16;
  padding: 10%;
  overflow: hidden;
  background: var(--wall);
  color: var(--wall-ink);
  border: 1px solid var(--line);
  border-radius: clamp(12px, 2.5vw, 22px);
}
.mini-note { font-size: clamp(1.05rem, 5vw, 2rem); line-height: 1.12; }
.mini-stamp { color: var(--wall-soft); font-size: clamp(0.8rem, 3.4vw, 1.0625rem); }

/* Living note demo. The looks follow LOOKS in NoteWallpaperRenderer.kt. */
.shift { max-width: 15rem; }
.act .words, .living .words { order: -1; }
.shift-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 20;
  padding: 80% 8% 26%;
  overflow: hidden;
  background: var(--wall);
  color: var(--wall-ink);
  border: 1px solid var(--line);
  border-radius: 30px;
  transition: background-color 120ms linear;
}
.shift-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.shift-screen.off::after { opacity: 1; }
.shift-clock {
  position: absolute;
  top: 7%;
  left: 8%;
  color: var(--clock);
  font-family: system-ui, Roboto, sans-serif;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}
.shift-note {
  margin-block: auto;
  font-size: clamp(2.25rem, 3.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.shift-screen[data-look="1"] .shift-note { margin-block: auto 0; text-align: right; color: var(--wall-word); }
.shift-screen[data-look="2"] { background: var(--wall-deep); }
.shift-screen[data-look="2"] .shift-note { margin-block: 0 auto; }
.shift-screen[data-look="3"] { background: var(--wall-deep); }
.shift-screen[data-look="4"] .shift-note { margin-block: auto 0; text-align: right; }
.shift-screen[data-look="5"] .shift-note { margin-block: 0 auto; color: var(--wall-word); }

.quiet {
  min-height: 48px;
  white-space: nowrap;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--muted);
  border-radius: 14px;
  background: none;
  cursor: pointer;
}
.quiet:hover { background: var(--surface); }

/* The one band that goes back to the wall color */
.private { background: var(--wall); color: var(--wall-ink); }
.private-in {
  padding: clamp(64px, 11vw, 136px) var(--edge);
}
.private h2 { max-width: 14em; }
.facts {
  margin: 32px 0 8px;
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  line-height: 1.3;
}
.private-in > p { max-width: 38rem; margin-top: 18px; }

.plans h2 { max-width: 13em; }
.lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.lists h3 { font-size: 1.5rem; }
.lists ul { margin-top: 10px; }
.lists li { padding: 11px 0; border-top: 1px solid var(--line); }
.lists .aside { margin-top: 14px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px var(--edge) 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}
.foot p { display: flex; align-items: center; gap: 10px; }
.foot img { flex: none; border-radius: 6px; }
.foot nav { margin-left: -8px; }

/* Privacy and support */
.doc .bar {
  max-width: 44rem;
  margin: 0 auto;
  padding: 10px var(--gutter);
}
.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 32px var(--gutter) 72px;
}
.page h1 { font-size: clamp(2.75rem, 11vw, 4.25rem); line-height: 1.12; letter-spacing: -0.015em; }
.page h1 + .aside { margin-top: 12px; }
.page .lead { max-width: none; margin-top: 24px; }
.page h2 { margin-top: 44px; font-size: 1.625rem; line-height: 1.25; letter-spacing: 0; }
.page p { margin-top: 12px; }
.page ul { margin-top: 12px; padding-left: 1.2em; list-style: disc; }
.page li { margin-top: 8px; }
.page strong { font-weight: 600; }
.page code { font-family: inherit; }
.page table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 1rem; }
.page th { padding: 8px 12px 8px 0; font-weight: 600; text-align: left; }
.page td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.page td:first-child { width: 38%; }
.doc .foot { max-width: 44rem; margin: 0 auto; padding-inline: var(--gutter); }

/* Placeholders stand out until they are replaced. See site/README.md. */
.todo {
  padding: 0 4px;
  background: var(--todo);
  color: var(--todo-ink);
  border-radius: 3px;
}

@media (min-width: 720px) {
  .band { gap: 56px; }
  .lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .wall {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "bar  bar"
      "time pin"
      "big  pitch";
    column-gap: clamp(40px, 6vw, 96px);
    padding-bottom: clamp(40px, 7vh, 72px);
  }
  .time { padding-top: 3vh; }
  .pin { align-self: end; }
  .big, .pitch { align-self: end; }
  .clock { font-size: clamp(5.5rem, 9vw, 8rem); }
  .wall { --note-size: clamp(4.5rem, min(8.2vw, 15vh), 8.5rem); }
  .note[data-len="m"] { font-size: clamp(3.75rem, min(6.4vw, 12vh), 6.5rem); }
  .note[data-len="l"] { font-size: clamp(3rem, min(4.8vw, 9vh), 5rem); }

  .stays { grid-template-columns: 5fr 7fr; align-items: center; }
  .act { grid-template-columns: 6fr 6fr; align-items: center; }
  .act .shots { justify-self: center; width: 100%; }
  .repeat { grid-template-columns: 5fr 7fr; align-items: center; }
  .living { grid-template-columns: 5fr 7fr; align-items: center; }
  .living .shift { justify-self: center; width: 100%; max-width: 19rem; }
  .act .words, .living .words { order: 0; }

  .private-in {
    display: grid;
    grid-template-columns: 7fr 5fr;
    column-gap: clamp(40px, 6vw, 96px);
  }
  .private h2 { grid-column: 1 / -1; margin-bottom: 14px; }
  .facts { grid-column: 2; grid-row: 2 / span 3; margin: 16px 0 0; }
  .private-in > p { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
