/* ============================================
   Sleep Ireland — Main Stylesheet
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --midnight: #0f1b2d;
  --deep-blue: #1a2a4a;
  --slate: #3d4f6f;
  --mist: #8e9baf;
  --cloud: #c8d1df;
  --moonlight: #e8ecf2;
  --snow: #f5f7fa;
  --white: #ffffff;
  --amber: #e4a853;
  --amber-hover: #d49640;
  --lavender: #7b68ae;
  --sage: #5a8a72;
  --rose: #c4626a;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display-font: 'DM Serif Display', Georgia, serif;
  --max-width: 1140px;
  --reading-width: 720px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  color: var(--midnight);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--deep-blue); text-decoration-color: var(--cloud); text-underline-offset: 3px; transition: color 0.2s; }
a:hover { color: var(--lavender); }

/* --- Typography --- */
h1, h2, h3 { font-family: var(--display-font); font-weight: 400; line-height: 1.25; color: var(--midnight); }
h1 { font-size: 2.75rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; max-width: var(--reading-width); }
p + p { margin-top: 0; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: var(--reading-width); margin: 0 auto; }

/* --- Nav --- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--moonlight);
  padding: 0.9rem 0;
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav__logo {
  font-family: var(--display-font);
  font-size: 1.35rem; color: var(--midnight);
  text-decoration: none;
}
.site-nav__logo span { color: var(--lavender); }
.site-nav__links { display: flex; gap: 2rem; list-style: none; }
.site-nav__links a {
  font-size: 0.9rem; font-weight: 500; color: var(--slate);
  text-decoration: none; transition: color 0.2s;
}
.site-nav__links a:hover { color: var(--midnight); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.25rem; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--midnight); }

/* --- Hero --- */
.hero {
  padding: 6rem 0 5rem;
  background-color: var(--midnight);
  background-image: linear-gradient(rgba(15, 27, 45, 0.62), rgba(15, 27, 45, 0.62)), url('../images/comfy-sleep-hero.png');
  background-size: cover;
  background-position: center 58%;
  text-align: center;
}
.hero h1 { margin-bottom: 1.5rem; color: var(--white); font-size: clamp(2.5rem, 5.5vw, 4.75rem); line-height: 1.08; }
.hero h1 span { color: #d9c7f4; }
.hero p {
  font-size: 1.15rem; color: var(--white);
  max-width: 560px; margin: 0 auto 2rem;
  line-height: 1.75;
}
.hero__cta {
  display: inline-block;
  background: var(--white); color: var(--midnight);
  padding: 0.9rem 2.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.hero__cta:hover { background: #eee8f5; color: var(--midnight); }

/* --- Section --- */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--snow); }
.section__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lavender);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.section h2 { margin-bottom: 1rem; }
.section__intro {
  font-size: 1.05rem; color: var(--slate);
  margin-bottom: 2.5rem; max-width: var(--reading-width);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--moonlight);
  border-radius: 10px;
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--cloud);
  box-shadow: 0 4px 20px rgba(15, 27, 45, 0.06);
}
.card__icon {
  width: 48px; height: 48px;
  background: var(--snow);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--slate); font-size: 0.92rem; margin-bottom: 1rem; }
.card__link {
  font-size: 0.9rem; font-weight: 600;
  color: var(--lavender); text-decoration: none;
}
.card__link:hover { color: var(--midnight); }

/* --- Funnel Steps --- */
.funnel { counter-reset: step; }
.funnel-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--moonlight);
}
.funnel-step:last-child { border-bottom: none; }
.funnel-step__number {
  counter-increment: step;
  width: 48px; height: 48px;
  background: var(--lavender);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display-font);
  font-size: 1.2rem;
}
.funnel-step__number::before { content: counter(step); }
.funnel-step h3 { margin-bottom: 0.35rem; font-family: var(--body-font); font-weight: 600; font-size: 1.05rem; }
.funnel-step p { color: var(--slate); font-size: 0.92rem; }

/* --- Product Card --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--moonlight);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}
.product-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sage);
  background: #eaf4ee;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.product-card h3 { font-size: 1.05rem; font-family: var(--body-font); font-weight: 600; margin-bottom: 0.35rem; }
.product-card__price { font-size: 1.15rem; font-weight: 600; color: var(--midnight); margin-bottom: 0.5rem; }
.product-card p { font-size: 0.88rem; color: var(--slate); margin: 0 auto 1rem; }
.product-card__cta {
  display: inline-block;
  background: var(--amber);
  color: var(--midnight);
  padding: 0.55rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.product-card__cta:hover { background: var(--amber-hover); color: var(--midnight); }

/* --- Checklist --- */
.checklist { list-style: none; max-width: var(--reading-width); }
.checklist li {
  padding: 0.85rem 0 0.85rem 2.5rem;
  border-bottom: 1px solid var(--moonlight);
  position: relative;
  font-size: 0.95rem;
}
.checklist li::before {
  content: '';
  position: absolute; left: 0; top: 1rem;
  width: 18px; height: 18px;
  border: 2px solid var(--cloud);
  border-radius: 4px;
}

/* --- Article --- */
.article { padding: 3.5rem 0 5rem; }
.article h1 { font-size: 2.25rem; margin-bottom: 0.75rem; text-align: left; }
.article__meta { color: var(--mist); font-size: 0.85rem; margin-bottom: 2.5rem; }
.article__body h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; font-size: 1.5rem; }
.article__body h3 { margin-top: 2rem; font-size: 1.15rem; font-family: var(--body-font); font-weight: 600; }
.article__body ul, .article__body ol { margin: 1rem 0 1.5rem 1.25rem; max-width: var(--reading-width); }
.article__body li { margin-bottom: 0.5rem; color: var(--slate); }
.article__body blockquote {
  border-left: 3px solid var(--lavender);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--slate);
  font-style: italic;
  max-width: var(--reading-width);
}
.article__callout {
  background: var(--snow);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  max-width: var(--reading-width);
}
.article__callout p { margin-bottom: 0; }

/* --- Footer --- */
.site-footer {
  background: var(--midnight);
  color: var(--cloud);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer h4 {
  font-family: var(--body-font);
  font-weight: 600;
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--cloud); text-decoration: none; font-size: 0.88rem; }
.site-footer a:hover { color: var(--white); }
.footer-about { font-size: 0.88rem; line-height: 1.65; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--deep-blue);
  padding-top: 1.5rem;
  font-size: 0.8rem; color: var(--mist);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom a { color: var(--mist); }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 4rem 0 3.5rem; background-position: 68% center; }
  .hero p { font-size: 1.05rem; }
  .card-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .funnel-step { grid-template-columns: 48px 1fr; gap: 1rem; }

  .site-nav__links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--moonlight);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .site-nav__links.active { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.65rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* Free bedtime checklist */
.article__body .bedtime-checklist { list-style: none; margin-left: 0; }
.bedtime-checklist label { display: flex; align-items: baseline; gap: .75rem; padding: .65rem 0; cursor: pointer; }
.bedtime-checklist input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--lavender); }
.bedtime-checklist input:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; }

/* --- Why Cards --- */
.reason-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1.5rem 0 2.5rem; }
.reason-card { display:flex; flex-direction:column; padding:1.35rem; border:1px solid var(--moonlight); border-radius:10px; background:var(--white); color:var(--midnight); text-decoration:none; transition:transform .2s,border-color .2s,box-shadow .2s; }
.reason-card:hover { transform:translateY(-2px); border-color:var(--lavender); box-shadow:0 8px 22px rgba(15,27,45,.08); color:var(--midnight); }
.reason-card__eyebrow { color:var(--lavender); font-size:.74rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.reason-card h3 { margin:.35rem 0 .55rem; }
.reason-card p { color:var(--slate); font-size:.9rem; margin:0 0 1rem; }
.reason-card__link { margin-top:auto; color:var(--lavender); font-size:.88rem; font-weight:700; }
@media (max-width:768px) { .reason-card-grid { grid-template-columns:1fr; } }
