/* UnBizzy — shared styles
   Palette from the app: Sherwin Williams "Reticence" inspired.
   No third-party requests anywhere in this file. */

/* Playfair Display, self-hosted.
   If the font files aren't present, browsers fall back to Georgia
   and the site still looks right. */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-Italic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --daisy-gold: #E8A849;
  --daisy-pink: #D94F6B;
  --stem-green: #4A8C5E;
  --petal-white: #F8F1EE;
  --whisper: #FDF9F7;
  --reticence: #E5D6D1;
  --espresso: #4A3530;
  --warm-grey: #7A5E56;
  --dusty-rose: #B09890;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--petal-white);
  color: var(--espresso);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- layout ---------- */

.page {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
}

.masthead {
  text-align: center;
  padding: 2.5rem 1.5rem 0;
}

.masthead img {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.masthead--home img { max-width: 380px; }

/* ---------- type ---------- */

h1, h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.2;
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 1rem;
}

.masthead--home + .page h1 {
  text-align: center;
  color: var(--warm-grey);
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.6rem;
}

p { margin: 0 0 1.1rem; }

.lead {
  font-size: 1.15rem;
  color: var(--warm-grey);
}

.meta {
  color: var(--dusty-rose);
  font-size: 0.9rem;
}

a {
  color: var(--daisy-pink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--espresso); }

a:focus-visible {
  outline: 2px solid var(--daisy-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

ul { padding-left: 1.2rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }

/* ---------- small pieces ---------- */

.rule {
  border: 0;
  border-top: 1px solid var(--reticence);
  margin: 2.5rem 0;
}

.notice {
  background: var(--whisper);
  border-left: 3px solid var(--daisy-gold);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
}

.notice p:last-child { margin-bottom: 0; }

.contact {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--reticence);
  padding: 1.75rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--dusty-rose);
  font-size: 0.9rem;
}

.site-footer nav {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  justify-content: center;
}

.site-footer a { color: var(--warm-grey); }
.site-footer a:hover { color: var(--espresso); }

/* ---------- responsive ---------- */

@media (max-width: 30rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  .masthead--home img { max-width: 280px; }
  .page { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- forms ---------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--espresso);
  background: var(--whisper);
  border: 1px solid var(--reticence);
  border-radius: 4px;
}

input[type="email"]:focus-visible {
  outline: 2px solid var(--daisy-gold);
  outline-offset: 1px;
  border-color: var(--daisy-gold);
}

button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--espresso);
  background: var(--daisy-gold);
  border: 0;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
}

button:hover { background: #d99a3f; }

button:focus-visible {
  outline: 2px solid var(--espresso);
  outline-offset: 2px;
}

button[disabled] {
  background: var(--reticence);
  color: var(--dusty-rose);
  cursor: default;
}

button.danger { background: var(--daisy-pink); color: var(--whisper); }
button.danger:hover { background: #c74560; }

.field { margin-bottom: 1.5rem; }

.result {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--dusty-rose);
  background: var(--whisper);
}

.result p:last-child { margin-bottom: 0; }
.result--ok { border-left-color: var(--stem-green); }
.result--bad { border-left-color: var(--daisy-pink); }
.hidden { display: none; }

/* ---------- homepage ---------- */

/* The homepage is wider than the reading pages. Text blocks are held
   to a comfortable measure inside it; tables and grids use the full
   width. */

.page--home {
  max-width: 72rem;
  padding-top: 1.5rem;
}

.masthead--home { padding-top: 2rem; }
.masthead--home img { max-width: 320px; }

.measure { max-width: 40rem; }

.section {
  padding: 3.5rem 0 1rem;
}

.section h2 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.section > p { margin-bottom: 1.5rem; }

.section .lead { font-size: 1.15rem; }

/* soft band behind alternate sections, running edge to edge.
   Box-shadow never adds scrollable overflow, so this needs no
   overflow clipping on the body. */
.band {
  padding: 3.5rem 0 3rem;
  background: var(--whisper);
  box-shadow: 0 0 0 100vmax var(--whisper), 0 0 0 calc(100vmax + 1px) var(--reticence);
  clip-path: inset(-1px -100vmax);
}

/* hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
  padding: 1.5rem 0 2rem;
}

.masthead--home + .page--home .hero h1 {
  text-align: left;
  color: var(--espresso);
  font-size: 3.4rem;
  margin: 0 0 1.25rem;
}

.hero .lead { font-size: 1.3rem; }
.hero p:not(.lead) { font-size: 1.05rem; max-width: 34rem; }

.hero img {
  width: 100%;
  max-width: 26rem;
  height: auto;
  display: block;
  margin: 0 auto;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 52% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 52% 50%, #000 62%, transparent 100%);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 0;
}

.button {
  display: inline-block;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--espresso);
  background: var(--daisy-gold);
  border-radius: 4px;
  padding: 0.85rem 1.75rem;
  text-decoration: none;
}

.button:hover { background: #d99a3f; color: var(--espresso); }

/* how a week goes */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li { margin: 0; }

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--daisy-gold);
  margin-bottom: 0.6rem;
}

.steps h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.steps p { margin: 0; color: var(--warm-grey); }

/* pull quote */

.pull {
  margin: 3.5rem auto 0;
  max-width: 44rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1.35;
  color: var(--warm-grey);
  text-align: center;
}

/* the things it gets right */

.truths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;
  margin-top: 1rem;
}

.truths h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.truths p { margin: 0; font-size: 0.97rem; }

/* the allergy line */

.honest {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1rem 4rem;
  align-items: start;
  border-left: 3px solid var(--daisy-pink);
  padding: 0.5rem 0 0.5rem 2rem;
  margin: 3.5rem 0 0;
}

.honest h2 { font-size: 2rem; margin: 0; }
.honest p:last-child { margin-bottom: 0; }

/* comparison tables */

.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 0.75rem;
}

.swipe-hint { display: none; }

.compare {
  width: 100%;
  min-width: 52rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  background: var(--whisper);
  border: 1px solid var(--reticence);
  border-radius: 6px;
}

.compare th, .compare td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--reticence);
  vertical-align: top;
  text-align: left;
}

.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

.compare thead th {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--espresso);
  background: var(--petal-white);
  border-bottom: 2px solid var(--reticence);
  vertical-align: bottom;
}

.compare thead th small {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--dusty-rose);
  margin-top: 0.15rem;
}

.compare tbody th {
  font-weight: 600;
  color: var(--espresso);
  width: 22%;
  min-width: 14rem;
}

.compare tbody th small {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--warm-grey);
}

.compare .us {
  background: #FBEBDD;
  color: var(--espresso);
  font-weight: 600;
}

.compare thead .us { border-top: 3px solid var(--daisy-gold); }

.compare td.center, .compare th.center { text-align: center; }

.compare td.center { vertical-align: middle; }

.compare svg {
  width: 1.3rem;
  height: 1.3rem;
  vertical-align: middle;
}

.compare--solo {
  min-width: 0;
  max-width: 40rem;
  margin-top: 0.5rem;
}

.compare--solo th { width: 9rem; min-width: 0; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--warm-grey);
  margin: 0 0 0.75rem;
}

.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend svg { width: 1.1rem; height: 1.1rem; }

.price {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  white-space: nowrap;
}

.placeholder {
  background: #FFF4C2;
  border: 1px dashed var(--daisy-gold);
  border-radius: 3px;
  padding: 0 0.3rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85em;
}

/* closing */

.closing {
  text-align: center;
  padding: 4rem 0 1rem;
}

.closing h2 { font-size: 2.4rem; margin: 0 0 0.75rem; }
.closing .lead { font-size: 1.25rem; }
.closing .cta { justify-content: center; }

/* responsive */

@media (max-width: 64rem) {
  .truths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead--home + .page--home .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 44rem) {
  .page--home { padding-top: 1rem; }
  .section { padding-top: 2.5rem; }
  .section h2, .honest h2 { font-size: 1.6rem; }
  .hero { grid-template-columns: 1fr; gap: 1rem; padding-top: 0.5rem; }
  .hero img { max-width: 14rem; order: -1; }
  .masthead--home + .page--home .hero h1 { font-size: 2.1rem; text-align: center; }
  .hero .lead, .hero p { text-align: center; }
  .hero .cta { justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .truths { grid-template-columns: 1fr; gap: 1.5rem; }
  .honest { grid-template-columns: 1fr; padding-left: 1.25rem; }
  .pull { font-size: 1.25rem; margin-top: 2.5rem; }
  .compare tbody th { min-width: 11rem; }
  .swipe-hint { display: block; }
  .closing h2 { font-size: 1.8rem; }
}
