/* Humanity In Peril: shared styles.
   Two rooms: .night (landing, the office) and .day (apps, support, legal). */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/archivo-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/newsreader-italic-latin.woff2) format('woff2');
}

:root {
  --room: #0B1214;
  --room-2: #0E181B;
  --fog: #C9D1D1;
  --mist: #8A999D;
  --hairline: #1D2A2E;
  --lamp: #D9B98A;

  --daylight: #E8F0EF;
  --daylight-2: #F4F8F7;
  --ink: #0B1214;
  --slate: #44555A;
  --rule: #C3D0CF;
  --tide: #0B6A8C;

  --lw-air: #e6f7fb;
  --lw-water: #0f7a9e;
  --lw-deep: #063b57;
  --lw-lemon: #ffd92e;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.night { background: var(--room); color: var(--fog); }
body.day { background: var(--daylight); color: var(--ink); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Top bar */
.bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px 28px;
  padding: 34px 0;
}
.wordmark {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.42em;
  text-decoration: none;
}
.bar ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.bar ul a {
  font-size: 14px; letter-spacing: 0.04em;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.night .bar ul a { color: var(--mist); }
.night .bar ul a:hover { color: var(--lamp); }
.day .bar ul a { color: var(--slate); }
.day .bar ul a:hover, .day .bar ul a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

/* Footer */
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 28px;
  padding: 26px 0 36px;
  font-size: 13.5px; letter-spacing: 0.03em;
}
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.night .foot { border-top: 1px solid var(--hairline); color: var(--mist); }
.day .foot { border-top: 1px solid var(--rule); color: var(--slate); margin-top: clamp(70px, 12vh, 130px); }

/* ---------- Landing: two bubbles ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 0 70px; }
.landing h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.15;
  text-align: center;
  color: var(--fog);
}
.bubbles {
  display: flex; justify-content: center; align-items: center;
  gap: clamp(22px, 5vw, 70px);
  margin-top: clamp(40px, 7vh, 76px);
}
.bubble {
  --size: min(40vw, 410px, 58vh);
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; text-decoration: none;
  padding: calc(var(--size) * 0.14);
  flex: none;
}
.bubble strong {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.05;
}
.bubble span {
  margin-top: 14px;
  font-size: clamp(14px, 1.5vw, 16.5px); line-height: 1.5;
  max-width: 22ch;
}
.bubble-day {
  background: radial-gradient(circle at 34% 28%, #FFFFFF 0%, var(--daylight) 46%, #C9DAD8 100%);
  color: var(--ink);
  box-shadow: 0 0 110px rgba(232, 240, 239, 0.16);
}
.bubble-day span { color: var(--slate); }
.bubble-night {
  background: radial-gradient(circle at 34% 28%, rgba(217,185,138,0.34) 0%, rgba(217,185,138,0.10) 40%, var(--room-2) 74%);
  color: var(--fog);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 0 110px rgba(217, 185, 138, 0.10);
}
.bubble-night strong { color: var(--lamp); }
.bubble-night span { color: var(--fog); }
@media (prefers-reduced-motion: no-preference) {
  .bubble { transition: transform 260ms ease, box-shadow 260ms ease; }
  .bubble:hover, .bubble:focus-visible { transform: scale(1.035); }
}
.bubble-day:hover, .bubble-day:focus-visible { box-shadow: 0 0 150px rgba(232, 240, 239, 0.30); }
.bubble-night:hover, .bubble-night:focus-visible { box-shadow: inset 0 0 0 1px var(--lamp), 0 0 150px rgba(217, 185, 138, 0.22); }
.bubble:focus-visible { outline: 2px solid var(--lamp); outline-offset: 8px; }

@media (max-width: 700px) {
  .bubbles { flex-direction: column; }
  .bubble { --size: min(78vw, 330px); }
  .bubble strong { font-size: 44px; }
  .bubble span { font-size: 15.5px; }
}

/* ---------- Day pages ---------- */
.lede { padding: clamp(30px, 7vh, 80px) 0 clamp(34px, 6vh, 60px); }
.lede h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 1.02;
}
.lede p { margin-top: 22px; max-width: 56ch; color: var(--slate); font-size: 18px; }

.button {
  display: inline-block;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: transparent; color: inherit;
  cursor: pointer;
}
.button.solid { background: var(--ink); color: var(--daylight-2); border-color: var(--ink); }
.button.solid:hover { background: #1F2E33; }
.button:hover { text-decoration: underline; text-underline-offset: 4px; }
.button:disabled { opacity: 0.5; cursor: wait; }

/* Lemon Water panel: borrows the app's own waterline look */
.lw {
  position: relative; overflow: hidden;
  border-radius: 28px;
  background: var(--lw-air);
  color: var(--lw-deep);
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: end;
  gap: 20px;
  padding: clamp(28px, 5vw, 60px) clamp(24px, 5vw, 60px) 0;
  min-height: 460px;
}
.lw::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: var(--lw-water);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 26 C150 0 300 52 450 26 S750 0 900 26 S1100 48 1200 22 V200 H0Z'/%3E%3C/svg%3E") top / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 26 C150 0 300 52 450 26 S750 0 900 26 S1100 48 1200 22 V200 H0Z'/%3E%3C/svg%3E") top / 100% 100% no-repeat;
}
.lw-text { position: relative; z-index: 1; align-self: start; padding-bottom: 150px; }
.lw-id { display: flex; align-items: center; gap: 16px; }
.lw-id img { width: 68px; height: 68px; border-radius: 16px; }
.lw-id b { font-size: 22px; font-weight: 600; }
.lw h2, .lw h1 {
  margin-top: 26px;
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(27px, 3.5vw, 40px); line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 17ch;
}
.lw p { margin-top: 18px; max-width: 44ch; }
.lw .status {
  display: inline-block; margin-top: 24px;
  background: var(--lw-lemon); color: var(--lw-deep);
  font-size: 14.5px; font-weight: 600;
  padding: 7px 16px; border-radius: 999px;
}
.lw .actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.lw .button.solid { background: var(--lw-deep); border-color: var(--lw-deep); color: #fff; }
.lw .button.solid:hover { background: #0A4D70; }
.lw-shot { position: relative; z-index: 1; justify-self: center; align-self: end; }
.lw-shot img {
  display: block; width: min(100%, 270px); height: auto;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -6px 40px rgba(6, 59, 87, 0.22);
}
@media (max-width: 760px) {
  .lw { grid-template-columns: 1fr; min-height: 0; }
  .lw-text { padding-bottom: 10px; }
  .lw::after { height: 150px; }
}

.note { margin-top: 44px; color: var(--slate); max-width: 56ch; }

/* App detail */
.features { margin-top: clamp(60px, 10vh, 110px); display: grid; gap: clamp(50px, 8vh, 90px); }
.feature { display: grid; grid-template-columns: minmax(0, 240px) 1fr; gap: clamp(24px, 6vw, 80px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: 1fr minmax(0, 240px); }
.feature:nth-child(even) img { order: 2; }
.feature img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 10px 40px rgba(11, 18, 20, 0.14); }
.feature h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; }
.feature p { margin-top: 14px; max-width: 48ch; color: var(--slate); }
@media (max-width: 640px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) img { order: 0; }
  .feature img { max-width: 240px; }
}

.facts { margin-top: clamp(60px, 10vh, 110px); border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: minmax(110px, 220px) 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--slate); }
.facts dd a { color: var(--tide); text-underline-offset: 4px; }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Documents: privacy, terms */
.doc { max-width: 68ch; padding-bottom: 20px; }
.doc h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; line-height: 1.2; margin-top: 54px; }
.doc h3 { font-size: 17px; font-weight: 600; margin-top: 30px; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 22px; }
.doc li { margin-top: 6px; }
.doc a { color: var(--tide); text-underline-offset: 4px; }
.doc .dated { color: var(--slate); font-size: 15px; }

/* Support form */
.form { max-width: 600px; display: grid; gap: 18px; }
.form label { display: grid; gap: 7px; font-size: 15px; font-weight: 500; }
.form label small { font-weight: 400; color: var(--slate); font-size: 14px; }
.form textarea, .form input, .form select {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--daylight-2);
  border: 1.5px solid var(--rule); border-radius: 10px;
  padding: 13px 15px; width: 100%;
}
.form textarea { min-height: 150px; resize: vertical; }
.form textarea:focus, .form input:focus, .form select:focus { outline: none; border-color: var(--ink); }
.form .button { justify-self: start; }
.form .error { color: #9A2B12; font-weight: 500; }
.sent { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.4; max-width: 30ch; }
.help { margin-top: clamp(50px, 8vh, 80px); max-width: 68ch; }
.help h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; }
.help h3 { font-size: 17px; font-weight: 600; margin-top: 26px; }
.help p { margin-top: 8px; color: var(--slate); }
.help a { color: var(--tide); text-underline-offset: 4px; }
.offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
