/* Casa Valença buying guide */
:root {
  color-scheme: light;
  --paper: #fbf6ed;
  --ink: #2d1d1c;
  --wine: #6b2434;
  --muted: #5e4f48;
  --rule: #d8c8ba;
  --panel: #f0e2d4;
  --cta: #176348;
  --cta-hover: #104e39;
  --display: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem / 1.65 var(--body);
}
h1, h2, p, figure, dl, dd { margin: 0; }
p + p { margin-top: 1rem; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.8vw, 5.6rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); line-height: 1.15; margin-bottom: .75rem; }
a { color: var(--wine); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--wine); outline-offset: 5px; }
::selection { color: var(--paper); background: var(--wine); }
.wrap { width: min(72rem, calc(100% - clamp(2rem, 7vw, 6rem))); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; padding: .5rem; background: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }
.masthead, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding-block: .7rem;
}
.masthead { border-bottom: 1px solid var(--rule); }
.wordmark { font: 1.65rem / 1.15 var(--display); color: var(--ink); text-decoration: none; padding-block: .55rem; }
nav { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .88rem; }
.article-head { padding-block: clamp(1.15rem, 3vw, 2.6rem) clamp(1.35rem, 4vw, 2.75rem); }
.offer-disclosure { color: var(--muted); font-size: .875rem; line-height: 1.5; margin-bottom: .55rem; }
h1 { max-width: 14ch; }
.standfirst { max-width: 49ch; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.24rem); margin-top: 1rem; }
.opening { display: grid; gap: clamp(1rem, 4vw, 3rem); align-items: start; }
.opening img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 674;
  object-fit: contain;
  padding: clamp(.65rem, 2vw, 1.3rem);
  background: #fff;
  border-radius: 4px;
}
figcaption { color: var(--muted); font-size: .8rem; margin-top: .48rem; }
.fact-list { border-block: 1px solid var(--rule); margin-block: 1.15rem; }
.fact-list > div { display: flex; justify-content: space-between; gap: .8rem; padding: .52rem 0; }
.fact-list > div + div { border-top: 1px solid var(--rule); }
.fact-list dt { color: var(--muted); }
.fact-list dd { font-weight: 600; text-align: right; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 54px;
  padding: .7rem 1.2rem;
  border-radius: .65rem;
  background: var(--cta);
  color: white;
  box-shadow: 0 3px 8px rgb(23 99 72 / 20%);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button span { font-size: 1.2em; line-height: 1; }
.button[href]:hover { background: var(--cta-hover); }
.button[aria-disabled="true"] { cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .button-pulse.is-in-view { animation: offer-pulse 1.8s ease-out .55s 2; }
  @keyframes offer-pulse {
    0%, 85%, 100% { box-shadow: 0 3px 8px rgb(23 99 72 / 20%), 0 0 0 0 transparent; }
    24% { box-shadow: 0 3px 8px rgb(23 99 72 / 20%), 0 0 0 3px rgb(23 99 72 / 20%); }
    72% { box-shadow: 0 3px 8px rgb(23 99 72 / 20%), 0 0 0 9px transparent; }
  }
}
.button-note:not(:empty) { margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.reading { max-width: 64ch; margin: clamp(2.5rem, 8vw, 5rem) auto; }
.closing { display: grid; gap: 1.1rem 2.25rem; background: var(--panel); padding: clamp(1.2rem, 5vw, 3.1rem); align-items: center; }
.closing p { max-width: 60ch; }
.closing .offer-disclosure { max-width: 38ch; }
.supplement-disclosure { margin-top: 1rem; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.footer { margin-block: 2.5rem 1rem; border-top: 1px solid var(--rule); color: var(--muted); }
.analytics-preferences {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.analytics-consent {
  position: fixed;
  z-index: 2;
  right: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100% - 2rem));
  padding: .95rem;
  border: 1px solid var(--rule);
  border-radius: .65rem;
  background: var(--paper);
  box-shadow: 0 .35rem 1.5rem rgb(45 29 28 / 16%);
  font-size: .9rem;
  line-height: 1.4;
}
.analytics-consent p { margin-top: .35rem; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.analytics-actions button {
  min-height: 44px;
  padding: .45rem .65rem;
  border: 1px solid var(--rule);
  border-radius: .35rem;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.analytics-consent button:focus-visible, .analytics-preferences:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}
.support { max-width: 48rem; padding-block: clamp(2rem, 8vw, 5rem); }
.support h1 { margin-bottom: 1.4rem; max-width: none; }
.support h2 { margin-top: 2rem; }
.draft-note { padding: .85rem 1rem; background: var(--panel); color: var(--ink); }
@media (min-width: 800px) {
  .opening { grid-template-columns: 1.55fr 1fr; }
  .opening-copy { padding-top: .3rem; }
  .closing { grid-template-columns: 1fr max-content; }
}
@media (max-width: 420px) {
  .button { width: 100%; }
  .wordmark { font-size: 1.45rem; }
}

/* YuSleep article layout */
h1 {
  max-width: 22ch;
  font-size: clamp(2.75rem, 6.4vw, 5.4rem);
}
.article-head { max-width: 58rem; }
.advertorial-label {
  margin-bottom: 0.6rem;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.routine-image { margin: 1.2rem 0; }
.routine-image img { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 520px) {
  .article-head h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  .masthead nav { gap: 0.1rem 0.85rem; }
}
