/* Base e identidade visual. */
:root {
  color-scheme: dark;
  --color-background: #030b09;
  --color-surface: #071511;
  --color-text: #f2f6f4;
  --color-muted: #acbcb7;
  --color-accent: #58f0bf;
  --color-border: #26493c;
  --content-width: 88rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --space: clamp(1.25rem, 2.5vw, 2.25rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* Uma única composição acompanha a altura total da página. */
  background-color: var(--color-background);
  background-image: radial-gradient(ellipse 75% 32% at -38% 18%, transparent 69%, #26af8320 69.3%, #26af8300 71%), radial-gradient(ellipse 80% 42% at 135% 66%, transparent 68%, #58f0bf18 68.3%, #58f0bf00 70%), radial-gradient(ellipse 65% 22% at 96% 14%, #0e382866, #0e382800 80%), radial-gradient(ellipse 55% 30% at 0% 56%, #0e38284d, #0e382800 85%), radial-gradient(ellipse 65% 24% at 95% 92%, #0e382855, #0e382800 85%);
  background-repeat: no-repeat;
  color: var(--color-text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-accent);
  color: #081711;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

button, input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 6px;
}

p {
  margin: 0 0 1.25rem;
}

.container {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #081711;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  padding-block: .85rem;
  border-bottom: 1px solid transparent;
}

.header-layout, .footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  text-decoration: none;
  line-height: 1;
}

.brand-name {
  font-size: 2.25rem;
  font-weight: 850;
  letter-spacing: -0.065em;
}

.brand-dot {
  color: var(--color-accent);
}

.brand-subtitle {
  margin-top: 0.55rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.36em;
}

.navigation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(1.25rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.navigation-list a {
  display: inline-block;
  padding-block: 0.65rem;
  color: #c8d3cf;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.navigation-list li:last-child a {
  color: var(--color-accent);
}

.navigation-list a:hover, .site-footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.section {
  padding-block: clamp(2.5rem, 4vw, 4rem);
  scroll-margin-top: 1.5rem;
}

.section + .section {
  border-top: 1px solid transparent;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.08;
  text-wrap: balance;
}

h2 {
  max-width: 22ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3.3vw, 3.25rem);
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 65ch;
  margin-bottom: 2.5rem;
  color: var(--color-muted);
}

.hero {
  position: relative;
}

.hero-layout {
  display: grid;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.hero-copy > p:first-child {
  margin-bottom: 1.5rem;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--color-accent);
}

.hero .section-intro {
  max-width: 51ch;
  margin-block: 1.15rem 1.5rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-visual img {
  width: 100%;
}

.laptop-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.laptop-terminal {
  width: 800px;
  height: 500px;
  padding: 42px 38px;
  overflow: hidden;
  background: linear-gradient(135deg, #091411, #030b09 70%, #0b2018);
  color: #f2f6f4;
  font: 24px / 32px Consolas, "Courier New", monospace;
  text-align: left;
  transform-origin: 0 0;
  /* Projeção do plano do terminal nos quatro cantos internos da tela. */
  transform: matrix3d(0.6186950186, -0.1181897296, 0, -0.0002653273, -0.2108770036, 0.8956090453, 0, -0.0000413406, 0, 0, 1, 0, 600, 130, 0, 1);
}

.terminal-line {
  display: block;
  height: 32px;
  white-space: pre;
  animation: terminal-type var(--duration) steps(var(--steps), end) var(--delay) both;
}

.terminal-output, .terminal-string {
  color: #79efc3;
}

.terminal-keyword {
  color: #c8a4ef;
}

.terminal-function {
  color: #f2f6f4;
}

@keyframes terminal-type {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-line {
    animation: none;
  }
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-height: 3.5rem;
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.5rem;
  background: var(--color-accent);
  color: #0a2018;
  font-weight: 750;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: box-shadow 180ms ease;
}

a.button:hover {
  background: #a0f5d6;
  border-color: #a0f5d6;
}

.project-grid, .service-grid, .quote-grid {
  display: grid;
  gap: var(--space);
}

.card, .selection-card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface);
}

.card {
  padding: var(--space);
}

figure {
  margin: 0;
}

.project-grid {
  gap: 1rem;
  grid-auto-rows: 1fr;
}

.project-grid .card {
  display: flex;
  flex-direction: column;
  padding: 0 0 clamp(1.25rem, 2.5vw, 2rem);
  overflow: hidden;
  border-color: #386c57;
  background: linear-gradient(145deg, #121e1b, #0e1514);
}

.project-grid figure {
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.project-grid .project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-grid .card > p, .project-grid .card > h3 {
  margin-inline: clamp(1.25rem, 2.5vw, 2rem);
}

.project-grid .card > p:last-child {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.project-kind {
  margin-bottom: 0.75rem;
  color: var(--color-accent);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#sobre .section-intro {
  margin-bottom: 0;
}

#sobre .section-intro p:first-child {
  color: #e0e8e4;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

#sobre .section-intro p:last-child {
  margin-bottom: 0;
}

.service-grid .card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.5vw, 2.5rem);
}

.service-grid h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.price {
  margin-block: .85rem;
  color: var(--color-accent);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.service-grid .card > p:last-child {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.quote-form {
  display: grid;
  justify-items: start;
  gap: 1.75rem;
  padding: var(--space);
}

fieldset {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 1rem;
  padding: 0;
  color: #e4ece8;
  font-size: 0.9375rem;
  font-weight: 650;
}

.selection-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.selection-card strong {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--color-text);
  font-weight: 600;
}

.selection-card input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.35rem 0 0;
  accent-color: var(--color-accent);
}

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid transparent;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.site-footer .brand {
  color: var(--color-text);
}

.site-footer .brand-name {
  font-size: 1.875rem;
}

.site-footer .brand + p {
  margin-top: 1rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  padding-block: 0.65rem;
}

/* Títulos, superfícies e detalhes dos serviços. */
.navigation-list li:last-child a, .button.secondary {
  border: 1px solid var(--color-accent);
  border-radius: .55rem;
  background: transparent;
  color: var(--color-accent);
  padding-inline: 1.3rem;
}

.hero h1, h2 {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .99;
}

.hero h1 {
  font-style: italic;
  max-width: 19ch;
  font-size: clamp(2.5rem,4.4vw,4.6rem);
}

h2 span {
  color: var(--color-accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-visual img {
  aspect-ratio: 533 / 367;
  object-fit: contain;
}

.service-grid .card, .quote-form {
  background: linear-gradient(140deg,#10291e,#050e0b 63%,#0b2119);
  border:1px solid #345d4c;
  border-radius:.85rem;
}

.service-grid .card::before {
  content:'';
  width:2rem;
  height:1.3rem;
  border:2px solid var(--color-accent);
  border-radius:.22rem;
  margin-bottom:1.25rem;
}

.service-grid .card:nth-child(2)::before {
  transform:skewY(-12deg);
  box-shadow: 0 4px #0b1b15,0 6px var(--color-accent);
}

.quote-form .selection-card, .quote-form button {
  cursor: pointer;
}

.site-footer nav a {
  margin-inline:.25rem;
}

.service-cost-notice {
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.service-cost-notice strong {
  color: var(--color-text);
  font-weight: 600;
}

@media (min-width: 44rem) {
  .project-grid, .quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .hero-layout {
    gap: 0;
  }
  .hero-visual {
    margin-right: -2rem;
    margin-left: 0;
  }
  #projetos > .container, #servicos > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
  }
  #projetos > .container > .section-intro, #servicos > .container > .section-intro {
    align-self: end;
    justify-self: end;
    max-width: 53ch;
  }
  .project-grid, .service-grid {
    grid-column: 1 / -1;
  }
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #sobre > .container {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 4rem;
  }
  #sobre h2::before {
    content: "";
    display: block;
    width: 3rem;
    height: 2px;
    margin-bottom: 1.5rem;
    background: var(--color-accent);
  }
  #orcamento > .container {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: clamp(3rem, 6vw, 6rem);
    align-content: start;
  }
  #orcamento h2 {
    grid-column: 1;
  }
  #orcamento .section-intro {
    grid-column: 1;
    margin-bottom: 1.5rem;
  }
  .quote-form {
    grid-column: 2;
    grid-row: 1 / 5;
  }
}

@media (min-width: 64rem) {
  #servicos .service-cost-notice {
    grid-column: 2;
    grid-row: 4;
    margin-top: 0;
  }
  .hero-layout {
    grid-template-columns: minmax(0,1fr) minmax(0,1.05fr);
  }
  #servicos > .container {
    grid-template-columns:minmax(0,.8fr) minmax(0,2.7fr);
    gap:1rem 2rem;
    align-items:start;
  }
  #servicos .service-grid {
    grid-column:2;
    grid-row:1 / 4;
    gap:1rem;
  }
  #servicos > .container > .section-intro {
    grid-column:1;
    margin:0;
  }
  .footer-layout > p {
    order:4;
    flex-basis:100%;
    border-top:1px solid transparent;
    padding-top:1rem;
  }
}

.project-preview {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 58%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.project-preview-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: #fff;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.project-preview:focus-visible {
  outline-offset: -4px;
}

.project-preview:focus-visible::after, .project-preview:focus-visible .project-preview-label {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .project-preview:hover::after, .project-preview:hover .project-preview-label {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-preview::after, .project-preview-label {
    transition: none;
  }
}

/* Mobile e tablet: a imagem e o SVG compartilham o mesmo plano de escala. */
@media (max-width: 63.999rem) {
  .container > *, .project-grid > *, .service-grid > *, .quote-grid > *, .header-layout nav, .footer-layout > *, .selection-card > span {
    min-width: 0;
  }
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }
  .hero h1 {
    max-width: 23ch;
    font-size: clamp(2.25rem, 6vw, 3.75rem);
    line-height: 1.05;
  }
  .hero .section-intro {
    max-width: 58ch;
  }
  .hero-visual {
    width: min(100%, 42.5rem);
    aspect-ratio: 1510 / 1041;
    margin: 0;
    justify-self: center;
    isolation: isolate;
    overflow: clip;
  }
  .hero-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 1510 / 1041;
    object-fit: contain;
  }
  .laptop-screen {
    display: block;
    overflow: hidden;
    aspect-ratio: 1510 / 1041;
    contain: paint;
  }
  .hero-actions .button {
    flex: 1 1 13rem;
    min-width: 0;
  }
  .button, .selection-card, .project-grid .card {
    overflow-wrap: anywhere;
  }
  .quote-form > .button {
    width: 100%;
  }
  .project-grid .card > h3 {
    line-height: 1.2;
  }
  .project-grid figure {
    position: relative;
  }
  .project-preview {
    position: absolute;
    inset: 0;
  }
  .quote-form {
    width: 100%;
  }
  .header-layout {
    gap: 1.25rem;
  }
  .navigation-list {
    gap: 0.5rem 1.25rem;
  }
  .navigation-list a {
    min-height: 2.75rem;
  }
  .footer-layout {
    gap: 1.5rem;
  }
}

@media (max-width: 43.999rem) {
  .site-header {
    padding-block: 0.75rem 0.25rem;
  }
  .header-layout {
    row-gap: 0.625rem;
  }
  .site-header .brand-name {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
  }
  .site-header .brand-subtitle {
    margin-top: 0.375rem;
    font-size: 0.5rem;
    letter-spacing: 0.28em;
  }
  .hero {
    padding-top: clamp(1rem, 3vw, 1.5rem);
  }
  .header-layout nav {
    width: 100%;
  }
  .navigation-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.25rem, 1vw, 0.5rem);
    align-items: center;
  }
  .navigation-list a, .navigation-list li:last-child a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: clamp(0.75rem, 3.2vw, 0.875rem);
    white-space: nowrap;
  }
  .navigation-list a:hover {
    color: #fff;
  }
  .hero-copy > p:first-child {
    font-size: 0.6875rem;
    letter-spacing: 0.075em;
  }
  .section-intro {
    margin-bottom: 1.75rem;
  }
  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 44rem) and (max-width: 63.999rem) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .header-layout nav {
    flex: 1 1 25rem;
  }
  .navigation-list {
    justify-content: flex-end;
  }
}

@media (max-width: 30rem) {
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .button {
    flex: none;
    width: 100%;
  }
  .laptop-terminal {
    font-size: 28px;
    padding-inline: 30px;
  }
}

@media (max-width: 24rem) {
  .hero h1 {
    font-size: clamp(1.875rem, 10vw, 2.25rem);
  }
  h2 {
    font-size: 1.75rem;
  }
  .selection-card {
    gap: 0.625rem;
    padding: 1rem;
  }
}


@media (hover: hover) and (pointer: fine) {
  .button:hover {
    box-shadow: 0 0 18px rgb(88 240 191 / 22%);
  }
}

.button:focus-visible {
  box-shadow: 0 0 18px rgb(88 240 191 / 22%);
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* É ativado antes da primeira pintura e removido se a inicialização falhar. */
.entrances-pending :is( .hero-copy h1, .section > .container > h2, .section > .container > p.section-intro, .hero-copy .section-intro, #sobre .section-intro p, .project-grid > .card, .service-grid > .card, .quote-form ):not(.entrance-started):not(:focus-within) {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .entrances-pending :is( .hero-copy h1, .section > .container > h2, .section > .container > p.section-intro, .hero-copy .section-intro, #sobre .section-intro p, .project-grid > .card, .service-grid > .card, .quote-form ) {
    visibility: visible;
  }
}
