/* Opportunity Habit — marketing site styles (implements Marketing Site v4). */

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { margin: 0; text-wrap: pretty; background: #ffffff; color: var(--color-text); }
a { color: var(--color-accent-700); text-decoration: none; }
.btn, .tag, .input, .card, .dialog { border-radius: 8px; }
a.btn { text-decoration: none; }
a.btn-primary { color: var(--color-bg); }
/* The generic link hover must not reach the button variants — on the solid
   primary it repaints the label in the fill colour and erases it. */
a:not(.btn):hover { color: var(--color-accent); }
a.btn-primary:hover, a.btn-primary:active, a.btn-primary:focus-visible { color: var(--color-bg); }
a.btn-secondary:hover, a.btn-secondary:active { color: var(--color-accent-700); }
.btn { min-height: 44px; }
h1, h2, h3 { overflow-wrap: break-word; }

/* — layout helpers — */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 72px); }
.kicker {
  display: block; font-size: 13px; line-height: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-accent-700); margin: 0 0 14px;
}
.section-h2 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(24px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.015em; margin: 0;
}
.body-copy {
  font-size: 15.5px; line-height: 28px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent); margin: 0;
}
.muted-70 { color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.micro-label {
  font-size: 11px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.bullet { display: flex; gap: 11px; align-items: baseline; }
.bullet .sq { width: 9px; height: 9px; border-radius: 2px; background: var(--color-accent); flex: none; }
.bullet .tx { font-size: 14px; line-height: 24px; color: color-mix(in srgb, var(--color-text) 80%, transparent); }

/* — navigation — */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  margin: 12px max(12px, calc((100% - 1224px) / 2));
  padding-inline: 20px;
  flex-wrap: wrap; gap: 10px 18px;
  background: var(--color-bg);
  border: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(0);
  transition: margin 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}
.site-nav.is-floating { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10); }
.site-nav.is-hidden { transform: translateY(-160%); }
.nav-links { display: contents; }
/* Nav links stay text — an accent rule appears under the label on hover and
   stays put on the section you are currently in, so they read as clickable
   without competing with the primary button. */
.nav-links > a {
  position: relative;
  color: var(--color-text);
  padding: 6px 0;
  font-size: 14px;
}
.nav-links > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.nav-links > a:hover, .nav-links > a:focus-visible { color: var(--color-accent-700); }
.nav-links > a:hover::after,
.nav-links > a:focus-visible::after,
.nav-links > a[aria-current="true"]::after { transform: scaleX(1); }
.nav-links > a[aria-current="true"] { color: var(--color-accent-700); }
@media (prefers-reduced-motion: reduce) {
  .nav-links > a::after { transition: none; }
}
/* Below 880px the section links collapse into a burger, so the bar stays
   one line instead of wrapping into a two-storey block on a phone. */
.nav-burger {
  display: none;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 2px solid var(--color-divider); border-radius: 8px;
  cursor: pointer; padding: 0; color: var(--color-text);
}
.nav-burger:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (max-width: 880px) {
  .nav-links { display: none !important; }
  .nav-burger { display: inline-flex; }
}
@media (min-width: 881px) {
  .nav-menu { display: none !important; }
}
/* On a narrow phone the wordmark, the button and the burger cannot share a
   line, so the mark carries the brand and the text steps aside. */
@media (max-width: 560px) {
  .nav-wordmark { display: none; }
}
.nav-menu {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px;
  background: var(--color-bg); border: 2px solid var(--color-divider); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 8px; display: flex; flex-direction: column;
}
.nav-menu a {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px;
  border-radius: 8px; font-family: var(--font-heading); font-weight: 800;
  font-size: 16px; color: var(--color-text);
}
.nav-menu a:hover { background: var(--color-neutral-100); color: var(--color-text); }

/* — phone frame — */
.device { position: relative; width: 100%; }
.device .side-btn {
  position: absolute; width: 3px; background: var(--color-neutral-700);
}
.device .side-btn.l { left: -3px; border-radius: 2px 0 0 2px; }
.device .side-btn.r { right: -3px; border-radius: 0 2px 2px 0; }
.device .side-btn.b1 { top: 14%; height: 3.4%; }
.device .side-btn.b2 { top: 21%; height: 6%; }
.device .side-btn.b3 { top: 29%; height: 6%; }
.device .side-btn.b4 { top: 25%; height: 9.5%; }
.device .bezel {
  background: linear-gradient(150deg, #4a4744 0%, #161413 32%, #2c2926 62%, #0f0d0d 100%);
  padding: 2.9%; border-radius: 16%/7.4%;
}
.device .bezel > img { width: 100%; height: auto; display: block; border-radius: 14%/6.4%; }
.device-clip {
  width: 100%; max-width: 292px; padding: 0 6px; box-sizing: border-box;
  overflow: hidden; aspect-ratio: 292/430;
}

/* — hero demo phone — */
.demo-screen {
  position: relative; width: 100%; aspect-ratio: 402/874;
  border-radius: 14%/6.4%; overflow: hidden; background: #ffffff;
}
.demo-stage { position: absolute; inset: 0; overflow: hidden; background: #ffffff; }
.demo-canvas {
  position: absolute; top: 0; left: 0; width: 402px; height: 874px;
  transform-origin: top left; font-family: var(--font-body); color: var(--color-text);
}
.demo-slider {
  position: relative; width: 100px; height: 40px; flex: none;
  background: var(--color-neutral-300); touch-action: none; user-select: none;
  -webkit-user-select: none; cursor: grab; border-radius: 10px;
}
.demo-knob {
  position: absolute; top: 2px; transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.demo-stat { flex: 1; text-align: center; }
.demo-stat .n { font-family: var(--font-heading); font-weight: 800; font-size: 16px; }
.demo-stat .l { font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.5; }

/* — screens (inside the app) rows — */
.screen-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 36px clamp(28px, 5vw, 72px); align-items: start;
  border-top: 2px solid var(--color-divider); padding: 52px 0;
}
.screen-num {
  font-family: var(--font-heading); font-weight: 800; font-size: 13px; line-height: 14px;
  letter-spacing: 0.08em; color: var(--color-accent-700); margin-bottom: 14px;
}
.screen-h3 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(21px, 2.5vw, 28px); line-height: 1.18; letter-spacing: -0.012em; margin: 0 0 14px;
}

/* — interactive chips (insights, nudge) — */
.chip {
  border: 2px solid var(--color-divider); border-radius: 12px;
  background: transparent; color: var(--color-text);
  font-family: var(--font-heading); font-weight: 800; font-size: 13px; line-height: 18px;
  padding: 9px 14px; min-height: 44px; display: flex; align-items: center;
  cursor: pointer; user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.chip.small { font-size: 12px; line-height: 16px; padding: 8px 13px; }
.chip.on { background: var(--color-accent); color: var(--color-bg); }
.step-btn {
  border: 2px solid var(--color-divider); border-radius: 12px;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 15px;
  background: transparent; color: var(--color-text);
  cursor: pointer; user-select: none; flex: none; padding: 0;
}
.step-btn[disabled] { opacity: 0.28; cursor: default; }

/* — forms — */
.text-input {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px;
  border-radius: 8px; border: 2px solid var(--color-divider);
  background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px;
}
.field-label {
  display: block; font-size: 11px; line-height: 14px;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px;
}

/* — features carousel — */
.feat-track {
  display: flex; align-items: stretch; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding: 0 0 6px;
  cursor: grab; user-select: none; flex: 1; min-width: 0;
}
.feat-track::-webkit-scrollbar { display: none; }
.feat-spacer { flex: 0 0 max(0px, calc(50% - clamp(120px, 35vw, 180px))); }
.feat-card {
  flex: 0 0 clamp(240px, 70vw, 360px); min-height: 480px; scroll-snap-align: center;
  box-sizing: border-box; border: 2px solid var(--color-divider); border-radius: 12px;
  padding: clamp(18px, 4vw, 24px); display: flex; flex-direction: column;
  opacity: 0.5; transition: opacity 0.3s ease;
}
.feat-card.on { opacity: 1; }
.feat-card .num {
  font-family: var(--font-heading); font-weight: 800; font-size: 17px; line-height: 22px;
  letter-spacing: 0.06em; color: var(--color-accent-700); margin-bottom: 12px;
}
.feat-card .t {
  font-family: var(--font-heading); font-weight: 800; font-size: 18px; line-height: 24px; margin-bottom: 10px;
}
.feat-card .d {
  font-size: 14px; line-height: 26px;
  color: color-mix(in srgb, var(--color-text) 76%, transparent); max-width: 38ch;
}
.feat-card .art { margin-top: auto; padding-top: 20px; margin-bottom: 30px; display: flex; }
.feat-card .art > div {
  flex: 1; height: 230px; background: var(--color-neutral-100); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.feat-arrow-slot { flex: none; width: clamp(0px, calc((100vw - 640px) * 999), 44px); overflow: hidden; }
.feat-dot-hit {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: transparent; border: 0; padding: 0;
}
.feat-dot-hit .dot { width: 10px; height: 10px; background: var(--color-neutral-300); transition: background 0.2s ease; }
.feat-dot-hit.on .dot { background: var(--color-accent); }

/* — FAQ — */
.faq-item { border-top: 2px solid var(--color-divider); }
.faq-q {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 24px 0; min-height: 44px; cursor: pointer;
  width: 100%; background: transparent; border: 0; text-align: left; color: inherit;
}
.faq-q h3 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 19px; line-height: 28px; letter-spacing: -0.01em; margin: 0;
}
.faq-q .glyph {
  font-family: var(--font-heading); font-weight: 800; font-size: 19px; line-height: 28px;
  color: var(--color-accent); flex: none;
}
.faq-a { padding: 0 0 28px; }
.faq-a p { font-size: 15.5px; line-height: 28px; color: color-mix(in srgb, var(--color-text) 78%, transparent); margin: 0; max-width: 62ch; }

/* — dialogs / overlays — */
.overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: color-mix(in srgb, var(--color-text) 55%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.overlay[hidden] { display: none; }
.modal {
  background: var(--color-bg); border: 2px solid var(--color-divider); border-radius: 12px;
  max-height: calc(100vh - 48px); overflow-y: auto; box-sizing: border-box;
}
.legal-p { font-size: 14px; line-height: 25px; color: color-mix(in srgb, var(--color-text) 82%, transparent); margin: 0 0 14px; }
.legal-ul { margin: 0 0 14px; padding-left: 20px; }
.legal-ul li { font-size: 14px; line-height: 25px; color: color-mix(in srgb, var(--color-text) 82%, transparent); margin: 0 0 6px; }

/* — animations — */
@keyframes omBarGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes omPopA { 0% { transform: translateY(6px) scale(0.86); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
@keyframes omPopB { 0% { transform: translateY(6px) scale(0.86); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
@keyframes omPhoneKnobRock {
  0%, 64%, 100% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% + 9px)); }
  42% { transform: translateX(calc(-50% - 9px)); }
}
@keyframes omArrowHintR {
  0%, 30%, 100% { opacity: 0.35; }
  16% { opacity: 1; }
}
@keyframes omArrowHintL {
  0%, 20%, 52%, 100% { opacity: 0.3; }
  37% { opacity: 0.85; }
}
@keyframes omKnobRock {
  0%, 64%, 100% { transform: translateX(0); }
  20% { transform: translateX(9px); }
  42% { transform: translateX(-9px); }
}
@keyframes omRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes omRowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: omRise 0.45s ease both; }
@media (prefers-reduced-motion: reduce) {
  [data-om-rock] { animation: none !important; }
  html { scroll-behavior: auto; }
  .rise { animation: none; }
}
