/* Shijro website. Tokens mirror shijro/lib/theme/tokens.ts (Oxblood, #116). */
:root {
  --ground: #f5f2ea;
  --surface: #fcfaf4;
  --input: #e8e3d7;
  --ink: #1c1315;
  --muted: #6a6162;
  --faint: #857c7d;
  --line: #dad5ca;
  --primary: #5b1f2b;
  --primary-text: #5b1f2b;
  --primary-soft: #f5dee1;
  --on-primary: #f5f2ea;
  --on-primary-muted: rgba(245, 242, 234, 0.78);
  --secondary: #3a1219;
  --accent: #b78934;
  --accent-soft: #f0e7d3;
  --danger: #ad4410;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --body:
    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, Menlo, monospace;
}
/* Night is warm charcoal, not a dark oxblood, as in the app. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1113;
    --surface: #231a1c;
    --input: #2d2425;
    --ink: #f5f2ea;
    --muted: #cab0b4;
    --faint: #8e7a7d;
    --line: #3a3031;
    --primary: #793243;
    --primary-text: #e6acb5;
    --primary-soft: #371e23;
    --secondary: #4a1d27;
    --accent: #d4a845;
    --accent-soft: #2a2410;
    --danger: #e8875a;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
main.wide {
  max-width: 64rem;
}

/* Header */
header.site {
  border-bottom: 1px solid var(--line);
}
header.site .inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
header.site a {
  color: var(--ink);
  text-decoration: none;
}
header.site a.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
header.site a.brand svg {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
header.site nav {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
header.site nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}
header.site nav a:hover {
  color: var(--primary-text);
}
/* The Play link in the header, on every page: a small primary pill. After
   the links on a wide screen; on a phone it sits beside the brand and the
   links wrap underneath, so the header stays two short rows. */
header.site a.nav-cta {
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
header.site a.nav-cta:hover {
  filter: brightness(1.08);
}
@media (max-width: 720px) {
  header.site .inner {
    gap: 0.6rem 1.25rem;
  }
  header.site a.nav-cta {
    order: 2;
    margin-left: auto;
  }
  header.site nav {
    order: 3;
    margin-left: 0;
    width: 100%;
  }
}

/* Type */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.6rem;
}
h3 {
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
}
p,
li {
  color: var(--ink);
}
.muted {
  color: var(--muted);
}
/* Sentence case, in the body face. The tracked-out uppercase mono this used
   to be is the one label the app deliberately does not have; see
   docs/design.md. */
.eyebrow {
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
a {
  color: var(--primary-text);
}
strong {
  font-weight: 700;
}

/* Cards and forms (deletion page) */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
input[type='email'],
input[type='text'] {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input);
  color: var(--ink);
}
input:focus {
  /* Lapis at 11.5:1 rather than gold at 3:1: a focus ring is the one thing
     that has to be unmissable. */
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  text-decoration: none;
  margin-top: 1rem;
}
button:hover,
.button:hover {
  filter: brightness(1.08);
}
.button.outline {
  background: transparent;
  color: var(--primary-text);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}
button.link {
  background: none;
  border: none;
  color: var(--primary-text);
  padding: 0;
  margin-left: 1rem;
  font-weight: 500;
}
button:disabled {
  opacity: 0.6;
  cursor: default;
}
.error {
  color: var(--danger);
  margin-top: 0.75rem;
}
.notice {
  color: var(--muted);
  margin-top: 0.75rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 1rem;
}
.check input {
  margin-top: 0.35rem;
}
.check span {
  font-weight: 400;
}

/* Home page */
main.wide > section {
  margin-top: 3.5rem;
}
main.wide > section.hero-band {
  margin-top: 0;
}
.eyebrow + h1,
.eyebrow + h2 {
  margin-top: 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
  padding: 2rem 0 1rem;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.5rem;
}
.hero .actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero .actions .button {
  margin-top: 0;
}
.hero .actions .note {
  font-size: 0.85rem;
  color: var(--faint);
  width: 100%;
  margin: 0.25rem 0 0;
}
.button svg {
  width: 18px;
  height: 18px;
}
.phone {
  position: relative;
  border-radius: 28px;
  /* A phone is dark whatever the page is, so the bezel keeps a paper-toned
     rim: without it the body disappears into the night ground. */
  background: #0b0b12;
  padding: 10px;
  box-shadow:
    0 30px 60px -30px rgba(40, 11, 18, 0.55),
    0 0 0 1px rgba(245, 242, 234, 0.22);
}
/* The screen, not the phone, is 9:16: the bezel is padding round it, and a
   9:16 phone would leave the screen a little narrow and crop the capture's
   sides. */
.phone .screen {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
}
/* The frame is the device's own aspect and the captures are full screens,
   so the image fills it exactly. The old rule shaved 3.1% off the top to
   hide the status bar, a figure tuned to a capture size that has since
   changed, which left a sliver of it showing. */
.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .phone {
  width: min(280px, 100%);
  margin: 0 auto;
  transform: rotate(-2deg);
}
.hero-band {
  position: relative;
  overflow: hidden;
}
.hero-band::before {
  content: '';
  position: absolute;
  right: -160px;
  top: -200px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 90px solid var(--primary-soft);
  opacity: 0.8;
  pointer-events: none;
}
.hero-band > * {
  position: relative;
}
.features {
  display: grid;
  /* Eight cards: two rows of four on a wide window, so none sits alone. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}
.feature .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-text);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}
.feature .icon svg {
  width: 22px;
  height: 22px;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
/* Every screen visible at once, wrapped into centred rows: four and three
   on a wide window, two a row on a phone. A sideways-scrolling row hid the
   rest behind a scrollbar macOS does not show, so it read as cut off. */
.screens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 1.5rem;
  margin-top: 1rem;
}
.screens figure {
  margin: 0;
  flex: 0 1 200px;
}
.screens .phone {
  width: 100%;
}
.screens figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}
/* Questions people ask before they install, answered on the page. */
.faq {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--primary-text);
  font-weight: 400;
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq details p {
  color: var(--muted);
  margin: 0.6rem 0 0;
  max-width: 44rem;
}
.band {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
}
.band h2 {
  color: var(--on-primary);
  margin: 0 0 0.4rem;
}
.band p {
  color: var(--on-primary-muted);
  margin: 0;
}
/* Gold marks lineage and nothing else, and it never sets text; see
   docs/design.md. On an oxblood band the call to action inverts to paper with
   an oxblood label, the same way a roundel does on the person's plate. */
.band .eyebrow {
  color: var(--on-primary-muted);
}
.band .button {
  background: var(--on-primary);
  border-color: var(--on-primary);
  color: var(--primary);
  margin: 0;
}
/* The closing ask on every page that isn't the home page. */
.app-cta {
  max-width: 44rem;
  margin: 0 auto 3rem;
  width: calc(100% - 2.5rem);
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  gap: 0.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.app-cta p {
  margin: 0.25rem 0;
  color: var(--muted);
}
.app-cta .app-cta-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
}
.app-cta .button {
  margin-top: 0.5rem;
}

footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
footer a {
  color: var(--muted);
}
footer a:hover {
  color: var(--primary-text);
}
@media (max-width: 960px) and (min-width: 721px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }
  .hero .phone {
    transform: none;
    width: min(240px, 100%);
  }
  .screens figure {
    flex-basis: calc(50% - 0.75rem);
  }
  .features {
    grid-template-columns: 1fr;
  }
  .band {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  button {
    transition: filter 120ms ease;
  }
}

/* Where the name comes from: the mark large beside the story. */
#name .origin {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 2rem;
  align-items: start;
}
#name .origin svg {
  width: 148px;
  height: 148px;
  border-radius: 33px;
}
#name .shajra {
  font-size: 1.6rem;
  line-height: 1;
  vertical-align: -0.1em;
}
@media (max-width: 640px) {
  #name .origin {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* The invite page, /j/<code>, which the worker renders. The code is set large
   in the mono face so it can be read out over the phone character by
   character. */
main.invite .invite-code {
  font-family: var(--mono);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
main.invite .card .eyebrow {
  margin-bottom: 0.25rem;
}
main.invite .card p:last-child {
  margin-bottom: 0;
}
main.invite .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}
main.invite .actions .button {
  margin-top: 0;
}
