/* bygoncalo.web
   Preto e branco como a marca: a única cor da página vem dos logótipos dos clientes. */

/* ---------- Tokens ---------- */
:root {
  --black: #000;
  --surface: #0d0d0d;
  --surface-2: #171717;
  --line: #242424;
  --line-strong: #474747;
  --white: #fff;
  --text: #b9b9b9;
  --dim: #858585;
  --error: #ff8f85;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --wrap: 73.75rem;
  --section-space: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 4.25rem;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  --z-header: 10;
  --z-skip: 20;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--white); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: var(--z-skip);
  padding: .6rem 1rem;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-s);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
    color .2s var(--ease), transform .2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--solid {
  background: var(--white);
  color: var(--black);
}

.btn--solid:hover { background: #d6d6d6; }

.btn--line {
  border-color: var(--line-strong);
  color: var(--white);
}

.btn--line:hover {
  border-color: var(--white);
  background: var(--surface-2);
}

.btn--block { width: 100%; }

.btn[disabled] {
  opacity: .6;
  cursor: progress;
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  text-decoration: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2rem);
}

.site-nav a {
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="true"] { color: var(--white); }

.site-nav a[aria-current="true"]:not(.site-nav__cta) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .45em;
}

.site-nav .site-nav__cta {
  display: inline-block;
  padding: .5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  color: var(--white);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.site-nav .site-nav__cta:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.6rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin-inline: auto;
  background: var(--white);
  transition: transform .25s var(--ease);
}

.nav-toggle__bars { transform: translateY(-4px); }

.nav-toggle__bars::before {
  content: "";
  transform: translateY(8px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(-90deg); }

@media (max-width: 52rem) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--black);
    border-bottom: 1px solid var(--line);
  }

  .site-header.is-open .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a:not(.site-nav__cta) {
    display: block;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }

  .site-nav .site-nav__cta {
    display: block;
    margin-top: 1.25rem;
    padding: .85rem 1rem;
    text-align: center;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 9vw, 6.5rem));
}

.hero__title {
  max-width: 13ch;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8.4vw, 7rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.hero__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.75rem 3rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.hero__lead p {
  max-width: 34ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.45;
}

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

/* Janela de browser com os sites dos clientes */
.browser {
  margin-top: clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.browser__bar {
  display: flex;
  align-items: end;
  gap: 1rem;
  padding: .6rem .75rem 0 1rem;
}

.browser__dots {
  display: flex;
  gap: .4rem;
  padding-bottom: .95rem;
}

.browser__dots i {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.browser__tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.browser__tabs::-webkit-scrollbar { display: none; }

.browser__tab {
  flex: none;
  padding: .6rem 1.1rem;
  background: none;
  border: 0;
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  color: var(--dim);
  font-size: .875rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.browser__tab:hover { color: var(--white); }

.browser__tab[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--white);
}

.browser__tab:focus-visible { outline-offset: -3px; }

.browser__address {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.1rem;
  background: var(--surface-2);
  color: var(--dim);
  font-size: .9rem;
}

.browser__url {
  color: var(--white);
  white-space: nowrap;
}

.browser__url.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.18em;
  background: var(--white);
}

.browser__stage {
  display: block;
  text-decoration: none;
}

.browser__logos {
  position: relative;
  display: block;
  height: clamp(13rem, 36vw, 27rem);
  background: var(--stage, var(--black));
  transition: background-color .45s var(--ease);
}

.browser__logos img {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 78%;
  margin: auto;
  opacity: 0;
  transition: opacity .45s var(--ease);
}

.browser__logos img.is-active { opacity: 1; }

.browser__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.1rem;
  border-top: 1px solid var(--line);
}

.browser__name {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.browser__visit {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.browser__stage:hover .browser__visit { color: var(--white); }

/* Entrada do hero: o único momento de animação automática da página */
@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__lead,
  .browser {
    animation: hero-in .8s var(--ease) both;
  }

  .hero__lead { animation-delay: .1s; }
  .browser { animation-delay: .22s; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(1.25rem); }
}

/* ---------- Secções ---------- */
.section {
  padding-block: var(--section-space);
  border-bottom: 1px solid var(--line);
}

.hero + .section { margin-top: var(--section-space); border-top: 1px solid var(--line); }

.section__title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.section__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}

.section__head p { max-width: 46ch; }

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 3rem;
  }
}

/* ---------- Sobre ---------- */
.about {
  display: grid;
  gap: 1.5rem;
}

.about p { max-width: 58ch; }

.about .about__statement {
  max-width: 26ch;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.1vw, 2.4rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.025em;
  text-wrap: pretty;
}

/* ---------- Serviços ---------- */
.services__row {
  display: grid;
  gap: .4rem 3rem;
  padding-block: clamp(1.4rem, 3vw, 2.1rem);
  border-top: 1px solid var(--line);
}

.services__row:last-child { border-bottom: 1px solid var(--line); }

.services dt {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.services dd { max-width: 48ch; }

@media (min-width: 60rem) {
  .services__row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: baseline;
  }
}

/* ---------- Clientes ---------- */
.clients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1rem;
}

@media (min-width: 48rem) {
  .clients {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.75rem 1.5rem;
  }
}

.client {
  display: grid;
  gap: .2rem;
  text-decoration: none;
}

.client__logo {
  position: relative;
  aspect-ratio: 3 / 2;
  margin-bottom: .8rem;
  overflow: hidden;
  background: var(--stage, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: border-color .25s var(--ease);
}

.client__logo img {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  max-width: 68%;
  max-height: 74%;
  margin: auto;
  transition: transform .4s var(--ease);
}

/* cliente sem logótipo próprio: a imagem preenche o cartão */
.client__logo--photo img,
.browser__logos img.is-photo {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.client:hover .client__logo { border-color: var(--line-strong); }
.client:hover .client__logo img { transform: scale(1.04); }

.client__name {
  color: var(--white);
  font-weight: 600;
}

.client__domain {
  color: var(--dim);
  font-size: .9rem;
  overflow-wrap: anywhere;
  transition: color .2s var(--ease);
}

.client:hover .client__domain { color: var(--white); }

/* ---------- Processo ---------- */
.steps {
  display: grid;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1.4;
}

.steps li::before {
  content: counter(step);
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}

@media (min-width: 60rem) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .steps li {
    grid-template-columns: none;
    align-content: start;
    gap: 2.25rem;
    padding-block: 1.25rem 0;
    border-top-color: var(--line-strong);
    font-size: 1.0625rem;
  }

  .steps li::before { font-size: 3rem; }
}

/* ---------- Contacto ---------- */
.contact-info {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}

.contact-info p { max-width: 34ch; }

.contact-list {
  display: grid;
  gap: .7rem;
  margin-top: .5rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.contact-list a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  overflow-wrap: anywhere;
  transition: text-decoration-color .2s var(--ease);
}

.contact-list a:hover { text-decoration-color: var(--white); }

.form {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: 1 / -1; }
}

.field {
  display: grid;
  align-content: start;
  gap: .45rem;
}

.field label {
  color: var(--white);
  font-size: .9rem;
  font-weight: 500;
}

.field__optional {
  color: var(--dim);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  color: var(--white);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.field textarea {
  min-height: 9.5rem;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b9b9b9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.field option {
  background: var(--surface);
  color: var(--white);
}

.field ::placeholder {
  color: var(--dim);
  opacity: 1;
}

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-strong); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--white);
  background-color: var(--black);
}

.field [aria-invalid="true"] { border-color: var(--error); }

.field__error {
  color: var(--error);
  font-size: .875rem;
}

.form__footer {
  display: grid;
  gap: .9rem;
  margin-top: .25rem;
}

.form__status { font-size: .95rem; }
.form__status:empty { display: none; }
.form__status.is-success { color: var(--white); }
.form__status.is-error { color: var(--error); }

/* ---------- Rodapé ---------- */
.site-footer {
  padding-block: 2.25rem 2.75rem;
  color: var(--dim);
  font-size: .9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
}

.site-footer a {
  text-underline-offset: .3em;
  transition: color .2s var(--ease);
}

.site-footer a:hover { color: var(--white); }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
