/* ============================================================
   SoftlyStill — quiet, paper-warm, no dark patterns
   ============================================================ */
:root {
  --bg: #f5f3ec;
  --bg-soft: #eceade;
  --paper: #ffffff;
  --ink: #24302a;
  --ink-soft: #41504a;
  --muted: #6c7a72;
  --accent: #4c6b57;
  --accent-deep: #3a5444;
  --accent-tint: #dfe8dd;
  --line: #e3dfd2;
  --night: #171f1b;
  --night-ink: #e8e2d5;
  --night-line: #2a3630;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(40, 55, 45, .06), 0 10px 30px rgba(40, 55, 45, .08);
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  background:
    radial-gradient(1100px 500px at 15% -10%, #ecefe6 0%, transparent 60%),
    radial-gradient(900px 420px at 90% 0%, #eef0e2 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-tint); color: var(--ink); }
img { max-width: 100%; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #000; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(245, 243, 236, .82); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(227, 223, 210, .8); }
.head-row { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--font-serif); font-size: 19px; }
.brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #8fae92, var(--accent) 62%, var(--accent-deep));
  box-shadow: 0 0 0 5px rgba(76, 107, 87, .12);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 5px rgba(76, 107, 87, .10); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(76, 107, 87, .05); }
}
.brand-name { letter-spacing: -.01em; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-size: 15px; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--accent-tint); color: var(--ink); }
.nav-link.active { background: var(--ink); color: #f4f2e9; }
.nav-cta { margin-left: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 500; letter-spacing: .01em;
  border-radius: 999px; padding: 10px 18px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fbfaf5; box-shadow: 0 6px 18px rgba(76, 107, 87, .25); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: #cfc9b8; color: var(--ink); }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn[disabled]:hover { background: var(--accent); color: #fbfaf5; }

/* hero */
.hero { padding: 84px 0 72px; text-align: center; }
.hero-kicker { justify-content: center; }
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent);
  font-weight: 600; margin: 0 0 14px;
}
.hero-title { font-size: clamp(38px, 6vw, 62px); line-height: 1.08; margin: 0 0 22px; }
.hero-sub { max-width: 620px; margin: 0 auto 30px; font-size: 19px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-proof { list-style: none; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin: 40px 0 0; padding: 0; }
.hero-proof li { font-size: 13.5px; color: var(--muted); }
.hero-proof li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* sections */
.section { padding: 56px 0; }
.section-alt { background: rgba(236, 234, 222, .55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.sec-head .kicker { justify-content: center; }
.sec-sub { max-width: 560px; margin: 6px auto 0; color: var(--muted); }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(40, 55, 45, .13); text-decoration: none; color: inherit; }
.tile h3 { margin: 2px 0; font-size: 22px; }
.tile-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.tile-top { display: flex; gap: 8px; }
.tag {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-deep); background: var(--accent-tint); border-radius: 999px; padding: 3px 10px;
}
.tag-soft { background: rgba(108, 122, 114, .12); color: var(--muted); }
.tile-link { margin-top: auto; padding-top: 10px; font-size: 14.5px; font-weight: 600; color: var(--accent-deep); }
.more-link { margin: 26px 0 0; text-align: center; }
.more-link.small { margin-top: 18px; color: var(--muted); }

/* page head / breadcrumb */
.crumbs { font-size: 13px; color: var(--muted); margin: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-deep); }
.crumb-sep { opacity: .5; margin: 0 3px; }
.crumb-here { color: var(--ink); }
.page-head { padding: 46px 0 8px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 46px); margin: 0 0 10px; }
.lede { font-size: 18.5px; color: var(--muted); max-width: 720px; line-height: 1.6; }
.muted { color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink-soft); text-decoration: none; text-transform: capitalize;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #f4f2e9; }

/* detail */
.detail-article { max-width: 780px; margin: 0 auto; padding-bottom: 70px; }
.detail-head h1 { font-size: clamp(30px, 4vw, 42px); margin: 4px 0 12px; }
.detail-head .kicker { margin-bottom: 8px; }
.detail-head .lede { font-size: 18px; }
.prose { font-size: 17.5px; line-height: 1.85; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 22px 0; padding: 4px 0 4px 22px; color: var(--muted); font-style: italic; }

/* meditation player */
.player-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 26px 22px; margin: 26px 0 14px; box-shadow: var(--shadow);
}
.player-top { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pbar { height: 6px; background: rgba(108, 122, 114, .14); border-radius: 99px; overflow: hidden; }
.pbar-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; transition: width .5s linear; }
.p-text { min-height: 150px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px 6px; }
.p-text p { font-family: var(--font-serif); font-size: 23px; line-height: 1.65; color: var(--ink); margin: 0; max-width: 620px; }
.p-idle { font-family: var(--font-sans) !important; font-size: 16px !important; color: var(--muted); font-style: italic; }
.p-text p.fade-in { animation: fadeIn 1.6s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.player-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.p-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.player-card.playing .p-text p { font-size: 24px; }

/* breathing */
.breath-app { text-align: center; padding: 18px 0 6px; }
.breath-stage { display: flex; justify-content: center; padding: 12px 0 22px; }
.breath-ring {
  width: 230px; height: 230px; border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: transform var(--breath-ms, 4000ms) ease-in-out;
  background: radial-gradient(circle at 50% 38%, rgba(76, 107, 87, .08), transparent 65%);
}
.breath-ring.scale-out { transform: scale(1); }
.breath-ring.scale-in { transform: scale(1.42); }
.breath-core { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.breath-phase { font-family: var(--font-serif); font-size: 21px; color: var(--ink); text-transform: capitalize; }
.breath-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.breath-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* sleep */
.sleep-article { max-width: 860px; margin: 0 auto; padding-bottom: 70px; }
.sleep-article .detail-head h1 { color: var(--night-ink); }
.sleep-app {
  background: linear-gradient(160deg, var(--night), #202b25);
  color: var(--night-ink); border-radius: 24px; padding: 34px 28px; margin: 24px 0;
  box-shadow: 0 20px 60px rgba(12, 18, 14, .35);
}
.sleep-app .kicker, .sleep-app .lede { color: #b9c3bb; }
.sleep-reader { min-height: 220px; display: flex; align-items: center; justify-content: center; text-align: center; }
.sleep-reader p { font-family: var(--font-serif); font-size: 21px; line-height: 1.9; margin: 0; max-width: 600px; }
.sleep-start-hint { font-family: var(--font-sans) !important; font-size: 16px !important; color: #a8b3ab; font-style: italic; }
.sleep-ctl { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.sleep-app .btn-ghost { border-color: #3a4a40; color: var(--night-ink); }
.sleep-app .btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: #55665c; }
.sleep-app .p-hint { color: #8f9b92; }
.sleep-readmode { max-width: 720px; margin: 0 auto; }
.sleep-readmode .prose p:first-letter { font-family: var(--font-serif); font-size: 1.35em; color: var(--accent-deep); }

/* faq */
.faq { max-width: 720px; margin: 0 auto; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--ink); font-size: 16.5px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--accent); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 20px 16px; color: var(--muted); }

/* articles row */
.art-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.art-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .2s;
}
.art-card:hover { transform: translateY(-3px); text-decoration: none; color: inherit; box-shadow: 0 14px 34px rgba(40, 55, 45, .12); }
.art-card h2, .art-card h3 { margin: 2px 0; font-size: 21px; }
.art-card p { margin: 0; color: var(--muted); font-size: 15px; }
.art-body { max-width: 720px; }
.art-end { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.art-end .kicker { margin: 0; margin-right: 6px; }

/* search */
.search-form { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.search-form input {
  flex: 1; min-width: 240px; max-width: 420px; padding: 12px 18px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: inherit;
}
.empty { text-align: center; padding: 60px 0; color: var(--muted); }

/* footer */
.site-footer { background: #1f2924; color: #aeb9b1; margin-top: 40px; padding: 52px 0 0; }
.site-footer a { color: #cdd7d0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; padding-bottom: 36px; }
.site-footer .brand { color: #eef2ee; font-size: 18px; margin-bottom: 12px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.foot-col h4 { font-family: var(--font-sans); color: #8fa095; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 6px; }
.foot-note { font-size: 14px; color: #8b968e; margin: 12px 0 0; max-width: 320px; }
.foot-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 24px; font-size: 13px; color: #7c887f; }
.foot-bottom span { margin: 0; }

/* misc */
main:focus { outline: none; }
@media (max-width: 820px) {
  .main-nav { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { padding: 56px 0 44px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
  .tile-grid, .art-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
