/*
 * saltandhoney.app
 *
 * Colors are the app's own roles (iOS Assets.xcassets/Colors), light and dark.
 * Link text uses the darker terracotta from the design review (SET-5) so it
 * reads on cream. Titles use the system serif, which is New York on Apple
 * devices, the same face the app uses for recipe titles. No web fonts: the
 * site makes no request to anyone but itself.
 */

:root {
  --background: #F6F2EA;
  --surface: #FDFBF5;
  --surface-inset: #EDE6D9;
  --hairline: #DFD7C9;
  --ink: #2A2118;
  --ink-muted: #6B5F53;
  --accent: #B5552E;
  --accent-text: #A3482A;
  --on-accent: #FFFFFF;
  --accent-soft: #F2DBCF;
  --cookable: #2F7A4D;
  --shadow: 42 33 24;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-phone: 28px;
  --page: 1120px;
  --gutter: clamp(16px, 5vw, 40px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1A1613;
    --surface: #241F1A;
    --surface-inset: #2E2721;
    --hairline: #3B322A;
    --ink: #EEE6DA;
    --ink-muted: #A99C8C;
    --accent: #E08A5F;
    --accent-text: #E08A5F;
    --on-accent: #2A2118;
    --accent-soft: #3F2A20;
    --cookable: #6FBE8D;
    --shadow: 0 0 0;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

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

/* Phone frame around a screenshot */

.phone {
  margin: 0;
  border-radius: var(--radius-phone);
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 6px;
  box-shadow: 0 24px 60px -24px rgb(var(--shadow) / 0.35);
}

.phone img {
  border-radius: calc(var(--radius-phone) - 6px);
  width: 100%;
}

/* Hero */

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.hero h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.25rem);
  line-height: 1.05;
}

.hero h1 .line {
  display: block;
}

.hero .lede {
  margin-top: 20px;
  max-width: 34ch;
  font-size: 1.1875rem;
  color: var(--ink-muted);
}

.hero .phone {
  max-width: 340px;
  justify-self: center;
}

.availability {
  margin-top: 28px;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Sections */

.section {
  padding: clamp(56px, 9vw, 112px) 0;
}

.section h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
}

.section .body {
  margin-top: 16px;
  max-width: 52ch;
  color: var(--ink-muted);
}

.band {
  background: var(--surface-inset);
}

/* Tonight: the one wide image-and-text row */

.feature {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.feature .phone {
  max-width: 320px;
}

.checks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.checks li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
}

.checks .tag {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}

/* The app's own state colors: green only for Cookable, grey for what is missing. */
.tag--cookable {
  color: var(--cookable);
}

.tag--need {
  color: var(--ink-muted);
}

.tag--pick {
  color: var(--accent-text);
}

/* Import: typographic, no image */

.sources {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  max-width: 820px;
}

.sources h3 {
  font-size: 1.25rem;
}

.sources p {
  margin-top: 6px;
  color: var(--ink-muted);
}

/* Pantry and Cook Mode: two tiles */

.pair {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tile {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  overflow: hidden;
}

.tile h3 {
  font-size: 1.5rem;
}

.tile p {
  color: var(--ink-muted);
}

.tile .phone {
  margin-top: 16px;
  width: 100%;
  max-width: 280px;
  justify-self: center;
  align-self: end;
}

/* The top of the screen is the part that tells the story. */
.tile .phone img {
  aspect-ratio: 720 / 800;
  object-fit: cover;
  object-position: top;
}

.tile--accent {
  background: var(--accent-soft);
  border-color: transparent;
}

/* Cards: one centered statement */

.statement {
  text-align: center;
}

.statement h2 {
  max-width: 18ch;
  margin: 0 auto;
}

.statement .body {
  margin: 16px auto 0;
}

/* Privacy promises */

.promises {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}

.promises dt {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.promises dd {
  margin: 6px 0 0;
  color: var(--ink-muted);
}

/* Text pages: privacy, help, card link, 404 */

.page {
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(56px, 9vw, 112px);
}

.prose {
  max-width: 68ch;
}

.prose h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 40px;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 14px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 8px;
}

.prose .meta {
  margin-top: 12px;
  color: var(--ink-muted);
}

.notice {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.notice > :first-child {
  margin-top: 0;
}

/* The recipe card page, /r */

[hidden] {
  display: none !important;
}

.card-head h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-top: 6px;
}

.card-overline {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.card-meta {
  margin-top: 12px;
  color: var(--ink-muted);
}

.card-diets {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-diets .tag {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
}

.card-body {
  margin-top: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.card-body h2 {
  font-size: 1.5rem;
}

.card-ingredients {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}

/* One quantity column for the whole recipe, as in the apps, so "⅓ cup" and
   "150 g" line up across sections. */
.card-sections {
  margin-top: 12px;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 14px;
  row-gap: 10px;
}

.card-section-title {
  grid-column: 1 / -1;
  font-size: 1.0625rem;
  margin-top: 12px;
}

.card-lines,
.card-lines li {
  display: contents;
}

.card-qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.card-prep {
  color: var(--ink-muted);
}

.card-steps {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 22px;
}

.card-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 12px;
}

.card-steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-text);
}

.card-timer {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.card-empty {
  margin-top: 12px;
  color: var(--ink-muted);
}

.card-drinks {
  margin-top: 36px;
}

.card-drinks p {
  margin-top: 8px;
}

.card-credit {
  margin-top: 32px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.card-actions {
  margin-top: 32px;
}

.button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.button:hover {
  border-color: var(--ink-muted);
}

.button:active {
  transform: translateY(1px);
}

.get-app {
  margin-top: clamp(40px, 7vw, 72px);
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--accent-soft);
  max-width: 68ch;
}

.get-app h2 {
  font-size: 1.5rem;
}

.get-app p {
  margin-top: 10px;
}

.get-app .availability {
  margin-top: 16px;
  background: var(--surface);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 48px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

/* A little movement on arrival, and none for people who ask for none */

@media (prefers-reduced-motion: no-preference) {
  .hero .copy,
  .hero .phone {
    animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero .phone {
    animation-delay: 120ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Phones and small tablets: one column */

@media (max-width: 767px) {
  .hero .wrap,
  .feature,
  .pair,
  .promises {
    grid-template-columns: 1fr;
  }

  .hero .phone {
    max-width: 280px;
  }

  .feature .phone {
    order: 2;
    max-width: 280px;
    justify-self: center;
  }

  .sources {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .site-nav {
    gap: 16px;
  }

  .card-body {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header nav,
  .site-footer,
  .phone,
  .get-app,
  .card-actions,
  .skip {
    display: none;
  }

  .card-ingredients {
    border: 0;
    padding: 0;
    background: none;
  }

  .card-body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  body {
    background: #fff;
    color: #000;
  }
}
