/* ==========================================================================
   Apartment Defrag — product page ("Clean Mac" direction)
   Imported from claudedesign/apartment-defrag/v1 (css/main.css token layer
   kept verbatim in spirit; only the theme SELECTOR is remapped).

   Theming — humbleha.us mechanism, NOT the design's data-theme:
     dark  = html[data-dark="true"]  ← site default, tokens live on :root
     light = html:not([data-dark="true"])
   localStorage key: hls-dark. Never use data-theme here.
   ========================================================================== */

/* ---------- Tokens: dark (site default) ---------- */
:root {
  --bg: #131118;
  --surface: #1a1822;
  --card: #211e2a;
  --soft: #1d1a25;
  --line: #332f3d;
  --chip: #272431;
  --text: #f5f2f9;
  --muted: #a39fb1;
  --faint: #8f8b9c;          /* nudged up from the design's #7c7889 → 5.7:1 */
  --accent: #ff8a5c;         /* fills */
  --accent-text: #ff8a5c;    /* accent used as small text */
  --accent-2: #ff5c9d;
  --on-accent: #20121b;
  --shadow: 0 30px 70px -25px rgba(0, 0, 0, .7);

  --font-sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-card: 14px;
  --radius-btn: 11px;
  --wrap-max: 1160px;
}

/* ---------- Tokens: light (no data-dark attribute) ---------- */
html:not([data-dark="true"]) {
  --bg: #f3efe7;
  --surface: #ffffff;
  --card: #ffffff;
  --soft: #faf7f1;
  --line: #e7e1d4;
  --chip: #efeae0;
  --text: #1b1823;
  --muted: #6b6577;
  --faint: #645e70;          /* darkened from #9a93a3 → 5.4:1 on cream */
  --accent: #ef5a32;
  --accent-text: #b8431f;    /* darker still for small text → 4.7:1 */
  --accent-2: #df3a82;
  --shadow: 0 26px 60px -22px rgba(70, 45, 30, .26);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 36px;
}

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ==========================================================================
   humbleha.us site chrome — nav + sponsored placeholder + donate block.
   Uses the design tokens so it themes with the rest of the page.
   ========================================================================== */
nav[aria-label="Site navigation"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: .75rem;
  padding: .75rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}
.nav-brand { display: flex; align-items: center; gap: .5rem; flex-shrink: 1; min-width: 0; }
.nav-brand a { color: var(--text); font-size: .875rem; font-weight: 700; }
.nav-brand a:hover { color: var(--accent-text); }
.exp-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  padding: .15rem .4rem; border-radius: .25rem;
  background: var(--chip); color: var(--muted);
  flex-shrink: 0;
}
.nav-right { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.donate-link {
  font-size: .8rem; color: var(--muted);
  white-space: nowrap; position: relative;
}
.donate-link:hover { color: var(--accent-text); }
.donate-link::before {  /* 44px tap target without changing the visual box */
  content: ''; position: absolute; top: 50%; left: 0;
  width: 100%; min-width: 44px; height: 44px;
  transform: translateY(-50%);
}
.dark-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.dark-toggle::after { content: '☀️'; }
.dark-toggle::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%);
}
[data-dark="true"] .dark-toggle::after { content: '🌙'; }

@media (max-width: 540px) {
  nav[aria-label="Site navigation"] { padding: .75rem 1rem; }
  .nav-brand a { font-size: .78rem; }
  .donate-link { font-size: .72rem; }
}

/* ---------- Animations ---------- */
@keyframes ad-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@keyframes ad-toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Logo glyph (2×2 grid, two cells filled) ---------- */
.glyph {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5px;
  flex-shrink: 0;
}
.glyph-16 { width: 16px; height: 16px; gap: 2px; }
.glyph-26 { width: 26px; height: 26px; gap: 3px; }
.glyph-cell { border: 1.5px solid var(--line); border-radius: 3px; }
.glyph-cell.fill { background: var(--accent); border: none; }
.glyph-26 .glyph-cell { border-width: 1.6px; border-color: var(--accent); border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-btn);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 12px 34px -12px var(--accent);
}
.btn-primary:hover {
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -12px var(--accent);
}
.btn-lg { padding: 14px 24px; }

/* Not-yet-shipped CTA: reads as a button, is not a link, is not clickable. */
.btn-soon {
  background: transparent;
  color: var(--text);
  border: 1px dashed var(--line);
  cursor: default;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  min-height: 44px;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 82px 0 96px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--accent-text);
  margin: 0 0 22px;
}
.hero-title {
  font-size: clamp(34px, 6.5vw, 62px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 auto 22px;
  max-width: 760px;
}
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 20px;
}
.hero-note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 34px;
}
.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- App window mockup ---------- */
.app-shot {
  position: relative;
  width: 660px;
  max-width: 100%;
  margin: 56px auto 0;
}
.app-glow {
  position: absolute;
  inset: -10% -6% -14%;
  background: radial-gradient(60% 70% at 50% 28%, var(--accent), transparent 70%);
  opacity: .16;
  filter: blur(36px);
  pointer-events: none;
}
.app-window {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
  animation: ad-float 7s ease-in-out infinite;
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.titlebar-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.titlebar-reset {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: .04em;
}
.app-body { display: flex; min-height: 286px; }

.sidebar {
  width: 174px;
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--faint);
  padding: 4px 10px 8px;
}
.room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
}
.room.is-active { background: var(--chip); }
.room-name { font-size: 13px; color: var(--muted); }
.room.is-active .room-name { color: var(--text); font-weight: 600; }
.room-count { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.room.is-active .room-count { color: var(--accent-text); }

.tasks { flex: 1; padding: 16px 18px; min-width: 0; }
.tasks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.tasks-room { font-size: 16px; font-weight: 600; }
.tasks-progress { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); white-space: nowrap; }
.progress {
  height: 5px;
  border-radius: 999px;
  background: var(--chip);
  overflow: hidden;
  margin: 12px 0 14px;
}
.progress-fill { height: 100%; width: 60%; background: var(--accent); border-radius: 999px; }
.task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.6px solid var(--line);
  flex-shrink: 0;
}
.checkbox.is-checked {
  border: none;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-label { font-size: 14px; flex-grow: 1; }
.task.is-done .task-label { color: var(--faint); text-decoration: line-through; }
.avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Notification toast — demonstrates the core feature; keep it. */
.toast {
  position: absolute;
  right: -14px;
  bottom: -24px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  box-shadow: var(--shadow);
  max-width: 280px;
  text-align: left;
  animation: ad-toast-in .7s .5s ease-out both;
}
.toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-title { font-size: 13px; font-weight: 600; }
.toast-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  margin-top: 2px;
}

/* ---------- Features ---------- */
.features { padding: 8px 0 70px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  background: var(--soft);
}
.feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.feature-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.feature-card h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 9px;
  letter-spacing: -.01em;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Feature icons (pure CSS) */
.icon-clock {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.4px solid var(--accent);
}
.icon-clock-dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.icon-screen {
  position: relative;
  display: block;
  width: 32px;
  height: 23px;
  border-radius: 6px;
  border: 2.2px solid var(--accent);
}
.icon-screen-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ---------- Fact lists + section spacing ---------- */
.section { padding: 0 0 70px; }

/* ---------- Fact lists (privacy + requirements) ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.fact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  background: var(--soft);
}
.fact-card h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.fact-card > p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
}
.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  position: relative;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  padding: 9px 0 9px 20px;
  border-bottom: 1px solid var(--line);
}
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.facts strong { color: var(--text); font-weight: 600; }

/* ---------- Coming soon banner ---------- */
.coming-soon { padding-bottom: 66px; }
.banner {
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.banner-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--accent-text);
  margin-bottom: 8px;
}
.banner-text { font-size: 16px; font-weight: 500; line-height: 1.4; }
.icon-phone {
  position: relative;
  display: block;
  width: 30px;
  height: 52px;
  border-radius: 7px;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.icon-phone-dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Status / final CTA ---------- */
.cta { text-align: center; padding: 6px 0 78px; }
.cta-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; display: block; }
.cta h2 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.cta-sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 470px;
}
.cta-meta { margin-top: 16px; font-size: 11px; }
.cta-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Donation block (CLAUDE.md spec) ---------- */
.donation-block {
  margin: 0 auto 72px;
  padding: 2rem 1.5rem;
  max-width: 560px;
  text-align: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.donation-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 1rem;
  text-wrap: pretty;
}
.donation-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-text);
  padding: .7rem 1.4rem;
  border: 1.5px solid var(--accent);
  border-radius: 100px;
  transition: background .2s, color .2s;
}
.donation-btn:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  padding-bottom: 26px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-links a:hover { color: var(--accent-text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .sidebar { display: none; }
  .app-glow { inset: -10% 0 -14%; }
  .toast { right: 4px; left: 4px; max-width: none; }
  .banner { flex-direction: column; align-items: flex-start; }
  .fact-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 72px; }
  .app-shot { margin-top: 44px; }
}
@media (max-width: 380px) {
  .cta-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-window { animation: none; }
  .toast { animation-duration: .01s; animation-delay: 0s; }
  .btn, .donation-btn { transition: none; }
}
