/* Allan Amorelli · portfólio
   Layout: hero dividido (texto + colunas de reels rolando), faixa de clientes, grade de reels 9:16 com prévia ao passar o mouse, arquivo de design, sobre, contato.
   Cor de destaque: o amarelo da marca Amorelli Design. */
:root {
  --bg: #14110F;
  --bg-2: #1D1916;
  --line: #2E2824;
  --text: #F2EDE4;
  --muted: #A69C90;
  --accent: #FFC81E;
  --accent-ink: #1A1408;
  --f-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --max: 1320px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font: 500 12px/1.4 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-big { padding: 18px 32px; font-size: 18px; }

/* topo */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; margin-right: auto; }
.brand svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(48px, 7.4vw, 108px); line-height: .92; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 32px; margin: 12px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 2px; }
.facts dt { font: 400 12px var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 0; font: 600 22px var(--f-display); }

.hero-reels {
  height: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.col { overflow: hidden; }
.track { display: grid; gap: 14px; }
.track video { width: 100%; height: auto; border-radius: 18px; background: var(--bg-2); }
.col-b { padding-top: 120px; }
@media (prefers-reduced-motion: no-preference) {
  .col-a .track { animation: drift 38s linear infinite alternate; }
  .col-b .track { animation: drift 30s linear infinite alternate-reverse; }
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-45%); } }

/* clientes */
.clients { border-block: 1px solid var(--line); overflow: hidden; padding-block: 18px; }
.clients-track { display: flex; gap: 56px; width: max-content; font: 600 22px var(--f-display); color: var(--muted); white-space: nowrap; }
.clients-track span::after { content: "✦"; color: var(--accent); margin-left: 56px; font-size: 14px; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) {
  .clients-track { animation: marquee 40s linear infinite; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* seções */
.section { max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 0; display: grid; gap: 32px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.sec-head > div:first-child { display: grid; gap: 10px; }
.sec-note { color: var(--muted); max-width: 46ch; margin: 0; }
.sub { font-size: 24px; margin-top: 24px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 360px; justify-content: flex-end; }
@media (max-width: 960px) { .filters { justify-content: flex-start; } }
.filters button {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* destaque institucional */
.feature {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: 22px; overflow: hidden; aspect-ratio: 16/9; background: var(--bg-2); text-align: left;
}
.feature img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.feature:hover img { transform: scale(1.03); }
.feature-info {
  position: absolute; inset: auto 0 0 0; padding: 28px;
  display: grid; gap: 8px;
  background: linear-gradient(transparent, rgba(10, 8, 6, .85));
}
.feature-title { font: 800 clamp(24px, 3.4vw, 44px)/1.05 var(--f-display); letter-spacing: -.02em; max-width: 20ch; color: #fff; }
.play { font-weight: 600; color: var(--accent); }
.tag { font: 500 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #E7DFD3; }

/* grade de reels */
.reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.reel { display: grid; gap: 10px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.reel-frame { position: relative; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.reel-frame img, .reel-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* fundo desfocado atrás de vídeos que não são 9:16, para não cortar nada */
.reel-frame .bg { object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.15); }
.reel-frame video { opacity: 0; transition: opacity .25s ease; }
.reel.playing .reel-frame video { opacity: 1; }
.reel-frame .badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font: 500 11px var(--f-mono); letter-spacing: .04em;
  background: rgba(10, 8, 6, .7); color: #F2EDE4; padding: 4px 8px; border-radius: 6px;
}
.reel-frame .badge.fmt { left: auto; right: 10px; }
.reel-meta { display: grid; gap: 2px; padding-inline: 2px; }
.reel-client { font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.reel-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
@media (prefers-reduced-motion: no-preference) {
  .reel-frame { transition: transform .25s ease; }
  .reel:hover .reel-frame { transform: translateY(-4px); }
}

/* estáticos */
.stills { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 18px; align-items: start; }
.still { position: relative; padding: 0; border: 0; background: var(--bg-2); border-radius: 16px; overflow: hidden; cursor: zoom-in; display: grid; }
.still img { width: 100%; height: auto; }
.still span { position: absolute; left: 10px; bottom: 10px; font: 500 11px var(--f-mono); background: rgba(10, 8, 6, .75); color: #F2EDE4; padding: 4px 8px; border-radius: 6px; }

/* design gráfico */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.board { padding: 0; border: 0; background: var(--accent); border-radius: 16px; overflow: hidden; cursor: zoom-in; display: grid; text-align: left; }
.board img { width: 100%; aspect-ratio: 972/924; object-fit: cover; }
.board span { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--bg-2); font-weight: 600; }
.board small { font: 400 12px var(--f-mono); color: var(--muted); align-self: center; }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.logos button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; }
.logos img { width: 100%; height: auto; }

/* sobre */
.about { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-text { display: grid; gap: 18px; }
.about-text p { margin: 0; color: var(--muted); font-size: 17px; max-width: 58ch; }
.tools { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { font: 500 13px var(--f-mono); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.when { font: 500 13px var(--f-mono); color: var(--accent); padding-top: 3px; font-variant-numeric: tabular-nums; }
.what { display: grid; color: var(--muted); }
.what b { color: var(--text); font-weight: 600; font-size: 17px; }

/* contato */
.contact {
  max-width: var(--max); margin: 120px auto 0;
  padding: 72px var(--gutter);
  display: grid; gap: 28px;
  border-top: 1px solid var(--line);
}
.contact h2 { font-size: clamp(44px, 7vw, 96px); line-height: .95; max-width: 14ch; }
.contact-links { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.contact-list { display: grid; gap: 10px; }
.contact-list > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.k { font: 400 12px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 84px; }
.v { font-size: 18px; font-weight: 500; text-decoration: none; }
a.v:hover { color: var(--accent); }
.copy { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); cursor: pointer; }

.foot {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
}

/* visualizador */
dialog {
  border: 0; padding: 0; background: transparent; color: var(--text);
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
dialog::backdrop { background: rgba(8, 6, 5, .92); }
dialog[open] { display: grid; place-items: center; align-content: center; gap: 12px; }
.viewer-media { display: grid; place-items: center; }
.viewer-media video, .viewer-media img {
  max-height: calc(100vh - 120px); max-width: min(92vw, 1400px);
  border-radius: 14px; background: #000;
}
.viewer-title { margin: 0; font: 500 13px var(--f-mono); color: var(--muted); text-align: center; }
.close {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px));
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-2); font-size: 26px; line-height: 1; cursor: pointer;
}

/* responsivo */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-reels { height: 460px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .stills { grid-template-columns: 1fr 1fr; }
  .stills .wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top nav { display: none; }
  .hero h1 { font-size: 46px; }
  .lede { font-size: 17px; }
  .hero-reels { height: 380px; }
  .col-b { padding-top: 70px; }
  .section { padding-top: 72px; }
  .reel-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .reel-title { font-size: 14px; }
  .feature-info { padding: 18px; }
  .boards { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .facts { gap: 20px; }
}
