/* =============================================
   RETRO — CSS da landing (PERF2.8)
   Só a página inicial baixa este arquivo (home/index.html.erb, via
   content_for :stylesheets), depois do stylesheet do app. Usa os tokens do
   design system; os blocos .lp-* estão em docs/design_system.md.
   ============================================= */

/* Letra de mão dos post-its, servida pelo app (LGPD5.3; licença em
   app/assets/fonts/OFL-*.txt). Só é baixada onde .postit aparece. */
@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/kalam-latin-400-normal-61793e81.woff2") format("woff2");
}

@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/assets/kalam-latin-700-normal-920a7e79.woff2") format("woff2");
}

/* =============================================
   Landing — apple.com 2025
   ============================================= */

.lp { --lp-max: 64rem; }

.lp-tile {
  position: relative;
  padding: clamp(4rem, 10vw, 7.5rem) 1.25rem;
  text-align: center;
  overflow: hidden;
}
.lp-tile--hero      { padding-top: clamp(3rem, 7vw, 5rem); }
.lp-tile--parchment { background: transparent; color: var(--text); }
.lp-tile--dark      { background: #000; color: #f5f5f7; color-scheme: dark; }

.lp-inner { max-width: var(--lp-max); margin: 0 auto; }
.lp-inner--wide { max-width: 76rem; }

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}
.lp-tile--dark .lp-eyebrow { color: #f5f5f7; }

.lp-hero-title {
  margin-top: 1.25rem;
  font-size: clamp(3rem, 9.5vw, 6.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.lp-title {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.lp-tile--dark h2, .lp-tile--dark h3 { color: #f5f5f7; }

.lp-lead {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  font-size: clamp(1.1875rem, 2.2vw, 1.625rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--text-dim);
}
.lp-lead strong { color: var(--text); font-weight: 600; }
.lp-tile--dark .lp-lead { color: #86868b; }
.lp-tile--dark .lp-lead strong { color: #f5f5f7; }

.lp-gradient-text {
  background: linear-gradient(95deg, #0894ff 0%, #c959dd 45%, #ff2e54 75%, #ff9004 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lp-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 2.25rem;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--accent-strong);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 28%);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -10px var(--accent-glow);
  transition: transform 300ms var(--ease-spring), background-color 150ms var(--ease), box-shadow 200ms var(--ease);
}
.lp-btn:hover  { background-color: var(--accent-strong-hover); transform: translateY(-1px); }
.lp-btn:active { transform: scale(0.96); }

/* Botão de vidro (secundário) */
.lp-btn--glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass);
  color: var(--text);
}
.lp-btn--glass:hover { background: var(--glass-strong); }
.lp-tile--dark .lp-btn--glass { color: #f5f5f7; }

.lp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--link);
}
.lp-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.lp-tile--dark .lp-link { color: #2997ff; }

.lp-note { margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-dim); }

/* ── Produto com halo de luz ───────────────── */

.lp-product {
  position: relative;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  max-width: 64rem;
  text-align: left;
}
.lp-product::before {
  content: "";
  position: absolute;
  inset: 6% 4% -4%;
  z-index: 0;
  border-radius: 48px;
  background: var(--glow);
  filter: blur(64px);
  opacity: 0.45;
}

.lp-window {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  padding: 0.5rem;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass), var(--shadow-hero);
}
.lp-window-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 2.75rem;
  padding: 0 0.875rem;
}
.lp-lights { display: inline-flex; gap: 0.5rem; }
.lp-lights i { width: 0.75rem; height: 0.75rem; border-radius: 999px; display: block; }
.lp-lights i:nth-child(1) { background: #ff5f57; }
.lp-lights i:nth-child(2) { background: #febc2e; }
.lp-lights i:nth-child(3) { background: #28c840; }
.lp-window-title {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 3.25rem;
}
.lp-window-body {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--bg);
}
.lp-window-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.lp-window-h {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lp-cols {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) { .lp-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lp-col {
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 0 0 1px light-dark(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.06));
}
.lp-col-h {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.25rem 0.375rem;
}
.lp-card {
  font-size: 0.8125rem;
  line-height: 1.35;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--tint) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tint) 22%, transparent);
  box-shadow: var(--shadow-card);
}
.lp-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-dim);
}
.lp-card-votes {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.lp-window .dot { box-shadow: none; }

/* Toolbar flutuante dentro do produto */
.lp-toolbar {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}
.lp-toolbar-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.lp-toolbar-inner span { padding: 0.45rem 0.9rem; border-radius: 999px; }
.lp-toolbar-inner .is-muted { background: var(--fill); }
.lp-toolbar-inner .is-primary { background: var(--accent); color: #fff; }

/* ── Fases ─────────────────────────────────── */

.lp-phases {
  list-style: none;
  margin: 3.5rem auto 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  text-align: left;
  counter-reset: phase;
}
@media (min-width: 768px) { .lp-phases { grid-template-columns: repeat(5, 1fr); } }
.lp-phase {
  position: relative;
  background: #1c1c1e;
  border-radius: 26px;
  padding: 1.5rem 1.375rem 1.625rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 400ms var(--ease-spring), background-color 200ms var(--ease);
}
.lp-phase:hover { transform: translateY(-4px); background: #242426; }
.lp-phase-num {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--phase, #0a84ff);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -6px var(--phase, #0a84ff);
}
.lp-phase:nth-child(1) { --phase: #0a84ff; }
.lp-phase:nth-child(2) { --phase: #5e5ce6; }
.lp-phase:nth-child(3) { --phase: #bf5af2; }
.lp-phase:nth-child(4) { --phase: #ff375f; }
.lp-phase:nth-child(5) { --phase: #ff9f0a; }
.lp-phase-title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f5f5f7;
}
.lp-phase-desc {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #98989d;
}

/* ── Bento de recursos ─────────────────────── */

.lp-bento {
  margin-top: 3.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  text-align: left;
}
@media (min-width: 860px) {
  .lp-bento { grid-template-columns: repeat(3, 1fr); }
}
.lp-tile-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 15rem;
  padding: 2rem;
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 400ms var(--ease-spring), box-shadow 250ms var(--ease);
}
.lp-tile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lifted); }
.lp-tile-card--dark { background: #1d1d1f; color: #f5f5f7; color-scheme: dark; }
.lp-tile-card--tint { background: color-mix(in srgb, var(--tint) 12%, var(--surface)); }

.lp-feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--tint, var(--accent));
}
.lp-feature-kicker {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tint, var(--accent));
}
.lp-feature-title {
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.lp-tile-card--dark .lp-feature-title { color: #f5f5f7; }
.lp-feature-desc {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text-dim);
}
.lp-tile-card--dark .lp-feature-desc { color: #98989d; }

/* Mini-visual do card de votação */
.lp-viz-bars { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.lp-viz-bar {
  display: grid;
  grid-template-columns: 7.5rem 1fr 1.5rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.lp-viz-bar b {
  display: block;
  height: 0.625rem;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, white), var(--c));
  width: var(--w);
}
.lp-viz-bar em { font-style: normal; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.w-90 { --w: 90%; } .w-70 { --w: 70%; } .w-45 { --w: 45%; }
.c-green { --c: var(--green); } .c-red { --c: var(--red); } .c-blue { --c: var(--blue); }

/* ── Privacidade ──────────────────────────── */

.lp-privacy-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.75rem;
  padding: 1.1rem;
  border-radius: 1.5rem;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 16px 40px -14px var(--accent-glow);
}
.lp-privacy-points {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  max-width: 40rem;
  text-align: left;
  border-top: 1px solid var(--border);
}
.lp-privacy-points li {
  padding: 1rem 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

/* ── Post-its (só na landing) ──────────────
   Papel não muda com a aparência: as cores são fixas e o texto é sempre escuro. */

.postit {
  --paper: #fff1a8;
  position: relative;
  display: block;
  color-scheme: light;
  color: #2b2616;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0) 22%),
    var(--paper);
  border-radius: 2px 2px 4px 14px / 2px 2px 4px 6px;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.08),
    0 14px 18px -12px rgba(0, 0, 0, 0.45);
  font-family: "Kalam", "Comic Neue", "Segoe Print", cursive;
  transform: rotate(var(--tilt, -1.5deg));
}
/* fita adesiva */
.postit::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 4.5rem;
  height: 1.4rem;
  transform: translateX(-50%) rotate(calc(var(--tilt, -1.5deg) * -2));
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.postit--yellow { --paper: #fff1a8; }
.postit--pink   { --paper: #ffd3df; }
.postit--green  { --paper: #d6f3c4; }
.postit--blue   { --paper: #cfe6ff; }

/* Hero: post-its soltos nas laterais */
.lp-loose-notes { display: none; }
@media (min-width: 1200px) {
  .lp-loose-notes { display: block; }
  .lp-loose-notes .postit {
    position: absolute;
    z-index: 0;
    width: 9.5rem;
    min-height: 8.5rem;
    padding: 1.1rem 1rem;
    font-size: 1.0625rem;
    line-height: 1.3;
    text-align: left;
  }
  .lp-loose-notes .postit:nth-child(1) { top: 26rem; left: max(1.5rem, calc(50% - 40rem)); --tilt: -6deg; }
  .lp-loose-notes .postit:nth-child(2) { top: 35.5rem; left: max(3rem, calc(50% - 37rem)); --tilt: 3deg; }
  .lp-loose-notes .postit:nth-child(3) { top: 25rem; right: max(1.5rem, calc(50% - 40rem)); --tilt: 5deg; }
  .lp-loose-notes .postit:nth-child(4) { top: 34.5rem; right: max(3rem, calc(50% - 37.5rem)); --tilt: -3deg; }
  .lp-tile--hero .lp-inner { position: relative; z-index: 1; }
}

/* CTA final: o título escrito num post-it */
.lp-cta-note {
  width: fit-content;
  max-width: min(100%, 30rem);
  margin: 0 auto;
  padding: 2.25rem 2.5rem 2.5rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-family: "Kalam", cursive;
  color: #2b2616;
  --tilt: -2deg;
}
.lp-cta-note::before { width: 6rem; }

/* Fundo contínuo: seções claras seguidas ganham só um fio curto entre elas */
.lp-tile--parchment + .lp-tile--parchment::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4rem;
  height: 1px;
  transform: translateX(-50%);
  background: var(--border-strong);
}

/* ── Entrada ───────────────────────────────── */

@keyframes landing-rise {
  from { opacity: 0; transform: translateY(32px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
.landing-rise { opacity: 0; animation: landing-rise 1s var(--ease) forwards; }
.landing-delay-1 { animation-delay: 150ms; }

/* ── Menos movimento (a regra global está no design system) ── */

@media (prefers-reduced-motion: reduce) {
  .landing-rise { opacity: 1; }
}
