/* ILUSTRATON · site styles (the opening screen styles live inline in index.html) */

:root {
  --font-title: "Grandstander", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Gochi Hand", "Comic Sans MS", cursive;
  --radius: 12px;
  --gutter: 16px;
  --header-h: 62px;
  --logo-header-w: 120px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 76px; --logo-header-w: 160px; }
}

html { background: var(--papel); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--papel);
  color: var(--marca-nanquim);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
img { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-title); font-weight: 800; line-height: 1.12; }

:focus-visible { outline: 3px solid var(--marca-nanquim); outline-offset: 3px; border-radius: 4px; }

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Shared bits ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--amarelo-assinatura);
  color: var(--marca-nanquim);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--marca-nanquim);
  transition: transform .2s ease;
}
.btn:hover { animation: btn-bounce .55s cubic-bezier(.3, 1.6, .5, 1); }
.btn:active { transform: translateY(2px); }
@keyframes btn-bounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-5px) scale(1.04, .97); }
  65% { transform: translateY(1px) scale(.98, 1.02); }
  100% { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .btn:hover { animation: none; } }

/* Handwritten note on a small yellow tag */
.tag {
  display: inline-block;
  background: var(--amarelo-assinatura);
  color: var(--marca-nanquim);
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1.25;
  padding: 3px 12px 4px;
  border-radius: 4px;
  transform: rotate(-2deg);
}

/* Image placeholder: drop the .webp at the shown path and the real image covers it */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  background: var(--azul-ceu);
  border: 2px dashed var(--marca-nanquim);
  border-radius: var(--radius);
  color: var(--marca-nanquim);
  font-size: .95rem;
  line-height: 1.35;
}
.ph__file { font-weight: 700; font-size: .8rem; letter-spacing: .02em; opacity: .75; }

.section { padding: 56px var(--gutter) 72px; max-width: 1200px; margin: 0 auto; }
.section__title { font-size: clamp(2rem, 6vw, 3.4rem); text-align: center; }
.section__subtitle { text-align: center; margin-top: 8px; font-size: 1.125rem; }

/* ---------- Header + logo ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--amarelo-assinatura);
  box-shadow: 0 2px 0 rgba(30, 42, 74, .08);
  opacity: 0;
  transition: opacity .4s ease .35s;
}
.site-header.is-docked { pointer-events: auto; }
.site-header.is-docked::before { opacity: 1; }

.site-header__home {
  display: block;
  width: var(--logo-header-w);
  aspect-ratio: 462.71 / 132.6;
  flex: none;
}
.site-header__home .site-logo { width: 100%; }
.site-logo { position: relative; will-change: transform; }
.site-logo__art { transform-origin: 50% 60%; }

/* Nav: desktop row */
.site-nav { position: relative; }
.site-nav__list { list-style: none; display: flex; gap: 6px; }
.site-nav__item a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  color: var(--marca-nanquim);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
}
.site-nav__item a::before {
  content: "";
  position: absolute;
  inset: 6px 4px;
  z-index: -1;
  background: var(--amarelo-assinatura);
  border-radius: 10px;
  transform: scale(.4, .2) rotate(-2deg);
  opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s ease;
}
.site-nav__item a:hover::before,
.site-nav__item a:focus-visible::before { transform: scale(1) rotate(-2deg); opacity: 1; }
.site-nav__item a::after {
  content: "";
  position: absolute;
  right: 6px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral-detalhe);
  transform: scale(0);
  transition: transform .3s cubic-bezier(.3, 1.8, .5, 1);
}
.site-nav__item a:hover::after { transform: scale(1); }

.site-nav__toggle { display: none; }

/* JS state: hidden until the logo docks (GSAP animates them in) */
.js .site-nav__item,
.js .site-nav__toggle { opacity: 0; visibility: hidden; }
.no-gsap .is-docked .site-nav__item,
.no-gsap .is-docked .site-nav__toggle { opacity: 1; visibility: visible; }

/* Nav: mobile round button + dropdown */
@media (max-width: 767.98px) {
  .site-nav__toggle {
    display: grid;
    place-content: center;
    gap: 5px;
    width: 48px; height: 48px;
    border: 2px solid var(--marca-nanquim);
    border-radius: 50%;
    background: var(--amarelo-assinatura);
    box-shadow: 0 3px 0 var(--marca-nanquim);
    cursor: pointer;
  }
  .site-nav__toggle span {
    display: block;
    width: 20px; height: 3px;
    border-radius: 3px;
    background: var(--marca-nanquim);
    transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s;
  }
  .site-nav.is-open .site-nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-nav.is-open .site-nav__toggle span:nth-child(2) { opacity: 0; }
  .site-nav.is-open .site-nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .js .site-nav__list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 4px 0;
    visibility: hidden;
  }
  .js .site-nav.is-open .site-nav__list { visibility: visible; }
  .js .site-nav__item a {
    background: var(--papel);
    border: 2px solid var(--marca-nanquim);
    border-radius: var(--radius);
    padding: 10px 18px;
    box-shadow: 0 3px 0 var(--marca-nanquim);
  }
  .js .site-nav__item a::before { inset: 0; border-radius: 10px; }
  /* Without JS: compact row of links */
  html:not(.js) .site-nav__list { gap: 0; }
  html:not(.js) .site-nav__item a { padding: 8px; font-size: .9rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Exactly one screen below the sticky header (grows only if the content cannot fit) */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}
.hero__slider { position: relative; flex: 1 1 auto; min-height: 160px; width: 100%; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide .ph { border-radius: 0; border-width: 3px; inset: 0; font-size: 1rem; }
.hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .hero__slide { transition-duration: .6s; } }

.hero__dots {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  z-index: 2;
  display: flex;
  gap: 2px;
}
.hero__dot {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.hero__dot::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--papel);
  border: 2px solid var(--marca-nanquim);
  transition: transform .3s cubic-bezier(.3, 1.8, .5, 1);
}
.hero__dot[aria-current="true"]::before { background: var(--amarelo-assinatura); transform: scale(1.3); }
.hero__dot:hover::before { transform: scale(1.3); }

.hero__card { position: relative; margin: -28px var(--gutter) 0; z-index: 3; }
.hero__card-bg { position: absolute; inset: -6px -10px; width: calc(100% + 20px); height: calc(100% + 12px); fill: var(--papel); }
.hero__card-body { position: relative; padding: 28px 22px 30px; }
.hero__title { font-size: clamp(2rem, 7.4vw, 3.6rem); }
.hero__card-body .tag { margin-top: 14px; }
.hero__seo { margin-top: 14px; font-size: .875rem; line-height: 1.45; opacity: .78; max-width: 46ch; }
.hero__actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Desktop: the slides fill the whole screen below the header; title, text and buttons sit below them. */
@media (min-width: 900px) {
  .hero__slider {
    flex: none;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
  }
  .hero__slide .ph { align-items: center; padding-right: 16px; text-align: center; }
  .hero__dots { bottom: 20px; left: 50%; right: auto; translate: -50% 0; }
  .hero__card { margin: 0 auto; max-width: 860px; text-align: center; }
  .hero__card-bg { display: none; }
  .hero__card-body { padding: 56px var(--gutter) 64px; }
  .hero__title { font-size: clamp(2.4rem, 4vw, 3.6rem); }
  .hero__seo { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
}

/* ---------- Dividers ---------- */

.divider { padding: 8px var(--gutter); max-width: 1280px; margin: 0 auto; }
.divider svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- About ---------- */

.about .section__title { margin-bottom: 40px; }
.about-block { display: grid; gap: 28px; align-items: center; margin-bottom: 64px; }
.about-block__media { position: relative; aspect-ratio: 4 / 3; }
.about-block__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
/* Transparent cut-out illustration: show it whole, no placeholder box behind it */
.about-block__media--cutout img { object-fit: contain; border-radius: 0; }
.about-block__media--cutout:has(img) .ph { display: none; }
.tag--media { position: absolute; left: -6px; top: -14px; z-index: 2; }
.about-block--flip .tag--media { left: auto; right: -6px; transform: rotate(2deg); }
.about-block__text h3 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); margin-bottom: 12px; }
.about-block__text p { max-width: 48ch; }

@media (min-width: 768px) {
  .about-block { grid-template-columns: 1fr 1fr; gap: 56px; margin-bottom: 88px; }
  .about-block--flip .about-block__media { order: 2; }
}

.about__cta { text-align: center; }
.about__cta p { font-family: var(--font-title); font-weight: 800; font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 18px; }

/* ---------- Portfolio ---------- */

.cards { margin-top: 36px; display: grid; gap: 36px 28px; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card__link {
  position: relative;
  display: block;
  color: var(--marca-nanquim);
  text-decoration: none;
  transition: transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.card__link::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  aspect-ratio: 808 / 632;
  border-radius: var(--radius);
  box-shadow: 0 16px 30px rgba(30, 42, 74, .18);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.card:hover .card__link,
.card__link:focus-visible { transform: translateY(-8px) rotate(-1.2deg); }
.card:nth-child(even):hover .card__link { transform: translateY(-8px) rotate(1.2deg); }
.card:hover .card__link::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .card__link { transition: none; }
  .card:hover .card__link, .card:nth-child(even):hover .card__link { transform: none; }
}

/* Thumbnails keep the Behance cover shape (808 x 632), so covers are never cropped */
.card__thumb { position: relative; aspect-ratio: 808 / 632; border-radius: var(--radius); overflow: hidden; background: var(--azul-ceu); }
.card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph--card { background: var(--papel); font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; }
.card__kind { margin-top: 14px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.card__title { font-size: 1.35rem; margin-top: 2px; }
.card__desc { margin-top: 6px; font-size: 1rem; line-height: 1.5; }
.card__title:empty, .card__desc:empty { display: none; }
.card__more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--amarelo-assinatura);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Contact ---------- */

.contact { text-align: center; padding-bottom: 96px; }
.contact__mail { margin: 16px 0 24px; font-size: 1.2rem; }
.contact__mail a { color: var(--marca-nanquim); font-weight: 700; text-decoration-color: var(--amarelo-assinatura); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Scroll hint (first screen only) ---------- */

.opening { position: relative; }
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 32px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--marca-nanquim);
  cursor: pointer;
}
.js .scroll-hint { opacity: 0; visibility: hidden; }
.no-gsap .scroll-hint { opacity: 1; visibility: visible; }
.scroll-hint__arrows { display: block; width: 30px; height: 30px; overflow: visible; }
@media (min-width: 768px) { .scroll-hint__arrows { width: 36px; height: 36px; } }
.scroll-hint__arrows path {
  fill: none;
  stroke: var(--marca-nanquim);
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
/* "Boiling line": one of three hand-drawn versions is shown at a time */
.scroll-hint__arrows[data-frame="0"] .f0,
.scroll-hint__arrows[data-frame="1"] .f1,
.scroll-hint__arrows[data-frame="2"] .f2 { opacity: 1; }

/* ---------- Social links under the logo (first screen) ---------- */

.socials {
  position: absolute;
  top: calc(100% + clamp(14px, 3vw, 28px));
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: clamp(4px, 1.4vw, 12px);
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--marca-nanquim);
}
/* Same brush-pen look as the scroll arrows: thick round strokes, slightly wobbly hand-drawn paths */
.socials svg,
.contact-socials svg,
.whatsapp-float svg {
  width: 28px; height: 28px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 100%;
}
.socials svg .dot,
.contact-socials svg .dot { stroke-width: 6; }
@media (min-width: 768px) { .socials svg, .contact-socials svg { width: 32px; height: 32px; } }

/* ---------- Social links under the contact e-mail (static) ---------- */

.contact-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(4px, 1.4vw, 12px);
  margin: -8px 0 28px;
}
.contact-socials a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--marca-nanquim);
}

/* ---------- Floating WhatsApp button ---------- */

.whatsapp-float {
  position: fixed;
  right: var(--gutter);
  bottom: 16px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--amarelo-assinatura);
  border: 2px solid var(--marca-nanquim);
  box-shadow: 0 3px 0 var(--marca-nanquim);
  color: var(--marca-nanquim);
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float svg .handset { stroke-width: 4; }
.whatsapp-float:hover { animation: btn-bounce .55s cubic-bezier(.3, 1.6, .5, 1); }
@media (min-width: 768px) { .whatsapp-float { bottom: 24px; width: 60px; height: 60px; } }
@media (prefers-reduced-motion: reduce) { .whatsapp-float:hover { animation: none; } }
/* Hidden on the first screen; the script jumps it in once the logo docks in the header */
.js .whatsapp-float { opacity: 0; visibility: hidden; transform-origin: 50% 100%; }
.no-gsap .whatsapp-float.is-visible { opacity: 1; visibility: visible; }
