/* Lungo landing page — Apple-clean UI, pixel art only for the buddy world.
   Tokens mirror clearday/src/theme/colors.ts */

:root {
  --bg: #F3F3F6;
  --surface: #FFFFFF;
  --paper: #F9F9FB;
  --ink: #1C1C1E;
  --ink-soft: #3A3A3C;
  --muted: #6B7280;
  --secondary: #9296A1;
  --line: #EAEAEF;
  --mint: #E4F8EC;
  --mint-strong: #34C759;
  --mint-deep: #1FA34A;
  --peach: #FFB38A;
  --peach-strong: #FF7E55;
  --yellow: #FFD976;
  --blue: #007AFF;
  --shadow: 0 10px 30px rgba(11, 18, 32, 0.07);
  --shadow-soft: 0 4px 14px rgba(11, 18, 32, 0.05);
  --radius: 24px;
  --radius-sm: 16px;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 243, 246, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand img { width: 30px; height: auto; }

/* Give the header wordmark a stronger visual anchor without enlarging footer branding. */
.site-header .brand {
  gap: 12px;
  font-size: 1.4rem;
}

.header-logo-mark {
  position: relative;
  display: block;
  width: 64px;
  height: 48px;
  overflow: hidden;
  flex: 0 0 64px;
}

.site-header .brand .header-logo-mark img {
  position: absolute;
  top: -47px;
  left: -32px;
  width: 128px;
  max-width: none;
  height: 128px;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover { color: var(--ink); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
}

.lang-switch a:hover { background: var(--line); color: var(--ink); }

.lang-switch .active {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 8px;
}

.header-cta {
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-cta:hover { background: #000; }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero { padding: 84px 0 40px; }

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-strong);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.accent { color: var(--mint-deep); }

.hero .lead {
  margin-top: 20px;
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 34em;
}

.store-badges {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 9px 20px 10px;
  min-width: 190px;
  line-height: 1.25;
  opacity: 0.92;
}

.badge .small {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge .big {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.store-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--secondary);
}

/* hero visual */

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 20px 0;
}

.hero-disc {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #EDFBF2 0%, var(--mint) 62%, #D8F3E3 100%);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

.hero-frog {
  position: relative;
  width: 70%;
}

/* animated sprite sheet: 12x3 grid, 32 frames of 304x352 */
.frog-anim {
  width: 100%;
  aspect-ratio: 304 / 352;
  background-image: url('/assets/lungo-smoking-sheet.png');
  background-repeat: no-repeat;
  background-size: 1200% 300%;
  background-position: 0 0;
  image-rendering: pixelated;
  animation: frog-frames 3.6s infinite;
  animation-timing-function: step-end;
}

.speech {
  position: absolute;
  top: -8px;
  right: -4px;
  max-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}

@keyframes frog-frames {
  0% { background-position: 0% 0%; }
  3.125% { background-position: 9.0909% 0%; }
  6.25% { background-position: 18.1818% 0%; }
  9.375% { background-position: 27.2727% 0%; }
  12.5% { background-position: 36.3636% 0%; }
  15.625% { background-position: 45.4545% 0%; }
  18.75% { background-position: 54.5455% 0%; }
  21.875% { background-position: 63.6364% 0%; }
  25% { background-position: 72.7273% 0%; }
  28.125% { background-position: 81.8182% 0%; }
  31.25% { background-position: 90.9091% 0%; }
  34.375% { background-position: 100% 0%; }
  37.5% { background-position: 0% 50%; }
  40.625% { background-position: 9.0909% 50%; }
  43.75% { background-position: 18.1818% 50%; }
  46.875% { background-position: 27.2727% 50%; }
  50% { background-position: 36.3636% 50%; }
  53.125% { background-position: 45.4545% 50%; }
  56.25% { background-position: 54.5455% 50%; }
  59.375% { background-position: 63.6364% 50%; }
  62.5% { background-position: 72.7273% 50%; }
  65.625% { background-position: 81.8182% 50%; }
  68.75% { background-position: 90.9091% 50%; }
  71.875% { background-position: 100% 50%; }
  75% { background-position: 0% 100%; }
  78.125% { background-position: 9.0909% 100%; }
  81.25% { background-position: 18.1818% 100%; }
  84.375% { background-position: 27.2727% 100%; }
  87.5% { background-position: 36.3636% 100%; }
  90.625% { background-position: 45.4545% 100%; }
  93.75% { background-position: 54.5455% 100%; }
  96.875% { background-position: 63.6364% 100%; }
  100% { background-position: 63.6364% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frog-anim, .cal-anim { animation: none; }
}

@media (max-width: 860px) {
  .hero { padding-top: 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { order: -1; }
  .speech { right: 6px; }
}

/* ---------- clarity strip ---------- */

.clarity {
  padding: 26px 0 0;
}

.clarity p {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

/* ---------- sections ---------- */

.section { padding: 88px 0 0; }

.section-head { max-width: 640px; }

.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--mint-deep);
}

.section h2 {
  margin-top: 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section .sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* steps */

.steps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
}

.step .num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--mint-deep);
  font-weight: 800;
  font-size: 0.95rem;
}

.step h3 {
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.note-card {
  margin-top: 20px;
  background: var(--mint);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  font-size: 0.9rem;
  color: #1B5E31;
}

@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* features */

.features {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
}

.feature .px {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.feature h3 {
  margin-top: 16px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- app scenes / phone frames ---------- */

.screens {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.screen { text-align: center; }

.phone {
  margin-inline: auto;
  width: min(240px, 100%);
  aspect-ratio: 9 / 19;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
  padding: 12px;
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: var(--bg);
  border-radius: 999px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--bg) 100%);
  border: 1px dashed var(--line);
  display: grid;
  place-content: center;
  gap: 10px;
  justify-items: center;
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 20px;
  text-align: center;
}

.phone-screen .px { width: 21px; height: 21px; opacity: 0.9; }

.phone-real {
  padding: 6px;
  overflow: hidden;
}

.phone-real::before { display: none; }

.phone-screen.app-screen-wrap {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--bg);
}

.app-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.screen h3 {
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.screen p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 26em;
  margin-inline: auto;
}

@media (max-width: 860px) { .screens { grid-template-columns: 1fr; } }

/* ---------- trust ---------- */

.trust {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trust-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
}

.trust-item h3 {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.trust-item p {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq-list {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list details:last-child { border-bottom: none; }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--secondary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list .answer {
  padding: 0 26px 22px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62em;
}

/* ---------- final CTA ---------- */

.cta-final { padding: 96px 0 30px; }

.cta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 64px 32px;
  text-align: center;
}

.cta-card .cta-frog {
  width: 108px;
  margin: 0 auto 22px;
}

/* animated calendar sprite sheet: 12x3 grid, 34 frames of 288x304 */
.cal-anim {
  aspect-ratio: 288 / 304;
  background-image: url('/assets/lungo-calendar-sheet.png');
  background-repeat: no-repeat;
  background-size: 1200% 300%;
  background-position: 0 0;
  image-rendering: pixelated;
  animation: cal-frames 3.8s infinite;
  animation-timing-function: step-end;
}

@keyframes cal-frames {
  0% { background-position: 0% 0%; }
  2.9412% { background-position: 9.0909% 0%; }
  5.8824% { background-position: 18.1818% 0%; }
  8.8235% { background-position: 27.2727% 0%; }
  11.7647% { background-position: 36.3636% 0%; }
  14.7059% { background-position: 45.4545% 0%; }
  17.6471% { background-position: 54.5455% 0%; }
  20.5882% { background-position: 63.6364% 0%; }
  23.5294% { background-position: 72.7273% 0%; }
  26.4706% { background-position: 81.8182% 0%; }
  29.4118% { background-position: 90.9091% 0%; }
  32.3529% { background-position: 100% 0%; }
  35.2941% { background-position: 0% 50%; }
  38.2353% { background-position: 9.0909% 50%; }
  41.1765% { background-position: 18.1818% 50%; }
  44.1176% { background-position: 27.2727% 50%; }
  47.0588% { background-position: 36.3636% 50%; }
  50% { background-position: 45.4545% 50%; }
  52.9412% { background-position: 54.5455% 50%; }
  55.8824% { background-position: 63.6364% 50%; }
  58.8235% { background-position: 72.7273% 50%; }
  61.7647% { background-position: 81.8182% 50%; }
  64.7059% { background-position: 90.9091% 50%; }
  67.6471% { background-position: 100% 50%; }
  70.5882% { background-position: 0% 100%; }
  73.5294% { background-position: 9.0909% 100%; }
  76.4706% { background-position: 18.1818% 100%; }
  79.4118% { background-position: 27.2727% 100%; }
  82.3529% { background-position: 36.3636% 100%; }
  85.2941% { background-position: 45.4545% 100%; }
  88.2353% { background-position: 54.5455% 100%; }
  91.1765% { background-position: 63.6364% 100%; }
  94.1176% { background-position: 72.7273% 100%; }
  97.0588% { background-position: 81.8182% 100%; }
  100% { background-position: 81.8182% 100%; }
}

.cta-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cta-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-card .store-badges { justify-content: center; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand { margin-bottom: 10px; }

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 24em;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--secondary);
}

.footer-bottom .legal-note { max-width: 46em; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- subpages (privacy / imprint / support) ---------- */

.subpage { padding: 72px 0 40px; min-height: 55vh; }

.subpage .prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 44px 40px;
  max-width: 760px;
  margin-inline: auto;
}

.subpage h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.subpage .prose p { margin-top: 16px; color: var(--ink-soft); }

.subpage .prose p.muted { color: var(--muted); font-size: 0.95rem; }

.subpage .prose h2 {
  margin-top: 32px;
  font-size: 1.15rem;
  font-weight: 700;
}

.subpage .prose ul { margin: 12px 0 0 20px; color: var(--ink-soft); }

.subpage .prose li { margin-bottom: 6px; }

.placeholder-flag {
  display: inline-block;
  background: #FFF4E2;
  color: #9A6B15;
  border: 1px solid #F5E3C2;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link:hover { color: var(--ink); }

/* ---------- a11y ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 100;
}

.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
