/* Portfólio 3 · Bento — grade de blocos claros e coloridos; cada bloco abre em tela cheia.
   Cores da marca: --c1..--c6 vêm do site.json → cores.
   --c1 = bloco de contato (texto escuro por cima) · --c2 = bloco do lema (texto claro) · --c5 = bloco escuro (relógio). */
:root {
  --c1: #E8B24C; --c2: #3D7BE0; --c3: #D9534F; --c4: #2E9E7A; --c5: #141418; --c6: #8A8F99;
  --bg: #E9ECF1; --bg-2: #FFFFFF; --fg: #141418; --muted: #565A66; --line: rgba(20, 20, 24, .1);
  --accent: var(--c1); --on-accent: #141418; --on-c2: #FFFFFF; --dark: var(--c5); --on-dark: #F4F3EF;
  --f-display: "Gabarito", system-ui, sans-serif;
  --f-text: "Gabarito", system-ui, sans-serif;
  --gut: clamp(12px, 2.4vw, 28px);
  --r: 28px;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--bg); }
body { font: 400 1.0625rem/1.5 var(--f-text); color: var(--fg); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
small { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Grade ---------- */
main { padding: var(--gut); max-width: 1320px; margin: 0 auto; }
.bento {
  display: grid; gap: var(--gut);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
  grid-auto-flow: dense;
}
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(170px, 19vw, 240px), auto); }
}
.tile { position: relative; border-radius: var(--r); background: var(--bg-2); overflow: hidden; min-width: 0; }
.tile__open { position: absolute; inset: 0; display: block; text-decoration: none; color: inherit; }
.tile__open img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .7, .2, 1); }
.tile__cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 18px 20px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.tile__cap b { font-size: clamp(1.1rem, 1.7vw, 1.45rem); font-weight: 800; line-height: 1.1; }
.tile__plus, .tile__arrow { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--fg); font-size: 1.4rem; font-weight: 600; line-height: 1; transition: rotate .35s, scale .35s; }
@media (hover: hover) and (pointer: fine) {
  .tile__open:hover img { scale: 1.05; }
  .tile__open:hover .tile__plus { rotate: 90deg; }
  .tile__open:hover .tile__arrow { scale: 1.12; }
}
.tile__open:focus-visible { outline-offset: -6px; border-radius: var(--r); }

.tile--me { grid-column: span 2; grid-row: span 2; display: grid; align-content: end; gap: 10px; padding: clamp(22px, 3vw, 36px); background: var(--bg-2); }
.me__photo { width: clamp(72px, 9vw, 112px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: auto; }
.me__name { font-family: var(--f-display); font-weight: 900; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: .9; letter-spacing: -.03em; }
.me__role { font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.25rem); }
.me__lead { color: var(--muted); max-width: 42ch; }

.tile--photo { grid-row: span 2; }
.tile--about { grid-column: span 2; background: var(--bg-2); }
.tile__open--text { display: grid; align-content: space-between; gap: 12px; padding: clamp(20px, 2.6vw, 30px); }
.tile__open--text small { color: var(--muted); }
.about__first { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.02; letter-spacing: -.02em; padding-right: 48px; }
.tile__open--text .tile__plus { background: var(--bg); }

.tile--motto { grid-column: span 2; display: grid; align-content: center; gap: 10px; padding: clamp(22px, 3vw, 36px); background: var(--c2); color: var(--on-c2); }
.motto__q { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 2.3vw, 1.9rem); line-height: 1.15; }
.motto__f { font-weight: 600; opacity: .85; }

.tile--project { grid-column: span 2; grid-row: span 2; }
.tile--project .tile__open img { object-position: 50% 40%; }
.tile--contact { background: var(--accent); color: var(--on-accent); }
.tile--contact b { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1; }
.tile--contact small { color: inherit; opacity: .75; }
.tile--contact .tile__arrow { background: var(--on-accent); color: var(--accent); }
.tile--clock { display: grid; align-content: space-between; padding: clamp(18px, 2.4vw, 26px); background: var(--dark); color: var(--on-dark); }
.tile--clock small { opacity: .7; }
.tile--clock b { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.tile--clock span { opacity: .8; font-size: .95rem; }
.tile--ig { display: grid; align-content: space-between; gap: 10px; padding: clamp(18px, 2.4vw, 26px); }
.tile--ig small { color: var(--muted); }
.ig__handle { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.15rem, 1.9vw, 1.6rem); line-height: 1.1; overflow-wrap: anywhere; text-decoration: none; }
.ig__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-size: .85rem; font-weight: 700; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .mini:hover { border-color: var(--fg); } .ig__handle:hover { text-decoration: underline; } }
.tile--moments { grid-row: span 2; }
@media (max-width: 899px) {
  .tile--photo, .tile--moments { grid-row: span 2; }
  .tile--clock, .tile--contact, .tile--ig { min-height: 170px; }
}

/* ---------- Detalhes ---------- */
.det { display: grid; gap: 24px; align-items: center; margin-top: var(--gut); padding: clamp(22px, 4vw, 48px); background: var(--bg-2); border-radius: var(--r); }
.det h2 { font-family: var(--f-display); font-weight: 900; font-size: clamp(2rem, 5vw, 4rem); line-height: .95; letter-spacing: -.03em; }
.det__k { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.det__txt { display: grid; gap: 14px; justify-items: start; }
.det__txt p { max-width: 52ch; font-size: 1.1rem; }
.det__img { width: 100%; max-height: 72svh; object-fit: cover; border-radius: calc(var(--r) - 8px); }
.det__sector { color: var(--muted); font-weight: 600; margin-top: -6px; }
.det__list { display: grid; gap: 6px; }
.det__list li { position: relative; padding-left: 20px; }
.det__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.det__tech { display: flex; flex-wrap: wrap; gap: 6px; }
.det__tech span { padding: 4px 12px; border-radius: 999px; background: var(--bg); font-size: .82rem; font-weight: 700; }
.det__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.det__avatar { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.det__big { font-size: clamp(1.2rem, 2.2vw, 1.7rem) !important; line-height: 1.4; max-width: 40ch !important; }
.det__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; margin-top: 18px; }
.det__grid li { display: grid; gap: 6px; }
.det__grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.det__grid b { font-weight: 800; }
.det__grid span { color: var(--muted); }
@media (min-width: 900px) { .det:not(.det--list) { grid-template-columns: 1fr 1fr; } .det--project { grid-template-columns: 1.15fr .85fr !important; } .det--text { grid-template-columns: auto 1fr !important; } }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--fg); color: #fff; font-weight: 800; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--accent); color: var(--on-accent); } }

/* Com JS: os detalhes viram uma tela cheia que abre a partir do bloco */
.bento-live .sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; visibility: hidden; padding: clamp(14px, 3vw, 36px); }
.bento-live .sheet.is-open { visibility: visible; }
.bento-live .det { display: none; margin: 0 auto; max-width: 1180px; min-height: calc(100svh - 2 * clamp(14px, 3vw, 36px)); }
.bento-live .det.is-on { display: grid; }
.bento-live .det--list.is-on { display: block; }
.sheet__close { position: fixed; z-index: 2; top: clamp(18px, 3vw, 40px); right: clamp(18px, 3vw, 40px); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--fg); color: #fff; font-weight: 800; cursor: pointer; }
.sheet__close span { font-size: 1.3rem; line-height: 1; }

.foot { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 28px var(--gut) 40px; color: var(--muted); font-size: .9rem; }
.foot b { color: var(--fg); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot a { min-height: 32px; display: inline-flex; align-items: center; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
