/* =========================================================
   Melara Max Pillow — shared stylesheet
   Palette sampled from the official product photography:
   blush background, sky-blue contour foam, deep navy text.
   ========================================================= */

:root {
  --blush: #F7EEEC;
  --blush-deep: #F1DFDA;
  --white: #FFFFFF;
  --ink: #262A34;
  --ink-soft: #5B6270;
  --line: #E7DDD9;

  --blue-50: #EAF2FC;
  --blue-100: #C9DFF7;
  --blue-300: #8FB8EA;
  --blue-500: #4C7FBE;
  --blue-700: #345E93;
  --blue-900: #23415F;

  --good: #3F9142;
  --good-bg: #E9F5E9;
  --bad: #D2572F;
  --bad-bg: #FBE9E2;

  --star: #E0A93D;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow: 0 18px 40px -18px rgba(35, 65, 95, 0.28);
  --shadow-soft: 0 10px 26px -14px rgba(38, 42, 52, 0.18);

  --maxw: 1180px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--blue-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
p { margin: 0 0 1em; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 76px 0; }
section.tight { padding: 56px 0; }
.section-alt { background: var(--blush); }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--blue-500);
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.02rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--blue-300);
}
.btn-ghost:hover { background: var(--blue-50); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand .tag {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--blue-500);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 3px 8px;
  border-radius: 6px;
}
.main-nav { display: flex; gap: 30px; }
.main-nav a { font-size: 0.96rem; font-weight: 500; color: var(--ink-soft); }
.main-nav a:hover { color: var(--blue-700); }
.header-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn-primary { padding: 12px 18px; font-size: 0.92rem; }
}
@media (max-width: 480px) {
  .site-header .container { min-height: 66px; height: auto; padding: 10px 16px; gap: 10px; }
  .brand .tag { display: none; }
  .brand img { height: 24px; }
  .header-cta { gap: 10px; }
  .header-cta .btn-primary { padding: 10px 14px; font-size: 0.85rem; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.hero-rating .stars { color: var(--star); letter-spacing: 2px; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); }
.hero .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 52ch; }
.hero-checks { margin: 22px 0 30px; display: grid; gap: 10px; }
.hero-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; }
.hero-checks li::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--good-bg);
  border: 1px solid #cfe9cf;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='%233F9142' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 10.5l3 3 7-7'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-l); box-shadow: var(--shadow); }
.hero-media .badge {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 230px;
}
.hero-media .badge strong { display: block; font-size: 1.3rem; color: var(--blue-700); font-family: var(--font-display); }
.hero-media .badge span { font-size: 0.8rem; color: var(--ink-soft); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media .badge { left: 12px; bottom: -14px; }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.trust-strip li .ic { font-size: 1.15rem; }

/* ---------- Section heading block ---------- */
.section-head { max-width: 680px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Problem (two-column with image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
.split-media.shrink img { max-width: 75%; margin: 0 auto; display: block; }
.split-copy h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.split-copy p { color: var(--ink-soft); font-size: 1.03rem; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: -1; }
  .split-media.shrink img { max-width: 93%; }
}
@media (max-width: 480px) {
  .split-media.shrink img { max-width: 100%; }
}

/* ---------- Icon cards (4-up "why") ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.icard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px 24px;
}
.icard .ic {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--blue-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.icard h3 { font-size: 1.08rem; margin-bottom: 8px; }
.icard p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid, .card-grid.cols-3, .card-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ---------- Full-bleed banner ---------- */
.banner {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.banner img { width: 100%; height: auto; }
.banner picture { display: block; }
.banner.centered { margin-left: auto; margin-right: auto; }
.banner.compact { max-width: 50%; margin-left: auto; margin-right: auto; }
@media (max-width: 860px) {
  .banner.compact { max-width: 62%; }
}
@media (max-width: 480px) {
  .banner.compact { max-width: 80%; }
}

/* ---------- Testimonials ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px;
}
.review-card .stars { color: var(--star); letter-spacing: 2px; margin-bottom: 12px; display: block; }
.review-card p.quote { font-size: 0.98rem; color: var(--ink); }
.review-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.review-who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.review-who strong { display: block; font-size: 0.94rem; }
.review-who span { font-size: 0.8rem; color: var(--ink-soft); }
@media (max-width: 860px) { .review-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.steps.cols-3 { grid-template-columns: repeat(3, 1fr); }
.step { position: relative; padding-top: 8px; }
.step .num {
  counter-increment: step;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step .num::before { content: counter(step); }
.step h4 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }
@media (max-width: 980px) { .steps, .steps.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps, .steps.cols-3 { grid-template-columns: 1fr; } }

/* ---------- Comparison table ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
table.compare { width: 100%; border-collapse: collapse; background: var(--white); min-width: 560px; }
table.compare th, table.compare td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
table.compare thead th {
  background: var(--blue-900);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
}
table.compare td.yes { color: var(--good); font-weight: 600; }
table.compare td.no { color: var(--bad); }
table.compare tbody tr:last-child td { border-bottom: none; }

/* ---------- Guarantee ---------- */
.guarantee {
  background: var(--blue-900);
  color: var(--blue-50);
  border-radius: var(--radius-l);
  padding: 56px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  align-items: center;
}
.guarantee .seal {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-900);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.15;
  padding: 8px;
}
.guarantee h2 { color: var(--white); }
.guarantee p { color: var(--blue-100); }
.guarantee a.btn-primary { background: var(--white); color: var(--blue-900); }
.guarantee a.btn-primary:hover { background: var(--blue-50); }
@media (max-width: 700px) {
  .guarantee { grid-template-columns: 1fr; text-align: center; padding: 40px 26px; }
  .guarantee .seal { margin: 0 auto; }
}

/* ---------- Pricing ---------- */
.price-note {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 34px;
  box-shadow: var(--shadow-soft);
}
.price-note ul { display: grid; gap: 12px; margin: 20px 0; }
.price-note li { display: flex; gap: 10px; font-size: 0.98rem; }
.price-note li::before { content: "•"; color: var(--blue-500); font-weight: 700; }

/* ---------- Pricing cards ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 30px 0 26px;
}
.price-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px 20px 22px;
  text-align: center;
}
.price-card.featured { border-color: var(--blue-500); box-shadow: var(--shadow-soft); }
.price-card .ribbon {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  background: var(--blue-500);
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card.popular .ribbon { background: var(--good); }
.price-card .qty { font-family: var(--font-display); font-size: 1.9rem; color: var(--blue-900); margin: 10px 0 2px; }
.price-card .label { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 12px; }
.price-card .off {
  display: inline-block;
  background: var(--bad-bg);
  color: var(--bad);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.price-card .was { display: block; color: var(--ink-soft); text-decoration: line-through; font-size: 0.95rem; }
.price-card .now { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--good); font-weight: 700; margin-top: 2px; }
.price-fineprint { font-size: 0.86rem; color: var(--ink-soft); text-align: center; }
@media (max-width: 860px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .price-grid { grid-template-columns: 1fr; }
}

.faq-list { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
details.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 4px 22px;
}
details.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 30px 18px 0;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
  color: var(--blue-900);
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-size: 1.4rem;
  color: var(--blue-500);
  transition: transform 0.18s ease;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item p { color: var(--ink-soft); padding-bottom: 20px; margin: 0; }

/* ---------- Jump nav (cluster pages) ---------- */
.jumpnav {
  background: var(--blush);
  border: 1px solid var(--blush-deep);
  border-radius: var(--radius-m);
  padding: 22px 26px;
  margin: 34px 0 46px;
}
.jumpnav strong { display: block; margin-bottom: 10px; font-family: var(--font-display); color: var(--blue-900); }
.jumpnav ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.jumpnav a { font-size: 0.92rem; color: var(--blue-700); border-bottom: 1px dashed var(--blue-300); }
.jumpnav a:hover { color: var(--blue-900); }

/* ---------- Article typography (cluster / legal pages) ---------- */
.article { max-width: 780px; margin: 0 auto; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.article .kicker { color: var(--blue-500); font-family: var(--font-display); font-style: italic; }
.article .lede { font-size: 1.1rem; color: var(--ink-soft); }
.article h2 { margin-top: 2.2em; font-size: 1.5rem; }
.article h3 { margin-top: 1.6em; font-size: 1.15rem; }
.article p { font-size: 1.02rem; }
.article ul { margin: 0 0 1.2em; display: grid; gap: 8px; }
.article ul li { padding-left: 22px; position: relative; }
.article ul li::before { content: "—"; position: absolute; left: 0; color: var(--blue-300); }
.article figure { margin: 2em 0; }
.article figure img { border-radius: var(--radius-m); box-shadow: var(--shadow-soft); }
.article figcaption { font-size: 0.85rem; color: var(--ink-soft); text-align: center; margin-top: 10px; }
.article a.inline-link { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.article .callout {
  background: var(--blush);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  padding: 18px 22px;
  margin: 1.8em 0;
  font-size: 0.98rem;
}
.legal-updated { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Final CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 64px 0;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.cta-band p { color: var(--ink-soft); max-width: 54ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 22px; }

/* ---------- Disclaimer strip ---------- */
.legal-disclaimer {
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: var(--blue-100); padding: 56px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand img { height: 26px; width: auto; filter: brightness(0) invert(1); margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; color: var(--blue-100); max-width: 34ch; }
.site-footer h5 { color: var(--white); font-family: var(--font-display); font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { font-size: 0.92rem; color: var(--blue-100); }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 22px;
  font-size: 0.82rem;
  color: rgba(234, 242, 252, 0.7);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue-900); color: var(--white);
  padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
