:root {
  --bg: #060708;
  --ink: #f2f4f3;
  --ink-soft: rgba(242, 244, 243, .72);
  --line: rgba(255, 255, 255, .16);
  --mint: #4cff7a; /* verde da marca */
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gap: clamp(10px, 1.2vw, 16px);
  --pad: clamp(14px, 1.5vw, 22px);
  --r: clamp(20px, 2vw, 28px);
  /* a foto é dimensionada pela altura da tela, para a cabeça nunca cortar */
  --ph: 112svh;
  --pw: calc(var(--ph) * .8);
  --head-x: 69vw; /* onde fica o centro da cabeça na tela */
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
h1, p, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; }
svg { display: block; }

/* Cursor pixelado. O arquivo @2x evita que o Mac borre os pixels em tela retina. */
html {
  cursor: url("../assets/cursor.png") 0 0, auto;
  cursor: -webkit-image-set(url("../assets/cursor.png") 1x, url("../assets/cursor@2x.png") 2x) 0 0, auto;
  cursor: image-set(url("../assets/cursor.png") 1x, url("../assets/cursor@2x.png") 2x) 0 0, auto;
}
a, button {
  cursor: url("../assets/cursor-link.png") 10 0, pointer;
  cursor: -webkit-image-set(url("../assets/cursor-link.png") 1x, url("../assets/cursor-link@2x.png") 2x) 10 0, pointer;
  cursor: image-set(url("../assets/cursor-link.png") 1x, url("../assets/cursor-link@2x.png") 2x) 10 0, pointer;
}

:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ---------- Camadas de fundo ---------- */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  /* reserva sem WebGL: um degradê preto e branco que também passa */
  background: linear-gradient(115deg, #050505 0%, #0a0a0a 38%, #a8a8a8 52%, #0f0f0f 64%, #050505 100%);
  background-size: 260% 260%;
  animation: bg-flow 26s ease-in-out infinite alternate;
}
.bg.is-gl { animation: none; background: var(--bg); }
@keyframes bg-flow { to { background-position: 100% 100%; } }

.person {
  position: fixed;
  z-index: 1;
  left: calc(var(--head-x) - var(--pw) * .505);
  bottom: calc(var(--ph) * -.17);
  width: var(--pw);
  height: var(--ph);
  pointer-events: none;
}
.person img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.smoke {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scrim { display: none; }

/* ---------- Vidro ---------- */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 60%), rgba(10, 11, 12, .6);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 18px 50px -24px rgba(0, 0, 0, .75);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
.glass--dark {
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 45%), rgba(7, 8, 9, .58);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

/* ---------- Estrutura ---------- */
.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  gap: var(--gap);
  height: 100vh;
  height: 100svh;
  padding: var(--gap);
  padding-top: max(var(--gap), env(safe-area-inset-top));
  padding-bottom: max(var(--gap), env(safe-area-inset-bottom));
}

.panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: var(--pad) clamp(18px, 2.4vw, 36px);
  border-radius: var(--r);
  overflow: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  font-weight: 500;
  letter-spacing: -.01em;
  font-size: 17px;
}
.spark { width: 20px; height: 20px; fill: var(--mint); }

.hero { display: grid; gap: clamp(12px, 2.4vh, 24px); }

.kicker {
  font-family: var(--mono);
  font-size: clamp(10px, .82vw, 12px);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title {
  font-size: min(5vw, 10.4vh);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 400;
  text-wrap: balance;
}
.title em {
  font-size: 1.1em;
  letter-spacing: -.02em;
  color: var(--ink);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 12px;
  color: var(--ink-soft);
}

.quote { display: grid; gap: 8px; }
.quote figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quote blockquote {
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.3;
  text-wrap: balance;
}
.quote em { font-size: 1.12em; }

.side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.handle, .lang {
  display: inline-flex;
  align-items: center;
  height: 38px;
  border-radius: 99px;
  background: rgba(10, 11, 12, .74); /* a faixa branca passa atrás: precisa manter leitura */
}
.handle {
  gap: 8px;
  padding: 0 14px 0 11px;
  font-size: 13.5px;
  transition: border-color .25s;
}
.handle:hover { border-color: rgba(255, 255, 255, .5); }
.handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.handle .dot { fill: currentColor; stroke: none; }

.lang { padding: 3px; gap: 1px; }
.lang button {
  min-width: 34px;
  height: 100%;
  padding: 0 7px;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--ink-soft);
  transition: background .25s, color .25s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: #08090a; }

.note {
  position: absolute;
  top: 54px;
  left: 0;
  width: min(232px, 30%);
  padding: 13px 15px;
  border-radius: 18px;
}
.note strong { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.note p { font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  width: min(100%, 560px);
  margin: auto 0 0 auto;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 22px);
  min-height: 44px;
  padding: clamp(12px, 1.9vh, 18px);
  border-radius: 20px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, background-color .25s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .5); }
.card:hover .card__arrow { transform: translateX(3px); }
.card:active { transform: translateY(0) scale(.99); }

.card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
}
.card__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__text { display: grid; gap: 4px; min-width: 0; }
.card strong { font-size: clamp(15px, 1.2vw, 17px); font-weight: 500; letter-spacing: -.01em; }
.card small { font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }

.card__arrow {
  position: absolute;
  top: clamp(12px, 1.9vh, 18px);
  right: clamp(12px, 1.9vh, 18px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 15px;
  transition: transform .3s;
}

.card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  padding-right: 62px;
}
.card--wide .card__icon {
  width: 46px;
  height: 46px;
  background: var(--mint);
  border-color: transparent;
}
.card--wide .card__icon svg { width: 20px; height: 20px; fill: #08090a; stroke: none; }
.card--wide .card__arrow {
  top: 50%;
  margin-top: -18px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

/* a nota encostaria no cabelo em telas mais estreitas */
@media (max-width: 1180px) { .note { display: none; } }

/* ---------- Tela baixa no desktop e celular deitado ---------- */
@media (min-aspect-ratio: 1/1) and (max-height: 640px) {
  .quote, .note { display: none; }
  .card small { display: none; }
  .card { gap: 6px; }
  .title { font-size: min(5vw, 12.5vh); }
}
@media (min-aspect-ratio: 1/1) and (max-height: 420px) {
  .chips { display: none; }
  .card__icon { display: none; }
  .card:not(.card--wide) .card__arrow { display: none; }
  .card--wide { padding-right: 44px; }
  .card--wide .card__arrow { margin-top: -18px; top: 50%; }
  .links { width: min(100%, 340px); }
}

/* ---------- Celular e tablet em pé (é o que chega do Instagram) ---------- */
@media (max-aspect-ratio: 1/1) {
  :root {
    --ph: min(84svh, 150vw);
    --head-x: 50vw;
  }

  .person { bottom: auto; top: clamp(44px, 7svh, 72px); }

  /* blur custa caro sobre fundo animado: no celular, menos */
  .glass { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

  .scrim {
    display: block;
    position: fixed;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(6, 7, 8, 0) 34%, rgba(6, 7, 8, .72) 56%, rgba(6, 7, 8, .96) 76%, #060708 100%);
  }

  /* painel e coluna somem como caixas: os filhos entram direto na grade */
  .panel, .side { display: contents; }
  .quote, .note, .chips { display: none; }

  .shell {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand top"
      "hero hero"
      "links links";
    gap: 12px 8px;
    padding-inline: 16px;
  }

  .brand { grid-area: brand; align-self: center; }
  .brand__name { display: none; }
  .spark { width: 24px; height: 24px; }

  .top { grid-area: top; }
  .handle { height: 36px; font-size: 13px; }
  .lang { height: 36px; }
  .lang button { min-width: 30px; padding: 0 5px; font-size: 11px; }

  .hero { grid-area: hero; align-self: end; gap: 6px; }
  .kicker { font-size: 10px; letter-spacing: .06em; }
  .title { font-size: min(9.4vw, 5.1svh); line-height: 1.02; }

  .links { grid-area: links; width: 100%; margin: 0; gap: 8px; }
  .card {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 9px 46px 9px 11px;
    border-radius: 18px;
  }
  .card .card__icon, .card--wide .card__icon { width: 38px; height: 38px; }
  .card--wide .card__icon svg, .card__icon svg { width: 18px; height: 18px; }
  .card strong { font-size: 15.5px; }
  .card small { font-size: 12px; }
  .card__arrow, .card--wide .card__arrow {
    top: 50%;
    right: 10px;
    margin-top: -15px;
    width: 30px;
    height: 30px;
    border: 0;
  }
}

@media (max-aspect-ratio: 1/1) and (max-height: 620px) {
  .kicker, .card small { display: none; }
  .card { min-height: 48px; padding-block: 5px; }
  .card .card__icon, .card--wide .card__icon { width: 32px; height: 32px; }
}

@media (max-aspect-ratio: 1/1) and (min-width: 700px) {
  .title { font-size: min(7vw, 5svh); }
  .card strong { font-size: 18px; }
  .card small { font-size: 14px; }
}

/* ---------- Entrada ---------- */
.panel, .top, .note, .card, .hero { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.note { animation-delay: .15s; }
.card:nth-child(1) { animation-delay: .1s; }
.card:nth-child(2) { animation-delay: .18s; }
.card:nth-child(3) { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
