/* Diogo Pinto — site
   Identidade: símbolo dp, Verde Pinto, Grafite, Papel, IBM Plex. */

:root {
  --paper: #f4f4f1;
  --white: #ffffff;
  --ink: #16181d;
  --body: #3a3d45;
  --grey: #5a5d66;
  --line: #e2e2dd;
  --green: #0b7a5c;
  --green-deep: #085c45;
  --green-ink: #06402f;
  --mint: #dcefe8;
  --on-ink: #b9bcc4;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 12px;
  --radius-lg: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgba(22, 24, 29, 0.06), 0 12px 32px -12px rgba(22, 24, 29, 0.18);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: #b7b9b2 var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--green);
  overflow-x: clip;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.97);
}
.btn--green {
  background: var(--green);
  color: var(--white);
}
.btn--green:hover {
  background: var(--green-deep);
}
.btn--line {
  border-color: rgba(22, 24, 29, 0.22);
  color: var(--ink);
  background: transparent;
}
.btn--line:hover {
  border-color: var(--ink);
}
.btn--white {
  background: var(--white);
  color: var(--green-ink);
}
.btn--white:hover {
  background: var(--mint);
}
.btn--lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.0625rem;
}
.btn .icon {
  width: 22px;
  height: 22px;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.link-arrow .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease-out);
}
.link-arrow:hover .icon {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 244, 241, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand__mark {
  width: 34px;
  height: 34px;
  fill: var(--green);
  transition: transform 0.6s var(--ease-out);
}
.brand:hover .brand__mark {
  transform: rotate(180deg);
}
.brand__type {
  width: 94px;
  height: 34px;
  fill: var(--ink);
}
.site-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-link {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--body);
  padding: 8px 0;
  transition: color 0.2s;
}
.site-link:hover,
.site-link[aria-current="page"] {
  color: var(--ink);
}
.site-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.site-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-actions .btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: var(--white);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  font: 500 0.75rem/1 var(--mono);
  color: var(--grey);
  min-width: 34px;
  min-height: 30px;
  border-radius: 6px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    gap: 12px;
  }
  .site-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 32px -24px rgba(22, 24, 29, 0.25);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0s 0.25s;
  }
  .site-menu.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 0.2s, transform 0.25s var(--ease-out);
  }
  .site-link {
    padding: 14px 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line);
  }
  .site-link[aria-current="page"] {
    text-underline-offset: 6px;
  }
}
@media (max-width: 520px) {
  .site-actions .btn span {
    display: none;
  }
  .site-actions .btn {
    width: 44px;
    padding: 0;
  }
  .brand__mark {
    width: 30px;
    height: 30px;
  }
  .brand__type {
    width: 83px;
    height: 30px;
  }
}

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

.hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}
.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: clamp(8px, 3vw, 40px) 0;
}
.hero__title {
  font-size: clamp(2.5rem, 1.1rem + 4.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.hero__title em {
  font-style: normal;
  color: var(--green);
}
.hero__lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--body);
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--grey);
}
.hero__note span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__note span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero__panel {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-lg);
  background: var(--green);
  overflow: hidden;
  isolation: isolate;
}
.hero__panel-mark {
  position: absolute;
  width: 128%;
  left: -14%;
  top: 6%;
  fill: rgba(255, 255, 255, 0.09);
  z-index: -1;
  transform: rotate(var(--turn, 0deg));
  will-change: transform;
}
.hero__portrait {
  position: absolute;
  left: 50%;
  bottom: -18%;
  height: 112%;
  width: auto;
  max-width: none;
  transform: translateX(-46%);
  filter: drop-shadow(0 24px 30px rgba(22, 24, 29, 0.35));
}
.hero__tag {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(22, 24, 29, 0.35);
}
.hero__tag img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.hero__tag strong {
  display: block;
  font-size: 0.9375rem;
}
.hero__tag span {
  color: var(--grey);
  font-size: 0.875rem;
}
.hero__tag .status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green-deep);
  white-space: nowrap;
}
.hero__tag .status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1fa77c;
}

/* Proof strip */
.proof {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.proof .stat strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
}
.proof .stat span {
  color: var(--grey);
  font-size: 0.9375rem;
}

@media (max-width: 920px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__panel {
    min-height: 0;
    aspect-ratio: 4 / 4.2;
    max-height: 560px;
  }
  .hero__title {
    max-width: 14ch;
  }
}
@media (max-width: 640px) {
  .proof {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero__panel {
    aspect-ratio: 1 / 1;
  }
  .hero__note #heroBadge {
    display: none;
  }
  .hero__tag {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .hero__tag .status {
    display: none;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* Entrance: one moment, on load */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.9s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  .hero__panel.rise {
    animation-name: panel;
    animation-duration: 1.1s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}
@keyframes panel {
  from {
    clip-path: inset(18% 0 0 0 round 24px);
    opacity: 0.4;
  }
  to {
    clip-path: inset(0 0 0 0 round 24px);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: var(--section) 0;
}
.section--tight-top {
  padding-top: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-title {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.section-sub {
  max-width: 36em;
  color: var(--body);
  font-size: 1.0625rem;
}

/* ---------- Work ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out), border-color 0.35s;
}
a.project-card:hover,
.project-card.has-gallery:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: #d3d3cd;
}
.project-card__shot {
  order: -1;
  position: relative;
  margin: 12px 12px 0;
  border-radius: 14px 14px 0 0;
  background: #ecece8;
  padding-top: 26px;
  overflow: hidden;
}
.project-card__shot::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9c9c3;
  box-shadow: 13px 0 0 #c9c9c3, 26px 0 0 #c9c9c3;
}
.project-card__shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.6s var(--ease-out), object-position 3.5s ease-in-out;
}
a.project-card:hover .project-card__shot img,
.project-card.has-gallery:hover .project-card__shot img {
  object-position: bottom center;
}
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px 28px;
  flex: 1;
}
.project-card__title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.project-card__body p {
  color: var(--body);
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card__visit {
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--green);
}
.project-card__visit .icon {
  width: 18px;
  height: 18px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green-deep);
  background: var(--mint);
  border-radius: 999px;
  padding: 4px 10px;
}
.project-grid--feature .project-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.project-grid--feature .project-card:first-child .project-card__shot {
  margin: 12px 0 12px 12px;
  border-radius: 14px;
}
.project-grid--feature .project-card:first-child .project-card__shot img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 380px;
  max-height: 460px;
}
.project-grid--feature .project-card:first-child .project-card__body {
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
}
.project-grid--feature .project-card:first-child .project-card__title {
  font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem);
}
.project-grid--feature .project-card:first-child p {
  -webkit-line-clamp: 6;
}
.project-empty {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--grey);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

@media (max-width: 860px) {
  .project-grid,
  .project-grid--feature .project-card:first-child {
    grid-template-columns: 1fr;
  }
  .project-grid--feature .project-card:first-child .project-card__shot {
    margin: 12px 12px 0;
    border-radius: 14px 14px 0 0;
  }
  .project-grid--feature .project-card:first-child .project-card__shot img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

.project-card__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: inherit;
}
.project-card__open:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.project-card.has-gallery .project-card__visit {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  text-decoration: none;
}
.project-card.has-gallery .project-card__visit:hover {
  text-decoration: underline;
}
.project-card__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.82);
  color: var(--white);
  font-size: 0.75rem;
}

/* ---------- Project screens viewer ---------- */

.has-lightbox {
  overflow: hidden;
}
.lightbox {
  width: min(1240px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.lightbox[open] {
  display: flex;
  flex-direction: column;
}
.lightbox::backdrop {
  background: rgba(10, 12, 15, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] {
    animation: lightbox-in 0.35s var(--ease-out);
  }
}
@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 16px 16px 24px;
}
.lightbox__title {
  font-size: 1.25rem;
}
.lightbox__count {
  color: var(--on-ink);
}
.lightbox__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lightbox .btn--line {
  min-height: 44px;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}
.lightbox .btn--line:hover {
  border-color: var(--white);
}
.lightbox .btn--line .icon {
  width: 18px;
  height: 18px;
}
.lightbox__close,
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.16);
}
.lightbox__close .icon {
  transform: rotate(45deg);
}
.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 300px);
  border-radius: 10px;
  object-fit: contain;
  touch-action: pan-y;
  -webkit-user-drag: none;
  user-select: none;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(22, 24, 29, 0.78);
}
.lightbox__nav--prev {
  left: 24px;
}
.lightbox__nav--prev .icon {
  transform: rotate(180deg);
}
.lightbox__nav--next {
  right: 24px;
}
.lightbox__nav[hidden],
.lightbox__visit[hidden],
.lightbox__thumbs[hidden] {
  display: none;
}
.lightbox__caption {
  margin: 14px 24px 0;
  text-align: center;
  color: #dfe1e6;
  font-size: 0.9375rem;
}
.lightbox__caption[hidden] {
  display: none;
}
.lightbox__thumbs {
  display: flex;
  gap: 8px;
  padding: 16px 24px 20px;
  overflow-x: auto;
}
.lightbox__thumbs button {
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2d34;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
}
.lightbox__thumbs button:hover {
  opacity: 0.85;
}
.lightbox__thumbs button[aria-current="true"] {
  opacity: 1;
  border-color: #46c39a;
}
.lightbox__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
@media (max-width: 640px) {
  .lightbox {
    width: calc(100vw - 16px);
    border-radius: 16px;
  }
  .lightbox__bar {
    padding: 12px 12px 12px 16px;
  }
  .lightbox__visit {
    display: none;
  }
  .lightbox__nav {
    top: auto;
    bottom: 8px;
    transform: none;
  }
  .lightbox__nav--prev {
    left: 16px;
  }
  .lightbox__nav--next {
    right: 16px;
  }
  .lightbox__stage {
    padding: 0 8px 60px;
  }
  .lightbox__thumbs button {
    width: 84px;
  }
}

/* ---------- Services (dark band) ---------- */

.band-ink {
  background: var(--ink);
  color: var(--white);
}
.band-ink .section-sub {
  color: var(--on-ink);
}
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 16px 48px;
  align-items: start;
  padding: clamp(24px, 3.4vw, 40px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.service h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem);
  letter-spacing: -0.025em;
}
.service p {
  color: var(--on-ink);
}
.service ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: #dfe1e6;
}
.service ul li::before {
  content: "+ ";
  color: #46c39a;
}
.service .link-arrow {
  color: #6fd8b3;
  white-space: nowrap;
  padding: 10px 0;
}
.service .link-arrow:hover {
  color: var(--white);
}
@media (max-width: 860px) {
  .service {
    grid-template-columns: 1fr;
  }
}

/* ---------- Process ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 28px 0 0;
  border-top: 2px solid var(--line);
  counter-increment: step;
}
.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--green);
  transition: width 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 180ms);
}
.steps.is-in .step::before {
  width: calc(100% - 28px);
}
.step__n {
  display: block;
  margin-bottom: 18px;
  color: var(--green);
}
.step h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.step p {
  color: var(--body);
  font-size: 1rem;
}
@media (max-width: 920px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
}
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
}

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

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--mint);
  aspect-ratio: 4 / 5;
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__text .lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  color: var(--body);
  max-width: 36em;
}
.about__text .lead:first-of-type {
  color: var(--ink);
}
.skill-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 20px;
}
.skill-card {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.skill-card em {
  display: none;
}
.skill-card strong {
  display: block;
  font-size: 1.0625rem;
  margin-bottom: 6px;
}
.skill-card p {
  color: var(--grey);
  font-size: 0.9375rem;
}
@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about__photo {
    max-width: 360px;
    aspect-ratio: 1;
  }
  .skill-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
}
.faq__list {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .icon {
  color: var(--green);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary .icon {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 48px 24px 0;
  color: var(--body);
}
@media (max-width: 860px) {
  .faq {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA (green band) ---------- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 80px);
  isolation: isolate;
}
.cta__mark {
  position: absolute;
  right: -6%;
  top: 50%;
  width: min(560px, 70%);
  fill: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%) rotate(var(--turn, 0deg));
  z-index: -1;
  will-change: transform;
}
.cta h2 {
  font-size: clamp(2.125rem, 1.2rem + 3.2vw, 4rem);
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-bottom: 20px;
}
.cta p {
  color: #eaf6f1;
  font-size: 1.125rem;
  max-width: 32em;
  margin-bottom: 36px;
}
.cta__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  color: #e3f3ec;
}
.cta__meta a {
  color: var(--white);
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 5vw, 56px);
}
.page-hero .site-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.page-hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 3.8vw, 4.5rem);
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.page-hero p {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--body);
  max-width: 36em;
}

/* ---------- Resume ---------- */

.resume {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-bottom: var(--section);
}
.resume__side {
  position: sticky;
  top: 104px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.resume__side h2 {
  font-size: 1.5rem;
}
.resume__side p {
  color: var(--grey);
}
.resume__section + .resume__section {
  margin-top: clamp(48px, 7vw, 88px);
}
.resume__section > h2 {
  font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.25rem);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tl-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 8px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.tl-when {
  color: var(--green-deep);
  padding-top: 4px;
}
.tl-body h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.tl-org {
  color: var(--grey);
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.tl-org a {
  color: var(--green);
}
.tl-body > p:not(.tl-org) {
  color: var(--body);
  font-size: 1rem;
}
.tl-detail {
  margin-top: 10px;
  color: var(--grey);
  font-size: 0.9375rem;
}
.tl-body .tag-row {
  margin-top: 14px;
}
@media (max-width: 860px) {
  .resume {
    grid-template-columns: 1fr;
  }
  .resume__side {
    position: static;
  }
  .tl-item {
    grid-template-columns: 1fr;
  }
}

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

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  padding-bottom: var(--section);
  align-items: start;
}
.wa-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wa-card h2 {
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  letter-spacing: -0.03em;
}
.wa-card p {
  color: #eaf6f1;
}
.wa-card .wa-number {
  font-family: var(--mono);
  font-size: 1.125rem;
  color: var(--white);
}
.wa-card .cta__mark {
  width: 70%;
  right: -22%;
}
.wa-card .btn {
  align-self: flex-start;
}
.contact__alt {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #eaf6f1;
  font-size: 0.9375rem;
}
.contact__alt a {
  color: var(--white);
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
}
.form-card h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.form-card > p {
  color: var(--grey);
  margin-bottom: 24px;
}
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field--full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.875rem;
  font-weight: 500;
}
.field input,
.field textarea,
.field select {
  font: 400 1rem/1.4 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}
.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #c9c9c3;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 122, 92, 0.18);
}
.field ::placeholder {
  color: #5f626b;
}
.form .btn {
  justify-self: start;
}
.form-status {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  min-height: 1.5em;
}
.form-status.is-error {
  color: #b42318;
}
.form-status.is-ok {
  color: var(--green-deep);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .form {
    grid-template-columns: 1fr;
  }
  .form .btn,
  .wa-card .btn {
    width: 100%;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px 0 40px;
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}
.footer__brand p {
  color: var(--grey);
  font-size: 0.9375rem;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 0.9375rem;
}
.footer__links a {
  color: var(--body);
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.socials {
  display: flex;
  gap: 8px;
}
.socials a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--body);
  transition: color 0.2s, border-color 0.2s;
}
.socials a:hover {
  color: var(--green);
  border-color: var(--green);
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  color: var(--grey);
}
.footer__base a {
  color: var(--grey);
}

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

.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 12px -2px rgba(22, 24, 29, 0.18), 0 18px 36px -12px rgba(22, 24, 29, 0.4);
  transform: translateY(0);
  transition: transform 0.45s var(--ease-out), opacity 0.3s, background-color 0.2s;
}
.wa-float:hover {
  background: var(--green-deep);
}
.wa-float .icon {
  width: 24px;
  height: 24px;
}
.wa-float.is-hidden {
  transform: translateY(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 520px) {
  .wa-float {
    padding: 0 18px 0 16px;
  }
}

/* ---------- Scroll reveal (content stays visible without JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Scroll-built landing ----------
   site.js sets --t (0 → 1) on every [data-b] element from its place in the viewport,
   so sections assemble while scrolling down and come apart again scrolling up.
   Only active under html.motion: without JS or with reduced motion everything is simply shown. */

.motion [data-b="rise"],
.motion [data-b="step"] {
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 56px), 0);
}

.motion [data-b="card"] {
  opacity: calc(0.15 + var(--t) * 0.85);
  transform: translate3d(0, calc((1 - var(--t)) * 96px), 0) scale(calc(0.94 + var(--t) * 0.06));
}
.motion [data-b="card"]:nth-child(2) {
  transform: translate3d(calc((1 - var(--t)) * -48px), calc((1 - var(--t)) * 96px), 0) rotate(calc((1 - var(--t)) * -2deg));
}
.motion [data-b="card"]:nth-child(3) {
  transform: translate3d(calc((1 - var(--t)) * 48px), calc((1 - var(--t)) * 96px), 0) rotate(calc((1 - var(--t)) * 2deg));
}
.motion [data-b="card"] .project-card__shot {
  clip-path: inset(calc((1 - var(--t)) * 55%) 0 0 0 round 14px);
}
.motion [data-b="card"] .project-card__shot img {
  transform: scale(calc(1.2 - var(--t) * 0.2));
  transform-origin: top center;
}
.motion [data-b="card"] .project-card__body > * {
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 28px), 0);
}

.motion [data-b="band"] {
  clip-path: inset(0 calc((1 - var(--t)) * 5vw) round calc((1 - var(--t)) * 48px));
}
.motion [data-b="band"] > .wrap {
  opacity: calc(0.2 + var(--t) * 0.8);
}

.motion [data-b="row"] {
  position: relative;
  border-bottom-color: transparent;
}
.motion [data-b="row"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  transform: scaleX(var(--t));
  transform-origin: left center;
}
.motion [data-b="row"] > * {
  opacity: var(--t);
}
.motion [data-b="row"] > :nth-child(1) {
  transform: translate3d(calc((1 - var(--t)) * -40px), 0, 0);
}
.motion [data-b="row"] > :nth-child(2) {
  transform: translate3d(0, calc((1 - var(--t)) * 40px), 0);
}
.motion [data-b="row"] > :nth-child(3) {
  transform: translate3d(calc((1 - var(--t)) * 40px), 0, 0);
}

.motion .step::before {
  width: calc((100% - 28px) * var(--t, 1));
  transition: none;
}

.motion [data-b="reveal"] {
  clip-path: inset(calc((1 - var(--t)) * 100%) 0 0 0 round 24px);
}
.motion [data-b="reveal"] img {
  transform: scale(calc(1.3 - var(--t) * 0.3));
}

.motion [data-b="pop"] {
  opacity: calc(0.3 + var(--t) * 0.7);
  transform: scale(calc(0.88 + var(--t) * 0.12));
  border-radius: calc(24px + (1 - var(--t)) * 40px);
}
.motion [data-b="pop"] > :not(.cta__mark) {
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * 32px), 0);
}

/* Hero takes itself apart as you leave it (--x: 0 at the top, 1 once scrolled past) */
.motion [data-hero] .hero__copy {
  transform: translate3d(0, calc(var(--x, 0) * -60px), 0);
  opacity: calc(1 - var(--x, 0) * 0.7);
}
.motion [data-hero] .hero__portrait {
  translate: 0 calc(var(--x, 0) * 70px);
}
.motion [data-hero] .hero__tag {
  transform: translate3d(0, calc(var(--x, 0) * 40px), 0);
}
.motion [data-hero] .hero__panel {
  scale: calc(1 - var(--x, 0) * 0.05);
}

/* ---------- Admin hooks (shown only after login) ---------- */

.btn-admin-quick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px dashed var(--green);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-deep);
  background: var(--mint);
  text-decoration: none;
}
.admin-floating-badge {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
}
.admin-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8125rem;
  text-decoration: none;
}
