/* ============================================
   THE SLEEP DESK — SHARED STYLESHEET
   Used across index, about, terms, privacy
   ============================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- TOKENS ---------- */
:root {
  --bg: #F6F8FC;
  --bg-alt: #FFFFFF;
  --bg-card: #EEF1F8;
  --text: #14244A;
  --text-muted: #5A6B8C;
  --accent: #2B3F7A;
  --accent-light: #6B83B8;
  --star: #E8A93A;
  --border: #D8DFEC;
  --shadow: 0 4px 24px rgba(20, 36, 74, 0.06);
  --shadow-hover: 0 8px 32px rgba(20, 36, 74, 0.12);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- HEADER ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.96);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.logo { flex-shrink: 0; }
.logo img { height: 56px; width: auto; }
.logo-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.logo-text .thin {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--accent-light);
  display: block;
  margin-top: 2px;
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 36px;
}
.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--accent); }

/* ---------- HOMEPAGE HERO ---------- */
.hero {
  padding: 96px 0 72px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 24px;
  max-width: 800px;
  color: var(--text);
}
.hero .tagline-divider {
  display: inline-block;
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 24px;
}
.hero .subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.star-dot {
  position: absolute;
  background: var(--accent-light);
  border-radius: 50%;
  opacity: 0.3;
}
.star-dot.s1 { width: 5px; height: 5px; top: 20%; right: 30%; }
.star-dot.s2 { width: 3px; height: 3px; top: 45%; right: 8%; }
.star-dot.s3 { width: 4px; height: 4px; top: 70%; right: 35%; }

/* ---------- HOMEPAGE ARTICLES GRID ---------- */
.articles { padding: 40px 0 80px; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.article-card {
  display: block;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.article-card:hover { transform: translateY(-4px); }
.article-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-image.g1 { background: linear-gradient(135deg, #2B3F7A 0%, #6B83B8 100%); }
.article-image.g2 { background: linear-gradient(135deg, #14244A 0%, #3A5998 100%); }
.article-image.g3 { background: linear-gradient(135deg, #3A5998 0%, #8BA3C7 100%); }
.article-image.g4 { background: linear-gradient(135deg, #1F3563 0%, #5A6B8C 100%); }
.article-image.g5 { background: linear-gradient(135deg, #14244A 0%, #2B3F7A 100%); }
.article-image.g6 { background: linear-gradient(135deg, #6B83B8 0%, #2B3F7A 100%); }
.article-image-num {
  font-family: var(--serif);
  font-size: 80px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1;
}
.article-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.article-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--text);
}
.article-excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ---------- FEATURED INNOVATION ---------- */
.featured {
  padding: 80px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  margin: 0 0 40px;
  color: var(--text);
}
.featured-placeholder {
  min-height: 400px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  background: var(--bg-card);
}
.featured-placeholder h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 12px;
  color: var(--accent);
}
.featured-placeholder p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 0 8px;
  font-size: 15px;
}
.featured-placeholder code {
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* ---------- FEATURED CARD (live LP preview) ---------- */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border);
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.featured-card-image {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
}
.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-card-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.featured-card-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.featured-card-deck {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.featured-card-cta {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.featured-card-cta .arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}
.featured-card:hover .featured-card-cta .arrow {
  transform: translateX(4px);
}
.featured-card-meta {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.featured-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.featured-card-meta .stars {
  color: var(--star);
  letter-spacing: 1px;
}

/* ---------- PUBLICATION QUOTE ---------- */
.pub-quote {
  padding: 80px 0;
  text-align: center;
  background: var(--bg);
}
.pub-quote .stars {
  font-size: 20px;
  color: var(--star);
  letter-spacing: 4px;
  margin-bottom: 24px;
}
.pub-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.4;
  max-width: 760px;
  margin: 0 auto 20px;
  color: var(--text);
  position: relative;
}
.pub-quote blockquote::before {
  content: '"';
  font-size: 72px;
  color: var(--accent-light);
  opacity: 0.4;
  position: absolute;
  left: -20px;
  top: -30px;
  font-family: var(--serif);
}
.pub-quote cite {
  font-style: normal;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ---------- REVIEWS ---------- */
.reviews {
  padding: 80px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.review-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.review-stars {
  color: var(--star);
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.review-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.review-product {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text);
}
.review-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
  font-style: italic;
}
.review-text strong {
  font-style: normal;
  font-weight: 700;
}

/* ---------- VALUES (Our Guiding Principles) ---------- */
.values {
  padding: 80px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.values-header {
  text-align: center;
  margin-bottom: 56px;
}
.values-header h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.value-card { padding: 0 8px; }
.value-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  color: var(--text);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}
.value-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text);
  padding: 64px 0 28px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, max-content) 1fr;
  gap: 96px;
  margin-bottom: 40px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col ul li { margin-bottom: 14px; }
.footer-col a {
  color: var(--text);
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}
.footer-social a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}
.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
  max-width: 960px;
  margin-bottom: 32px;
}
.footer-disclaimer p { margin: 0 0 16px; }
.footer-disclaimer p:last-child { margin-bottom: 0; }

.footer-bottom-links {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.footer-bottom-links a { color: var(--text); }
.footer-bottom-links a:hover { color: var(--accent); }
.footer-bottom-links .sep { color: var(--text-muted); margin: 0 6px; font-weight: 400; }

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- PAGE HERO (subpages) ---------- */
.page-hero {
  padding: 80px 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.15;
  color: var(--text);
}
.page-hero .date {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- PROSE (long-form article/legal) ---------- */
.prose {
  padding: 48px 0 96px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.prose p { margin: 0 0 20px; }
.prose h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 48px 0 20px;
  color: var(--text);
  line-height: 1.3;
}
.prose h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 36px 0 16px;
  color: var(--accent);
}
.prose ul, .prose ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.prose li { margin-bottom: 10px; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.prose a:hover { color: var(--text); }
.prose strong { font-weight: 600; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.prose table th,
.prose table td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}
.prose table th {
  background: var(--bg-card);
  font-weight: 600;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .nav ul { gap: 24px; }
  .hero { padding: 72px 0 56px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card-image { min-height: 280px; aspect-ratio: 16 / 10; }
  .featured-card-body { padding: 36px 32px; }
}
@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .logo img { height: 44px; }
  .nav ul { gap: 20px; flex-wrap: wrap; }
  .nav a { font-size: 14px; }
  .hero { padding: 56px 0 40px; }
  .articles { padding: 32px 0 56px; }
  .articles-grid { grid-template-columns: 1fr; gap: 36px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; gap: 36px; }
  .article-title { font-size: 22px; }
  .featured, .pub-quote, .reviews, .values { padding: 56px 0; }
  .footer-nav { grid-template-columns: 1fr; gap: 24px; margin-bottom: 32px; }
  .page-hero { padding: 56px 0 24px; }
  .prose { padding: 32px 0 64px; }
  .prose h2 { font-size: 22px; margin: 36px 0 16px; }
}
