/* ==========================================================================
   MAGU Design System · components.css
   Vidro líquido · botões · controles · janela/terminal · tiles · formulário
   Nomes seguem o vocabulário de namethatui.com (Segmented Control, Bento Grid,
   Traffic Lights, Command Palette, Toast, Hover Card, Badge/Pill…)
   ========================================================================== */

/* ── Liquid Glass ───────────────────────────────────────────────────────────
   .glass           superfície padrão (cards, painéis, janelas)
   .glass--strong   mais opaco, para texto longo (legibilidade)
   .glass--ti       aro de titânio no lugar do aro de vidro
   Reflexo: ::before = aro especular (estático; sem efeito de hover). */
.glass {
  position: relative; isolation: isolate; border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(190%); backdrop-filter: blur(var(--glass-blur)) saturate(190%);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo), 0 0 0 .5px var(--glass-edge);
}
.glass--strong { background: var(--glass-strong); }
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: linear-gradient(150deg, rgba(255,255,255,.55), rgba(255,255,255,.06) 32%, rgba(255,255,255,0) 60%, rgba(255,255,255,.20));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass--ti::before { background: var(--ti-rim); }
.glass > * { position: relative; z-index: 2; }

/* ── botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--r); border: 0; cursor: pointer;
  font-size: var(--t-md); font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--spring), background .2s, box-shadow .3s, color .2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn-core { background: var(--core); color: var(--core-ink); box-shadow: 0 8px 24px -8px var(--core-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-core:hover { background: var(--core-hi); color: var(--core-ink); }
.btn-glass { background: var(--glass); color: var(--text);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 .5px var(--glass-edge), 0 6px 20px -10px rgba(0,0,0,.4); }
.btn-glass:hover { color: var(--text); background: var(--glass-strong); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: var(--t-sm); border-radius: var(--r-sm); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-more { font-size: var(--t-md); font-weight: 500; color: var(--core); display: inline-flex; align-items: center; gap: 2px; }
.link-more::after { content: '›'; font-size: 1.2em; line-height: 1; transform: translateY(-1px); }
.link-more:hover { text-decoration: none; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: center; }

/* ── Segmented Control (toggle group) ───────────────────────────────────── */
.segmented {
  display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r); position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  border: 0; background: transparent; cursor: pointer; white-space: nowrap;
  min-height: 36px; padding: 0 16px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--t-sm); font-weight: 500;
  transition: color .2s, background .25s var(--ease), box-shadow .25s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] {
  color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 1px 3px rgba(0,0,0,.18);
}

/* ── Badge / Pill / Status ──────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; letter-spacing: .01em;
  padding: 4px 10px; border-radius: var(--r-sm); color: var(--text-2); background: color-mix(in srgb, var(--text) 7%, transparent); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.status[data-s="live"]::before { background: var(--core); box-shadow: 0 0 10px var(--core-glow); }
.status[data-s="beta"]::before { background: var(--warn); }
.status[data-s="wip"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.status[data-s="internal"]::before { background: var(--text-3); border-radius: 2px; }
.status[data-s="off"] { color: var(--text-3); }
.status[data-s="off"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); opacity: .6; }
kbd { font: 600 var(--t-xs)/1 var(--f-text); padding: 3px 6px; border-radius: var(--r-xs); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line); }

/* ── Traffic Lights (macOS 27: vidro líquido, Aqua-like) ───────────────── */
.lights { display: inline-flex; gap: 8px; align-items: center; }
.lights span {
  width: 12px; height: 12px; border-radius: 50%; position: relative;
  background:
    radial-gradient(ellipse 60% 38% at 50% 18%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 70% 35% at 50% 92%, rgba(255,255,255,.45), rgba(255,255,255,0) 70%),
    radial-gradient(circle at 50% 55%, var(--l), color-mix(in srgb, var(--l) 70%, #000) 100%);
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.28), 0 .5px 1.5px rgba(0,0,0,.25);
}
.lights span:nth-child(1) { --l: #ff6b61; }
.lights span:nth-child(2) { --l: #f9c74f; }
.lights span:nth-child(3) { --l: #3fd26a; }

/* ── Mac Window / Terminal ──────────────────────────────────────────────── */
.window { border-radius: var(--r); overflow: hidden; text-align: left; }
.window-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.window-title { flex: 1; text-align: center; font-size: var(--t-xs); font-weight: 600; color: var(--text-3); margin-right: 52px; }
.window-body { padding: 18px 20px 22px; }
.terminal .window-body { font: 500 clamp(.72rem, .6rem + .45vw, .86rem)/1.7 var(--f-mono); letter-spacing: 0; color: var(--text-2); overflow-x: auto; white-space: pre; }
.terminal .p { color: var(--core); }
.terminal .c { color: var(--text); }
.terminal .k { color: var(--text); font-weight: 600; }
.terminal .d { color: var(--text-3); }
.terminal .ok { color: var(--core); }
.terminal .ln { display: block; }
.terminal.typing .ln { opacity: 0; }
.terminal.typing .ln.on { opacity: 1; transition: opacity .18s; }
.terminal .caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--core); border-radius: 2px; animation: blink 1.1s step-end infinite; }

/* ── Sigil: símbolo de titânio dentro de uma bolha de vidro ─────────────── */
.sigil { position: relative; width: min(64vw, 300px); aspect-ratio: 1; margin: 0 auto 28px; display: grid; place-items: center; }
.sigil::before { /* eixo condutivo */
  content: ''; position: absolute; left: 50%; top: -30%; bottom: -30%; width: 1px; transform: translateX(-.5px);
  background: linear-gradient(to bottom, transparent, var(--core) 30%, var(--core) 70%, transparent);
  box-shadow: 0 0 14px var(--core-glow); animation: axis 1.6s var(--ease) both; transform-origin: top;
}
.sigil .orb {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.55) 0 3%, rgba(255,255,255,.12) 10%, transparent 24%),
    radial-gradient(circle at 62% 80%, color-mix(in srgb, var(--core) 30%, transparent), transparent 42%),
    radial-gradient(circle, transparent 60%, rgba(255,255,255,.10) 70%, rgba(255,255,255,.30) 76%, transparent 78%);
  -webkit-backdrop-filter: blur(6px) saturate(160%); backdrop-filter: blur(6px) saturate(160%);
  box-shadow: inset 0 0 40px rgba(255,255,255,.06), 0 30px 80px -30px rgba(0,0,0,.6);
}
.sigil img { position: relative; width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
@keyframes axis { from { transform: translateX(-.5px) scaleY(0); opacity: 0; } to { transform: translateX(-.5px) scaleY(1); opacity: 1; } }

/* ── Bento Grid + Tiles ─────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 1060px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px)  { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px)  { .bento { grid-template-columns: 1fr; } }
.bento--features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento--features .tile--feature { grid-column: auto; }
@media (max-width: 700px) { .bento--features { grid-template-columns: 1fr; } }
.bento > li[hidden] { display: none; }
.tile { min-height: 230px; }
.tile--feature { grid-column: span 2; min-height: 280px; }
@media (max-width: 540px) { .tile--feature { grid-column: auto; } }
.tile-link { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; color: var(--text); border-radius: inherit; }
.tile-link:hover { text-decoration: none; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tile-icon {
  width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 .5px var(--glass-edge);
}
.tile-icon .i { width: 24px; height: 24px; }
.tile--feature .tile-icon { width: 54px; height: 54px; color: var(--core); }
.tile-type { font-size: var(--t-xs); font-weight: 600; color: var(--text-3); letter-spacing: .01em; }
.tile-name { font-size: var(--t-xl); letter-spacing: -.03em; }
.tile--feature .tile-name { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
.tile-kind { font-weight: 600; color: var(--text-2); font-size: var(--t-md); }
.tile-desc { color: var(--text-2); font-size: var(--t-sm); line-height: 1.5; margin-top: 4px; }
.tile--feature .tile-desc { font-size: var(--t-md); max-width: 30em; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.tile-cta { font-size: var(--t-sm); font-weight: 600; color: var(--core); }
.tile-cta::after { content: ' ›'; }
.tile-cta.ext::after { content: ' ↗'; }
div.tile-link { cursor: default; }
.tile.is-off { opacity: .62; }

/* linhas (MAGU Tools/Private/Business/Performance) */
.lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.line-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; min-height: 250px; color: var(--text); }
.line-card:hover { text-decoration: none; }
.line-card .brandline { font-size: var(--t-sm); font-weight: 700; letter-spacing: .02em; }
.line-card h3 { font-size: var(--t-xl); }
.line-card p { color: var(--text-2); font-size: var(--t-sm); }
.line-card .count { margin-top: auto; font-size: var(--t-sm); color: var(--text-3); display: flex; justify-content: space-between; align-items: center; }
.line-card .count b { color: var(--core); font-weight: 600; }

/* princípios / passos */
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card { padding: 26px; display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: var(--t-lg); letter-spacing: -.02em; }
.card p { color: var(--text-2); font-size: var(--t-sm); }
.card .i { width: 28px; height: 28px; color: var(--core); margin-bottom: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; counter-reset: s; }
.steps li { padding: 18px 20px; counter-increment: s; display: grid; gap: 4px; }
.steps b::before { content: counter(s, decimal-leading-zero); display: block; font: 600 var(--t-xs)/1 var(--f-mono); color: var(--core); margin-bottom: 8px; }
.steps b { font-size: var(--t-md); }
.steps span { color: var(--text-2); font-size: var(--t-sm); }

/* acrônimo (sobre) */
.acro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.acro .card b { display: block; font-family: var(--f-display); font-size: clamp(3rem, 2rem + 3vw, 4.6rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.acro strong { font-size: var(--t-lg); }
@media (max-width: 860px) { .acro { grid-template-columns: 1fr 1fr; } }

/* pessoas (co-fundadores) */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.person { padding: 26px; display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: start; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center;
  background: var(--ti); color: var(--bg); font: 700 1.5rem/1 var(--f-display); letter-spacing: -.02em;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg) 40%, transparent), 0 0 0 3.5px rgba(255,255,255,.35), 0 12px 30px -10px rgba(0,0,0,.5);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: var(--t-lg); }
.person h3 a { color: var(--text); }
.person .role { color: var(--core); font-size: var(--t-sm); font-weight: 600; margin: 2px 0 8px; }
.person p { color: var(--text-2); font-size: var(--t-sm); }
.person .link-more { font-size: var(--t-sm); margin-top: 10px; }

/* painel de texto (legal, prosa) */
.panel { padding: clamp(22px, 4vw, 44px); }
.prose { max-width: 44em; margin: 0 auto; }
.prose h2 { font-size: var(--t-xl); margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--t-lg); margin: 26px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; color: var(--text-2); }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.table-scroll { overflow-x: auto; border-radius: var(--r-sm); margin: 0 0 18px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; }

/* ── formulário ─────────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field .hint { font-size: var(--t-xs); color: var(--text-3); }
.input {
  width: 100%; min-height: 48px; padding: 12px 15px; border-radius: var(--r-sm); border: 0; color: var(--text);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 2px rgba(0,0,0,.18); transition: box-shadow .2s;
}
.input::placeholder { color: var(--text-3); }
textarea.input { min-height: 150px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--core), 0 0 0 4px var(--core-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-msg { font-size: var(--t-sm); min-height: 1.4em; }
.form-msg[data-kind="ok"] { color: var(--core); }
.form-msg[data-kind="err"] { color: var(--danger); }

/* ── Command Palette (⌘K) ───────────────────────────────────────────────── */
.cmdk { width: min(640px, calc(100% - 24px)); max-height: min(70vh, 560px); padding: 0; border: 0; color: var(--text); overflow: hidden;
  margin: 12vh auto auto; display: none; flex-direction: column; }
.cmdk[open] { display: flex; animation: pop .35s var(--spring); }
.cmdk::backdrop { background: color-mix(in srgb, var(--bg) 45%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-6px); } }
.cmdk-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cmdk-head .i { color: var(--text-3); }
.cmdk-head input { flex: 1; border: 0; background: transparent; font-size: var(--t-lg); outline: none; color: var(--text); min-width: 0; }
.cmdk-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.cmdk-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); }
.cmdk-list li a:hover, .cmdk-list li[aria-selected="true"] a { background: color-mix(in srgb, var(--core) 18%, transparent); text-decoration: none; }
.cmdk-list .i { width: 20px; height: 20px; color: var(--text-2); }
.cmdk-list b { font-weight: 600; }
.cmdk-list small { color: var(--text-3); margin-left: auto; font-size: var(--t-xs); white-space: nowrap; }
.cmdk-empty { padding: 26px; text-align: center; color: var(--text-3); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 200;
  padding: 12px 18px; font-size: var(--t-sm); font-weight: 600; transition: opacity .3s, transform .45s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 404 / aviso ────────────────────────────────────────────────────────── */
.notice { max-width: 640px; margin: clamp(40px, 10vh, 120px) auto; padding: clamp(28px, 5vw, 48px); text-align: center; display: grid; gap: 16px; justify-items: center; }
.notice h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4rem); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(40px, 7vw, 88px); }
.hero .section-head { max-width: 1000px; }
.hero .sigil { width: min(46vw, 210px); margin-bottom: 18px; }
.hero-title { font-size: var(--t-hero); letter-spacing: -.035em; line-height: 1.02; }
.hero .eyebrow.brandmark { font-size: var(--t-sm); letter-spacing: .5em; margin: 0; padding-left: .5em; }
.hero-window { max-width: 780px; margin-top: clamp(40px, 6vw, 72px); }

/* paleta no top layer: posição própria (o .glass usa relative) */
.cmdk { position: fixed; inset: 0; height: fit-content; }

/* enquadramento das fotos (ver data/people.json → focus) */
.avatar[data-person="gustavo-saez"] img { object-position: 50% 45%; }
.avatar[data-person="murilo-saez"] img { object-position: 50% 40%; }
.person .avatar:hover { text-decoration: none; }
.person p a.muted:hover { color: var(--text); }
