/* Happitly landing page */

/* ---------- Fonts (Finlandica, SIL Open Font License) ---------- */
@font-face {
  font-family: "Happits Headline";
  src: url("assets/fonts/FinlandicaHeadline-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Happits Text";
  src: url("assets/fonts/FinlandicaText-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Colours (Aurora, night theme) ---------- */
:root {
  --bg: #090E1C;
  --surface: #121B33;
  --line: #24304F;
  --glass-line: rgba(255, 255, 255, .08);
  --ink: #E9EEF7;
  --ink2: #A9B4CB;
  --ink3: #8995AF;
  --primary: #7FDDB8;
  --on-primary: #06221A;
  --tint: rgba(127, 221, 184, .14);
  --danger: #EE9A9A;
  --star: rgba(233, 238, 247, .75);
  /* habit colours */
  --c1: #57C9A0;
  --c2: #64B5D9;
  --c4: #A9D47E;
  --c5: #9A88E0;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Happits Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand b { font-family: "Happits Headline", "Happits Text", system-ui, sans-serif; font-weight: 500; }
h1 { font-size: 68px; line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: 46px; line-height: 1.08; letter-spacing: -.01em; }
h3 { font-size: 21px; line-height: 1.25; }
svg, img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::selection { background: var(--tint); }

.wrap { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink2); }
.small { font-size: 14px; color: var(--ink3); }

/* ---------- Header ---------- */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; }
.brand b { font-size: 26px; letter-spacing: -.005em; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 900px;
  overflow: hidden;
  background: linear-gradient(180deg, #060A15 0%, #0A1430 52%, #13244C 100%);
}
.hero .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(9, 14, 28, .55)); }
.trees {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 110px;
  background: url("assets/img/trees-wide.svg") center bottom / 100% 100% no-repeat;
}
.hero .wrap { height: 100%; display: flex; align-items: center; gap: 40px; padding-top: 40px; }
.hero .copy { position: relative; z-index: 2; flex: 1; max-width: 600px; display: flex; flex-direction: column; gap: 24px; }
.hero .copy .lead { max-width: 520px; }

/* platforms row */
.plat { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px; }
.plat .eyebrow { margin-right: 4px; padding-bottom: 18px; }
.pi { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pi svg { color: var(--primary); }
.pi em { font-style: normal; font-size: 11px; letter-spacing: .02em; color: var(--ink3); }

/* store badges (placeholders until launch) */
.soon { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px 0 12px;
  border-radius: 12px; border: 1px solid rgba(233, 238, 247, .28); background: rgba(0, 0, 0, .35);
  font-size: 14px; line-height: 1.1;
}
.store svg { flex: none; }
.store small { display: block; font-size: 11px; letter-spacing: .02em; color: var(--ink2); }
.store b { font-size: 16px; font-weight: 600; }

/* phone picture */
.pwrap { position: relative; z-index: 2; flex: none; margin-right: 20px; }
.phone {
  width: 326px; height: auto;
  border-radius: 55px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 120px rgba(127, 221, 184, .12);
}

/* night sky stars: shared look here, each star's place below */
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i { position: absolute; border-radius: 50%; background: var(--star); }

/* ---------- Waitlist form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 600; white-space: nowrap;
}
.btn.pri { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 1px rgba(127, 221, 184, .4), 0 8px 30px rgba(127, 221, 184, .25); }
.btn.pri:hover { filter: brightness(1.06); }
.btn:disabled { cursor: default; opacity: .7; }

form.wl {
  display: flex; gap: 8px; max-width: 480px; padding: 6px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(14, 24, 48, .6);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
form.wl:focus-within { border-color: rgba(127, 221, 184, .6); }
form.wl input[type="email"] {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px;
  border: 0; outline: none; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px;
}
form.wl input::placeholder { color: var(--ink3); }
form.wl .hp { display: none; } /* spam trap, hidden from people */
.thanks, .err { display: none; margin-top: 12px; font-size: 15px; }
.thanks { color: var(--primary); }
.err { color: var(--danger); }
form.wl.done { display: none; }
form.wl.done + .thanks, .err.on { display: block; }

/* ---------- Four points ---------- */
.why { padding: 48px 0 96px; }
.why h2 { margin-bottom: 40px; }
.pts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pt { display: flex; flex-direction: column; gap: 12px; padding: 26px 24px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--surface); }
.pt svg { margin-bottom: 6px; }
.pt p { font-size: 16px; line-height: 1.55; color: var(--ink2); }
.ic-c1 { color: var(--c1); }
.ic-c2 { color: var(--c2); }
.ic-c4 { color: var(--c4); }
.ic-c5 { color: var(--c5); }

/* ---------- Bottom waitlist ---------- */
.cta { padding: 72px 0 104px; text-align: center; background: linear-gradient(180deg, var(--bg), #0B1430); }
.cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta .lead { max-width: 520px; }
.joinbox { width: 100%; max-width: 480px; margin-top: 8px; }
.cta form.wl { margin: 0 auto; }

/* ---------- Footer ---------- */
.foot { padding: 26px 0 34px; border-top: 1px solid var(--line); background: #0B1430; }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink3); }
.foot .brand img { width: 26px; height: 26px; }
.foot .brand b { font-size: 20px; }

/* ---------- Screen sizes ---------- */
@media (min-width: 900px) {
  .hero { height: max(760px, 100vh); }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .pts { grid-template-columns: repeat(2, 1fr); }
}
/* phones and small tablets */
@media (max-width: 899.98px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .lead { font-size: 17px; }
  .nav { padding: 16px 0; }
  .brand img { width: 30px; height: 30px; }
  .brand b { font-size: 22px; }

  .hero { height: auto; }
  .hero .wrap { flex-direction: column; align-items: stretch; gap: 44px; padding-top: 120px; padding-bottom: 150px; }
  .pwrap { margin: 0 auto; }
  .phone { width: 295px; border-radius: 50px; }
  .trees { height: 84px; background-image: url("assets/img/trees-narrow.svg"); }
  .plat { gap: 10px 20px; }
  .plat .eyebrow { width: 100%; padding-bottom: 0; }

  form.wl { flex-direction: column; padding: 8px; border-radius: 22px; }
  form.wl .btn { width: 100%; }
  form.wl input[type="email"] { flex: none; height: 52px; padding: 0 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); }

  .why { padding: 24px 0 64px; }
  .why h2 { margin-bottom: 28px; }
  .pts { grid-template-columns: 1fr; gap: 14px; }
  .cta { padding: 56px 0 72px; }
  .foot .wrap { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Star positions (decoration) ---------- */
.stars i:nth-child(1){left:99.0%;top:233px;width:1.4px;height:1.4px;opacity:0.71}
.stars i:nth-child(2){left:2.3%;top:295px;width:1px;height:1px;opacity:0.23}
.stars i:nth-child(3){left:24.7%;top:42px;width:1px;height:1px;opacity:0.65}
.stars i:nth-child(4){left:92.1%;top:330px;width:1.4px;height:1.4px;opacity:0.30}
.stars i:nth-child(5){left:58.0%;top:407px;width:1px;height:1px;opacity:0.55}
.stars i:nth-child(6){left:39.7%;top:321px;width:1px;height:1px;opacity:0.32}
.stars i:nth-child(7){left:34.0%;top:532px;width:1px;height:1px;opacity:0.75}
.stars i:nth-child(8){left:27.5%;top:375px;width:1px;height:1px;opacity:0.53}
.stars i:nth-child(9){left:67.6%;top:101px;width:1px;height:1px;opacity:0.28}
.stars i:nth-child(10){left:8.5%;top:548px;width:1.4px;height:1.4px;opacity:0.31}
.stars i:nth-child(11){left:72.2%;top:475px;width:1px;height:1px;opacity:0.41}
.stars i:nth-child(12){left:94.4%;top:17px;width:1px;height:1px;opacity:0.27}
.stars i:nth-child(13){left:9.5%;top:293px;width:1px;height:1px;opacity:0.29}
.stars i:nth-child(14){left:80.0%;top:5px;width:1px;height:1px;opacity:0.30}
.stars i:nth-child(15){left:85.3%;top:547px;width:1px;height:1px;opacity:0.62}
.stars i:nth-child(16){left:85.7%;top:249px;width:2px;height:2px;opacity:0.61}
.stars i:nth-child(17){left:49.4%;top:474px;width:1px;height:1px;opacity:0.44}
.stars i:nth-child(18){left:83.8%;top:61px;width:1px;height:1px;opacity:0.65}
.stars i:nth-child(19){left:25.5%;top:507px;width:1px;height:1px;opacity:0.26}
.stars i:nth-child(20){left:1.1%;top:44px;width:1px;height:1px;opacity:0.70}
.stars i:nth-child(21){left:53.3%;top:44px;width:1px;height:1px;opacity:0.39}
.stars i:nth-child(22){left:23.2%;top:85px;width:1px;height:1px;opacity:0.50}
.stars i:nth-child(23){left:69.3%;top:169px;width:1px;height:1px;opacity:0.67}
.stars i:nth-child(24){left:62.5%;top:470px;width:1px;height:1px;opacity:0.49}
.stars i:nth-child(25){left:52.6%;top:151px;width:2px;height:2px;opacity:0.35}
.stars i:nth-child(26){left:69.0%;top:420px;width:1px;height:1px;opacity:0.24}
.stars i:nth-child(27){left:49.3%;top:203px;width:1px;height:1px;opacity:0.38}
.stars i:nth-child(28){left:6.1%;top:350px;width:1px;height:1px;opacity:0.40}
.stars i:nth-child(29){left:8.5%;top:352px;width:1px;height:1px;opacity:0.34}
.stars i:nth-child(30){left:11.7%;top:486px;width:1px;height:1px;opacity:0.57}
.stars i:nth-child(31){left:17.4%;top:420px;width:1px;height:1px;opacity:0.45}
.stars i:nth-child(32){left:98.1%;top:131px;width:1px;height:1px;opacity:0.37}
.stars i:nth-child(33){left:13.5%;top:161px;width:1.4px;height:1.4px;opacity:0.68}
.stars i:nth-child(34){left:45.0%;top:18px;width:1px;height:1px;opacity:0.35}
.stars i:nth-child(35){left:68.6%;top:21px;width:1px;height:1px;opacity:0.55}
.stars i:nth-child(36){left:75.4%;top:302px;width:1px;height:1px;opacity:0.22}
.stars i:nth-child(37){left:18.1%;top:56px;width:1px;height:1px;opacity:0.48}
.stars i:nth-child(38){left:7.2%;top:126px;width:1.4px;height:1.4px;opacity:0.61}
.stars i:nth-child(39){left:8.2%;top:536px;width:1px;height:1px;opacity:0.24}
.stars i:nth-child(40){left:76.7%;top:308px;width:1.4px;height:1.4px;opacity:0.51}
.stars i:nth-child(41){left:19.8%;top:224px;width:1px;height:1px;opacity:0.66}
.stars i:nth-child(42){left:86.3%;top:285px;width:1px;height:1px;opacity:0.36}
.stars i:nth-child(43){left:65.9%;top:193px;width:1.4px;height:1.4px;opacity:0.29}
.stars i:nth-child(44){left:18.2%;top:30px;width:1px;height:1px;opacity:0.28}
.stars i:nth-child(45){left:33.6%;top:237px;width:1.4px;height:1.4px;opacity:0.51}
.stars i:nth-child(46){left:41.1%;top:84px;width:2px;height:2px;opacity:0.27}
.stars i:nth-child(47){left:57.5%;top:30px;width:1.4px;height:1.4px;opacity:0.65}
.stars i:nth-child(48){left:13.6%;top:240px;width:1.4px;height:1.4px;opacity:0.52}
.stars i:nth-child(49){left:15.4%;top:24px;width:1px;height:1px;opacity:0.36}
.stars i:nth-child(50){left:82.8%;top:394px;width:1px;height:1px;opacity:0.47}
.stars i:nth-child(51){left:75.9%;top:381px;width:1px;height:1px;opacity:0.69}
.stars i:nth-child(52){left:37.2%;top:390px;width:1.4px;height:1.4px;opacity:0.30}
.stars i:nth-child(53){left:69.7%;top:137px;width:1px;height:1px;opacity:0.54}
.stars i:nth-child(54){left:66.8%;top:78px;width:1px;height:1px;opacity:0.43}
.stars i:nth-child(55){left:78.6%;top:321px;width:1.4px;height:1.4px;opacity:0.62}
.stars i:nth-child(56){left:17.4%;top:513px;width:1.4px;height:1.4px;opacity:0.67}
.stars i:nth-child(57){left:57.9%;top:364px;width:1px;height:1px;opacity:0.60}
.stars i:nth-child(58){left:13.3%;top:109px;width:1px;height:1px;opacity:0.30}
.stars i:nth-child(59){left:8.9%;top:92px;width:1.4px;height:1.4px;opacity:0.69}
.stars i:nth-child(60){left:89.7%;top:541px;width:1.4px;height:1.4px;opacity:0.51}
.stars i:nth-child(61){left:5.5%;top:51px;width:1px;height:1px;opacity:0.35}
.stars i:nth-child(62){left:28.5%;top:397px;width:1px;height:1px;opacity:0.69}
.stars i:nth-child(63){left:91.3%;top:342px;width:1px;height:1px;opacity:0.46}
.stars i:nth-child(64){left:45.8%;top:32px;width:1px;height:1px;opacity:0.26}
.stars i:nth-child(65){left:14.1%;top:132px;width:1px;height:1px;opacity:0.52}
.stars i:nth-child(66){left:87.0%;top:226px;width:1.4px;height:1.4px;opacity:0.29}
.stars i:nth-child(67){left:46.3%;top:392px;width:1.4px;height:1.4px;opacity:0.38}
.stars i:nth-child(68){left:54.3%;top:402px;width:1px;height:1px;opacity:0.48}
.stars i:nth-child(69){left:65.3%;top:457px;width:1px;height:1px;opacity:0.28}
.stars i:nth-child(70){left:69.7%;top:147px;width:1.4px;height:1.4px;opacity:0.29}
