/* openTARS: uma ideia só. O logo vira um monólito de quatro lâminas que abre com a rolagem e mostra o app.
   Base sem movimento (funciona em qualquer navegador); a abertura entra como melhoria no fim do arquivo. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-var.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plexmono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/plexmono-500.woff2") format("woff2"); }

:root {
  --hull: #141C38;
  --slab: #0D1329;
  --paper: #1A2446;
  --ink: #E8ECF4;
  --steel: #A9B3CC;
  --rule: #2C3760;
  --signal: #5FD97A;
  --caution: #E7A93B;
  --metal: linear-gradient(96deg, #F5F7FC 0%, #D5DBEA 46%, #B4BDD5 100%);
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(5rem, 12vw, 10rem);
  --s: 3.4;   /* escala do monólito para cobrir a tela: o site.js mede de verdade */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hull); color: var(--ink); font-family: "Archivo", system-ui, sans-serif; font-size: 1.125rem; line-height: 1.55; overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 30; padding: .6rem 1rem; background: var(--ink); color: var(--hull); }
.skip:focus { top: 1rem; }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
p { margin: 0; }
code, pre, kbd { font-family: "IBM Plex Mono", ui-monospace, monospace; }
code { font-size: .92em; }
kbd { font-size: .8em; padding: .1em .45em; border: 1px solid var(--rule); border-radius: 5px; background: var(--slab); }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; max-width: 34rem; color: var(--ink); }
.btn { display: inline-block; padding: .8rem 1.4rem; border: 0; border-radius: .6rem; background: var(--ink); color: var(--hull); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #fff; }

/* cabeçalho */
.top { position: fixed; inset: 0 0 auto; z-index: 20; background: color-mix(in srgb, var(--hull) 82%, transparent); backdrop-filter: blur(14px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.mark { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-stretch: 112%; font-size: 1.15rem; text-decoration: none; }
.mark b { font-weight: inherit; }
.mark b span, .big span { color: var(--signal); }
.top nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.top nav a { text-decoration: none; color: var(--steel); }
.top nav a:hover { color: var(--ink); }

/* a porta: versão sem movimento */
.door { padding-top: 4rem; }
.stage { position: relative; display: grid; gap: clamp(2rem, 5vw, 4rem); width: min(100%, var(--wrap)); margin-inline: auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }
.copy { grid-row: 1; max-width: 42rem; }
h1 { font-size: clamp(2.9rem, 5.9vw, 6rem); line-height: .98; }
h1 span { display: block; }
.copy .lede { margin-top: 1.4rem; }
.mono { display: none; }
.reveal { grid-row: 2; margin: 0; }
.window { border-radius: .9rem; overflow: hidden; background: var(--slab); box-shadow: 0 0 0 1px var(--rule), 0 40px 90px -40px rgba(0, 0, 0, .8); }
.window video { width: 100%; }
.reveal figcaption { margin-top: 1rem; color: var(--steel); text-align: center; }

/* comando de instalar */
.get { margin-top: 1.8rem; max-width: 40rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .5rem; }
.tabs button { padding: .4rem .8rem; border: 0; border-radius: .45rem; background: none; color: var(--steel); font: inherit; font-size: 1rem; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 600; }
.cmd { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .75rem; align-items: center; }
.cmd[hidden] { display: none; }
.cmd pre { grid-column: 1; margin: 0; padding: .85rem 1rem; overflow-x: auto; border-radius: .6rem; background: var(--slab); box-shadow: 0 0 0 1px var(--rule); font-size: .84rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.cmd button[data-copy] { grid-column: 2; min-width: 5rem; height: 2.9rem; padding: 0 1rem; border: 0; border-radius: .6rem; background: var(--ink); color: var(--hull); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.cmd button[data-copy]:hover { background: #fff; }
.cmd p { grid-column: 1 / -1; color: var(--steel); font-size: 1rem; }
.phone { margin-top: 1.8rem; }
.phone[hidden], .get[hidden] { display: none; }
.phone p { margin-top: .7rem; color: var(--steel); font-size: 1rem; }

/* 617 MB */
.size { padding-block: var(--section); }
.size h2 { font-size: inherit; letter-spacing: normal; line-height: 1; }
.huge { display: block; font-size: min(18.4vw, 15.5rem); font-weight: 800; font-stretch: 125%; letter-spacing: -.035em; line-height: .9; white-space: nowrap; }
.after { display: block; margin-top: 1.4rem; font-size: clamp(1.5rem, 3.2vw, 2.6rem); font-weight: 700; font-stretch: 112%; letter-spacing: -.01em; line-height: 1.12; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.2rem clamp(2rem, 5vw, 4rem); margin-top: clamp(2rem, 5vw, 3.5rem); max-width: 56rem; color: var(--steel); }
.cols strong { color: var(--ink); font-weight: 700; }
.fine { margin-top: 1.6rem; color: var(--steel); font-size: .95rem; }

/* pede antes */
.asks { padding-block: var(--section); background: var(--slab); }
.asks .wrap, .home .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.asks .text p { margin-top: 1.3rem; max-width: 30rem; color: var(--steel); }
.tokens { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.tokens code { display: block; padding: .25rem .6rem; border-radius: .4rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--caution) 55%, transparent); color: var(--caution); }
.window.amber { box-shadow: 0 0 0 2px var(--caution), 0 40px 90px -40px rgba(0, 0, 0, .8); }

/* sem Wi-Fi */
.home { padding-block: var(--section); }
.switch { position: relative; display: block; width: 7.5rem; height: 3.9rem; margin-top: 2rem; padding: 0; border: 0; border-radius: 2rem; background: var(--signal); cursor: pointer; transition: background .2s; }
.switch i { position: absolute; top: .35rem; left: .35rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #fff; transform: translateX(3.6rem); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.switch[aria-checked="false"] { background: var(--rule); }
.switch[aria-checked="false"] i { transform: none; }
.status { margin-top: 1rem; min-height: 1.6em; color: var(--steel); }
.still ul { margin: 0; padding: 0; list-style: none; }
.still li { position: relative; padding: .55rem 0 .55rem 2.2rem; border-bottom: 1px solid var(--rule); font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 700; font-stretch: 112%; line-height: 1.2; }
.still li::before { content: "✓"; position: absolute; left: 0; color: var(--signal); transition: opacity .2s; }
.armada .still li::before { opacity: 0; }
.armada.off .still li::before { opacity: 1; transition-delay: calc(var(--i, 0) * 70ms); }
.still p { margin-top: 1.4rem; color: var(--steel); }

/* o sistema inteiro */
.more { padding-block: var(--section); background: var(--slab); }
.rows { margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: .4rem clamp(2rem, 5vw, 4rem); padding: 1.3rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.rows q { font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 700; font-stretch: 112%; line-height: 1.2; letter-spacing: -.01em; }
.rows p { color: var(--steel); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2.5rem, 6vw, 4rem); }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: .8rem; box-shadow: 0 0 0 1px var(--rule); }
.shots figcaption { margin-top: .8rem; color: var(--steel); font-size: 1rem; }

/* os modelos: as mesmas lâminas do logo, com altura proporcional ao tamanho */
.crew { padding-block: var(--section); }
.bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin: clamp(2.5rem, 6vw, 4rem) 0 0; padding: 0; list-style: none; align-items: end; }
.bars li { display: grid; grid-template-rows: 26rem auto auto auto; }
.bars i { align-self: end; display: block; height: max(3px, calc(var(--gb) / 7.4 * 100%)); border-radius: .35rem; background: var(--metal); }
.bars b { margin-top: 1rem; font-weight: 800; font-stretch: 112%; font-size: 1.2rem; line-height: 1.15; }
.bars span { font-family: "IBM Plex Mono", monospace; color: var(--steel); font-size: 1rem; }
.bars p { margin-top: .4rem; color: var(--steel); font-size: 1rem; line-height: 1.4; }
.kipp { display: flex; align-items: center; gap: 1rem; margin-top: clamp(2rem, 5vw, 3rem); color: var(--steel); }
.kipp img { image-rendering: pixelated; flex: none; }


/* A nova geração de modelos */
.gen { padding-block: var(--section); scroll-margin-top: 3rem; }
.gen .lede { margin-top: 1.2rem; max-width: 40rem; color: var(--steel); }
.band { margin: clamp(2.6rem, 6vw, 4rem) 0 0; color: var(--ink); font-weight: 800; font-stretch: 112%; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.2rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.card { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; border: 1px solid var(--rule); border-radius: .9rem; background: var(--slab); color: var(--steel); }
.card.g4 { position: relative; padding: 2rem 1.6rem 1.7rem; border-color: #3A4772; background: var(--paper); overflow: hidden; }
.card.g4::before { content: ""; position: absolute; inset: 0 0 auto 0; height: .35rem; background: var(--metal); }
.card.feature { border-color: var(--steel); background: #1F2B55; }
.card h3 { margin: .6rem 0 0; color: var(--ink); font-weight: 800; font-stretch: 112%; font-size: 1.5rem; line-height: 1.1; }
.card.g4 h3 { font-size: 1.75rem; }
.card h3 small { display: block; margin-top: .25rem; font-size: 1rem; font-weight: 600; color: var(--steel); }
.card p { margin: 0; line-height: 1.45; font-size: 1rem; }
.card .role { color: var(--ink); font-weight: 600; }
.card .spec { font-family: "IBM Plex Mono", monospace; font-size: .9rem; color: var(--steel); }
.card b { color: var(--ink); font-weight: 800; }
.card .go { margin-top: auto; padding-top: .8rem; }
.card .go a { color: var(--ink); font-weight: 600; text-underline-offset: .25em; }
.chip { align-self: flex-start; padding: .2rem .65rem; border: 1px solid var(--rule); border-radius: 2rem; font-size: .8rem; font-weight: 600; color: var(--steel); }
.chip.on { border-color: var(--signal); color: var(--signal); }
.chip.live { border-color: var(--ink); color: var(--ink); }
.gen .fine { margin-top: 1.8rem; color: var(--steel); font-size: 1rem; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card { animation: card-chega linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes card-chega { from { opacity: 0; translate: 0 2.4rem; } }
  }
}

/* openTARS Pi */
.board { padding-block: var(--section); scroll-margin-top: 3rem; }
.board .lede { margin-top: 1.2rem; max-width: 46rem; color: var(--steel); }
.board .cmd { margin-top: 2rem; max-width: 56rem; }
.board .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.2rem clamp(1.5rem, 4vw, 3rem); margin: 2rem 0; padding: 0; list-style: none; color: var(--steel); }
.board .facts b { display: block; color: var(--ink); font-weight: 800; font-stretch: 112%; }

/* 5.3 */
.next { padding-block: var(--section); background: var(--slab); }
.next ul { margin: 2rem 0 0; padding: 0; list-style: none; max-width: 46rem; }
.next li { padding: .8rem 0; border-top: 1px solid var(--rule); color: var(--steel); }
.next b { color: var(--ink); font-weight: 700; }

/* instalar */
.install { padding-block: var(--section); scroll-margin-top: 3rem; }
.install .lede { margin-top: 1.2rem; color: var(--steel); }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: clamp(2.5rem, 5vw, 3.5rem) clamp(2rem, 5vw, 4rem); margin-top: clamp(2.5rem, 6vw, 4rem); }
.ways h3 { margin-bottom: .8rem; font-size: 1.3rem; font-stretch: 112%; letter-spacing: -.01em; line-height: 1.15; }
.ways p { margin-top: .7rem; color: var(--steel); font-size: 1rem; }
.pacote { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: .6rem 2rem; margin: 1.2rem 0 0; font-size: 1rem; }
.pacote dt { color: var(--steel); font-size: .9rem; }
.pacote dd { margin: 0; }
.pacote .sha { grid-column: 1 / -1; }
.pacote code { word-break: break-all; font-size: .82rem; }
details { margin-top: 1.4rem; border-top: 1px solid var(--rule); padding-top: 1rem; max-width: 46rem; }
.ways + details { margin-top: clamp(2.5rem, 6vw, 4rem); }
summary { cursor: pointer; font-weight: 600; }
details p { margin-top: .8rem; color: var(--steel); font-size: 1rem; }

/* rodapé */
footer { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--rule); }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.big { font-size: clamp(2.6rem, 8vw, 5.5rem); font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; line-height: 1; }
.contato { margin-top: .9rem; color: var(--steel); font-size: 1rem; }
footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: .3rem 2rem; font-size: 1rem; }
footer nav a { color: var(--steel); text-decoration: none; }
footer nav a:hover { color: var(--ink); }

/* changelog e privacidade */
main.texto { padding: 8rem 0 var(--section); }
.texto .wrap { max-width: 52rem; }
.texto h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.display { margin: 0; }
.texto .lede { margin-top: 1.2rem; }
.quiet { color: var(--steel); }
.texto article { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.texto h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.texto ul { margin: 1rem 0 0; padding-left: 1.2rem; }
.texto li { margin-top: .6rem; color: var(--steel); line-height: 1.55; }
.texto li::marker { color: var(--rule); }
.texto article > p { margin-top: 1rem; color: var(--steel); }
.texto strong { color: var(--ink); font-weight: 700; }
.quando { margin-top: .4rem !important; font-size: 1rem; }

@media (max-width: 60rem) {
  .asks .wrap, .home .wrap { grid-template-columns: minmax(0, 1fr); }
  .rows li { grid-template-columns: minmax(0, 1fr); }
  footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 44rem) {
  body { font-size: 1.0625rem; }
  /* no celular as lâminas deitam: comprimento proporcional ao tamanho */
  .bars { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .bars li { grid-template-rows: auto; }
  .bars i { height: 1.4rem; width: max(3px, calc(var(--gb) / 7.4 * 100%)); }
  .cmd { grid-template-columns: minmax(0, 1fr); }
  .cmd pre, .cmd button[data-copy] { grid-column: 1; }
  .cmd button[data-copy] { min-height: 2.8rem; }
  .pacote { grid-template-columns: repeat(2, auto); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .switch, .switch i, .still li::before { transition: none; }
}

/* A abertura. Só entra com rolagem por CSS, sem pedido de menos movimento e com altura para a cena. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-height: 620px) {
    .door { view-timeline: --porta block; height: 360svh; padding-top: 0; }
    .stage { position: sticky; top: 0; display: block; width: 100%; height: 100svh; max-width: none; padding: 0; overflow: hidden; background: radial-gradient(120% 90% at 72% 40%, #1E2C63 0%, var(--hull) 58%); }

    .copy { position: absolute; z-index: 3; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); top: 50%; width: min(44vw, 42rem); translate: 0 -46%;
      animation: copia-sai linear both; animation-timeline: --porta; animation-range: contain 0% contain 15%; }

    .mono { position: absolute; z-index: 2; left: 50%; top: 50%; display: flex; gap: 1.6%; height: 78svh; aspect-ratio: 68 / 80; margin-left: calc(78svh * -34 / 80); margin-top: -39svh;
      animation: mono-cresce cubic-bezier(.7, 0, .3, 1) both; animation-timeline: --porta; animation-range: contain 3% contain 44%; }
    .slab { position: relative; flex: 1; border-radius: 3.5% / .8%; background: var(--metal); box-shadow: inset -1px 0 0 rgba(20, 28, 56, .25), 0 40px 120px -30px rgba(0, 0, 0, .7);
      animation: lamina-sobe .9s cubic-bezier(.2, .8, .2, 1) both, lamina-abre cubic-bezier(.75, 0, .25, 1) both; animation-timeline: auto, --porta; animation-range: normal, contain 46% contain 80%; }
    .slab:nth-child(2) { animation-delay: 80ms, 0s; margin-right: 3.5%; }
    .slab:nth-child(3) { animation-delay: 160ms, 0s; }
    .slab:nth-child(4) { animation-delay: 240ms, 0s; }
    .slab:nth-child(1), .slab:nth-child(2) { --sai: -250%; }
    .slab:nth-child(3), .slab:nth-child(4) { --sai: 250%; }
    /* o visor verde do logo, dividido entre as duas lâminas do meio */
    .slab:nth-child(2)::after, .slab:nth-child(3)::after { content: ""; position: absolute; top: 22.5%; height: 12.5%; background: var(--signal); }
    .slab:nth-child(2)::after { left: -6%; right: -22.4%; border-radius: 6% 0 0 6% / 12%; }
    .slab:nth-child(3)::after { left: 0; right: -6%; border-radius: 0 6% 6% 0 / 12%; }

    .reveal { position: absolute; z-index: 1; left: 50%; top: 50%; width: min(90vw, calc((100svh - 11rem) * 1.552)); translate: -50% -50%; margin-top: 1.2rem;
      animation: janela-chega cubic-bezier(.2, .7, .2, 1) both; animation-timeline: --porta; animation-range: contain 48% contain 84%; }
    .reveal figcaption { animation: legenda linear both; animation-timeline: --porta; animation-range: contain 84% contain 92%; }

    @keyframes copia-sai { to { opacity: 0; translate: -4vw -46%; visibility: hidden; } }
    @keyframes mono-cresce { from { transform: translateX(23vw); } to { transform: translateX(0) scale(var(--s)); } }
    @keyframes lamina-sobe { from { translate: 0 6%; } }
    @keyframes lamina-abre { to { transform: translateX(var(--sai)); } }
    @keyframes janela-chega { from { scale: .86; opacity: 0; } to { scale: 1; opacity: 1; } }
    @keyframes legenda { from { opacity: 0; } }

    @media (max-width: 60rem) {
      .stage { background: radial-gradient(130% 70% at 50% 88%, #1E2C63 0%, var(--hull) 62%); }
      .copy { left: var(--gutter); right: var(--gutter); top: 5.4rem; width: auto; translate: none; }
      @keyframes copia-sai { to { opacity: 0; translate: 0 -4svh; visibility: hidden; } }
      .mono { top: 100%; margin-top: -30svh; height: 60svh; margin-left: calc(60svh * -34 / 80); }
      @keyframes mono-cresce { from { transform: none; } to { transform: translateY(-20svh) scale(var(--s)); } }
    }
  }
}
