/* Keizo Oguma — portfólio
   Paleta clara e fria; o verde de chroma key aparece só como sinal (vídeo tocando, foco, hover). */
:root {
  --paper: #F3F4F2;
  --paper-2: #E9EBE8;
  --ink: #141617;
  --ink-2: #4F5457;
  --muted: #8A8F91;
  --line: #D4D7D4;
  --key: #12B85A;
  --max: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--key); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }

/* ---------- Topo ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 600; letter-spacing: .02em; font-size: 15px; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { color: var(--ink-2); position: relative; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--key);
}
.menu-btn { display: none; background: none; border: 0; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; padding: 8px 0; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 22px; padding: 10px 0; font-variation-settings: "wdth" 115; color: var(--ink); }
  .nav a[aria-current="page"]::after { display: none; }
}

/* ---------- Hero da Home ---------- */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(32px, 5vw, 64px); }
.hero h1 {
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 300;
  font-size: clamp(56px, 13.5vw, 200px);
  line-height: .86;
  letter-spacing: -.035em;
}
.hero h1 span { display: block; }
.hero h1 .last { font-weight: 700; }
.hero .lede {
  margin-top: clamp(24px, 4vw, 44px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end;
}
.hero .lede p { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--ink-2); max-width: 34ch; margin: 0; }
.hero .lede a { justify-self: start; font-size: 15px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.hero .lede a:hover { border-color: var(--key); }
@media (max-width: 640px) { .hero .lede { grid-template-columns: 1fr; } }

/* Faixa de reels — o único momento animado no carregamento */
.reel-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr);
  gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 0 var(--gutter) 8px; margin: 0 auto; max-width: calc(var(--max) + 2 * var(--gutter));
  scrollbar-width: none;
}
.reel-strip::-webkit-scrollbar { display: none; }
.reel-strip .clip { scroll-snap-align: start; opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.reel-strip .clip:nth-child(2) { animation-delay: .08s; }
.reel-strip .clip:nth-child(3) { animation-delay: .16s; }
.reel-strip .clip:nth-child(4) { animation-delay: .24s; }
.reel-strip .clip:nth-child(5) { animation-delay: .32s; }
.reel-strip .clip:nth-child(6) { animation-delay: .40s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .reel-strip { grid-auto-columns: 58vw; } }

/* ---------- Mídia ---------- */
.clip {
  position: relative; margin: 0; background: var(--paper-2); overflow: hidden; cursor: pointer;
  border: 0; padding: 0; width: 100%; text-align: left; color: inherit; font: inherit;
}
.clip.v { aspect-ratio: 9 / 16; }
.clip.h { aspect-ratio: 16 / 9; }
.clip.sq { aspect-ratio: 1 / 1; }
.clip.tall { aspect-ratio: 4 / 5; }
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; }
.clip .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55));
  display: flex; align-items: center; gap: 8px;
}
.clip .cap::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); flex: none; }
.clip.playing .cap::before { background: var(--key); }
.clip.still { cursor: zoom-in; }

/* ---------- Índice de áreas (o elemento marcante) ---------- */
.index { border-top: 1px solid var(--ink); margin-top: clamp(56px, 9vw, 120px); }
.index a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 120px;
  gap: 24px; align-items: center; padding: clamp(18px, 2.6vw, 30px) 0;
  border-bottom: 1px solid var(--line); position: relative;
}
.index .name {
  font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 500;
  font-size: clamp(40px, 7vw, 104px); line-height: .9; letter-spacing: -.03em;
  transition: font-variation-settings .45s cubic-bezier(.2,.7,.2,1);
}
.index a:hover .name, .index a:focus-visible .name { font-variation-settings: "wdth" 62; }
.index .desc { color: var(--ink-2); font-size: 16px; max-width: 40ch; }
.index .thumb { width: 120px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); justify-self: end; }
.index .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .4s; }
.index a:hover .thumb img { filter: none; }
@media (max-width: 760px) {
  .index a { grid-template-columns: minmax(0, 1fr) 84px; }
  .index .desc { grid-column: 1; grid-row: 2; font-size: 15px; }
  .index .thumb { grid-column: 2; grid-row: 1 / span 2; width: 84px; }
  .index .thumb img { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .index .name { transition: none; }
  .reel-strip .clip { animation: none; opacity: 1; transform: none; }
}

/* ---------- Seções ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; margin-bottom: clamp(24px, 3.5vw, 44px); align-items: start; }
.section-head h2 { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: clamp(30px, 3.6vw, 52px); line-height: 1; letter-spacing: -.02em; }
.section-head p { color: var(--ink-2); margin: 0; }
.section-head .meta { color: var(--muted); font-size: 14px; margin-top: 12px; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 14px; } }

.grid { display: grid; gap: 10px; }
.grid.reels { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 760px) {
  .grid.reels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.wide, .grid.two { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
}

/* Cabeçalho de páginas internas */
.page-head { padding: clamp(48px, 8vw, 104px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--ink); }
.page-head h1 {
  font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 300;
  font-size: clamp(64px, 14vw, 220px); line-height: .85; letter-spacing: -.04em;
}
.page-head .intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; margin-top: clamp(24px, 3vw, 40px); }
.page-head .intro p { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); margin: 0; }
.page-head .intro .k { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .page-head .intro { grid-template-columns: 1fr; gap: 12px; } }

/* Projetos (3D) */
.project-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 20px 0; font-size: 15px; color: var(--ink-2); }
.project-nav a:hover { color: var(--ink); }
.project { padding-top: clamp(56px, 8vw, 112px); }
.project .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; margin: 24px 0 32px; font-size: 14px; }
.project .facts dt { color: var(--muted); }
.project .facts dd { margin: 2px 0 0; }
.project h3 { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: 22px; margin: 40px 0 14px; }
@media (max-width: 640px) { .project .facts { grid-template-columns: 1fr 1fr; } }

/* Marcas */
.brands { display: flex; flex-wrap: wrap; gap: 6px 0; font-family: var(--display); font-variation-settings: "wdth" 112; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.3; letter-spacing: -.01em; }
.brands span:not(:last-child)::after { content: ","; margin-right: .35em; color: var(--muted); }

/* Sobre */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.about .portrait { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.about .portrait img { width: 100%; height: 100%; object-fit: cover; }
.about .bio p { font-size: clamp(18px, 1.6vw, 20px); }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 15px; }
.timeline strong { font-weight: 600; display: block; margin-bottom: 4px; }
.timeline p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Tutorial */
.offer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.offer ul { padding-left: 1.1em; margin: 0 0 24px; color: var(--ink-2); }
.offer li { margin-bottom: 6px; }
.price { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: 40px; margin: 8px 0 20px; }
@media (max-width: 760px) { .offer { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper);
  padding: 14px 22px; font-size: 15px; border: 1px solid var(--ink); transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.link { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link:hover { border-color: var(--key); }

/* ---------- Rodapé / contato ---------- */
.contact { margin-top: clamp(80px, 12vw, 160px); border-top: 1px solid var(--ink); padding: clamp(40px, 6vw, 72px) 0 32px; }
.contact .ask { color: var(--ink-2); margin-bottom: 10px; }
.contact .mail {
  font-family: var(--display); font-variation-settings: "wdth" 125; font-weight: 500;
  font-size: clamp(30px, 6.4vw, 96px); line-height: 1; letter-spacing: -.035em; word-break: break-word;
  display: inline-block;
}
.contact .mail:hover { color: var(--key); }
.contact .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: clamp(40px, 6vw, 72px); font-size: 14px; color: var(--muted); }
.contact .row nav { display: flex; gap: 22px; }
.contact .row a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(243,244,242,.97); display: none; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.lb.open { display: flex; }
.lb .stage { max-width: min(1400px, 100%); max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lb .stage img, .lb .stage video { max-width: 100%; max-height: calc(100vh - 100px); object-fit: contain; background: #000; }
.lb .stage img { background: transparent; }
.lb button { position: absolute; background: none; border: 0; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; padding: 10px 14px; }
.lb .close { top: 8px; right: 8px; }
.lb .prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb .next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb .count { position: absolute; top: 16px; left: 22px; font-size: 14px; color: var(--muted); }

/* ---------- Criador ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dd { margin: 0 0 8px; font-family: var(--display); font-variation-settings: "wdth" 125; font-size: clamp(34px, 4.6vw, 76px); line-height: .95; letter-spacing: -.03em; white-space: nowrap; }
.stats dt { color: var(--ink-2); font-size: 15px; max-width: 18ch; }
.meta-line { color: var(--muted); font-size: 14px; margin-top: 24px; }
.hits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.hits a { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.hits .views { font-family: var(--display); font-variation-settings: "wdth" 125; font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -.03em; transition: color .2s; }
.hits a:hover .views, .hits a:focus-visible .views { color: var(--key); }
.hits strong { font-weight: 600; display: block; margin-bottom: 4px; }
.hits p { margin: 0; color: var(--ink-2); }
.hits .where { color: var(--muted); font-size: 14px; white-space: nowrap; }
.formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; border-top: 1px solid var(--ink); padding-top: 28px; }
.formats h3 { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: 24px; margin: 0 0 8px; }
.formats p { color: var(--ink-2); margin: 0; }
a.clip { display: block; }

/* Case em destaque */
.case { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); align-items: start; border-top: 1px solid var(--ink); padding-top: 32px; }
.case .clip { max-width: 380px; }
.case h2 { font-family: var(--display); font-variation-settings: "wdth" 125; font-size: clamp(40px, 6vw, 88px); line-height: .95; letter-spacing: -.03em; margin: 0 0 24px; }
.case .lead { font-size: clamp(18px, 1.7vw, 21px); }
.case .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; margin: 28px 0; font-size: 14px; }
.case .facts dt { color: var(--muted); }
.case .facts dd { margin: 2px 0 0; }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 8px 0 24px; }
.quotes blockquote { margin: 0; border-left: 2px solid var(--key); padding-left: 16px; }
.quotes p { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.quotes cite { font-style: normal; color: var(--muted); font-size: 14px; }

/* Ferramentas de IA */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--ink); padding-top: 24px; }
.tools h3 { font-size: 14px; color: var(--muted); font-weight: 400; margin: 0 0 12px; }
.tools ul { list-style: none; margin: 0; padding: 0; }
.tools li { font-family: var(--display); font-variation-settings: "wdth" 112; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.25; letter-spacing: -.01em; }

/* ---------- Estrutura v2: menu, submenu do portfólio, chamadas ---------- */
.nav { align-items: center; }
.nav .pill { color: var(--paper); background: var(--ink); padding: 7px 16px; border-radius: 999px; }
.nav .pill:hover { color: var(--paper); background: var(--key); }
.subnav { border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; align-items: center; gap: 26px; height: 48px; overflow-x: auto; scrollbar-width: none; font-size: 14px; white-space: nowrap; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { color: var(--muted); padding: 13px 0; }
.subnav a:hover { color: var(--ink); }
.subnav a.root { color: var(--ink); font-weight: 600; }
.subnav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--key); }
.hero .links { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-self: start; }
.hero .lede .links a { white-space: nowrap; }
.more { display: inline-block; margin-top: 28px; font-size: 15px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.more:hover { border-color: var(--key); }
.reel-wrap { margin-top: 8px; }
.home-index .index { margin-top: 0; }

@media (max-width: 860px) {
  .nav .pill { align-self: flex-start; margin-top: 10px; font-size: 18px; padding: 8px 18px; }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .hits a { grid-template-columns: 1fr; gap: 6px; }
  .formats { grid-template-columns: 1fr; }
  .case, .quotes { grid-template-columns: 1fr; }
  .case .clip { max-width: 260px; }
  .case .facts { grid-template-columns: 1fr 1fr; }
  .tools { grid-template-columns: 1fr 1fr; row-gap: 28px; }
}
