/* ian Lab 3D — página inicial. Mesmos tokens da Calculadora e do Extrusor. */

:root {
  --plate: #E6E8EB;
  --sheet: #FFFFFF;
  --ink: #15171C;
  --muted: #5D636D;
  --rule: #D3D7DD;
  --field: #F4F5F7;
  --pei: #B8862B;
  --pei-deep: #8C6316;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --plate: #111317; --sheet: #1A1D23; --ink: #ECEEF1; --muted: #9AA1AC;
    --rule: #2B3038; --field: #22262D; --pei: #D3A447; --pei-deep: #E8C072;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --plate: #111317; --sheet: #1A1D23; --ink: #ECEEF1; --muted: #9AA1AC;
  --rule: #2B3038; --field: #22262D; --pei: #D3A447; --pei-deep: #E8C072;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--plate);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pei); outline-offset: 3px; }

main { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.foot { width: calc(100% - 2 * var(--gutter)); max-width: calc(1180px - 2 * var(--gutter)); margin: 0 auto; }

/* ---------- Abertura ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(40px, 8vw, 96px) clamp(40px, 6vw, 72px);
}
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-variation-settings: "wdth" 87.5;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pei-deep);
}
.hero-title {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "wdth" 118;
  font-weight: 850;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lede { margin: 20px 0 0; max-width: 52ch; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-actions:empty { display: none; }
.hero-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.hero-note a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

.big-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: transform .15s, background .15s;
}
.big-group:hover { background: var(--pei-deep); color: #fff; transform: translateY(-1px); }
.big-group + .big-group { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.big-group + .big-group:hover { background: var(--ink); color: var(--sheet); }
.big-group svg, .small-group svg, .group-card-link svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.big-group svg .fill, .small-group svg .fill, .group-card-link svg .fill { fill: currentColor; stroke: none; }

/* A placa impressa com o QR do grupo */
.plaque-wrap { margin: 0; display: grid; justify-items: center; gap: 14px; perspective: 1100px; }
.plaque {
  position: relative;
  width: min(330px, 100%);
  padding: 22px 26px 18px;
  border-radius: 22px;
  background-color: #F4F3EF;
  /* linhas de camada vistas de frente, bem sutis */
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,.035) 0 1px, transparent 1px 3px);
  color: #17181B;
  text-align: center;
  transform: rotateX(8deg) rotateY(-14deg) rotateZ(1deg);
  box-shadow:
    1px 1px 0 #DCDAD3, 2px 2px 0 #D5D3CB, 3px 3px 0 #CECBC2, 4px 4px 0 #C7C4BA,
    5px 5px 0 #C0BDB2, 6px 6px 0 #B9B6AA,
    18px 26px 40px rgba(0,0,0,.22);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.plaque { margin-bottom: 30px; }
.plaque-wrap:hover .plaque { transform: rotateX(4deg) rotateY(-6deg) rotateZ(0deg); }
.plaque::after {
  content: "";
  position: absolute;
  left: 6%; right: -4%; bottom: -26px;
  height: 14px;
  border-radius: 3px;
  background:
    radial-gradient(circle, rgba(0,0,0,.2) .8px, transparent 1.2px) 0 0 / 4px 4px,
    linear-gradient(#C99A3E, #A97C2A);
  transform: translateZ(-30px);
}
.plaque-title {
  margin: 0 0 12px;
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  font-size: 19px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.plaque-qr { aspect-ratio: 1; width: 100%; max-width: 100%; }
.plaque-qr svg { display: block; width: 100%; height: auto; }
.plaque-qr svg rect[fill="#ffffff"], .plaque-qr svg path[fill="#ffffff"] { fill: transparent; }
.plaque-foot {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-variation-settings: "wdth" 87.5;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.plaque-tabs { display: flex; gap: 4px; margin-top: 0; padding: 3px; border-radius: 8px; background: var(--sheet); border: 1px solid var(--rule); }
.plaque-tabs:empty { display: none; }
.plaque-tabs button {
  border: 0; background: none; color: var(--muted);
  padding: 6px 14px; border-radius: 5px;
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.plaque-tabs button[aria-selected="true"] { background: var(--ink); color: var(--sheet); }
.plaque-caption { margin: 0; font-size: 13px; color: var(--muted); text-align: center; max-width: 34ch; }
.plaque-caption a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Seções ---------- */
.section-title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tools { padding-block: 24px 56px; border-top: 1px solid var(--rule); padding-top: 40px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.tool-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--sheet);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
a.tool-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.tool-art { width: 120px; height: 64px; margin-bottom: 6px; }
.art-base { fill: #F2F2EE; stroke: var(--rule); }
.art-hole { fill: var(--sheet); stroke: var(--rule); }
.art-text { fill: none; stroke: #7B50C8; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.art-plate { fill: var(--pei); }
.art-l1 { fill: #2E9C74; }
.art-l2 { fill: #DD5A35; }
.art-l3 { fill: #3A6BD4; }
.art-profit { fill: var(--pei); }
.art-line { stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 3 3; }
.tool-name {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
}
.tool-desc { color: var(--muted); font-size: 15px; }
.tool-go { margin-top: 6px; font-weight: 700; font-size: 14.5px; color: var(--pei-deep); }
.tool-next { background: transparent; border-style: dashed; }
.tool-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.small-group {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 99px;
  border: 1px solid var(--rule);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
}
.small-group:hover { border-color: var(--ink); }

.community {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: 40px 72px;
  border-top: 1px solid var(--rule);
}
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.perks li {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
  line-height: 1.45;
}
.perks li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 16px; height: 10px;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--pei) 0 2px, var(--pei-deep) 2px 3px);
}
.group-cards { display: grid; gap: 12px; align-content: start; }
.group-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--sheet);
  border: 1px solid var(--rule);
}
.group-card h3 { margin: 0; font-size: 17px; }
.group-card p { margin: 0; grid-column: 1; color: var(--muted); font-size: 14.5px; }
.group-card-link {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px 0 12px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  font-weight: 700;
}
.group-card-link:hover { background: var(--pei-deep); color: #fff; }
.dev-note {
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  border: 1.5px dashed var(--pei);
  color: var(--ink);
  font-size: 14.5px;
}
.dev-note code { font-family: var(--mono); font-size: 13px; color: var(--pei-deep); }

/* ---------- Rodapé ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding-block: 24px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}
.foot-brand { font-weight: 800; color: var(--ink); }
.foot-nav { display: flex; gap: 16px; margin-left: auto; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Telas menores ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .community { grid-template-columns: minmax(0, 1fr); }
}
/* No celular o QR não ajuda (a pessoa já está no celular): ficam os botões. */
@media (max-width: 640px) {
  .plaque-wrap { display: none; }
  .big-group { width: 100%; justify-content: center; }
  .foot-nav { margin-left: 0; width: 100%; }
  .group-card { grid-template-columns: minmax(0, 1fr); }
  .group-card-link { grid-column: 1; grid-row: auto; justify-content: center; margin-top: 8px; }
}
body.no-groups .hero { grid-template-columns: minmax(0, 1fr); }

@media (prefers-reduced-motion: reduce) {
  .plaque, .big-group, .tool-card { transition: none; }
}
