:root {
  --ink: #111;
  --bubble: #111;
  --accent: #ff9d3c;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
/* App (search) mode locks to a single centered screen; landing mode scrolls. */
body.mode-app {
  overflow: hidden;
}
.view[hidden] {
  display: none;
}

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 16px 26px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
}
.nav .nav-logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3px;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 4px 11px;
  border-radius: 9px;
}
.nav-right {
  margin-left: auto;
}
/* In app (search) mode the nav stays minimal and transparent. */
body.mode-app .nav {
  background: transparent;
  backdrop-filter: none;
}
body.mode-app .nav-left {
  display: none;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.nav-left {
  display: flex;
  gap: 26px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.btn-signup {
  background: var(--ink);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
}
.who {
  font-size: 14px;
  color: #444;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-login:hover,
.nav-left a:hover {
  text-decoration: underline;
}

/* ---------- Stage ---------- */
.stage {
  position: relative;
  height: 100vh;
  width: 100vw;
}
.center {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  text-align: center;
  z-index: 10;
}

/* AnnoTag speech-bubble logo */
.logo {
  display: inline-block;
  position: relative;
  background: var(--bubble);
  color: #fff;
  font-weight: 800;
  font-size: clamp(46px, 9vw, 84px);
  letter-spacing: 1px;
  line-height: 1;
  padding: 24px 40px 28px;
  border-radius: 28px;
  margin-bottom: 42px;
}
.logo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-top: 26px solid var(--bubble);
}

.search-wrap {
  display: flex;
  justify-content: center;
}
.search {
  width: 100%;
  max-width: 460px;
  padding: 14px 20px;
  font-size: 17px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.search:focus {
  border-color: #999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.source {
  min-height: 18px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: #999;
}
.source a {
  color: #666;
}

/* ---------- Floating result bubbles ---------- */
.bubbles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.bubble {
  position: absolute;
  max-width: 230px;
  background: var(--bubble);
  color: #fff;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  animation: pop 0.32s cubic-bezier(0.2, 1.2, 0.35, 1) forwards;
  transition: transform 0.14s ease;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -9px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--bubble);
}
.bubble:hover {
  transform: translate(-50%, -50%) scale(1.05);
}
.bubble .b-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  color: #b9b9b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes pop {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 640px) {
  .bubble {
    max-width: 160px;
    font-size: 13px;
    padding: 9px 13px;
  }
}

/* ============================ LANDING ============================ */
.logo.big {
  font-size: clamp(52px, 10vw, 92px);
  padding: 26px 44px 30px;
  border-radius: 30px;
  margin-bottom: 34px;
}
.logo.big::after {
  border-left-width: 28px;
  border-right-width: 28px;
  border-top-width: 28px;
  bottom: -24px;
}
.logo.sm {
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 8px;
}

.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 24px 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.tagline {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #555;
  max-width: 620px;
  margin: 0 auto 30px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 30px;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-ghost {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 30px;
  border: 1px solid #ccc;
}
.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---- demo tiles ---- */
.demo {
  max-width: 980px;
  margin: 30px auto 20px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 760px) {
  .demo {
    grid-template-columns: 1fr;
  }
}
.demo-card {
  margin: 0;
}
.demo-card figcaption {
  margin-top: 14px;
  color: #555;
  font-size: 14.5px;
  text-align: center;
}

.browser {
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
  background: #fff;
}
.browser-bar {
  background: #f2f2f3;
  padding: 11px 14px;
  display: flex;
  gap: 7px;
}
.browser-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d0d0d3;
}
.browser-body {
  position: relative;
  padding: 26px;
  min-height: 190px;
}
.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ml {
  height: 12px;
  border-radius: 6px;
  background: #ededf0;
}
.ml.w40 { width: 40%; }
.ml.w60 { width: 60%; }
.ml.w80 { width: 80%; }
.ml.w90 { width: 90%; }
.demo-note {
  position: absolute;
  right: 26px;
  bottom: 30px;
  max-width: 190px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 15px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  animation: floaty 3.2s ease-in-out infinite;
}
.demo-note::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -9px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #111;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.search-demo {
  position: relative;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
  min-height: 264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px;
  overflow: hidden;
}
.search-demo .logo {
  font-size: 24px;
  padding: 7px 15px;
  margin-bottom: 0;
}
.fake-search {
  width: 78%;
  max-width: 280px;
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
}
.mini-bubble {
  position: absolute;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  animation: floaty 3.6s ease-in-out infinite;
}
.mini-bubble.b1 { top: 16px; left: 14px; animation-delay: 0s; }
.mini-bubble.b2 { bottom: 58px; right: 14px; animation-delay: 0.5s; }
.mini-bubble.b3 { bottom: 16px; left: 20px; animation-delay: 1s; }

/* ---- features ---- */
.features {
  max-width: 980px;
  margin: 60px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 760px) {
  .features {
    grid-template-columns: 1fr;
  }
}
.feature {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 26px 24px;
}
.f-ico {
  font-size: 28px;
  margin-bottom: 10px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.feature p {
  margin: 0;
  color: #555;
  font-size: 14.5px;
}

/* ---- bottom cta + footer ---- */
.cta-band {
  text-align: center;
  padding: 64px 24px;
  background: #f6f6f7;
}
.cta-band h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 22px;
}
.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px;
  color: #999;
  font-size: 13px;
}
.foot-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.foot-links a {
  color: #666;
  text-decoration: none;
}
.foot-links a:hover {
  text-decoration: underline;
}
