/* Quase Cinema Lab - site v2 */
:root {
  --bg: #0a0b0d;
  --bg-soft: #121418;
  --line: #23272e;
  --text: #f2f4f5;
  --muted: #a3abb5;
  --accent: #5eead4;
  --accent-ink: #062a25;
  --font: "Avenir Next", "Montserrat", "Futura", "Century Gothic", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 68rem;
  --measure: 42rem;
  --pad: clamp(1.25rem, 5vw, 4rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* i18n: PT default, EN via ?lang=en (class "en" on <html>) */
html:not(.en) [data-l="en"] { display: none !important; }
html.en [data-l="pt"] { display: none !important; }

/* Motion background */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(94, 234, 212, .07), transparent 60%),
              linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}

a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem 1rem; border-radius: 6px; font-weight: 600; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* Header */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; line-height: 0; border-radius: 6px; }
.brand img { height: 4.5rem; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: .25rem 1.25rem; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .25rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--accent); }
.lang {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .2rem .7rem !important; font-size: .8rem !important; letter-spacing: .08em;
}
.lang:hover { border-color: var(--accent); }

/* Main */
main { flex: 1; padding: clamp(2rem, 8vh, 6rem) 0 4rem; }
.hero { min-height: 58vh; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--accent); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 1.25rem; }
h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.75rem); margin: 0 0 1.5rem; max-width: 16ch; }
.page h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: none; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: 3.5rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
p, ul, ol, dl { max-width: var(--measure); }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--muted); max-width: 38rem; margin: 0 0 2.5rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: transparent; color: var(--accent); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.card {
  background: rgba(18, 20, 24, .72); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.6rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }
.section { padding-top: 2rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Portfolio (Trabalhos) */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem; margin-top: 2rem; }
.work {
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(18, 20, 24, .78); border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .25s, transform .25s;
}
.work:hover { border-color: rgba(94, 234, 212, .45); transform: translateY(-2px); }
.work-media { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.work:hover .work-media img { transform: scale(1.03); }
.work-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.work-body h2, .work-body h3 { font-size: 1.2rem; margin: 0; }
.work-body p { margin: 0; color: var(--muted); font-size: .97rem; }
.work-body .work-meta { color: var(--accent); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.work-link { margin-top: auto; padding-top: .5rem; font-size: .9rem; }
.page .works { margin-bottom: 1rem; }
.section-cta { margin-top: 1.75rem; }
@media (min-width: 44rem) {
  .work-feature { grid-column: span 2; }
  .work-feature .work-media { aspect-ratio: 16 / 9; }
  .work-feature .work-body h2 { font-size: 1.45rem; }
}

/* Author block */
.author { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 1.5rem 2.5rem; align-items: center; }
.author h2 { margin-top: 0; }
.author-mark { width: 100%; height: auto; opacity: .9; }
.author .actions { margin-top: 1.25rem; }
.author-page { margin-top: 1rem; }

/* Data list (Sobre) */
.facts { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .6rem 1.5rem; margin: 1.5rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 1rem 0; max-width: var(--measure); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; list-style: none; padding-right: 2rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--accent); font-size: 1.25rem; line-height: 1.4; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); margin: .75rem 0 0; }

.legal h2 { font-size: 1.3rem; margin-top: 2.5rem; }
.legal li { margin: .35rem 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .875rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Gentle entrance */
.reveal { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

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

@media (max-width: 34rem) {
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .75rem; }
  .author { grid-template-columns: 1fr; }
  .author-mark { max-width: 10rem; }
  .brand img { height: 3.25rem; }
}

@media print {
  #bg, .nav, .skip { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* Portfolio polish: clamp description to ~2 lines feel, keep cards even */
.work-body p:not(.work-meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work:focus-within { border-color: rgba(94, 234, 212, .55); }
.works-teaser { margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) {
  .work:hover { transform: none; }
  .work:hover .work-media img { transform: none; }
}
