/* One stylesheet for every page of the site. Paper, ink and rosemary, as in the app. */
:root {
  color-scheme: light;
  --paper: #fbf9f6;
  --oat: #f3ede4;
  --ink: #1b2a4a;
  --quiet: #6c6256;
  --line: #e5ddd3;
  --rosemary: #2b4c37;
  --rosemary-soft: #e3eadf;
  --butter: #f5dda7;
  --danger: #b4432b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

main {
  max-width: 44rem;
  margin: 0 auto;
}

/* The app's own typefaces, served from this site. Used on the home page; the long pages keep
   the reader's system fonts. Both are free to use (the licences are beside the files). */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

/* The home page: what the app is, in under a minute. One column on a phone; on a wider screen
   each feature is a picture of the app beside a few words, on alternating sides. */
body.home {
  padding: 0 24px 24px;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body.home main {
  max-width: 56rem;
}

body.home h1,
body.home h2 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.02em;
}

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero .logo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.75rem, 9vw, 4.25rem);
  line-height: 1.05;
}

.hero .lead {
  max-width: 34rem;
  margin: 0 auto 24px;
  color: var(--quiet);
  font-size: 1.25rem;
}

.hero .soon {
  display: inline-block;
  margin: 0;
  padding: 8px 20px;
  border-radius: 40px;
  background: var(--rosemary-soft);
  color: var(--rosemary);
  font-weight: 600;
}

.feature {
  display: grid;
  gap: 24px;
  justify-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.feature h2,
.more h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 2rem;
}

.feature p {
  max-width: 26rem;
  margin: 0 auto;
  color: var(--quiet);
  font-size: 1.125rem;
}

/* A picture of the app, edged like a phone with a thin line: no shadows, as in the app. */
.screen {
  display: block;
  width: min(260px, 70vw);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  outline: 8px solid var(--oat);
}

.more {
  padding: 40px 0 16px;
  border-top: 1px solid var(--line);
}

.more h2 {
  text-align: center;
}

.more ul {
  display: grid;
  gap: 12px;
  max-width: 44rem;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
}

.more li {
  margin: 0;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--oat);
  color: var(--quiet);
}

.more strong {
  color: var(--ink);
}

body.home footer {
  text-align: center;
}

@media (min-width: 720px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    padding: 56px 0;
    text-align: left;
  }

  .feature p {
    margin: 0;
  }

  /* Every second feature has its picture on the right. */
  .feature:nth-of-type(even) .screen {
    order: 2;
  }

  .more ul {
    grid-template-columns: 1fr 1fr;
  }
}

/* The "no page here" page sits in the middle of the screen. */
body.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

body.centered main {
  max-width: 34rem;
  margin: 0;
}

h1,
h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  margin: 0 0 8px;
  font-size: 2.5rem;
}

h2 {
  margin: 40px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 1.6rem;
}

h3 {
  margin: 24px 0 4px;
  font-size: 1.0625rem;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--rosemary);
}

.quiet {
  color: var(--quiet);
  font-size: 1rem;
}

.note {
  margin: 16px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--butter);
}

.note.calm {
  background: var(--oat);
}

table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 1rem;
}

th,
td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

nav,
footer {
  margin: 32px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 1rem;
}

nav {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

nav a,
footer a {
  margin-right: 16px;
}

/* The owner's moderation page. */
label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
}

input[type='password'],
input[type='search'] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--oat);
  color: var(--ink);
  font: inherit;
}

button {
  margin: 8px 8px 0 0;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--oat);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.main {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

button.danger {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* A link dressed as a button: on the page a recipe share link opens. */
a.button {
  display: inline-block;
  margin: 8px 8px 0 0;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 40px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

a.button.quiet-button {
  border-color: var(--line);
  background: var(--oat);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.recipe {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.recipe h3 {
  margin: 0 0 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 1.35rem;
}

.recipe .held {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 40px;
  background: var(--butter);
  font-size: 0.875rem;
}

.recipe .reports {
  margin: 8px 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--rosemary-soft);
}

.recipe details {
  margin: 8px 0;
}

.recipe pre {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.95rem;
}

#message {
  min-height: 1.5em;
  margin: 12px 0;
  font-weight: 600;
}

/* A quiet line under the footer's links, such as the note about store names. */
footer .small-print {
  margin: 12px 0 0;
  font-size: 0.875rem;
}
