/* ==========================================================================
   Seções — hero, sobre, projetos, metodologia, labs, contato, footer
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: calc(var(--header-h) + clamp(1.5rem, 1rem + 2vw, 2.75rem));
  padding-bottom: var(--space-9);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(99 102 241 / 0.16), transparent 60%),
    radial-gradient(45rem 28rem at 0% 20%, rgb(37 99 235 / 0.12), transparent 60%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(15 23 42 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(15 23 42 / 0.045) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.hero__grid {
  display: grid;
  align-items: center;
  gap: var(--space-8);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-5);
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.8);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
}

.hero__tag-dot {
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__title {
  font-size: var(--text-h1);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero__lead {
  max-width: 34rem;
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-6);
  margin-top: var(--space-7);
  padding: 0;
  list-style: none;
}

.hero__proof strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-strong);
}

.hero__proof span {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Visual conceitual do hero */
.hero__visual {
  position: relative;
  padding: var(--space-5) 0 var(--space-6);
}

.studio-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: float-y 8s ease-in-out infinite;
}

.studio-panel__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.studio-panel__bar i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.studio-panel__bar i:nth-child(1) {
  background: #fca5a5;
}

.studio-panel__bar i:nth-child(2) {
  background: #fcd34d;
}

.studio-panel__bar i:nth-child(3) {
  background: #86efac;
}

.studio-panel__bar span {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.studio-panel__list {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  list-style: none;
}

.studio-panel__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) ease;
}

.studio-panel__item:first-child {
  background: var(--color-bg);
}

.studio-panel__item img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
}

.studio-panel__item div {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.studio-panel__item strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-strong);
}

.studio-panel__item small {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.studio-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.studio-panel__foot svg {
  width: 6.5rem;
  height: 2rem;
}

.studio-panel__foot b {
  color: var(--status-live-fg);
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.95);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-strong);
}

.float-chip svg {
  width: 1rem;
  height: 1rem;
  color: var(--color-indigo-600);
}

.float-chip--1 {
  top: -0.25rem;
  right: -0.5rem;
  animation: float-y 6s ease-in-out -2s infinite;
}

.float-chip--2 {
  bottom: 2.5rem;
  left: -1.5rem;
  animation: float-y 7s ease-in-out -4s infinite;
}

.float-chip--3 {
  right: 1rem;
  bottom: -0.5rem;
  animation: float-y 6.5s ease-in-out -1s infinite;
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-0.6rem);
  }
}

@media (max-width: 64rem) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    max-width: 34rem;
  }

  .float-chip--2 {
    left: -0.5rem;
  }
}

@media (max-width: 36rem) {
  .hero__visual {
    padding: 0;
  }

  .studio-panel__item {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .studio-panel__item .badge {
    margin-left: 3.15rem;
  }

  .float-chip {
    position: static;
    margin-top: var(--space-3);
    margin-right: var(--space-2);
    animation: none;
  }
}

/* ---------- Sobre / Manifesto ---------- */
.about__intro {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  margin-bottom: var(--space-7);
}

.about__intro p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.about__intro p + p {
  margin-top: var(--space-4);
}

.about__intro strong {
  color: var(--color-text-strong);
}

.grid-4 {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.principles {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: var(--space-7);
}

.principle {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--color-text-strong);
  color: #cbd5e1;
}

.principle:nth-child(1) {
  background: var(--gradient-brand);
  color: rgb(255 255 255 / 0.88);
}

.principle h3 {
  margin-bottom: var(--space-3);
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #fff;
}

.principle p,
.principle li {
  font-size: var(--text-sm);
}

.principle ul {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.principle li strong {
  color: #fff;
}

.principle__label {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

@media (max-width: 52rem) {
  .about__intro {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ---------- Projetos ---------- */
.projects__grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
}

.projects__empty {
  padding: var(--space-7);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-text-muted);
}

/* ---------- Metodologia ---------- */
.steps {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-indigo-600);
}

.step h3 {
  margin-bottom: var(--space-2);
  font-size: 1.1875rem;
  font-weight: 750;
}

.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.stack {
  margin-top: var(--space-7);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
}

.stack__title {
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---------- Algor Labs ---------- */
.labs {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.labs::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgb(245 158 11 / 0.1), transparent 60%),
    radial-gradient(40rem 24rem at 0% 100%, rgb(99 102 241 / 0.1), transparent 60%);
}

.labs__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.lab-card .badge {
  margin-bottom: var(--space-4);
}

.lab-card--cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  border-style: dashed;
  border-color: var(--color-border-strong);
  background: rgb(255 255 255 / 0.6);
}

/* ---------- Contato ---------- */
.contact__panel {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 4rem);
  border-radius: calc(var(--radius-xl) + 0.5rem);
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgb(99 102 241 / 0.45), transparent 60%),
    var(--color-text-strong);
  box-shadow: var(--shadow-lg);
  color: #cbd5e1;
}

.contact__panel .eyebrow {
  color: #a5b4fc;
}

.contact__panel .eyebrow::before {
  background: #a5b4fc;
}

.contact__panel .section-title {
  color: #fff;
}

.contact__panel .section-lead {
  color: #cbd5e1;
}

.contact__links {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.06);
  color: #fff;
  text-decoration: none;
  transition:
    transform var(--duration-base) var(--ease-out),
    background-color var(--duration-base) ease,
    border-color var(--duration-base) ease;
}

.contact-link:hover {
  color: #fff;
  transform: translateX(4px);
  border-color: rgb(165 180 252 / 0.55);
  background: rgb(255 255 255 / 0.11);
}

.contact-link__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 0.12);
}

.contact-link__icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.contact-link__text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.contact-link__text strong {
  display: block;
  font-size: var(--text-base);
}

.contact-link__text span {
  font-size: var(--text-sm);
  color: #cbd5e1;
  overflow-wrap: anywhere;
}

.contact-link > svg {
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.6;
}

@media (max-width: 52rem) {
  .contact__panel {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-7) var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
}

.site-footer__about p {
  max-width: 24rem;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
}

.site-footer h2 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.site-footer ul {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.site-footer ul a {
  color: var(--color-text);
  text-decoration: none;
}

.site-footer ul a:hover {
  color: var(--color-brand-600);
  text-decoration: underline;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 40rem) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__about {
    grid-column: 1 / -1;
  }
}

/* ---------- Revelação ao rolar (progressive enhancement, sem JS) ---------- */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 18%;
    }
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
