/* ============================================================
   Sunrise Alarm Guide — Main Stylesheet
   sunrisealarmguide.com
   ============================================================ */

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

/* --- CSS Custom Properties --- */
:root {
  --color-dark: #1A1A2E;
  --color-cream: #FFF9F0;
  --color-heading: #1A1A2E;
  --color-accent: #E8791C;
  --color-accent-light: #FFB347;
  --color-sky: #5B8FB9;
  --color-card: #FFF0DC;
  --color-white: #ffffff;
  --color-text: #3d3d3d;
  --color-muted: #6b6b6b;
  --color-border: #e0d8cc;
  --color-green: #2E7D32;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  --max-width: 1120px;
  --max-width-article: 820px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background-color: var(--color-cream); color: var(--color-text); line-height: 1.75; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #b85c10; text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--color-heading); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); }
p { margin-bottom: 1.2rem; font-size: 1rem; }
strong { font-weight: 700; color: var(--color-heading); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.container--article { max-width: var(--max-width-article); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section--sm { padding: 2.5rem 0; }
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); font-size: 0.9rem; }

/* --- Disclosure Banner --- */
.disclosure-banner {
  background: #FFF3CD;
  border-bottom: 1px solid #FDDFA0;
  text-align: center;
  font-size: 0.8rem;
  color: #856404;
  padding: 0.55rem 1rem;
}
.disclosure-banner a { color: #856404; text-decoration: underline; }

/* --- Navigation --- */
.site-nav { background-color: var(--color-dark); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.25rem; max-width: var(--max-width); margin: 0 auto; }
.nav-logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--color-white); text-decoration: none; }
.nav-logo span { color: var(--color-accent-light); }
.nav-logo:hover { color: var(--color-white); text-decoration: none; }
.nav-links { display: flex; list-style: none; padding: 0; gap: 1.5rem; align-items: center; }
.nav-links a { color: #c8c8cc; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; transition: color var(--transition); }
.nav-links a:hover { color: var(--color-accent-light); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-white); border-radius: 2px; }

/* --- Hero --- */
.hero { position: relative; background-size: cover; background-position: center; min-height: 520px; display: flex; align-items: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(232,121,28,0.45) 100%); }
.hero-content { position: relative; z-index: 1; max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.25rem; }
.hero-title { color: var(--color-white); margin-bottom: 1.25rem; max-width: 780px; }
.hero-subtitle { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 640px; margin-bottom: 1.75rem; line-height: 1.7; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badge { background: rgba(255,179,71,0.22); border: 1px solid rgba(255,179,71,0.5); color: var(--color-accent-light); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }

/* --- Article Header --- */
.article-header { background: var(--color-dark); color: var(--color-white); padding: 3rem 0 2.5rem; }
.article-header .container { max-width: var(--max-width-article); }
.article-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.article-category { background: var(--color-accent); color: white; padding: 0.2rem 0.7rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.article-header time { font-size: 0.85rem; color: rgba(255,255,255,0.65); }
.article-header h1 { color: var(--color-white); margin-bottom: 1rem; }
.article-header .article-intro { font-size: 1.05rem; color: rgba(255,255,255,0.82); line-height: 1.7; }
.article-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.15); }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--color-accent-light); display: block; }
.stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Article Body --- */
.article-body { padding: 3rem 0; }
.article-body h2 { margin: 2.5rem 0 1rem; padding-top: 0.5rem; border-top: 2px solid var(--color-border); }
.article-body h3 { margin: 2rem 0 0.75rem; color: var(--color-accent); }
.article-body h4 { margin: 1.5rem 0 0.5rem; }
.article-body p, .article-body li { font-size: 1.02rem; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body blockquote { border-left: 4px solid var(--color-accent); margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--color-card); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--color-muted); }

/* --- Product Card --- */
.product-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.75rem; margin: 2rem 0; box-shadow: var(--shadow); position: relative; transition: box-shadow var(--transition); }
.product-card:hover { box-shadow: var(--shadow-hover); }
.product-rank { position: absolute; top: -12px; left: 1.25rem; background: var(--color-accent); color: white; font-family: var(--font-heading); font-size: 0.9rem; font-weight: 800; padding: 0.2rem 0.65rem; border-radius: 20px; }
.product-rank.rank-1 { background: #B8860B; }
.product-card-inner { display: grid; grid-template-columns: 160px 1fr; gap: 1.5rem; align-items: start; }
.product-img { width: 160px; height: 160px; object-fit: contain; border-radius: var(--radius); background: var(--color-cream); }
.product-info h3 { margin: 0 0 0.4rem; color: var(--color-heading); font-size: 1.25rem; }
.product-tagline { font-size: 0.9rem; color: var(--color-muted); margin-bottom: 0.75rem; font-style: italic; }
.product-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.product-badge { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; font-size: 0.73rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 12px; }
.product-badge.warn { background: #FFF3E0; color: #E65100; border-color: #FFCC80; }
.product-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.pros-list h4 { color: var(--color-green); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.cons-list h4 { color: #c0392b; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.pros-list ul, .cons-list ul { list-style: none; padding: 0; }
.pros-list li::before { content: "✓ "; color: var(--color-green); font-weight: 700; }
.cons-list li::before { content: "✗ "; color: #c0392b; font-weight: 700; }
.pros-list li, .cons-list li { font-size: 0.88rem; margin-bottom: 0.3rem; }
.product-cta { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }
.btn-amazon { display: inline-flex; align-items: center; gap: 0.4rem; background: #FF9900; color: #111; font-weight: 700; font-size: 0.9rem; padding: 0.6rem 1.3rem; border-radius: var(--radius); transition: background var(--transition), transform var(--transition); white-space: nowrap; }
.btn-amazon:hover { background: #e68900; color: #111; text-decoration: none; transform: translateY(-1px); }
.product-price { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--color-accent); }

/* --- Star Rating --- */
.stars { color: #F4C430; font-size: 1rem; letter-spacing: 0.05em; }
.rating-count { font-size: 0.82rem; color: var(--color-muted); margin-left: 0.3rem; }

/* --- TOC --- */
.toc { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; margin: 2rem 0; }
.toc h4 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--color-heading); }
.toc ol { counter-reset: toc; list-style: none; padding: 0; }
.toc ol li { counter-increment: toc; margin-bottom: 0.35rem; font-size: 0.9rem; }
.toc ol li::before { content: counter(toc) ". "; color: var(--color-accent); font-weight: 700; }
.toc a { color: var(--color-heading); }
.toc a:hover { color: var(--color-accent); }

/* --- Info Box --- */
.info-box { background: #E3F2FD; border: 1px solid #90CAF9; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.75rem 0; }
.info-box h4 { color: #1565C0; margin-bottom: 0.5rem; font-size: 1rem; }
.info-box p { margin-bottom: 0; font-size: 0.95rem; color: #0D47A1; }
.warning-box { background: #FFF3E0; border: 1px solid #FFCC80; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.75rem 0; }
.warning-box h4 { color: #E65100; margin-bottom: 0.5rem; }
.warning-box p { margin-bottom: 0; color: #BF360C; font-size: 0.95rem; }

/* --- Comparison Table --- */
.comparison-table-wrap { overflow-x: auto; margin: 2rem 0; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.comparison-table th { background: var(--color-dark); color: var(--color-white); padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.comparison-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.comparison-table tr:nth-child(even) td { background: var(--color-card); }
.comparison-table tr:hover td { background: #FFE8C8; }
.check { color: var(--color-green); font-weight: 700; }
.cross { color: #c0392b; font-weight: 700; }

/* --- Card Grid (Homepage) --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow var(--transition), transform var(--transition); }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.4rem; }
.card-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent); margin-bottom: 0.5rem; }
.card-title { font-size: 1.1rem; font-family: var(--font-heading); color: var(--color-heading); line-height: 1.3; margin-bottom: 0.75rem; }
.card-desc { font-size: 0.88rem; color: var(--color-muted); line-height: 1.55; }
.card a { text-decoration: none; color: inherit; }
.card a:hover h3 { color: var(--color-accent); }

/* --- Stat Strip --- */
.stat-strip { background: var(--color-dark); color: var(--color-white); }
.stat-strip .container { display: flex; gap: 2rem; justify-content: space-around; flex-wrap: wrap; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.stat-strip-item { text-align: center; }
.stat-strip-value { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; color: var(--color-accent-light); display: block; }
.stat-strip-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.07em; }

/* --- Footer --- */
footer { background: var(--color-dark); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand h3 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--color-white); margin-bottom: 0.6rem; }
.footer-brand h3 span { color: var(--color-accent-light); }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; max-width: 320px; }
.footer-nav h4 { color: var(--color-white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin-bottom: 0.35rem; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-nav a:hover { color: var(--color-accent-light); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; text-align: center; font-size: 0.78rem; color: rgba(255,255,255,0.4); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-dark); padding: 1rem; gap: 0.75rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .product-card-inner { grid-template-columns: 1fr; }
  .product-img { width: 100%; height: 220px; }
  .product-pros-cons { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { min-height: 420px; }
  .article-stats { gap: 1.25rem; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .stat-strip .container { gap: 1.25rem; }
}
