/* Pulu web: landing page. Phone first (375 px, 16 px gutters), then tablet and desktop. */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Soft background glows, clipped to their own box so they never widen the page */
body { position: relative; background: transparent; }
.glows {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1100px;
  overflow: hidden;
  pointer-events: none;
}
main, .foot { position: relative; }
.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.glow--a {
  top: -140px; left: 50%;
  width: 560px; height: 420px;
  margin-left: -380px;
  background: radial-gradient(closest-side, rgba(110, 155, 255, 0.55), transparent);
}
.glow--b {
  top: 60px; left: 50%;
  width: 520px; height: 440px;
  margin-left: -60px;
  background: radial-gradient(closest-side, rgba(161, 132, 255, 0.5), transparent);
}

.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: rgba(11, 12, 14, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand__ghost { width: 26px; }
.brand__name { font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; }
.top__nav { display: flex; align-items: center; gap: 4px; }
.top__link {
  display: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s;
}
.top__link:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero { padding: 36px 0 24px; }
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}
.hero__copy { max-width: 620px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.eyebrow__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 10px rgba(143, 140, 255, 0.9);
}

.hero__title {
  margin-top: 18px;
  font: 700 40px/1.06 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__lead {
  margin: 16px auto 0;
  max-width: 34em;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.hero__cta .btn { flex: 1 1 auto; }
.hero__note { margin-top: 12px; color: var(--text-3); font-size: 13px; }

/* Hero art: the notch island and the ghost floating under it */
.hero__art {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.island {
  position: relative;
  width: min(100%, 360px);
  padding: 34px 16px 14px;
  border-radius: 0 0 30px 30px;
  background: #000;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  text-align: left;
}
.island::before {
  /* the screen edge the island hangs from */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}
.island__notch {
  position: absolute;
  top: 10px; left: 50%;
  width: 64px; height: 6px;
  margin-left: -32px;
  border-radius: 99px;
  background: #1a1b1f;
}
.island__row { display: flex; align-items: center; gap: 12px; }
.island__ghost { width: 34px; --lx: 0.35; }
.island__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.island__text strong { font-size: 14px; font-weight: 600; }
.island__text span { color: #c9ccd2; font-size: 14px; line-height: 1.35; }
.island__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #16171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #c9ccd2;
  font-size: 12px;
  font-weight: 500;
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; }
.pill__dot--violet { background: #9a6bff; }
.pill__dot--mint { background: #2fd08f; }
.pill__dot--green { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.8); animation: pulse 1.8s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.35; } }

.hero__stage {
  position: relative;
  width: 100%;
  height: 250px;
  margin-top: 20px;
}
.ghost--hero {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 168px;
  margin-left: -84px;
  animation: ghost-float 5s ease-in-out infinite;
  filter: drop-shadow(0 18px 40px rgba(143, 140, 255, 0.35));
}
.ghost--hero .ghost__body { background-image: url("/img/ghost.png"); }
.ghost--hero .ghost__eye,
.download__ghost .ghost__eye,
.island__ghost .ghost__eye { animation: ghost-blink 4.6s infinite; }

.hero__shadow {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 120px; height: 16px;
  margin-left: -60px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent);
  animation: shadow-breathe 5s ease-in-out infinite;
}
@keyframes shadow-breathe { 50% { transform: scale(0.82); opacity: 0.7; } }

.mini { position: absolute; width: 44px; animation: ghost-float 4s ease-in-out infinite; }
.mini--1 { left: 6%; top: 70px; animation-delay: -1.2s; }
.mini--2 { right: 8%; top: 36px; width: 38px; animation-delay: -2.4s; }
.mini--3 { right: 2%; top: 150px; width: 32px; animation-delay: -0.6s; }

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section__head { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section__title {
  margin-top: 10px;
  font: 700 30px/1.12 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section__lead { margin-top: 12px; color: var(--text-2); font-size: 16px; text-wrap: pretty; }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 60%), var(--panel);
}

.features { display: grid; grid-template-columns: 1fr; gap: 12px; }
.feature { padding: 22px; overflow: hidden; }
.feature__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.18), rgba(161, 132, 255, 0.18));
  border: 1px solid rgba(161, 132, 255, 0.25);
  color: #c4b8ff;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature__title { margin-top: 16px; font: 600 18px/1.25 var(--font-display); letter-spacing: -0.015em; }
.feature__text { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.feature__team { display: flex; gap: 6px; margin-top: 18px; }
.feature__team .ghost { width: 30px; }
.feature__team .ghost:nth-child(odd) { --lx: 0.5; }
.feature__team .ghost:nth-child(even) { --lx: -0.4; }

/* ---------- Phone section ---------- */

.section--phone { position: relative; }
.phone-sec { display: flex; flex-direction: column; gap: 36px; align-items: center; }
.phone-sec__copy { max-width: 560px; text-align: center; }

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  text-align: left;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.step__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #0b0c0e;
  font-weight: 700;
  font-size: 14px;
}
.step__title { font-size: 16px; font-weight: 600; }
.step__text { margin-top: 4px; color: var(--text-2); font-size: 15px; }
.step__text a { color: var(--text); text-decoration-color: rgba(161, 132, 255, 0.6); text-underline-offset: 3px; overflow-wrap: anywhere; }
.step__text strong { color: var(--text); font-weight: 600; }

/* Phone mockup */
.phone {
  width: 270px;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2a2c31, #141518);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08) inset,
              0 0 120px -30px rgba(143, 140, 255, 0.45);
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 500px;
  padding: 48px 14px 70px;
  border-radius: 37px;
  background: var(--bg);
  overflow: hidden;
  font-size: 13px;
}
.phone__island {
  position: absolute;
  top: 10px; left: 50%;
  width: 86px; height: 24px;
  margin-left: -43px;
  border-radius: 99px;
  background: #000;
}
.phone__bar { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.phone__mac { font-weight: 600; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.dot--on { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }

.bubble { max-width: 88%; padding: 9px 12px; border-radius: 16px; line-height: 1.4; }
.bubble--me { align-self: flex-end; background: #2b5cff; background: linear-gradient(135deg, #4b7bff, #7a5cff); color: #fff; border-bottom-right-radius: 6px; }
.bubble--pulu { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: #dfe1e5; }
.bubble--pulu .chip { display: table; margin-bottom: 6px; }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.chip--done { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.chip--act { background: rgba(255, 180, 61, 0.14); color: #ffc46b; }

.approval { padding: 12px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255, 180, 61, 0.25); }
.approval__title { margin-top: 6px; font-weight: 600; line-height: 1.35; }
.approval__btns { display: flex; gap: 8px; margin-top: 10px; }
.mini-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 999px;
  background: var(--panel-3);
  text-align: center;
  font-weight: 600;
  font-size: 12px;
}
.mini-btn--yes { background: var(--text); color: #0b0c0e; }

.phone__tabs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 12px 8px 22px;
  border-top: 1px solid var(--line);
  background: rgba(20, 21, 24, 0.9);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}
.phone__tabs .is-on { color: var(--text); }

/* ---------- Download ---------- */

.download {
  overflow: hidden;
  padding: 36px 20px;
  text-align: center;
}
.download::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 320px;
  background: radial-gradient(closest-side, rgba(143, 140, 255, 0.22), transparent);
  pointer-events: none;
}
.download__ghost { position: relative; width: 84px; animation: ghost-float 5s ease-in-out infinite; }
.download__ghost .ghost__body { background-image: url("/img/ghost.png"); }
.download__title { position: relative; margin-top: 18px; font: 700 28px/1.15 var(--font-display); letter-spacing: -0.03em; }
.download__text { position: relative; max-width: 30em; margin: 10px auto 0; color: var(--text-2); }
.download__cta { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- Footer ---------- */

.foot {
  margin-top: 24px;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
}
.foot__inner { display: flex; flex-direction: column; gap: 18px; }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__brand strong { color: var(--text); font-size: 15px; }
.foot__ghost { width: 30px; --lx: 0.3; }
.foot__links { display: flex; gap: 18px; }
.foot__links a { color: var(--text-2); text-decoration: none; }
.foot__links a:hover { color: var(--text); }
.foot__small { color: var(--text-3); font-size: 13px; }

/* ---------- Tablet ---------- */

@media (min-width: 640px) {
  .top__link { display: inline-block; }
  .hero { padding-top: 56px; }
  .hero__title { font-size: 54px; }
  .hero__cta .btn { flex: 0 0 auto; }
  .features { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section { padding: 80px 0; }
  .section__title { font-size: 38px; }
  .download { padding: 48px 32px; }
  .foot__inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .foot__small { width: 100%; }
}

/* ---------- Desktop ---------- */

@media (min-width: 980px) {
  .hero { padding: 72px 0 40px; }
  .hero__inner { flex-direction: row; justify-content: space-between; text-align: left; gap: 48px; }
  .hero__copy { flex: 1 1 0; }
  .hero__lead { margin-left: 0; }
  .hero__cta { justify-content: flex-start; }
  .hero__title { font-size: 64px; }
  .hero__art { flex: 0 0 440px; }
  .hero__stage { height: 290px; }
  .ghost--hero { width: 196px; margin-left: -98px; }

  .features { grid-template-columns: repeat(4, 1fr); }
  .feature { padding: 26px 24px; }

  .phone-sec { flex-direction: row; justify-content: space-between; align-items: center; gap: 64px; }
  .phone-sec__copy { flex: 1 1 0; text-align: left; max-width: 580px; }
  .phone-sec__copy .section__title,
  .phone-sec__copy .section__lead { text-align: left; }
  .phone { flex: none; width: 290px; }

  .glow--a { width: 760px; height: 520px; margin-left: -620px; }
  .glow--b { width: 700px; height: 560px; margin-left: 40px; }
}

/* ---------- 404 ---------- */

.lost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px var(--gutter);
  text-align: center;
}
.lost__ghost { width: 96px; --lx: -0.6; --ly: 0.4; opacity: 0.85; animation: ghost-float 5s ease-in-out infinite; }
.lost__ghost .ghost__body { background-image: url("/img/ghost.png"); }
.lost__title { margin-top: 8px; font: 700 28px/1.15 var(--font-display); letter-spacing: -0.03em; }
.lost__text { color: var(--text-2); }
.lost__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
