/* ==========================================================================
   GPLAY TV
   Tipografia: Inter. Cores: preto, vermelho e branco.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-100_900-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #050507;
  --surface: #0c0c10;
  --text: #f9fafb;
  --muted: #9ca3af;
  --dim: #78828f;
  --red: #e50914;
  --red-light: #ff3b30;
  --red-deep: #990000;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 8px;
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body,
button,
input {
  font-synthesis: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--red);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--red-light);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* -- marca ---------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  line-height: 1;
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand-word {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-g {
  color: var(--red);
}

.brand-tv {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

/* -- botões --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--red);
  color: var(--text);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-deep);
}

.btn-primary:focus-visible {
  outline-color: var(--text);
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-large {
  min-height: 50px;
  padding: 0 23px;
  font-size: 15px;
}

.text-link,
.install-foot a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 4px;
  transition: color 0.2s var(--ease);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.text-link:hover,
.text-link:focus-visible,
.install-foot a:hover,
.install-foot a:focus-visible {
  color: var(--red-light);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  flex: none;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

main {
  flex: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.2s var(--ease);
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--text);
}

.header-inner > .btn {
  flex: none;
}

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

.hero {
  padding: clamp(56px, 8.5vw, 96px) 0 clamp(64px, 9vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  max-width: 100%;
  font-size: clamp(2.7rem, 4.6vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-sub {
  max-width: 45ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.hero-mark {
  width: clamp(250px, 30vw, 410px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 24px 80px rgba(229, 9, 20, 0.18));
}

/* -- instalação ----------------------------------------------------------- */

.install {
  border-top: 1px solid var(--border);
  padding: clamp(56px, 8vw, 88px) 0 clamp(64px, 9vw, 96px);
  background: var(--surface);
}

.install-wrap {
  max-width: 820px;
}

.install-head {
  max-width: 55ch;
}

.install h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.install-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.devices {
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.device {
  border-bottom: 1px solid var(--border);
}

.device summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}

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

.device summary:hover .device-name {
  color: var(--red-light);
}

.device summary:focus-visible {
  outline: 2px solid var(--red-light);
  outline-offset: 4px;
}

.device-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.device-toggle {
  position: relative;
  justify-self: end;
  width: 24px;
  height: 24px;
  color: var(--muted);
}

.device-toggle::before,
.device-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease);
}

.device-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.device[open] .device-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.device[open] .device-toggle {
  color: var(--text);
}

.device-body {
  padding: 0 44px 26px 0;
}

.device-body > p {
  max-width: 65ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.device-note {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
}

.device-note-wide {
  max-width: 65ch;
  margin-top: 16px;
}

.code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.code-box code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.5;
  white-space: nowrap;
  scrollbar-width: thin;
}

.code-box code:focus-visible {
  outline: 2px solid var(--red-light);
  outline-offset: -2px;
}

.copy-button {
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.copy-button[data-copied="true"] {
  border-color: var(--red);
  background: rgba(229, 9, 20, 0.14);
}

.install-foot {
  margin-top: 22px;
  color: var(--dim);
  font-size: 13px;
}

.install-foot a {
  margin-left: 4px;
  font-size: inherit;
}

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

.site-footer {
  flex: none;
  border-top: 1px solid var(--border);
  padding: 44px 0 30px;
  background: var(--bg);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-footer .mark {
  width: 24px;
  height: 24px;
}

.brand-footer .brand-word {
  font-size: 17px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}

.footer-bottom p:first-child {
  max-width: 62ch;
}

.footer-bottom p:last-child {
  flex: none;
  text-align: right;
}

/* -- páginas internas ----------------------------------------------------- */

.legal-page,
.error-page {
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 104px);
}

.legal-wrap {
  max-width: 720px;
}

.legal-wrap h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.legal-updated {
  margin-top: 12px;
  color: var(--dim);
  font-size: 13px;
}

.legal-content {
  margin-top: 36px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.legal-content h2 {
  margin-top: 32px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content ul {
  margin-top: 12px;
}

.legal-content ul {
  padding-left: 20px;
  list-style: disc;
}

.legal-content li + li {
  margin-top: 6px;
}

.legal-content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: var(--red-light);
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 8px;
  margin-top: 40px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 4px;
}

.legal-back:hover {
  color: var(--red-light);
}

.steps {
  margin-top: 36px;
  border-top: 1px solid var(--border);
}

.step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.step h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.step p {
  max-width: 62ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.step .code-box {
  margin-top: 14px;
}

.step .device-actions {
  margin-top: 14px;
}

.dev-account {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-left: 2px solid var(--red);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.dev-account .dev-account-kicker {
  margin: 0;
  color: var(--red-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.dev-account h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.dev-account p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.dev-account-fields {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.dev-account-field {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.dev-account-label {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

.dev-account-field code {
  display: block;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dev-account-warning {
  color: var(--dim) !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.dev-account-warning strong {
  color: var(--red-light);
}

.dev-account-create {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dev-account-create h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.dev-account-create ol {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  list-style: decimal;
}

.dev-account-create li + li {
  margin-top: 6px;
}

.dev-account-create a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.dev-account-create a:hover {
  color: var(--red-light);
}

.dev-account-create .device-note {
  margin-top: 12px;
  color: var(--dim);
  font-size: 13px;
}

.dev-account-create .device-note a {
  color: var(--text);
}

.error-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.error-wrap .error-code {
  margin-top: 0;
  color: var(--red);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.error-wrap h1 {
  margin-top: 18px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.error-wrap p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
}

.error-wrap .btn {
  margin-top: 28px;
}

/* -- movimento ------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1,
  .hero-sub,
  .hero-actions {
    animation: intro-up 0.7s var(--ease) both;
  }

  .hero-sub {
    animation-delay: 0.06s;
  }

  .hero-actions {
    animation-delay: 0.12s;
  }

  .hero-mark {
    animation: mark-in 0.9s var(--ease) both 0.08s;
  }
}

@keyframes intro-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* -- responsivo ----------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.6fr);
    gap: 36px;
  }

  .hero-mark {
    width: clamp(220px, 28vw, 320px);
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 64px;
  }

  .header-nav {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }

  .hero {
    padding: 52px 0 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    display: none;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-sub {
    max-width: 48ch;
    margin-top: 20px;
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .install {
    padding: 52px 0 64px;
  }

  .install-wrap {
    max-width: none;
  }

  .devices {
    margin-top: 26px;
  }

  .device-body {
    padding-right: 0;
  }

  .footer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
  }

  .footer-bottom p:last-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 7px;
  }

  .mark {
    width: 25px;
    height: 25px;
  }

  .brand-word {
    font-size: 17px;
  }

  .brand-tv {
    height: 17px;
    font-size: 8px;
  }

  .header-inner > .btn {
    min-height: 40px;
    padding: 0 13px;
    font-size: 12px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 10.2vw, 2.8rem);
  }

  .hero-break {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .install {
    padding-top: 44px;
  }

  .device summary {
    grid-template-columns: minmax(0, 1fr) 24px;
    min-height: 68px;
    gap: 12px;
  }

  .device-name {
    font-size: 18px;
  }

  .device-toggle {
    grid-column: 2;
  }

  .device-body {
    padding-bottom: 22px;
  }

  .device-body > p {
    font-size: 14px;
  }

  .device-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .device-actions .btn {
    width: 100%;
  }

  .code-box {
    padding-left: 10px;
    gap: 6px;
  }

  .code-box code {
    font-size: 11px;
  }

  .copy-button {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .install-foot {
    font-size: 12px;
  }

  .footer-nav {
    gap: 16px;
  }

  .legal-content {
    font-size: 14px;
  }

  .step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }

  .step-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .step h2 {
    font-size: 16px;
  }

  .step p {
    font-size: 14px;
  }

  .dev-account {
    padding: 16px;
  }

  .dev-account-field {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dev-account-label {
    grid-column: 1 / -1;
  }
}
