/* Habito's page. Same visual system as poko.world, waku and wiit (Figtree, Snow / Black bases,
   cards, hairlines), with Habito's own colors: the red echo of its icon and the amber-to-green
   ramp of its streak number. No third-party requests. */

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2-variations'), url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAFAFA; --card: #FFFFFF; --card2: #F0F0F0;
  --ink: #111112; --ink-2: #606063; --ink-3: #707074;
  --line: rgba(0, 0, 0, .08);
  --accent: #C23B4A; --accent-2: #A3303D; --accent-soft: #FBE7E9;
  --streak: linear-gradient(100deg, #F2B21B 0%, #EE8B1F 45%, #7DC56F 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --phone-shadow: 0 30px 60px -20px rgba(17, 17, 18, .35);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #121316; --card2: #1C1E22;
    --ink: #F5F4F1; --ink-2: #9B9DA1; --ink-3: #85878C;
    --line: rgba(255, 255, 255, .11);
    --accent: #F28B96; --accent-2: #F6A6AE; --accent-soft: rgba(242, 139, 150, .14);
    --shadow: none;
    --phone-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg); color: var(--ink); min-height: 100dvh;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--card); color: var(--ink); padding: 12px 18px; border-radius: 0 0 14px 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* Languages: both are in the page; html[data-lang] shows one. English without JavaScript. */
[data-lang="en"] [lang="es"],
[data-lang="es"] [lang="en"] { display: none !important; }

.head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: clamp(18px, 2.8vh, 30px) clamp(20px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  grid-column: 2; display: flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800; letter-spacing: -.045em; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.lang { grid-column: 3; justify-self: end; display: flex; gap: 2px; }
.lang button {
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink-3);
  background: none; border: 0; padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }

main { flex: 1; width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(20px, 3vw, 40px); width: 100%; }
section { padding: clamp(40px, 7vh, 84px) 0; }
section + section { border-top: 1px solid var(--line); }

h1 { font-size: clamp(34px, 6.4vw, 58px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.032em; line-height: 1.1; text-wrap: balance; }
h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.flabel { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; display: block; }
h2 + .lede, .flabel + h2 { margin-top: 6px; }
.lede { margin-top: 16px; font-size: clamp(16px, 1.9vw, 19px); color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }
.small { font-size: 13.5px; color: var(--ink-3); }
.streak {
  background: var(--streak); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* hero: the copy, and three real screens fanned out */
.hero {
  padding-top: clamp(36px, 6vh, 72px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero h1 { margin-top: 10px; max-width: 13ch; }
.cta {
  display: inline-block; margin-top: 26px;
  background: var(--accent); color: #FFFFFF;
  font-weight: 800; font-size: 15px; padding: 12px 20px; border-radius: 999px;
}
@media (prefers-color-scheme: dark) { .cta { color: #111112; } }
.cta + .small { margin-top: 12px; }

.phone {
  border-radius: 34px; overflow: hidden; background: #000000;
  border: 5px solid #111112; box-shadow: var(--phone-shadow);
  aspect-ratio: 395 / 860;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.fan { position: relative; height: clamp(420px, 52vw, 520px); }
.fan .phone { position: absolute; top: 50%; width: 46%; }
.fan .phone:nth-child(1) { left: 0; transform: translateY(-46%) rotate(-7deg); }
.fan .phone:nth-child(2) { left: 27%; transform: translateY(-50%); z-index: 2; }
.fan .phone:nth-child(3) { right: 0; transform: translateY(-46%) rotate(7deg); }

/* the eight chain styles, as a row of phones */
.phones { display: grid; gap: clamp(14px, 2vw, 24px); margin-top: clamp(26px, 4vh, 40px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .phones { grid-template-columns: repeat(4, 1fr); } }
.phones figure { margin: 0; }
.phones .phone { border-radius: 26px; border-width: 4px; }
.phones figcaption { margin-top: 12px; font-weight: 700; font-size: 15px; }
.phones figcaption span.small { display: block; font-weight: 500; margin-top: 2px; }

/* cards */
.grid { display: grid; gap: 12px; margin-top: clamp(22px, 3.4vh, 32px); grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--card); border-radius: 18px; padding: clamp(18px, 2.4vw, 24px);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.card .big {
  font-size: 44px; font-weight: 900; letter-spacing: -.05em; line-height: 1; margin-bottom: 14px;
}
.card .shot { width: 100%; border-radius: 12px; margin-bottom: 16px; }
.card.soft { background: var(--accent-soft); box-shadow: none; }
.card.soft h3 { color: var(--accent); }

/* split: copy on one side, a picture on the other */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split .phone { width: min(280px, 100%); margin: 0 auto; }
.steps { margin-top: 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-top: 14px; color: var(--ink-2); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 14px;
}
.steps strong { color: var(--ink); }

.wide { margin-top: clamp(24px, 4vh, 36px); border-radius: 18px; overflow: hidden; box-shadow: var(--phone-shadow); }

/* the paper tracker, drawn in CSS: always white paper, even in dark mode */
.paper {
  position: relative; width: min(340px, 100%); margin: 0 auto; aspect-ratio: 210 / 297;
  background: #FFFFFF; color: #111112; border-radius: 4px; padding: 11% 10% 9%;
  box-shadow: 0 30px 60px -24px rgba(17, 17, 18, .35), 0 0 0 1px rgba(0, 0, 0, .05);
  transform: rotate(-2deg); display: flex; flex-direction: column;
}
.paper .reg { position: absolute; width: 14px; height: 14px; background: #111112; }
.paper .reg.tl { top: 4.5%; left: 6%; } .paper .reg.tr { top: 4.5%; right: 6%; }
.paper .reg.bl { bottom: 4.5%; left: 6%; } .paper .reg.br { bottom: 4.5%; right: 6%; }
.paper .ptitle { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.paper .ptitle i { width: 22px; height: 22px; border-radius: 6px; background: #E8F0FE; display: grid; place-items: center; font-style: normal; font-size: 13px; }
.paper .pmeta { font-size: 11px; color: #707074; margin-top: 2px; }
.paper .month { margin-top: 10%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.paper .month b { font-size: 9px; color: #9B9DA1; text-align: center; font-weight: 700; }
.paper .month span {
  position: relative; aspect-ratio: 1; border: 1.3px solid #C9CBD0; border-radius: 50%;
  display: grid; place-items: center; font-size: 8.5px; color: #9B9DA1; font-weight: 600;
}
.paper .month span.x::after {
  content: ""; position: absolute; inset: -12% -10% 4% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5c2.2 1.6 4 3.6 5.4 6.2C11.6 12.4 15.6 7 21.5 3.2' fill='none' stroke='%232348B5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.paper .month span.x:nth-child(3n)::after { transform: rotate(-8deg); }
.paper .month span.x:nth-child(4n)::after { transform: rotate(6deg) scale(1.08); }
.paper .month span.off { border-style: dashed; }
.paper .pfoot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.paper .qr {
  width: 44px; height: 44px; flex: none;
  background: repeating-conic-gradient(#111112 0 25%, #FFFFFF 0 50%) 0 0 / 9px 9px;
  outline: 3px solid #111112; outline-offset: -3px;
}
.paper .wm { font-size: 8px; color: #9B9DA1; line-height: 1.4; }

/* contact */
.shout { background: var(--accent-soft); border-radius: 18px; padding: clamp(20px, 3vw, 30px); }
.shout .flabel { color: var(--accent); opacity: .8; }
.shout h2 { color: var(--accent); margin-top: 6px; }
.shout p { color: var(--accent); max-width: 58ch; margin-top: 12px; }
.mail { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; letter-spacing: -.02em; }
@media (prefers-color-scheme: dark) { .shout p { color: var(--ink-2); } }

/* text pages: support, privacy, terms */
.page-top { padding-top: clamp(36px, 6vh, 72px); }
.page-top h1 { margin-top: 10px; }
.doc { max-width: 64ch; }
.doc h2 { margin-top: 36px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 26px; }
.doc p, .doc li { margin-top: 10px; color: var(--ink-2); }
.doc ul { padding-left: 1.2em; }

.foot { border-top: 1px solid var(--line); padding: 22px 0 28px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 760px) {
  .hero, .split { grid-template-columns: 1fr; }
  .split .art { order: -1; }
  .fan { height: min(560px, 120vw); max-width: 420px; width: 100%; margin: 0 auto; }
  .head { grid-template-columns: auto 1fr; }
  .wordmark { grid-column: 1; }
  .lang { grid-column: 2; }
}

.paper .month span.blank { visibility: hidden; }

.card .shot { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; background: var(--card2); }
@media (max-width: 760px) {
  .fan .phone { width: 40%; }
  .fan .phone:nth-child(1) { left: 4%; }
  .fan .phone:nth-child(2) { left: 30%; }
  .fan .phone:nth-child(3) { right: 4%; }
}
