/* ==========================================================================
   Habit Connect · landing page
   Sections in page order: hero, why, log, support, steps, privacy, note,
   closing, modal. Shared components (activity card) come first.
   ========================================================================== */

h2.display { font-size: clamp(34px, 4.8vw, 56px); line-height: 1.02; }
.section { padding: 112px 0; }
.section--flush { padding-top: 0; }
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.split .eyebrow { margin-bottom: 18px; }
.split h2 { margin-bottom: 22px; }
.card-surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Activity card (phone mock + feed) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 12px; box-shadow: var(--shadow);
}
.card--sm { border-radius: 18px; padding: 12px 12px 8px; }
.c-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.c-name { font-weight: 800; font-size: 16px; }
.c-time { margin-left: auto; font-size: 13px; color: var(--dim); font-weight: 600; }
.c-note { font-size: 16px; margin-bottom: 12px; }
.c-bar { display: flex; gap: 22px; border-top: 1px solid var(--border); padding-top: 10px; }
.card--sm .c-name { font-size: 13px; }
.card--sm .c-time { font-size: 11px; }
.card--sm .c-note { font-size: 12.5px; margin-bottom: 8px; }
.card--sm .c-bar { padding-top: 7px; gap: 16px; }

.av {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #0B110D;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.card--sm .av { width: 28px; height: 28px; font-size: 12px; }

.tag {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 999px; margin-left: 8px;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15px; padding: 7px 14px; border-radius: 999px; margin-bottom: 10px;
}
.pill svg { width: 14px; height: 14px; color: var(--green-strong); }
.card--sm .pill { font-size: 12px; padding: 5px 10px; gap: 6px; margin-bottom: 6px; }

.act {
  display: flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 15px; color: var(--muted);
  padding: 4px 6px 4px 0; border-radius: 10px;
}
.act svg { width: 21px; height: 21px; }
.card--sm .act { font-size: 12px; gap: 5px; }
.card--sm .act svg { width: 16px; height: 16px; }

.clap-btn { color: var(--violet); }
.clap-btn .ico-fill { display: none; }
.clap-btn.is-on .ico-fill { display: block; }
.clap-btn.is-on .ico-line { display: none; }
.clap-btn.is-pop svg { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35) rotate(-8deg); } }

.comment {
  display: flex; gap: 10px; margin-top: 10px; padding: 10px 12px;
  background: var(--surface-2); border-radius: 14px; font-size: 14.5px;
}
.comment .av { width: 26px; height: 26px; font-size: 11px; }
.comment b { font-weight: 800; margin-right: 6px; }

/* ---------- 1. Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(48px, 6.6vw, 88px); line-height: .98; margin-bottom: 24px; }
.hero .lead { margin-bottom: 36px; }
.clap-word { color: var(--violet); }

.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg);
  padding: 12px 22px 12px 18px; border-radius: 16px; transition: transform .15s;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 24px; height: 24px; }
.store small { display: block; font-size: 11px; font-weight: 600; opacity: .7; line-height: 1.1; }
.store b { display: block; font-size: 17px; font-weight: 800; line-height: 1.15; }
.free-line { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Phone mock: always dark, like the app */
.phone {
  --bg: #090C0A; --surface: #111611; --surface-2: #161D17; --border: #1F2820;
  --text: #EEF1EC; --muted: #7F8D81; --dim: #4C584E;
  --green-strong: #3DD68C; --violet: #A78BFA; --shadow: none;
  width: 300px; max-width: 100%; margin: 0 auto; aspect-ratio: 9 / 18.5;
  background: var(--bg); color: var(--text);
  border: 9px solid #1A201B; border-radius: 48px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.p-status { display: flex; justify-content: space-between; padding: 14px 26px 0; font-size: 13px; font-weight: 800; }
.p-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; }
.p-head h3 { font-size: 30px; }
.p-head svg { width: 20px; height: 20px; color: var(--muted); }
.p-feed { flex: 1; overflow: hidden; padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.p-fab {
  position: absolute; right: 16px; bottom: 70px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--fab); border: 1px solid #2A352B; display: grid; place-items: center; font-size: 24px; font-weight: 300;
}
.p-tabs {
  display: flex; justify-content: space-around; border-top: 1px solid var(--border);
  padding: 10px 0 18px; font-size: 11px; font-weight: 800; color: var(--dim);
}
.p-tabs span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.p-tabs .is-on { color: var(--green); }
.p-tabs svg { width: 18px; height: 18px; }

/* ---------- 2. Why habits fade ---------- */
.why { padding: 120px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-rows { display: grid; gap: 72px; margin-top: 40px; }
.why-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-line { font-size: clamp(34px, 5.2vw, 66px); line-height: 1.04; }
.why-vis { display: grid; gap: 12px; }
.why-cap { font-size: 14px; font-weight: 600; color: var(--dim); }

/* Trails: abstract dots, no app UI (this section is life without the app) */
.trail { padding: 20px 22px; overflow: hidden; }
.trail svg { display: block; width: 100%; height: auto; overflow: visible; }
.trail-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; margin-bottom: 6px; }

/* Row 1: you send a signal (ripples), the people around you stay grey and silent */
.lone-you { fill: var(--green); }
.lone-label { fill: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lone-ripple {
  fill: none; stroke: var(--green); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center;
  animation: ripple 3.3s ease-out infinite;
}
@keyframes ripple {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(6.5); opacity: 0; }
}
.lone-other { fill: var(--dim); opacity: .55; animation: idle 4s ease-in-out infinite; }
@keyframes idle { 50% { opacity: .3; } }

/* Row 2: after a gap, the steps behind fade away */
.trail-dot { transform-box: fill-box; transform-origin: center; transition: opacity .6s, transform .6s; }
.trail-dot.is-done { fill: var(--green); }
.trail-dot.is-gap { fill: none; stroke: var(--miss); stroke-width: 2; stroke-dasharray: 3 4; }
.trail-dot.is-new { fill: var(--green); }
.reset-box.is-reset .trail-dot.is-done { opacity: .07; transform: scale(.6); }

.reset-count { position: relative; font-weight: 900; color: var(--green-strong); text-align: right; }
.reset-count span { transition: opacity .5s; }
.reset-count .rc-after { position: absolute; right: 0; top: 0; white-space: nowrap; color: var(--coral); opacity: 0; }
.reset-box.is-reset .rc-before { opacity: 0; }
.reset-box.is-reset .rc-after { opacity: 1; transition-delay: .9s; }

/* ---------- 3. Log: calendar + journal ---------- */
.log-vis { display: grid; gap: 14px; }
.cal { overflow: hidden; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 22px 14px; }
.cal-head h3 { font-size: 24px; }
.cal-head span { font-weight: 900; font-size: 24px; color: var(--green-strong); }
.cal-scroll { overflow-x: auto; }
.cal table { border-collapse: collapse; width: 100%; min-width: 560px; }
.cal th, .cal td { border-top: 1px solid var(--border); text-align: center; padding: 10px 4px; }
.cal th { font-stretch: 125%; font-size: 10px; letter-spacing: .14em; color: var(--dim); font-weight: 800; }
.cal th span { display: block; font-size: 13px; color: var(--muted); }
.cal td:first-child, .cal th:first-child {
  text-align: left; padding-left: 22px; border-right: 1px solid var(--border);
  white-space: nowrap; font-weight: 700; font-size: 14px; width: 130px;
}
.cal .is-today { background: var(--today); }
.cal th.is-today, .cal th.is-today span { color: var(--text); }
.dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green);
  display: inline-grid; place-items: center; vertical-align: middle;
  transform: scale(0); animation: dot-in .4s forwards;
}
.dot svg { width: 12px; height: 12px; color: var(--green-ink); }
.miss { width: 22px; height: 22px; display: inline-block; vertical-align: middle; border-radius: 50%; border: 1.5px solid var(--miss); }
@keyframes dot-in { to { transform: scale(1); } }

.journal { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.journal b { font-weight: 800; font-size: 16px; }
.moods { display: flex; gap: 18px; }
.moods div { text-align: center; font-size: 24px; line-height: 1.2; }
.moods small { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }

/* ---------- 4. Support: scrolling feed ---------- */
.feed-wrap {
  position: relative; height: 620px; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 88%, transparent);
          mask-image: linear-gradient(transparent, #000 10%, #000 88%, transparent);
}
.feed-track { display: grid; gap: 14px; animation: scroll-up 46s linear infinite; }
.feed-wrap:hover .feed-track { animation-play-state: paused; }
@keyframes scroll-up { to { transform: translateY(-50%); } }
.hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--violet); font-weight: 800; }
.hint svg { width: 20px; height: 20px; }

/* ---------- 5. How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.step { padding: 16px 16px 28px; }
.step-body { padding: 0 12px; }
.step-n {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
  color: var(--green-strong); margin-bottom: 16px;
}
.step h3 { font-size: 24px; margin-bottom: 10px; }
.step p { color: var(--muted); }

.step-vis {
  height: 196px; background: var(--surface-2); border-radius: 16px; margin-bottom: 24px; padding: 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; overflow: hidden;
}
.sv-label { font-stretch: 125%; font-size: 9.5px; font-weight: 800; letter-spacing: .18em; color: var(--dim); margin-bottom: 2px; }

/* mini plan */
.mp { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid; border-radius: 10px; padding: 6px 10px; }
.mp b { display: block; font-size: 12px; font-weight: 800; line-height: 1.2; }
.mp small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.mp .bar { height: 3px; border-radius: 3px; background: var(--border); margin-top: 5px; overflow: hidden; }
.mp .bar i { display: block; height: 100%; background: var(--green); border-radius: 4px; animation: grow 1.4s ease both; }
@keyframes grow { from { width: 0; } }

/* mini check-in */
.mc { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 9px 11px; font-size: 13px; font-weight: 700; }
.mc .cb {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; border: 1.5px solid var(--miss);
}
.mc .cb svg { width: 11px; height: 11px; color: var(--green-ink); opacity: 0; }
.mc .label { flex: 1; }
.mc.is-done .cb { background: var(--green); border-color: var(--green); }
.mc.is-done .cb svg { opacity: 1; }
.mc.is-done .label { text-decoration: line-through; opacity: .55; }
.mc.is-anim .cb { animation: cb-fill 3.2s infinite; }
.mc.is-anim .cb svg { animation: cb-check 3.2s infinite; }
.mc.is-anim .label { animation: cb-label 3.2s infinite; }
@keyframes cb-fill {
  0%, 35% { background: transparent; border-color: var(--miss); transform: scale(1); }
  45% { transform: scale(1.25); }
  50%, 92% { background: var(--green); border-color: var(--green); transform: scale(1); }
  100% { background: transparent; border-color: var(--miss); }
}
@keyframes cb-check { 0%, 40% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cb-label {
  0%, 45% { text-decoration: none; opacity: 1; }
  50%, 92% { text-decoration: line-through; opacity: .55; }
  100% { opacity: 1; }
}

/* mini notifications */
.mn {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 10px; font-size: 12px; line-height: 1.3;
  opacity: 0; transform: translateY(8px); animation: notif-in .5s ease forwards;
}
.mn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mn .text { flex: 1; color: var(--muted); }
.mn b { font-weight: 800; color: var(--text); }
.mn > svg { width: 16px; height: 16px; color: var(--violet); flex-shrink: 0; }
@keyframes notif-in { to { opacity: 1; transform: none; } }

/* ---------- 6. Privacy ---------- */
.priv { display: grid; gap: 14px; }
.priv-item { display: flex; gap: 18px; align-items: flex-start; padding: 24px; }
.priv-item .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.priv-item .ic svg { width: 22px; height: 22px; color: var(--green-strong); }
.priv-item h3 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.priv-item p { color: var(--muted); font-size: 16px; }
.priv-item .toggle { margin-left: auto; align-self: center; }

/* ---------- 7. Why we built this ---------- */
.note { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.note .eyebrow { margin-bottom: 28px; }
.note blockquote { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.45; font-weight: 500; letter-spacing: -.01em; }
.note blockquote p + p { margin-top: 22px; }
.note cite { display: flex; align-items: center; gap: 14px; margin-top: 30px; font-style: normal; font-weight: 800; color: var(--muted); }
.sig { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }

/* ---------- Closing CTA ---------- */
.closing { text-align: center; padding: 120px 0 128px; border-top: 1px solid var(--border); }
.closing h2.display { margin: 0 auto 34px; max-width: 14ch; font-size: clamp(40px, 6vw, 76px); }
.closing .stores { justify-content: center; }

/* ---------- Coming-soon modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 24px;
  background: var(--overlay); backdrop-filter: blur(6px);
}
.modal.is-open { display: grid; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-lg);
  padding: 36px 32px 30px; max-width: 400px; width: 100%; text-align: center; animation: rise .25s ease;
}
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal-box .big { font-size: 44px; margin-bottom: 12px; }
.modal-box h3 { font-size: 30px; margin-bottom: 10px; }
.modal-box p { color: var(--muted); margin-bottom: 26px; }
.btn-green { display: block; background: var(--green); color: var(--green-ink); font-weight: 800; padding: 14px 20px; border-radius: 16px; }
.btn-ghost { margin-top: 10px; color: var(--muted); font-weight: 700; padding: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 20px 0 64px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 56px; }
  .split--reverse .split-vis { order: 2; }
  .why-row { grid-template-columns: 1fr; gap: 28px; }
  .why-rows { gap: 56px; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .section--flush { padding-top: 0; }
  .feed-wrap { height: 540px; }
}
@media (max-width: 520px) {
  .store { flex: 1; min-width: 150px; justify-content: center; }
  .moods { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .lone-ripple, .lone-other { animation: none; }
  .feed-track, .mc.is-anim .cb, .mc.is-anim .cb svg, .mc.is-anim .label { animation: none; }
  .dot { animation: none; transform: none; }
}
