/* MySleepPilot shared stylesheet
   Save as: css/site.css
   Link from HTML pages with: <link rel="stylesheet" href="css/site.css">
   Keep page-specific CSS in each page until it has been reviewed and moved.
*/

:root {
  --navy: #142c3d;
  --ink: #233b49;
  --muted: #536773;
  --teal: #187a7b;
  --pale: #edf7f5;
  --cream: #f8f6f0;
  --line: #dce5e5;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font: 17px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--teal); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #e8a95a;
  outline-offset: 4px;
}
.wrap { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.skip {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 10;
  padding: 10px;
  background: white;
}
.skip:focus { left: 10px; }

/* Header and navigation */
header { background: var(--navy); color: white; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.brand {
  color: white;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -.04em;
  text-decoration: none;
}
.brand span { color: #8bd6cc; }
.nav { display: flex; flex-wrap: wrap; gap: 24px; }
.nav a { color: #e3eeee; font-size: .94rem; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Titles and page introductions */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.03em; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.1rem); margin: 0 0 20px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin: 0 0 16px; }
h3 { font-size: 1.17rem; margin: 0 0 9px; }
.hero {
  background: linear-gradient(135deg, #142c3d, #1d4d5b);
  color: white;
  padding: 70px 0 78px;
}
.hero-inner { max-width: 820px; }
.eyebrow {
  margin: 0 0 14px;
  color: #9bdfd5;
  font-size: .77rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero p { max-width: 720px; margin: 0; color: #e3eeee; font-size: 1.18rem; }

/* Guide content */
.content { background: white; padding: 64px 0; }
.article { max-width: 790px; }
.article section { margin: 0 0 55px; }
.article p { margin: 0 0 18px; }
.article ul, .article ol { padding-left: 26px; }
.article li { margin: 0 0 11px; }
.lead { font-size: 1.18rem; }
.callout {
  margin: 28px 0;
  padding: 22px 28px;
  background: var(--pale);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
}
.callout p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 23px 0; }
.tile { padding: 22px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; }
.tile p { margin: 0; color: var(--muted); }
.sources { color: var(--muted); font-size: .91rem; }
.sources li { overflow-wrap: anywhere; }

/* Cards and frequently asked questions */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 7px 22px #14333a08;
}
.card p { color: var(--muted); }
.card a { font-weight: 700; }
.questions { background: var(--pale); padding: 56px 0; }
.questions .wrap { max-width: 790px; }
.questions details {
  margin: 12px 0;
  padding: 17px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.questions summary { cursor: pointer; font-weight: 700; }
.questions details p { margin: 12px 0 0; }

/* Calls to action and footer */
.button {
  display: inline-block;
  padding: 12px 19px;
  color: #123440;
  background: #a5e2d7;
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}
.button:hover { background: #c0eee5; }
.contact { padding: 44px 0; color: white; background: var(--navy); }
.contact p { color: #d6e6e8; }
footer { padding: 32px 0; color: #d1dfe2; background: #102633; font-size: .9rem; }
footer a { color: #b9e7df; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.disclaimer { max-width: 790px; margin: 18px 0 0; color: #bbced3; font-size: .85rem; }

@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px 0; }
  .nav { gap: 9px 18px; }
  .hero { padding: 55px 0 62px; }
  .content { padding: 48px 0; }
  .article section { margin-bottom: 44px; }
  .grid, .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}