:root {
  color-scheme: dark;
  --bg: #111311;
  --panel: #191c18;
  --ink: #f4f2e9;
  --quiet: #b2b3a7;
  --line: #393c31;
  --gold: #edbb77;
  --gold-deep: #382d1d;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 "Space Grotesk", system-ui, sans-serif; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .23em; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: #16160f; }
.wrap { width: min(100% - clamp(2.35rem, 10vw, 9rem), 82rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; top: .7rem; left: .9rem; padding: .75rem 1rem; background: var(--gold); color: #18160f; }

.site-head { position: sticky; inset-block-start: 0; z-index: 4; background: #111311f4; border-bottom: 1px solid #30332c; }
.head-inner { min-block-size: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.brand { display: inline-flex; inline-size: fit-content; align-items: center; gap: .65rem; color: var(--ink); font-size: 1.01rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 6px; }
.brand-labs { color: var(--gold); margin-inline-start: .3em; }
.top-nav { display: flex; gap: clamp(1.15rem, 2.7vw, 2.6rem); }
.top-nav a, .owner-link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; color: var(--quiet); font-size: .88rem; text-decoration: none; }
.top-nav a:hover, .owner-link:hover { color: var(--ink); text-decoration: underline; }
.owner-link { justify-self: end; gap: .55rem; }
.owner-link span { color: var(--gold); }

.hero { position: relative; display: grid; align-items: center; min-height: calc(100svh - 70px); padding-block: clamp(2.75rem, 6vw, 6.25rem); background: radial-gradient(ellipse at 76% 44%, #25251b 0%, #171a14 32%, var(--bg) 66%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); align-items: center; gap: clamp(2rem, 4vw, 5.1rem); }
.hero-place { display: flex; align-items: center; gap: .56rem; margin: 0 0 1.55rem; color: var(--quiet); font: 500 clamp(.62rem, 1.15vw, .78rem)/1.5 var(--mono); text-transform: uppercase; letter-spacing: .055em; }
.hero-place span { flex: 0 0 6px; height: 6px; background: var(--gold); border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.6rem; font-size: clamp(3.3rem, 6vw, 6.65rem); line-height: .97; letter-spacing: -.079em; font-weight: 600; }
h1 span { color: var(--gold); }
.lead { max-width: 26rem; margin-bottom: 2rem; color: #cecec1; font-size: clamp(1rem, 1.4vw, 1.19rem); line-height: 1.6; }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.7rem; min-height: 54px; padding: .7rem 1.12rem; border: 1px solid #f3ca93; background: var(--gold); color: #1c180f; font-weight: 700; text-decoration: none; border-radius: 7px; transition: transform 150ms var(--ease-out); }
.primary-link span { font: 500 1.15rem/1 var(--mono); }
.primary-link:active, .run:active { transform: translateY(1px); }

.bench { min-width: 0; position: relative; overflow: hidden; border: 1px solid #505142; border-radius: 13px; background: #181a16; box-shadow: 0 28px 72px #0709076b; }
.bench[data-mode="dados"] { --mode: #edbb77; }
.bench[data-mode="automacao"] { --mode: #9dcfa9; }
.bench[data-mode="interfaces"] { --mode: #b8cdda; }
.bench-top, .bench-controls { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .95rem; }
.bench-top { min-height: 48px; border-bottom: 1px solid #373a30; background: #1b1e18; }
.bench-top h2 { display: flex; align-items: center; gap: .68rem; margin: 0; color: #e4e2d7; font-size: .84rem; line-height: 1.1; font-weight: 600; }
.bench-glyph { width: 10px; height: 10px; border: 1px solid var(--mode); border-radius: 2px; transform: rotate(45deg); }
.bench-state { display: flex; align-items: center; gap: .46rem; color: #bfc1ad; font: 400 .61rem/1.2 var(--mono); text-align: right; }
.bench-state i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--mode); box-shadow: 0 0 9px color-mix(in srgb, var(--mode), transparent 40%); }
.bench-stage { position: relative; isolation: isolate; min-inline-size: 0; min-height: 240px; aspect-ratio: 1.43; overflow: hidden; background: radial-gradient(ellipse at 53% 48%, #3531255c, transparent 70%), repeating-linear-gradient(0deg, transparent 0 25px, #8b8a7420 26px, transparent 27px), repeating-linear-gradient(90deg, transparent 0 25px, #8b8a741b 26px, transparent 27px), #151712; }
.bench-stage::after { content: ""; position: absolute; z-index: -1; inset: 9px; border: 1px solid #ad9c6c25; border-radius: 2px; mask-image: linear-gradient(#000, transparent 36%, transparent 67%, #000); }
#board { display: none; position: absolute; width: 100%; height: 100%; inset: 0; }
.bench.is-rendered #board { display: block; }
.bench.is-rendered .board-fallback { display: none; }
.board-fallback { position: absolute; inset: 50% auto auto 50%; width: min(55%, 265px); height: 42%; transform: translate(-50%, -37%); }
.board-fallback i { position: absolute; inset: 0; border: 1px solid #81765a; border-radius: 12px; background: #303528; box-shadow: 8px 11px #10130e; transform: scaleY(.59) rotate(36deg) skewX(-23deg); }
.board-fallback i:nth-child(2) { inset: 3% 4%; background: #444335; transform: translateY(-17%) scaleY(.59) rotate(36deg) skewX(-23deg); }
.board-fallback i:nth-child(3) { inset: 15% 24%; background: #70634b; transform: translateY(-58%) scaleY(.59) rotate(36deg) skewX(-23deg); }
.board-fallback i:nth-child(4) { inset: 34% 36%; background: var(--mode); border-color: #ffdd9f; transform: translateY(-93%) scaleY(.63) rotate(36deg) skewX(-23deg); }
.stage-key { position: absolute; bottom: 1rem; left: 1rem; display: flex; align-items: center; gap: .45rem; font: 500 .6rem/1.3 var(--mono); color: #d8d5c4; text-transform: uppercase; letter-spacing: .055em; }
.stage-key b { width: 9px; height: 1px; background: var(--mode); }
.stage-corner { position: absolute; right: 1rem; bottom: 1.02rem; width: 12px; height: 12px; border: 1px solid #aaa18c; transform: rotate(45deg); opacity: .7; }
.stage-corner::after { content: ""; position: absolute; inset: 3px; background: var(--mode); }
.bench-controls { min-height: 63px; border-top: 1px solid #373a30; }
.mode-buttons, .filter-buttons { display: flex; align-items: center; gap: .23rem; }
.mode-buttons button, .filter-buttons button, .run { min-height: 44px; background: transparent; border: 1px solid transparent; padding: .4rem .63rem; border-radius: 5px; color: #c2c2b3; font-size: .75rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.mode-buttons button:hover, .filter-buttons button:hover { color: var(--ink); }
.mode-buttons button[aria-pressed="true"], .filter-buttons button[aria-pressed="true"] { color: #f1dbba; border-color: #736040; background: #382d1d; }
.run { display: inline-flex; align-items: center; gap: .55rem; border-color: #555949; transition: transform 150ms var(--ease-out); }
.run:hover { color: var(--ink); border-color: var(--mode); }
.run span { width: 0; height: 0; border-block: 4px solid transparent; border-left: 6px solid var(--mode); }

.catalog { border-top: 1px solid #34372e; padding-block: clamp(4.5rem, 8vw, 8rem); background: #131611; }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1.45rem 2rem; margin-bottom: 2.3rem; }
.section-head h2, .about h2 { margin-bottom: .72rem; font-size: clamp(2.45rem, 5.1vw, 5.35rem); font-weight: 600; letter-spacing: -.068em; line-height: 1; }
.section-head p, .about p { margin-bottom: 0; color: var(--quiet); }
.filter-buttons { flex-wrap: wrap; }
.filter-buttons button { font-size: .83rem; padding-inline: .8rem; border-color: #363b30; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project { position: relative; min-width: 0; min-height: 194px; padding: clamp(1.25rem, 2.1vw, 2.05rem); border: 1px solid var(--line); border-left: 0; border-top: 0; background: #171b14; }
.project:nth-child(even) { background: #191c16; }
.project:focus-within { z-index: 1; outline: 2px solid var(--gold); outline-offset: -2px; }
.project-meta { display: flex; gap: .55rem; align-items: center; margin-bottom: 1.3rem; color: #bdc0af; font: 500 .65rem/1.4 var(--mono); }
.project-mark { flex: 0 0 8px; height: 8px; border: 1px solid #e7b76f; transform: rotate(45deg); }
.project[data-area="marketing"] .project-mark { background: #a5c993; border-color: #a5c993; border-radius: 50%; }
.project[data-area="windows"] .project-mark { border-color: #a8cbdc; transform: none; }
.project-platform { margin-left: auto; color: #b6b9a8; }
.project h3 { margin-bottom: .45rem; font-size: clamp(1.24rem, 2vw, 1.72rem); font-weight: 600; letter-spacing: -.041em; line-height: 1.16; }
.project h3 a { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem; text-decoration: none; }
.project h3 a::after { content: ""; position: absolute; inset: 0; }
.project-arrow { color: var(--gold); font: 400 .9rem/1 var(--mono); transition: transform 150ms var(--ease-out); }
.project p { margin-bottom: 0; color: var(--quiet); font-size: .9rem; max-width: 33ch; }

.about { padding-block: clamp(4.5rem, 8vw, 8.5rem); border-top: 1px solid #383b32; background: #20231a; }
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.4rem, 8vw, 9rem); align-items: start; }
.about h2 { margin-bottom: 1.2rem; }
.about p { max-width: 38ch; }
.about a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: .8rem; color: var(--gold); }
.process { position: relative; display: grid; gap: 0; margin: 0; padding: 0 0 0 1.4rem; border-left: 1px solid #777457; list-style: none; }
.process li { position: relative; padding: 0 0 1.28rem; border-bottom: 1px solid var(--line); margin-bottom: 1.05rem; }
.process li:last-child { margin: 0; padding-bottom: 0; border-bottom: 0; }
.process li::before { content: ""; position: absolute; left: -1.67rem; top: .39rem; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.process h3 { margin-bottom: .15rem; font-size: 1.28rem; font-weight: 600; }

footer { border-top: 1px solid var(--line); padding-block: 2.4rem 1.3rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1rem; align-items: center; }
.footer-top p { margin: 0; color: var(--quiet); font-size: .85rem; }
.sb-network { margin-top: 1.45rem; padding-top: .82rem; border-top: 1px solid var(--line); }
.sb-network summary { width: fit-content; min-block-size: 44px; padding-block: .57rem; cursor: pointer; font-weight: 600; }
.sb-network nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .85rem 2rem; margin: .45rem 0 1.15rem; }
.sb-network nav ul { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.sb-network nav a, .footer-base a { display: inline-flex; align-items: center; min-height: 44px; color: var(--quiet); font-size: .82rem; }
.sb-network nav a:hover, .footer-base a:hover { color: var(--ink); }
.footer-base { display: flex; gap: .3rem 1.25rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  [data-enter] .hero-copy { animation: appear 640ms var(--ease-out) both; }
  [data-enter] .bench { animation: appear 680ms 65ms var(--ease-out) both; }
  @keyframes appear { from { opacity: 0; transform: translateY(12px); } }
}
@media (hover: hover) and (pointer: fine) {
  .primary-link:hover { transform: translateY(-2px); }
  .project:hover { background: #24291e; }
  .project:hover .project-arrow { transform: translate(2px, -2px); }
}
@media (max-width: 1050px) {
  .hero-inner { gap: 2rem; }
  h1 { font-size: clamp(3rem, 6.5vw, 4.75rem); }
}
@media (max-width: 790px) {
  .hero { background-position: center; }
  .hero-inner { grid-template-columns: 1fr; align-content: center; gap: 2rem; }
  .hero-copy { max-width: 32rem; }
  .bench { max-width: 42rem; width: 100%; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-link { display: none; }
  .head-inner { display: flex; justify-content: space-between; }
}
@media (max-width: 470px) {
  .site-head .brand { font-size: .8rem; gap: .42rem; }
  .site-head .brand img { width: 26px; height: 26px; }
  .head-inner { min-height: 60px; gap: .7rem; }
  .top-nav { gap: .68rem; }
  .top-nav a { font-size: .74rem; }
  .hero { padding-block: 2.55rem 2.65rem; min-height: calc(100svh - 60px); }
  .hero-place { margin-bottom: 1.05rem; }
  h1 { margin-bottom: 1.05rem; font-size: clamp(2.8rem, 11.8vw, 3.7rem); }
  .lead { margin-bottom: 1.4rem; }
  .primary-link { display: inline-flex; }
  .bench-top, .bench-controls { padding-inline: .58rem; }
  .bench-controls { flex-wrap: wrap; }
  .mode-buttons button, .run { padding-inline: .43rem; font-size: .71rem; }
  .bench-stage { aspect-ratio: 1.23; min-height: 220px; }
  .catalog, .about { padding-block: 3.7rem; }
  .project-grid, .about-inner { grid-template-columns: minmax(0, 1fr); }
  .project { min-height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .site-head .brand { font-size: .75rem; gap: .35rem; }
  .site-head .brand img { width: 23px; height: 23px; }
  .head-inner { gap: .45rem; }
  .top-nav { gap: .55rem; }
  .top-nav a { font-size: .69rem; }
}
