/* Cápsula do Tempo LG — identidade clara (branco + vermelho LG + cinza LG) */
:root {
  --lg-red: #a50034;
  --lg-red-deep: #87002a;
  --lg-red-soft: rgba(165, 0, 52, 0.08);
  --lg-grey: #6b6d6e;
  --lg-grey-dark: #3d3f40;

  --color-bg: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-surface: #f6f6f7;
  --color-border: rgba(61, 63, 64, 0.14);
  --color-text: #1c1d1e;
  --color-text-muted: var(--lg-grey);
  --color-accent: var(--lg-red);
  --color-accent-strong: var(--lg-red-deep);
  --color-danger: #b42318;
  --color-success: #1f7a4c;
  --color-focus: var(--lg-red);

  --font-display: "Outfit", "Avenir Next", sans-serif;
  --font-body: "Figtree", "Avenir Next", sans-serif;
  --logo-url: url("/icons/lg-logo.svg");

  --radius: 12px;
  --space: 1rem;
  --touch-min: 52px;
  --max-width: 420px;
  --shadow-soft: 0 18px 40px rgba(165, 0, 52, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(900px 420px at 50% -12%, rgba(165, 0, 52, 0.09), transparent 60%),
    radial-gradient(700px 360px at 100% 100%, rgba(107, 109, 110, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  background-attachment: fixed;
}

body {
  min-height: 100dvh;
}

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

a {
  color: var(--lg-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.app {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: calc(var(--space) * 1.35) var(--space) calc(var(--space) * 2.2);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lg-red), #d12a55 45%, transparent);
  pointer-events: none;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.35rem 0 1.75rem;
  animation: brand-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand__logo {
  width: min(168px, 58vw);
  height: auto;
  aspect-ratio: 280 / 96;
  background: var(--logo-url) left center / contain no-repeat;
  border: 0;
  border-radius: 0;
  background-color: transparent;
}

.brand__logo-img {
  width: min(168px, 58vw);
  height: auto;
  display: block;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.7rem, 6vw, 2rem);
  letter-spacing: -0.035em;
  margin: 0;
  line-height: 1.08;
  color: var(--lg-grey-dark);
}

.brand__name span {
  color: var(--lg-red);
}

.brand__tag {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand__rule {
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--lg-red);
  margin-top: 0.15rem;
  transform-origin: left center;
  animation: rule-grow 700ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  animation: fade-in 320ms ease;
}

.screen.is-active {
  display: flex;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rule-grow {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(165, 0, 52, 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(165, 0, 52, 0);
  }
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--lg-grey-dark);
}

h1 {
  font-size: 1.55rem;
}

h2 {
  font-size: 1.25rem;
}

.lede {
  color: var(--color-text-muted);
  margin: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--lg-grey-dark);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  min-height: var(--touch-min);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  padding: 0.75rem 0.9rem;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input[type="email"],
.field input[type="password"] {
  letter-spacing: normal;
  text-transform: none;
}

.field input:focus {
  border-color: rgba(165, 0, 52, 0.45);
  box-shadow: 0 0 0 4px var(--lg-red-soft);
}

.hint {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius);
  min-height: var(--touch-min);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition:
    transform 120ms ease,
    background 160ms ease,
    opacity 120ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(180deg, #b81245 0%, var(--lg-red) 55%, var(--lg-red-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(165, 0, 52, 0.22);
}

.btn--primary:hover {
  filter: brightness(1.03);
}

.btn--primary.is-recording {
  animation: pulse-soft 1.6s ease-in-out infinite;
}

.btn--secondary {
  background: #fff;
  color: var(--lg-grey-dark);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: rgba(165, 0, 52, 0.35);
  color: var(--lg-red);
}

.btn--danger {
  background: #fff;
  color: var(--color-danger);
  border: 1px solid rgba(180, 35, 24, 0.28);
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--lg-red);
}

.check label {
  font-size: 0.95rem;
}

.consent-box {
  max-height: 180px;
  overflow: auto;
  padding: 0.9rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  white-space: pre-wrap;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.banner {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: #fff8e8;
  border: 1px solid rgba(176, 120, 0, 0.28);
  color: #7a4e00;
  font-size: 0.92rem;
}

.banner--danger {
  background: #fff1f3;
  border-color: rgba(165, 0, 52, 0.28);
  color: var(--lg-red-deep);
}

.preview-wrap {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: #111;
  aspect-ratio: 9 / 16;
  max-height: 55dvh;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.rec-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.rec-meta strong {
  color: var(--lg-grey-dark);
  font-size: 1.15rem;
}

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  font-family: var(--font-display);
  font-size: 5rem;
  color: #fff;
  pointer-events: none;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(165, 0, 52, 0.1);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lg-red), #d6456d);
  transition: width 200ms ease;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 29, 30, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
  backdrop-filter: blur(4px);
}

.modal.is-open {
  display: flex;
}

.modal__panel {
  width: min(100%, var(--max-width));
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px 18px 12px 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fade-in 200ms ease;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.error-text {
  color: var(--color-danger);
  margin: 0;
  font-size: 0.92rem;
}

.footer-links {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.hidden {
  display: none !important;
}

/* Welcome emphasis */
#screen-welcome h1 {
  font-size: clamp(1.7rem, 6.5vw, 2.1rem);
}

#screen-final h1 {
  color: var(--lg-red);
}

@media (min-width: 720px) {
  .app {
    padding-top: 2.5rem;
  }

  .preview-wrap {
    aspect-ratio: 16 / 9;
    max-height: 42vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .brand__rule,
  .screen,
  .modal__panel,
  .btn--primary.is-recording {
    animation: none !important;
  }
}
