/* Página "em breve" do ruddergo.com (Task 9.0a). Mesmo visual da Home do app (Task 8.8c,
   apps/web/components/home/home.css): fundo escuro em gradiente, moldura, storyboard à esquerda e
   painel à direita, sem formulário. CSS puro (sem Tailwind): a página é estática e vive fora do
   app. O verde é o --auth-link do escuro (#40D69E). Quebra em 800px: painel em cima e storyboard
   embaixo. No computador a página cabe na tela, com zoom em degraus nas telas baixas. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  background: #060d16;
}
body {
  font-family: system-ui, sans-serif;
}
img,
svg {
  display: block;
}
button,
summary {
  font: inherit;
}

.rg-page {
  --rg-muted: #9daac0;
  --rg-border: #2b3c53;
  --rg-green: #40d69e;
  min-height: 100svh;
  background: radial-gradient(ellipse at 55% 0%, #132137 0%, #09131f 46%, #060d16 100%);
  color: #f7f8fc;
  padding: clamp(16px, 3vh, 40px) clamp(20px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}
.rg-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.8fr);
  gap: clamp(28px, 3vw, 48px);
  padding: 24px;
  border: 1px solid var(--rg-border);
  border-radius: 26px;
  background: linear-gradient(135deg, #101c2b99, #0a121dbb);
  box-shadow: 0 30px 90px #0004;
}

/* Painel: leme, logo (h1), selo "em breve", frase e apoio. */
.rg-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding: 15px 12px 17px;
  text-align: center;
}
.rg-logo {
  margin: 0 auto 18px;
  width: 76px;
  height: 76px;
}
.rg-title {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
  color: #ffffff;
}
.rg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid #40d69e59;
  border-radius: 30px;
  background: #40d69e14;
  color: var(--rg-green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.rg-badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rg-green);
}
.rg-phrase {
  margin: 0 auto;
  max-width: 430px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: #f1f6ff;
  text-wrap: balance;
}
.rg-support {
  margin: 14px auto 0;
  max-width: 396px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--rg-muted);
  text-wrap: pretty;
}
.rg-link {
  color: var(--rg-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Storyboard (mesmo player da Home, em JS puro: src/landing.js) */
.rg-story {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  /* Sem o formulário da Home, o painel é mais baixo: o storyboard tem altura própria (a Home
     usa 480px e acompanha a coluna do formulário). Nas telas baixas, o zoom em degraus reduz. */
  min-height: 600px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  background: #26382e;
}
.rg-story-media,
.rg-scene,
.rg-story-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.rg-story-media {
  touch-action: pan-y;
}
.rg-scene {
  object-fit: cover;
  object-position: 50% 50%;
  animation: rg-appear 0.6s ease both;
  user-select: none;
}
.rg-story-shade {
  pointer-events: none;
  background: linear-gradient(180deg, #0003 0%, transparent 25%, #030b1110 45%, #030b11b5 78%, #030b11ed 100%);
}
.rg-story-top {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.rg-story-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #ffffff3b;
  border-radius: 30px;
  background: #0b1a2040;
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.rg-story-badge > span {
  width: 6px;
  height: 6px;
  background: var(--rg-green);
  border-radius: 50%;
}
.rg-icon-button {
  border: 1px solid #ffffff40;
  border-radius: 50%;
  background: #0b172b55;
  color: #fff;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.rg-icon-button:hover {
  background: #183443b3;
}
.rg-icon-button[aria-pressed='true'] .rg-icon-pause,
.rg-icon-button[aria-pressed='false'] .rg-icon-play {
  display: none;
}
.rg-story-bottom {
  position: absolute;
  bottom: 25px;
  left: 30px;
  right: 30px;
  pointer-events: none;
  color: #fff;
}
.rg-story-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e1e7e6;
  margin-bottom: 16px;
  line-height: 1.5;
  text-shadow: 0 1px 3px #000c;
}
.rg-story h2 {
  font-size: clamp(30px, 3.3vw, 49px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -1.8px;
  max-width: 590px;
  margin: 0 0 12px;
  text-wrap: balance;
}
.rg-story-bottom p {
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.4;
  color: #d6ddd9;
  margin: 0 0 17px;
  max-width: 420px;
}
.rg-story-navigation {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.rg-progress {
  display: flex;
  gap: 7px;
  flex: 1;
}
.rg-progress button {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}
.rg-track {
  width: 100%;
  height: 4px;
  background: #ffffff4d;
  border-radius: 4px;
  overflow: hidden;
}
.rg-track > span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--rg-green);
  border-radius: 4px;
  transition: width 0.1s linear;
}
.rg-arrows {
  display: flex;
  gap: 8px;
}
.rg-arrows .rg-icon-button {
  width: 38px;
  height: 38px;
}

/* Foco visível do teclado */
.rg-icon-button:focus-visible,
.rg-progress button:focus-visible,
.rg-lang-trigger:focus-visible,
.rg-lang-option:focus-visible,
.rg-link:focus-visible {
  outline: 3px solid var(--rg-green);
  outline-offset: 3px;
}

/* Rodapé: marca à esquerda e o seletor de idioma, que abre para cima, à direita. */
.rg-footer {
  max-width: 1480px;
  width: 100%;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8e9eb5;
  font-size: 12px;
  line-height: 1.5;
  padding: 0 4px;
}
.rg-footer-brand {
  font-weight: 700;
  color: #9eaabe;
  letter-spacing: 0.3px;
}
.rg-lang {
  position: relative;
}
.rg-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #b7c2d4;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
}
.rg-lang-trigger::-webkit-details-marker {
  display: none;
}
.rg-lang-trigger:hover,
.rg-lang[open] .rg-lang-trigger {
  border-color: var(--rg-border);
  background: #0d1726;
}
.rg-lang-chevron {
  transition: transform 0.2s;
}
.rg-lang[open] .rg-lang-chevron {
  transform: rotate(180deg);
}
.rg-lang-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--rg-border);
  border-radius: 12px;
  background: #0d1726;
  box-shadow: 0 18px 40px #0008;
}
.rg-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e3e8f1;
  font-size: 14px;
  text-decoration: none;
}
.rg-lang-option:hover,
.rg-lang-option[aria-current] {
  background: #16243a;
}
.rg-lang-option > span {
  flex: 1;
}
.rg-flag {
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #ffffff26;
}
.rg-lang-check {
  color: var(--rg-green);
}

/* Página 404: só o painel, centralizado. */
.rg-page-center {
  align-items: center;
}
.rg-panel.rg-panel-alone {
  width: 100%;
  max-width: 460px;
  padding: 32px 24px 30px;
  border: 1px solid var(--rg-border);
  border-radius: 20px;
  background: linear-gradient(145deg, #111e2e, #0a131f);
}

@keyframes rg-appear {
  from {
    opacity: 0.55;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (min-width: 1600px) {
  .rg-panel {
    padding: 20px 22px;
  }
  .rg-phrase {
    font-size: 21px;
  }
  .rg-support {
    font-size: 15px;
  }
}
/* Computador em telas baixas: painel mais compacto e zoom em degraus, para tudo caber. */
@media (min-width: 801px) and (max-height: 900px) {
  .rg-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }
  .rg-title {
    margin-bottom: 16px;
  }
  .rg-title svg {
    height: 28px;
    width: auto;
  }
  .rg-panel {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
@media (min-width: 801px) and (max-height: 860px) {
  .rg-shell,
  .rg-footer {
    zoom: 0.92;
  }
}
@media (min-width: 801px) and (max-height: 780px) {
  .rg-shell,
  .rg-footer {
    zoom: 0.84;
  }
}
@media (min-width: 801px) and (max-height: 700px) {
  .rg-shell,
  .rg-footer {
    zoom: 0.76;
  }
}
@media (min-width: 801px) and (max-height: 620px) {
  .rg-shell,
  .rg-footer {
    zoom: 0.68;
  }
}
@media (max-width: 1000px) and (min-width: 801px) {
  .rg-page {
    padding: 24px;
  }
  .rg-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
    gap: 20px;
    padding: 18px;
  }
  .rg-panel {
    padding: 10px 3px;
  }
  .rg-story-bottom {
    left: 22px;
    right: 22px;
  }
  .rg-story h2 {
    font-size: 32px;
  }
  .rg-story-top {
    left: 18px;
    right: 18px;
  }
  .rg-story-navigation {
    gap: 10px;
  }
}
/* Celular: painel em cima e storyboard embaixo. */
@media (max-width: 800px) {
  .rg-page {
    padding: 22px 16px 20px;
    justify-content: flex-start;
  }
  .rg-shell {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .rg-panel {
    width: 100%;
    padding: 28px 24px 25px;
    border: 1px solid var(--rg-border);
    border-radius: 20px;
    background: linear-gradient(145deg, #111e2e, #0a131f);
  }
  .rg-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 17px;
  }
  .rg-phrase {
    font-size: 17px;
  }
  .rg-support {
    font-size: 13px;
    margin-top: 12px;
  }
  .rg-story {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1.1;
    border-radius: 19px;
    border: 1px solid var(--rg-border);
  }
  .rg-story-top {
    top: 17px;
    left: 17px;
    right: 17px;
  }
  .rg-story-badge {
    font-size: 11px;
    padding: 9px 12px;
  }
  .rg-story-bottom {
    left: 22px;
    right: 22px;
    bottom: 15px;
  }
  .rg-story h2 {
    font-size: 33px;
    letter-spacing: -1.15px;
    max-width: 370px;
  }
  .rg-story-bottom p {
    font-size: 14px;
    margin-bottom: 8px;
    max-width: 320px;
  }
  .rg-story-eyebrow {
    font-size: 9px;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
  }
  .rg-story-navigation {
    gap: 15px;
  }
  .rg-progress {
    gap: 6px;
  }
  .rg-footer {
    max-width: 520px;
    font-size: 11px;
  }
  .rg-arrows .rg-icon-button {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 360px) {
  .rg-page {
    padding: 14px 10px;
  }
  .rg-panel {
    padding: 24px 18px;
  }
  .rg-story h2 {
    font-size: 28px;
  }
  .rg-story-bottom {
    left: 18px;
    right: 18px;
  }
  .rg-story-eyebrow {
    letter-spacing: 0;
  }
  .rg-arrows {
    gap: 4px;
  }
  .rg-story-navigation {
    gap: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rg-page *,
  .rg-page *::before,
  .rg-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
