/* ===== HabitRebel website ===== */
:root {
  --blue: #1d8533;        /* logo blue */
  --blue-2: #2fb344;      /* lighter UI blue */
  --red: #84cc16;         /* logo red dot */
  --cream: #f6f3ec;       /* logo paper */
  --green: #34c759;
  --orange: #ff9f0a;
  --ink: #1d1d1f;
  --ink-2: #4a4a50;
  --muted: #86868b;
  --line: #e6e6ea;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --radius: 18px;
  --shadow: 0 30px 60px -20px rgba(16,70,34, .25), 0 10px 25px -10px rgba(16,70,34, .15);
  /* system fonts only: the site makes no requests to third-party servers */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--blue-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  height: 46px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 16px; }
.brand img { border-radius: 6px; width: 22px; height: 22px; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 12.5px; }
.nav__links a { color: rgba(0, 0, 0, .8); transition: color .15s; }
.nav__links a:hover { color: var(--ink); }
.nav__links .nav__cta {
  color: #fff; background: #1d8533; padding: 4px 12px; border-radius: 999px; font-weight: 500;
}
.nav__links .nav__cta:hover { color: #fff; background: #16772a; }

/* ---------- Hero: product tile ---------- */
.hero {
  background: #f5f5f7; text-align: center;
  padding: 56px 20px 0; overflow: hidden;           /* devices are cropped at the tile's bottom edge */
}
.hero__copy { animation: rise .9s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 15px; }
.hero__title {
  font-size: clamp(52px, 8vw, 80px); font-weight: 700; letter-spacing: -.04em; line-height: 1.02;
}
.hero__title span {
  background: linear-gradient(100deg, #2fb344 10%, #14b8a6 60%, #84cc16 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { margin: 10px 0 0; font-size: clamp(22px, 3vw, 28px); font-weight: 600; letter-spacing: -.015em; }
.hero__lead {
  max-width: 560px; margin: 10px auto 0;
  font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); line-height: 1.45;
}
.hero__ctas { display: flex; justify-content: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.pill {
  display: inline-block; min-width: 128px; padding: 10px 22px; border-radius: 999px;
  font-size: 17px; font-weight: 500; text-align: center; transition: background .2s, color .2s;
}
.pill--fill { background: #1d8533; color: #fff; border: 1px solid #1d8533; }
.pill--fill:hover { background: #16772a; }
.pill--line { color: #1d8533; border: 1px solid #1d8533; }
.pill--line:hover { background: #1d8533; color: #fff; }

/* ---------- Showcase: real screenshots in Mac + iPhone frames ---------- */
.showcase {
  position: relative; max-width: 1040px; margin: 48px auto -140px; padding: 0 0 0 150px;
  animation: rise 1.1s .15s ease both;
}
.mac {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #dfe2e8;
}
.mac__bar { height: 34px; background: #f1f2f5; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid #e3e5ea; }
.mac__bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.mac__bar i:nth-child(2) { background: #febc2e; }
.mac__bar i:nth-child(3) { background: #28c840; }
.mac__shot { width: 100%; height: auto; }

/* status pills (used in the Today feature chips) */
.st {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff; background: transparent; border: 1.5px solid #d4d6dc;
}
.st--done  { background: var(--green); border-color: var(--green); }
.st--fail  { background: var(--red); border-color: var(--red); }
.st--prog  { background: var(--blue-2); border-color: var(--blue-2); font-size: 10px; }
.st--move  { background: var(--orange); border-color: var(--orange); }
.st--deleg { background: #8e8e93; border-color: #8e8e93; }

/* iPhone frame */
.phone {
  position: relative; width: 270px; aspect-ratio: 9 / 19.2; flex: none;
  background: #111; border-radius: 44px; padding: 10px;
  box-shadow: var(--shadow), inset 0 0 0 2px #333;
}
.phone__notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 82px; height: 22px; background: #000; border-radius: 999px; z-index: 2; }
.phone__screen { position: relative; height: 100%; background: #fff; border-radius: 35px; overflow: hidden; }
/* screenshot fills the screen below a blank status-bar strip */
.phone__screen--shot { padding-top: 34px; }
.phone__screen--shot img { width: 100%; height: auto; }
.phone__screen--gray { background: #f5f5f7; }
.phone--hero { position: absolute; left: 0; bottom: -10px; z-index: 2; }
/* ---------- Section basics ---------- */
.section-title {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; text-align: center;
}
.section-title img { border-radius: 8px; }
.text-link { font-size: 18px; font-weight: 600; }
.text-link span { display: inline-block; transition: transform .2s; }
.text-link:hover span { transform: translateX(3px); }

.intro { max-width: 720px; margin: 0 auto; padding: 70px 20px 40px; text-align: center; }
.intro p { font-size: 20px; color: var(--ink-2); margin: 18px 0 18px; }

/* ---------- Feature rows ---------- */
.features { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; }
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 60px 0; border-top: 1px solid var(--line);
}
.feature:first-child { border-top: 0; }
.feature--flip .feature__text { order: 2; }
.feature__icon { width: 64px; height: 64px; margin-bottom: 16px; }
.feature h3 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; margin-bottom: 14px; }
.feature p { font-size: 18px; color: var(--ink-2); margin: 0 0 18px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: flex; align-items: center; gap: 7px; background: var(--bg-soft); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 14px; font-weight: 500; }
.chips .st { width: 22px; height: 22px; font-size: 12px; }

.feature__visual { display: flex; justify-content: center; }
.feature__visual .phone { width: 290px; }
/* ---------- Small grid ---------- */
.grid-section { background: var(--bg-soft); padding: 80px 20px; }
.grid { max-width: 1080px; margin: 44px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { background: #fff; border-radius: var(--radius); padding: 24px; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(16,70,34,.25); }
.tile img { width: 44px; height: 44px; margin-bottom: 14px; }
.tile__glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #e3f5e7; color: var(--blue); font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.tile h4 { font-size: 17px; margin-bottom: 6px; }
.tile p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Lean steps ---------- */
.lean { max-width: 1080px; margin: 0 auto; padding: 90px 20px 70px; text-align: center; }
.lean__lead { max-width: 620px; margin: 16px auto 44px; font-size: 19px; color: var(--ink-2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: left; counter-reset: s; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--cream); }
.step__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; margin-bottom: 14px; }
.step:last-child .step__n { background: var(--red); }
.step h4 { font-size: 19px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- Get ---------- */
.get {
  text-align: center; padding: 90px 20px;
  background: linear-gradient(180deg, #fff 0%, #eaf7ee 100%);
}
.get__lead { max-width: 600px; margin: 16px auto 44px; font-size: 19px; color: var(--ink-2); }
.platforms { max-width: 960px; margin: 0 auto 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.platform { background: #fff; border-radius: var(--radius); padding: 28px 18px; box-shadow: 0 10px 30px -18px rgba(16,70,34,.3); }
.platform__icon { color: var(--blue); display: flex; justify-content: center; margin-bottom: 12px; }
.platform h4 { font-size: 18px; margin-bottom: 4px; }
.platform p { margin: 0; color: var(--muted); font-size: 13.5px; }
.btn {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 600; font-size: 18px;
  padding: 14px 34px; border-radius: 999px; box-shadow: 0 12px 24px -10px rgba(31,79,180,.6);
  transition: transform .15s, background .15s;
}
.btn:hover { background: #166628; transform: translateY(-1px); }
.get__note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; padding: 90px 20px; }
.faq .section-title { margin-bottom: 34px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-size: 18px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 300; color: var(--blue-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Contact ---------- */
.contact { padding: 0 20px 90px; }
.contact__card {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: #f5f5f7; border-radius: 28px; padding: 48px 28px;
}
.contact__card img { margin: 0 auto 16px; border-radius: 13px; }
.contact__card h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
.contact__card p { max-width: 520px; margin: 12px auto 24px; font-size: 18px; color: var(--ink-2); }
.contact__card strong { color: var(--ink); font-weight: 600; }
.contact__mail { display: block; margin-top: 14px; font-size: 15px; color: var(--muted); }
.contact__mail:hover { color: #1d8533; }

/* ---------- Legal pages (privacy.html, terms.html) ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.legal-page h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 700; letter-spacing: -.03em; }
.legal-page .legal-meta { color: var(--muted); font-size: 15px; margin: 8px 0 32px; }
.legal-page h2 { font-size: 22px; font-weight: 700; margin: 36px 0 8px; }
.legal-page p, .legal-page li { font-size: 17px; color: var(--ink-2); line-height: 1.6; }
.legal-page p { margin: 8px 0; }
.legal-page ul { padding-left: 22px; margin: 8px 0; }
.legal-page li { margin: 8px 0; }
.legal-page .legal-summary { background: #f5f5f7; border-radius: 18px; padding: 20px 22px; }
.legal-page .legal-summary p { margin: 0; color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer__inner {
  max-width: 1080px; margin: 0 auto; padding: 30px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 14px;
}
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { color: var(--ink-2); }
.footer nav a:hover { color: var(--ink); }
.footer small { color: var(--muted); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__copy, .showcase { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid, .steps, .platforms { grid-template-columns: repeat(2, 1fr); }
  .showcase { padding-left: 110px; }
  .phone--hero { left: 14px; transform: scale(.72); transform-origin: bottom left; }
}
@media (max-width: 760px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .hero { padding-top: 40px; }
  .hero__icon { width: 52px; height: 52px; border-radius: 12px; }
  .pill { min-width: 0; padding: 9px 18px; font-size: 16px; }
  .mac__bar { height: 24px; }
  .mac__bar i { width: 9px; height: 9px; }
  .showcase { padding: 0; margin: 32px auto -110px; }
  .phone--hero { position: relative; left: auto; bottom: auto; transform: none; margin: -40px auto 0; width: 240px; }
  .feature { grid-template-columns: 1fr; gap: 30px; padding: 44px 0; }
  .feature--flip .feature__text { order: 0; }
  .feature__visual .phone { width: 260px; }
}
@media (max-width: 520px) {
  .grid, .steps, .platforms { grid-template-columns: 1fr; }
}

/* ===== HabitRebel additions ===== */
.hero__title span { background: linear-gradient(100deg, #2fb344 10%, #14b8a6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature__glyph { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #e3f5e7; color: #1d8533; font-size: 26px; margin-bottom: 14px; }
.nav__lang { font-weight: 600; font-size: 13px; padding: 3px 9px; border: 1px solid #d4d6dc; border-radius: 999px; color: var(--ink-2); }
.nav__lang:hover { border-color: #1d8533; color: #1d8533; }
.trio { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; margin: 40px auto 0; max-width: 900px; padding-bottom: 10px; }
.trio__mid { position: relative; z-index: 2; }
.trio__side { position: relative; z-index: 1; transform: scale(.88); transform-origin: bottom center; opacity: .96; }
.trio__side--l { margin-right: -46px; }
.trio__side--r { margin-left: -46px; }
.trio .phone { width: 260px; }
@media (max-width: 760px) {
  .trio .phone { width: 200px; }
  .trio__side--l { margin-right: -86px; }
  .trio__side--r { margin-left: -86px; }
}
@media (max-width: 520px) {
  .trio__side { display: none; }
  .trio .phone { width: 240px; }
}
.nav__links a.nav__lang { margin-left: 4px; }
@media (max-width: 640px) { .nav__links a:not(.nav__cta):not(.nav__lang) { display: none; } }

/* ---------- Цены: бесплатно и Pro ---------- */
.pricing { max-width: 960px; margin: 0 auto; padding: 90px 20px 30px; text-align: center; }
.pricing__lead { max-width: 620px; margin: 0 auto 36px; color: var(--ink-2); font-size: 18px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
.plan { background: #fff; border-radius: var(--radius); padding: 30px 28px; box-shadow: 0 10px 30px -18px rgba(16,70,34,.3); }
.plan h3 { font-size: 20px; margin: 0 0 6px; }
.plan__price { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.plan__price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan__alt { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; margin: 14px 0 0; padding: 0; }
.plan li { position: relative; padding: 7px 0 7px 28px; font-size: 15.5px; color: var(--ink-2); border-top: 1px solid rgba(0,0,0,.06); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.plan--pro { background: linear-gradient(160deg, #0f2a16, #17402a); color: #fff; }
.plan--pro .plan__price small, .plan--pro .plan__alt { color: rgba(255,255,255,.7); }
.plan--pro li { color: rgba(255,255,255,.88); border-top-color: rgba(255,255,255,.12); }
.plan--pro h3 { background: linear-gradient(135deg, #7BE06A, #2FB344 60%, #00B5A6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pricing__note { max-width: 680px; margin: 22px auto 0; color: var(--muted); font-size: 13px; }
.platforms { grid-template-columns: repeat(3, 1fr); }
.footer small { line-height: 1.6; }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.pricing__note a, .faq details a, .legal-page a, .support__legal a { color: #187a2b; text-decoration: underline; text-underline-offset: 2px; }
.faq__more { text-align: center; margin: 30px 0 0; }

/* ---------- Support page ---------- */
.support-hero { background: #f5f5f7; text-align: center; padding: 56px 20px 48px; }
.support-hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.support-hero__lead { max-width: 560px; margin: 12px auto 24px; font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); }
.quick { max-width: 960px; margin: 36px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick__item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); font-weight: 600; font-size: 16px; transition: border-color .15s, transform .15s; }
.quick__item:hover { border-color: #1d8533; transform: translateY(-2px); }
.quick__item .tile__glyph { margin: 0; flex: none; width: 38px; height: 38px; font-size: 18px; }
.faq.faq--group { padding: 50px 20px 0; }
.faq--group h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.faq--group details { scroll-margin-top: 64px; }
.faq--group details p + p { margin-top: -6px; }
.support .contact { padding-top: 70px; }
.support__legal { font-size: 14px !important; margin: 22px auto 0 !important; color: var(--muted) !important; }

/* ---------- Legal pages: language switch and the two parts ---------- */
.legal-langs { font-size: 15px; color: var(--muted); margin: 0 0 22px; }
.legal-langs a { text-decoration: none; font-weight: 600; }
.legal-part { scroll-margin-top: 64px; }
.legal-page h2 { scroll-margin-top: 64px; }
.legal-sep { border: 0; border-top: 1px solid var(--line); margin: 64px 0 48px; }

/* ---------- 404 ---------- */
.notfound { max-width: 620px; margin: 0 auto; padding: 80px 20px 100px; text-align: center; }
.notfound__code { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2em; color: #1d8533; }
.notfound h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; letter-spacing: -.03em; margin: 6px 0 14px; }
.notfound p { font-size: 18px; color: var(--ink-2); margin: 8px 0; }
.notfound .hero__ctas { margin-top: 28px; }
@media (max-width: 760px) {
  .quick { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nav__links { gap: 16px; }
  .nav__links a.nav__support:not(.nav__cta), .nav__links a.nav__lang:not(.nav__cta) { display: inline-block; }
}
@media (max-width: 460px) {
  .quick__item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; font-size: 15px; }
  .footer nav { gap: 12px 18px; }
}
@media (max-width: 430px) { .nav__links a.nav__cta { display: none; } }
@media (max-width: 720px) {
  .plans { grid-template-columns: 1fr; }
  .pricing { padding-top: 64px; }
  .platforms { grid-template-columns: 1fr; }
}
