/* ==========================================================================
   Rulf & Daughters — landing page styles
   Plain CSS. No framework, no build step. Mobile-first: the base rules are
   for small phones (320px and up); the media queries add the wider layouts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Palette: warm off-white background, soft brown and taupe text */
  --bg: #faf6ef;            /* page background */
  --bg-tint: #f3ebdf;       /* alternate section band */
  --surface: #fffcf7;       /* cards, callouts, the waitlist panel */
  --ink: #3b2e25;           /* main text */
  --ink-soft: #66564a;      /* secondary text */
  --accent: #7a4f35;        /* links, small accents, focus ring */
  --button: #4b382b;        /* button background */
  --button-hover: #33261c;
  --line: #dccdb8;          /* hairlines */
  --line-strong: #bfa98e;   /* badge and field outlines */
  --footer-bg: #3b2e25;
  --footer-ink: #eadfce;

  /* Type: system fonts only, nothing to download */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 68rem;                              /* widest content width */
  --measure: 33em;                            /* comfortable reading width, about 70 characters */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);      /* side padding */
  --section: clamp(3.5rem, 9vw, 6.5rem);      /* space above and below a section */
  --radius: 0.625rem;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

h1 {
  font-size: clamp(2.125rem, 1.45rem + 3.4vw, 3.5rem);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.7vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.4375rem);
  line-height: 1.25;
}

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

ul {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  background: #e8dcc9; /* shown while a photo loads */
}

figure {
  margin: 0;
}

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

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

/* Visible keyboard focus on everything focusable */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

::selection {
  background: #e7d6bd;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--tint {
  background: var(--bg-tint);
}

/* Even vertical spacing between stacked paragraphs */
.flow > * + * {
  margin-top: 1.15em;
}

/* Heading on the left, content on the right (stacked on small screens) */
.split {
  display: grid;
  gap: 1.5rem;
}

.split-body {
  min-width: 0;
  max-width: var(--measure);
}

@media (min-width: 60em) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.wordmark .amp {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   5. Section 1 — Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(1.75rem, 5vw, 4rem) var(--section);
}

.hero-grid {
  display: grid;
  gap: clamp(2.25rem, 6vw, 4.5rem);
}

.hero-copy {
  min-width: 0;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy > p {
  max-width: 33em;
  margin-top: 1.25rem;
}

.hero-copy > h1 + p {
  margin-top: 1.75rem;
}

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.badges li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.25;
}

.hero-copy > .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  max-width: 36em;
  margin-top: 2.25rem;
}

.cta-note {
  flex: 1 1 14rem;
  color: var(--ink-soft);
  font-size: 0.9375em;
  line-height: 1.5;
}

.button {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--button);
  color: var(--bg);
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--button-hover);
  color: var(--bg);
}

.button:focus-visible {
  border-radius: 999px;
}

.hero-photo {
  width: 100%;
  max-width: 28rem;
}

.hero-photo img,
.photo img {
  width: 100%;
  border-radius: var(--radius);
}

@media (min-width: 56em) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }

  .hero-photo {
    justify-self: end;
  }
}

/* --------------------------------------------------------------------------
   6. Lists of a name plus its detail (Sections 2 and 4)
   -------------------------------------------------------------------------- */

.free-list,
.ingredient-list {
  list-style: none;
  margin-top: 2.25rem;
  border-bottom: 1px solid var(--line);
  container-type: inline-size;
}

.free-list li,
.ingredient-list li {
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}

.item-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
}

.item-detail {
  margin-top: 0.3rem;
  font-size: 0.9375em;
  line-height: 1.6;
}

/* Name on the left, detail on the right, when the list itself is wide enough */
@container (min-width: 34rem) {
  .free-list li,
  .ingredient-list li {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: baseline;
  }

  .free-list .item-detail,
  .ingredient-list .item-detail {
    margin-top: 0;
  }
}

.small-print {
  max-width: 33em;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   7. Callout boxes (Sections 2 and 5)
   -------------------------------------------------------------------------- */

.callout {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout h3 {
  margin-bottom: 0.6rem;
}

.callout p {
  font-size: 0.9375em;
  line-height: 1.6;
}

@media (min-width: 40em) {
  .callout {
    padding: 1.75rem 2rem;
  }
}

/* --------------------------------------------------------------------------
   8. Section 3 — Story
   -------------------------------------------------------------------------- */

.pull-quote {
  margin-top: 2.5rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.2rem + 0.9vw, 1.6875rem);
  line-height: 1.35;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   9. Photos inside sections (Section 5, plus the optional extras)
   -------------------------------------------------------------------------- */

.split-head .photo {
  max-width: 20rem;
  margin-top: 1.75rem;
}

@media (min-width: 60em) {
  .split-head .photo {
    max-width: 22rem;
    margin-top: 2.25rem;
  }
}

/* --------------------------------------------------------------------------
   10. Section 6 — What it is, and what it is not
   -------------------------------------------------------------------------- */

.section-title {
  max-width: 20em;
}

.compare {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.compare-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mark-list {
  max-width: 33em;
  margin-top: 1rem;
  padding-left: 1.25rem;
  list-style: disc;
  font-size: 0.9375em;
  line-height: 1.6;
}

.mark-list li {
  text-wrap: pretty;
}

.mark-list--not {
  list-style: circle;
}

.mark-list li::marker {
  color: var(--accent);
}

.mark-list li + li {
  margin-top: 0.7rem;
}

@media (min-width: 48em) {
  .compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .compare-card {
    padding: 2rem 2.25rem 2.25rem;
  }
}

/* --------------------------------------------------------------------------
   11. Section 7 — Waitlist
   -------------------------------------------------------------------------- */

.panel {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

/* The gap above the form sits on the paragraph, so it is still there after
   the placeholder is replaced by the MailerLite embed. */
#waitlist .split-body > p:first-child {
  margin-bottom: 1.75rem;
}

/* Placeholder for the MailerLite embed. Delete with the placeholder block. */
.waitlist-placeholder {
  padding: 1.25rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.placeholder-flag {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.form-preview {
  margin-top: 1rem;
}

.form-preview label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.form-preview input {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.3;
}

.form-preview button {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--bg);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
}

.form-preview input:disabled,
.form-preview button:disabled {
  cursor: not-allowed;
}

.form-preview button:disabled {
  opacity: 0.6;
}

/* The real MailerLite embed, once pasted. These rules do nothing until then.
   They line the form up with the text column instead of centring it in its
   own padded box, and keep the field text at 16px so iPhones do not zoom the
   page when the field is tapped. */
#waitlist .split-body .ml-form-embedContainer .ml-form-align-center,
#waitlist .split-body .ml-form-embedContainer .ml-form-align-default,
#waitlist .split-body .ml-form-embedContainer .ml-form-align-right {
  text-align: left !important;
}

#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper {
  background: transparent;
}

#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody,
#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody {
  padding: 0;
}

/* MailerLite's own title and description. The heading and the paragraph are
   already on this page, so this block is hidden even if it was left in the
   MailerLite form or only emptied there (an emptied one can leave a gap). */
#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedContent {
  display: none;
}

#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit,
#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody .ml-form-successContent {
  margin-bottom: 0;
}

#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input,
#waitlist .split-body .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-horizontalRow input {
  font-size: 1rem !important;
}

.waitlist-trust {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   12. Section 8 — Questions
   -------------------------------------------------------------------------- */

.faq {
  border-bottom: 1px solid var(--line);
}

.faq-item {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq-item h3 {
  margin-bottom: 0.6rem;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.site-footer p {
  max-width: 33em;
}

.site-footer p + p {
  margin-top: 1rem;
}

/* Links on the dark footer (for example a contact email): the normal link
   color is too dark here, so use the footer text color instead */
.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer :focus-visible {
  outline-color: var(--footer-ink);
}

/* --------------------------------------------------------------------------
   14. Larger text on wider screens
   -------------------------------------------------------------------------- */

@media (min-width: 48em) {
  body {
    font-size: 1.125rem;
  }
}

/* --------------------------------------------------------------------------
   15. Windows high-contrast mode (forced colors)
   Background fills are removed there, so the two buttons get an outline
   instead. The padding shrinks by the border width, so the size is unchanged.
   -------------------------------------------------------------------------- */

@media (forced-colors: active) {
  .button,
  .form-preview button {
    padding: calc(0.9rem - 2px) calc(1.5rem - 2px);
    border: 2px solid;
  }
}

/* --------------------------------------------------------------------------
   16. Privacy page (privacy.html)
   -------------------------------------------------------------------------- */

/* On the privacy page the wordmark links back to the main page */
.wordmark a {
  color: inherit;
  text-decoration: none;
}

.wordmark a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.text-page {
  padding-block: clamp(2rem, 6vw, 4rem) var(--section);
}

.text-page-body {
  max-width: var(--measure);
}

/* Same size as the section headings on the main page */
.text-page h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.7vw, 2.5rem);
  letter-spacing: -0.01em;
}

.text-page h1 + p {
  margin-top: 1.5rem;
}

/* The privacy page is shorter than most windows. This keeps its footer band
   at the bottom of the window, with no strip of page background under it. */
.short-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.short-page > main {
  flex-grow: 1;
}
