/* ==========================================================================
   RASTER (raster.pt) — Editorial & Engineering Design System
   Strict Palette: #062018 (Deep Forest Ink), #A7F3D0 (Mint Ink), #F5F5F0 (Paper)
   Shape Language: Stepped raster corners (2px-3px), 1px hairlines, ZERO pills.
   ========================================================================== */

:root {
  --ink: #062018;
  --ink-deep: #041510;
  --ink-muted: rgba(6, 32, 24, 0.62);
  --ink-soft: rgba(6, 32, 24, 0.22);
  --ink-line: rgba(6, 32, 24, 0.14);

  --mint: #a7f3d0;
  --mint-bright: #6ee7b7;
  --mint-soft: rgba(167, 243, 208, 0.14);
  --mint-line: rgba(167, 243, 208, 0.2);

  --paper: #f5f5f0;
  --paper-alt: #ecece5;
  --white: #ffffff;
  --white-muted: rgba(245, 245, 240, 0.68);

  --font-display: "Unbounded", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;

  --radius: 3px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1260px;
  --gutter: clamp(20px, 4vw, 56px);
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
  color: var(--paper);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.section-paper :focus-visible,
.section-mint :focus-visible {
  outline-color: var(--ink);
}

.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Navigation — Minimal Architectural Bar (Inverts smoothly per section)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: 74px;
  display: flex;
  align-items: center;
  color: var(--paper);
  background: rgba(6, 32, 24, 0.72);
  border-bottom: 1px solid rgba(167, 243, 208, 0.12);
  backdrop-filter: blur(12px);
  transition: background-color 280ms var(--ease-out), color 280ms var(--ease-out), border-color 280ms var(--ease-out);
}

.site-header[data-theme="light"] {
  color: var(--ink);
  background: rgba(245, 245, 240, 0.86);
  border-bottom-color: var(--ink-line);
}

.site-header[data-theme="mint"] {
  color: var(--ink);
  background: rgba(167, 243, 208, 0.88);
  border-bottom-color: rgba(6, 32, 24, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--mint);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background-color 280ms var(--ease-out), color 280ms var(--ease-out);
}

.brand-mark svg {
  width: 14px;
  height: 14px;
  display: block;
}

.brand-word {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-header[data-theme="light"] .brand-mark,
.site-header[data-theme="mint"] .brand-mark {
  background: var(--ink);
  color: var(--mint);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0.88;
}

.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: currentColor;
}

.lang-toggle button[aria-pressed="true"] span {
  color: var(--ink);
}

.site-header[data-theme="light"] .lang-toggle button[aria-pressed="true"] span {
  color: var(--paper);
}

.site-header[data-theme="mint"] .lang-toggle button[aria-pressed="true"] span {
  color: var(--mint);
}

/* Scroll progress hairline directly under header */
.scroll-meter {
  position: fixed;
  top: 73px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 101;
  background: transparent;
  pointer-events: none;
}

.scroll-meter-fill {
  width: 100%;
  height: 100%;
  background: var(--mint);
  transform-origin: left center;
  transform: scaleX(0);
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-meter-fill {
      animation: scroll-meter-grow linear both;
      animation-timeline: scroll(root block);
      animation-range: 0% 100%;
    }
    @keyframes scroll-meter-grow {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}

/* ==========================================================================
   Stepped Raster Buttons & Architectural Shapes (ZERO pills!)
   ========================================================================== */
.btn-raster {
  --btn-bg: var(--mint);
  --btn-bg-hover: var(--mint-bright);
  --btn-fg: var(--ink);
  --btn-ring: var(--ink);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border: 0;
  background: transparent;
  color: var(--btn-fg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 260ms var(--ease-out);
}

/* Body of the button: a block with the stepped raster notch of Wave Spine R */
.btn-raster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--radius);
  background: var(--btn-bg);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%
  );
  transition: background-color 260ms var(--ease-out);
}

/* Loose pixel in the notch. On hover it docks and closes the grid,
   the same move as the squares of the logo joining up. */
.btn-raster::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 10px;
  height: 10px;
  border-radius: 1px;
  background: var(--btn-bg);
  transform: translate(5px, 5px) scale(0.5);
  transition: transform 420ms var(--ease-snap), background-color 260ms var(--ease-out);
}

.btn-raster:hover {
  transform: translateY(-2px);
}

.btn-raster:hover::before,
.btn-raster:hover::after {
  background: var(--btn-bg-hover);
}

.btn-raster:hover::after {
  transform: translate(0, 0) scale(1);
}

.btn-raster:active {
  transform: translateY(0);
}

.btn-raster:focus-visible {
  outline: 2px solid var(--btn-ring);
  outline-offset: 3px;
}

.btn-raster-mint {
  --btn-bg: var(--mint);
  --btn-bg-hover: var(--mint-bright);
  --btn-fg: var(--ink);
  --btn-ring: currentColor;
}

.btn-raster-ink {
  --btn-bg: var(--ink);
  --btn-bg-hover: var(--ink-deep);
  --btn-fg: var(--mint);
  --btn-ring: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .btn-raster,
  .btn-raster::after {
    transition: none;
  }
  .btn-raster:hover {
    transform: none;
  }
}

.link-editorial {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: opacity 180ms ease, gap 220ms var(--ease-out);
}

.link-editorial:hover {
  opacity: 0.78;
  gap: 13px;
}

/* Section Metadata Eyebrow */
.chapter-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.chapter-label::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect x='0' y='0' width='18' height='18' rx='3.5' fill='black'/%3E%3Crect x='18' y='18' width='18' height='18' rx='3.5' fill='black'/%3E%3Cpath d='M18 11 A7 7 0 0 0 25 18 L25 25 L18 25 A7 7 0 0 0 11 18 L11 11 Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Crect x='0' y='0' width='18' height='18' rx='3.5' fill='black'/%3E%3Crect x='18' y='18' width='18' height='18' rx='3.5' fill='black'/%3E%3Cpath d='M18 11 A7 7 0 0 0 25 18 L25 25 L18 25 A7 7 0 0 0 11 18 L11 11 Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   HERO | Copy left, Wave Spine R as a window onto real work (right)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(74px + clamp(28px, 6vh, 72px)) 0 clamp(40px, 7vh, 80px);
  background-color: var(--ink);
  /* Quiet raster grid, the same cell the R is built from */
  background-image:
    linear-gradient(to right, rgba(167, 243, 208, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 243, 208, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  color: var(--paper);
  overflow: clip;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  width: min(100%, var(--container));
}

.hero-copy {
  display: grid;
  gap: clamp(18px, 3.2vh, 30px);
  justify-items: start;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, min(4.9vw, 7.9vh), 76px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
}

.hero-title em {
  font-style: normal;
  font-weight: 600;
  color: var(--mint);
}

.hero-lead {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--white-muted);
}

.hero-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 4px;
}

/* The R window */
.hero-window {
  margin: 0;
  justify-self: end;
  width: min(100%, 64vh, 540px);
  display: grid;
  gap: 14px;
}

.hero-window-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hw-guides rect,
.hw-guides path {
  fill: none;
  stroke: rgba(167, 243, 208, 0.16);
  stroke-width: 0.15;
  vector-effect: non-scaling-stroke;
}

.hw-image {
  transform-box: view-box;
  transform-origin: 36px 36px;
}

.hero-window-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero-window-caption a {
  color: var(--white-muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.hero-window-caption a:hover,
.hero-window-caption a:focus-visible {
  color: var(--mint);
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    align-items: flex-start;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-window {
    justify-self: start;
    width: min(100%, 420px);
  }
}

/* Entrance: copy rises in, then the R assembles cell by cell and fuses */
@media (prefers-reduced-motion: no-preference) {
  .hero-reveal {
    animation: hero-rise 520ms var(--ease-out) both;
  }

  .hero-reveal:nth-child(2) { animation-delay: 60ms; }
  .hero-reveal:nth-child(3) { animation-delay: 120ms; }
  .hero-reveal:nth-child(4) { animation-delay: 180ms; }

  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hw-cell {
    transform-box: fill-box;
    transform-origin: center;
    animation: hw-cell-in 420ms var(--ease-out) both;
    animation-delay: calc(120ms + var(--i) * 55ms);
  }

  @keyframes hw-cell-in {
    from { opacity: 0; transform: scale(0.55); }
    to { opacity: 1; transform: scale(1); }
  }

  .hw-fuse {
    animation: hw-fuse-in 360ms ease both;
    animation-delay: 700ms;
  }

  @keyframes hw-fuse-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .hw-image {
    animation: hw-image-in 1100ms var(--ease-out) both;
    animation-delay: 120ms;
  }

  @keyframes hw-image-in {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
  }

  .hero-window-caption {
    animation: hero-rise 520ms var(--ease-out) both;
    animation-delay: 900ms;
  }
}

/* Liquid Grid Architectural Seams (Watertight modular SVG transitions) */
.liquid-seam {
  display: block;
  width: 100%;
  height: 56px;
  line-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
  margin-top: -1px;
  margin-bottom: -1px;
}

.liquid-seam svg {
  display: block;
  width: 100%;
  height: 56px;
}

.liquid-seam-to-paper {
  background: var(--ink);
  color: var(--paper);
}

.liquid-seam-to-ink {
  background: var(--paper);
  color: var(--ink);
}

.liquid-seam-to-mint {
  background: var(--paper);
  color: var(--mint);
}

@media (max-width: 640px) {
  .liquid-seam,
  .liquid-seam svg {
    height: 44px;
  }
}

/* ==========================================================================
   CHAPTER 01 — Editorial Manifesto (Paper #F5F5F0 + Scroll Text Reveal)
   ========================================================================== */
.section-paper {
  background: var(--paper);
  color: var(--ink);
}

.manifesto {
  position: relative;
  padding: clamp(84px, 12vw, 152px) 0 clamp(72px, 10vw, 128px);
  overflow: clip;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px 56px;
  align-items: start;
}

@media (max-width: 880px) {
  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.manifesto-aside {
  position: relative;
}

.manifesto-watermark {
  width: 112px;
  height: 112px;
  color: var(--ink);
  opacity: 0.08;
  margin-top: 28px;
  display: block;
}

@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto-watermark {
      animation: watermark-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    @keyframes watermark-drift {
      from { transform: translateY(-28px); }
      to { transform: translateY(42px); }
    }
  }
}

.manifesto-statement {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.7vw, 36px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.03em;
  margin: 0;
}

.manifesto-statement .word {
  display: inline;
  transition: opacity 220ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .manifesto-statement.is-scrubbed .word {
    opacity: 0.18;
  }
  .manifesto-statement.is-scrubbed .word.is-lit {
    opacity: 1;
  }
}

.manifesto-statement em {
  font-style: normal;
  font-weight: 500;
  color: rgba(6, 32, 24, 0.54);
}

.principles-bar {
  margin-top: clamp(52px, 7vw, 84px);
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 36px;
}

@media (max-width: 720px) {
  .principles-bar {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.principle-item h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--ink);
}

.principle-item p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 34ch;
}

/* Founder note: no photo, a monogram block and a short signed line */
.founder-note {
  margin: clamp(44px, 6vw, 72px) 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 18px 36px;
}

.founder-label {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.founder-quote {
  margin: 0;
}

.founder-quote p {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.founder-sign {
  display: flex;
  align-items: center;
  gap: 14px;
}

.founder-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

.founder-who {
  display: grid;
  gap: 2px;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--ink-muted);
}

.founder-who strong {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 720px) {
  .founder-note {
    grid-template-columns: 1fr;
  }
  .founder-label {
    grid-row: auto;
  }
}

/* ==========================================================================
   CHAPTER 02 — Selected Work (Asymmetric Editorial Showcase + Real Imagery)
   ========================================================================== */
.work {
  padding: clamp(56px, 8vw, 96px) 0 clamp(92px, 13vw, 156px);
}

.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: clamp(40px, 6vw, 68px);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.9vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0;
}

.section-title em {
  font-style: normal;
  font-weight: 600;
  color: rgba(6, 32, 24, 0.5);
}

.services .section-title em {
  color: var(--mint);
}

.work-note {
  margin: 0;
  max-width: 38ch;
  font-size: 14.5px;
  color: var(--ink-muted);
}

/* Featured case: full-width spread, editorial caption row underneath */
.case-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3vw, 36px);
}

/* Device stage: the real site on a laptop and a phone, side by side */
.device-stage {
  position: relative;
  aspect-ratio: 16 / 8.6;
  border-radius: var(--radius);
  background-color: var(--paper-alt);
  background-image:
    linear-gradient(to right, rgba(6, 32, 24, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(6, 32, 24, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 16px),
    calc(100% - 16px) calc(100% - 16px),
    calc(100% - 16px) 100%,
    0 100%
  );
}

.device-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(6, 32, 24, 0.1);
  pointer-events: none;
}

/* Real device mockups (PNG with a transparent screen) sit on top of the
   scrolling screenshot. Screen boxes are measured from the PNGs, with a
   hair of bleed under the bezel so no gap shows at any size. */
.device-laptop,
.device-phone {
  position: absolute;
}

.device-laptop {
  left: 5%;
  top: 8%;
  width: 74%;
  aspect-ratio: 800 / 460;
  filter: drop-shadow(0 24px 34px rgba(6, 32, 24, 0.18));
}

.device-phone {
  right: 7%;
  bottom: 6%;
  width: 20%;
  aspect-ratio: 389 / 800;
  filter: drop-shadow(0 24px 34px rgba(6, 32, 24, 0.24));
}

.device-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.device-viewport {
  position: absolute;
  overflow: hidden;
  background: #ffffff;
}

/* The laptop is split at the hinge (y 441 of 460) so the lid can close:
   the base is the bottom strip of the PNG, the lid is the rest, turning on
   its bottom edge in 3D (app.js 6e). Closed, it is a thin slab seen from the front. */
.device-laptop {
  perspective: 2200px;
  perspective-origin: 50% 30%;
}

.device-base {
  z-index: 0;
  clip-path: inset(95.87% 0 0 0);
}

.device-lid {
  position: absolute;
  inset: 0 0 auto;
  height: 95.87%;
  z-index: 1;
  transform-origin: 50% 100%;
  will-change: transform;
}

.device-lid-front {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.device-lid-front .device-frame {
  inset: 0 auto auto 0;
  height: 104.31%;
}

/* MacBook Air screen: x 88-711, y 26-415 of 800x460 (lid is 441 tall) */
.device-laptop .device-viewport {
  left: 10.9%;
  top: 5.685%;
  width: 78.1%;
  height: 88.66%;
}

/* The screen dims as it turns away from the light */
.device-lid-shade {
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}

/* iPhone screen: x 17-373, y 13-787 of 389x800 */
.device-phone .device-viewport {
  left: 4.15%;
  top: 1.5%;
  width: 91.8%;
  height: 97%;
  border-radius: 14% / 6.6%;
}

.device-scroll {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(0);
  will-change: transform;
}

@media (max-width: 720px) {
  .device-stage {
    aspect-ratio: 4 / 3.5;
    background-size: 32px 32px;
  }
  .device-laptop {
    left: 5%;
    top: 7%;
    width: 80%;
  }
  .device-phone {
    right: 5%;
    bottom: 6%;
    width: 29%;
  }
}

/* Slow scroll through the real pages while the stage is on screen */
@media (prefers-reduced-motion: no-preference) {
  .device-scroll {
    animation: device-scroll var(--scroll-time, 20s) cubic-bezier(0.45, 0, 0.25, 1) infinite alternate;
    animation-play-state: paused;
  }

  .device-phone .device-scroll {
    animation-delay: -3s;
  }

  .device-stage[data-playing="true"] .device-scroll {
    animation-play-state: running;
  }

  .device-stage[data-playing="true"]:hover .device-scroll {
    animation-play-state: paused;
  }

  @keyframes device-scroll {
    0%, 10% { transform: translateY(0); }
    90%, 100% { transform: translateY(var(--scroll-dist, 0px)); }
  }
}

.case-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-alt);
  aspect-ratio: 16 / 10;
  /* Stepped bottom-right raster frame corner */
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 16px),
    calc(100% - 16px) calc(100% - 16px),
    calc(100% - 16px) 100%,
    0 100%
  );
}

.case-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(6, 32, 24, 0.1);
  pointer-events: none;
}

.case-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 620ms var(--ease-out);
}

.case-card:hover .case-frame img {
  transform: scale(1.07);
}


/* Scanline vertical reveal on scroll (inner img wipe so .case-frame keeps stepped notch & measurable bounds) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-scan img {
    clip-path: inset(0 0 0% 0);
    opacity: 1;
    transition: clip-path 820ms var(--ease-out), transform 820ms var(--ease-out), opacity 420ms ease;
  }

  .reveal-scan[data-revealed="false"] img {
    opacity: 0.2;
    clip-path: inset(0 0 100% 0);
    transform: scale(1.1);
  }
}

.case-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  margin-bottom: 10px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.case-featured .case-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 clamp(32px, 5vw, 72px);
  align-items: start;
}

.case-featured .case-meta {
  grid-column: 1 / -1;
  padding-top: 0;
  border-top: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: 22px;
}

.case-featured .case-info h3 {
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1;
}

.case-body {
  display: flex;
  flex-direction: column;
}

@media (max-width: 720px) {
  .case-featured .case-info {
    grid-template-columns: 1fr;
  }
  .case-featured .case-info h3 {
    margin-bottom: 14px;
  }
}

.case-card h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

.case-link-frame {
  display: block;
  text-decoration: none;
}

/* Pinned work stage (app.js 6e): the devices stay on screen while the
   scroll closes the laptop and sends its pixels to the contact button.
   Only on desktop with motion; the stage fits the screen height. */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  /* The run of the pin. A spacer, not padding: sticky only travels
     through its parent's content box. */
  #projetos .work-pin::after {
    content: "";
    display: block;
    height: 160vh;
  }

  #projetos .work-pin-sticky {
    position: sticky;
    top: var(--pin-top, 96px);
  }

  #projetos .work-pin .case-link-frame {
    width: min(100%, calc((100vh - 150px) * 16 / 8.6));
    margin-inline: auto;
  }
}

.case-cta {
  margin-top: 20px;
  align-self: flex-start;
}

.case-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 44ch;
}

/* ==========================================================================
   CHAPTER 03 | What we do. Desktop: pinned list + a product mockup that
   changes with the scroll. Mobile / reduced motion: each row shows its mockup.
   ========================================================================== */
.services {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 10vw, 128px) 0;
  position: relative;
}

.services-head {
  margin-bottom: clamp(28px, 4vw, 56px);
  max-width: 680px;
}

.services-head .chapter-label {
  color: var(--mint);
  margin-bottom: clamp(10px, 1.8vh, 18px);
}

.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--mint-line);
}

.svc-row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--mint-line);
}

.svc-heading {
  margin: 0;
  font: inherit;
}

.svc-head {
  appearance: none;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.svc-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--mint);
  padding-top: 0.55em;
}

.svc-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.7vw, 38px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.svc-desc {
  display: block;
  margin-top: 10px;
  max-width: 40ch;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.5;
  color: var(--white-muted);
}

.svc-panel {
  margin: 0;
  display: grid;
  gap: 16px;
  justify-items: start;
}

.svc-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.svc-inc-label {
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-muted);
}

.svc-inc {
  display: contents;
  list-style: none;
}

.svc-inc li {
  padding: 6px 10px;
  border: 1px solid var(--mint-line);
  border-radius: 2px;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--white-muted);
}

@media (max-width: 900px) {
  .svc-row {
    grid-template-columns: 1fr;
  }
}

/* Pinned runway on desktop */
@media (min-width: 901px) and (min-height: 580px) and (prefers-reduced-motion: no-preference) {
  .services {
    height: 320vh;
    padding: 0;
  }

  .services-pin {
    position: sticky;
    top: 0;
    height: 100svh;
    padding: 92px 0 28px;
  }

  .services-pin > .container,
  .svc-layout {
    height: 100%;
  }

  .svc-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .services-head,
  .svc-list {
    width: 41%;
  }

  .services-head {
    margin-bottom: clamp(18px, 4vh, 40px);
  }

  .services-head .section-title {
    font-size: clamp(26px, min(3.2vw, 6.4vh), 46px);
  }

  .svc-list {
    border-top: 0;
  }

  .svc-row {
    display: block;
    padding: 0;
    border: 0;
  }

  .svc-head {
    position: relative;
    padding: clamp(10px, 2.1vh, 20px) 0 clamp(10px, 2.1vh, 20px) 18px;
    border-top: 1px solid var(--mint-line);
    cursor: pointer;
    opacity: 0.42;
    transition: opacity 320ms ease;
  }

  .svc-row:last-child .svc-head {
    border-bottom: 1px solid var(--mint-line);
  }

  .svc-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    bottom: 0;
    width: 2px;
    background: var(--mint);
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 420ms var(--ease-out);
  }

  .svc-head:hover,
  .svc-head:focus-visible {
    opacity: 0.8;
  }

  .svc-row.is-active .svc-head {
    opacity: 1;
  }

  .svc-row.is-active .svc-head::before {
    transform: scaleY(1);
  }

  .svc-title {
    font-size: clamp(20px, min(2.1vw, 4.1vh), 30px);
  }

  .svc-desc {
    margin-top: 6px;
    font-size: clamp(14px, 2.3vh, 16px);
  }

  .svc-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 54%;
    align-content: center;
    justify-items: start;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  .svc-row.is-active .svc-panel {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 200ms ease;
  }

  .svc-screen {
    width: min(100%, calc((100svh - 196px) * 1.4545));
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0s linear 240ms;
  }

  .svc-row.is-active .svc-screen {
    clip-path: inset(0 0 0 0);
    transition: clip-path 640ms var(--ease-out);
  }

  /* Pieces of each mockup build in after the wipe */
  .svc-panel .b {
    opacity: 0;
    transform: translateY(8px);
  }

  .svc-row.is-active .svc-panel .b {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 380ms ease, transform 480ms var(--ease-out);
    transition-delay: calc(240ms + var(--d, 0) * 70ms);
  }
}

/* --------------------------------------------------------------------------
   Product mockups. Drawn in HTML/CSS, sized in container units so they scale
   as one picture. Text is kept to labels; the rest is static skeleton.
   -------------------------------------------------------------------------- */
.svc-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  container-type: inline-size;
  border-radius: 4px;
  background-color: #0a2a20;
  background-image:
    linear-gradient(to right, rgba(167, 243, 208, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 243, 208, 0.06) 1px, transparent 1px);
  background-size: 6.25% 9.09%;
  box-shadow: inset 0 0 0 1px var(--mint-line);
}

.mk {
  position: absolute;
  inset: 0;
  font-family: var(--font-body);
  font-size: 1.5cqw;
  color: var(--ink);
}

.mk p {
  margin: 0;
}

.mk .sk {
  display: block;
  height: 1.3cqw;
  border-radius: 0.35cqw;
  background: rgba(6, 32, 24, 0.1);
}

.mk .w30 { width: 30%; }
.mk .w40 { width: 40%; }
.mk .w50 { width: 50%; }
.mk .w60 { width: 60%; }
.mk .w70 { width: 70%; }
.mk .w80 { width: 80%; }
.mk .w90 { width: 90%; }

.mk-logo {
  display: block;
  width: 3cqw;
  height: 3cqw;
  border-radius: 0.5cqw;
  background: var(--ink);
}

/* Shared window (website + software) */
.mk-web,
.mk-soft {
  inset: 6cqw 6cqw -3cqw;
  overflow: hidden;
  border-radius: 1cqw 1cqw 0 0;
  background: var(--paper);
  box-shadow: 0 2cqw 6cqw rgba(0, 0, 0, 0.35);
}

/* 01 Website */
.mk-web {
  display: flex;
  flex-direction: column;
}

.mk-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  height: 4.4cqw;
  padding: 0 1.6cqw;
  background: #e6e6de;
  border-bottom: 1px solid rgba(6, 32, 24, 0.08);
}

.mk-bar i {
  width: 1cqw;
  height: 1cqw;
  border-radius: 0.25cqw;
  background: rgba(6, 32, 24, 0.22);
}

.mk-url {
  display: flex;
  align-items: center;
  width: 38cqw;
  height: 2.6cqw;
  margin-left: 2cqw;
  padding: 0 1.2cqw;
  border-radius: 0.4cqw;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 1.3cqw;
  color: var(--ink-muted);
}

.mk-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  padding: 2.4cqw 4cqw;
}

.mk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mk-links {
  display: flex;
  gap: 2.6cqw;
  font-size: 1.4cqw;
  font-weight: 700;
  color: var(--ink-muted);
}

.mk-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4cqw;
}

.mk-hero-copy {
  display: grid;
  gap: 1.2cqw;
  justify-items: start;
}

.mk-h {
  margin-bottom: 0.8cqw !important;
  font-family: var(--font-display);
  font-size: 3.7cqw;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.mk-hero-copy .sk {
  width: 100%;
}

.mk-hero-copy .w70 {
  width: 70%;
}

.mk-btn {
  margin-top: 1.2cqw;
  padding: 1.1cqw 1.8cqw;
  border-radius: 0.4cqw;
  background: var(--ink);
  color: var(--mint);
  font-size: 1.4cqw;
  font-weight: 700;
}

.mk-art {
  display: grid;
  place-items: center;
  height: 21cqw;
  border-radius: 0.6cqw;
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(167, 243, 208, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 243, 208, 0.1) 1px, transparent 1px);
  background-size: 25% 25%;
  color: var(--mint);
}

.mk-art svg {
  width: 46%;
  height: auto;
}

.mk-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4cqw;
}

.mk-card {
  display: grid;
  gap: 1cqw;
}

.mk-thumb {
  height: 9cqw;
  border-radius: 0.5cqw;
  background: #e2e2d9;
}

/* 02 App */
.mk-phone {
  position: absolute;
  left: 37cqw;
  top: 5cqw;
  width: 29cqw;
  height: 66cqw;
  padding: 1.1cqw;
  border-radius: 4.6cqw;
  background: var(--ink-deep);
  box-shadow: 0 2cqw 6cqw rgba(0, 0, 0, 0.4), inset 0 0 0 0.25cqw rgba(167, 243, 208, 0.14);
}

.mk-phone-screen {
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
  height: 100%;
  padding: 2.4cqw 2.2cqw;
  overflow: hidden;
  border-radius: 3.6cqw;
  background: var(--paper);
}

.mk-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.6cqw;
  font-size: 1.2cqw;
  font-weight: 700;
}

.mk-status i {
  width: 4cqw;
  height: 1.1cqw;
  border-radius: 0.3cqw;
  background: var(--ink);
}

.mk-app-title {
  margin-top: 0.6cqw !important;
  font-family: var(--font-display);
  font-size: 2.6cqw;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.mk-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7cqw;
}

.mk-days span {
  display: grid;
  justify-items: center;
  gap: 0.3cqw;
  padding: 0.9cqw 0;
  border-radius: 0.6cqw;
  background: #e8e8e0;
  font-size: 1cqw;
  color: var(--ink-muted);
}

.mk-days b {
  font-size: 1.7cqw;
  font-weight: 700;
  color: var(--ink);
}

.mk-days span:nth-child(3) {
  background: var(--ink);
  color: rgba(167, 243, 208, 0.7);
}

.mk-days span:nth-child(3) b {
  color: var(--mint);
}

.mk-slot {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.2cqw 1.3cqw;
  border: 1px solid rgba(6, 32, 24, 0.12);
  border-radius: 0.6cqw;
}

.mk-slot .sk {
  flex: 0 1 auto;
}

.mk-time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 1.3cqw;
  font-weight: 500;
}

.mk-slot.is-picked {
  border-color: var(--ink);
  background: rgba(167, 243, 208, 0.45);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.mk-app-btn {
  margin-top: auto;
  margin-bottom: 1cqw;
  padding: 1.4cqw;
  border-radius: 0.6cqw;
  background: var(--ink);
  color: var(--mint);
  font-size: 1.4cqw;
  font-weight: 700;
  text-align: center;
}

.mk-toast {
  position: absolute;
  z-index: 2;
  left: 9cqw;
  top: 15cqw;
  width: 32cqw;
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.7cqw;
  border-radius: 0.8cqw;
  background: var(--paper);
  box-shadow: 0 1.6cqw 4cqw rgba(0, 0, 0, 0.35);
}

.mk-toast > span:last-child {
  flex: 1;
  display: grid;
  gap: 0.8cqw;
}

.mk-toast b {
  font-size: 1.4cqw;
  font-weight: 700;
}

.mk-check {
  position: relative;
  flex: none;
  width: 3.6cqw;
  height: 3.6cqw;
  border-radius: 0.6cqw;
  background: var(--mint);
}

.mk-check::after {
  content: "";
  position: absolute;
  left: 1.3cqw;
  top: 0.7cqw;
  width: 0.9cqw;
  height: 1.7cqw;
  border: solid var(--ink);
  border-width: 0 0.35cqw 0.35cqw 0;
  transform: rotate(45deg);
}

.mk-note {
  position: absolute;
  right: 7cqw;
  top: 36cqw;
  width: 22cqw;
  display: grid;
  gap: 1cqw;
  padding: 1.8cqw;
  border-radius: 0.8cqw;
  background: var(--mint);
}

.mk-note .sk {
  background: rgba(6, 32, 24, 0.18);
}

/* 03 Software */
.mk-soft {
  display: grid;
  grid-template-columns: 15cqw minmax(0, 1fr);
}

.mk-side {
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
  padding: 2.4cqw 1.6cqw;
  background: var(--ink);
}

.mk-side .mk-logo {
  margin-bottom: 1.4cqw;
  background: var(--mint);
}

.mk-side-item {
  display: block;
  padding: 0.9cqw 1cqw;
  border-radius: 0.4cqw;
  font-size: 1.3cqw;
  font-weight: 700;
  color: var(--mint);
}

.mk-side-item.is-on {
  background: rgba(167, 243, 208, 0.14);
}

.mk-side .sk {
  background: rgba(167, 243, 208, 0.18);
}

.mk-main {
  display: flex;
  flex-direction: column;
  gap: 1.8cqw;
  padding: 2.6cqw;
}

.mk-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6cqw;
}

.mk-kpi {
  display: grid;
  gap: 1cqw;
  padding: 1.5cqw;
  border: 1px solid rgba(6, 32, 24, 0.1);
  border-radius: 0.6cqw;
  background: var(--white);
}

.mk-kpi span {
  font-size: 1.15cqw;
  font-weight: 700;
  color: var(--ink-muted);
}

.mk-kpi b {
  display: block;
  width: 70%;
  height: 2.6cqw;
  border-radius: 0.4cqw;
  background: var(--ink);
}

.mk-kpi i {
  display: block;
  width: 34%;
  height: 1cqw;
  border-radius: 0.3cqw;
  background: var(--mint-bright);
}

.mk-chart {
  display: flex;
  align-items: flex-end;
  gap: 1.4cqw;
  height: 19cqw;
  padding: 1.6cqw 2cqw;
  border: 1px solid rgba(6, 32, 24, 0.1);
  border-radius: 0.6cqw;
  background-color: var(--white);
  background-image: linear-gradient(to bottom, rgba(6, 32, 24, 0.06) 1px, transparent 1px);
  background-size: 100% 25%;
}

/* Each bar is a stack of raster cells */
.mk-col {
  flex: 1;
  height: calc(var(--h) * 2.2cqw);
  background-image: repeating-linear-gradient(to top, var(--mint) 0 1.8cqw, transparent 1.8cqw 2.2cqw);
}

.mk-col.is-now {
  background-image: repeating-linear-gradient(to top, var(--ink) 0 1.8cqw, transparent 1.8cqw 2.2cqw);
}

.mk-table {
  display: grid;
}

.mk-tr {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  align-items: center;
  gap: 2cqw;
  padding: 1.1cqw 0.4cqw;
  border-bottom: 1px solid rgba(6, 32, 24, 0.08);
}

.mk-tag {
  padding: 0.45cqw 1cqw;
  border: 1px solid rgba(6, 32, 24, 0.25);
  border-radius: 0.3cqw;
  font-size: 1.1cqw;
  font-weight: 700;
  color: var(--ink-muted);
}

.mk-tag.is-ok {
  border-color: transparent;
  background: var(--mint);
  color: var(--ink);
}

/* 04 Brand */
.mk-brand {
  inset: 6cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3cqw;
}

.mk-mark {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.8cqw;
  background: var(--ink-deep);
  box-shadow: inset 0 0 0 1px var(--mint-line);
}

.mk-construct {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(167, 243, 208, 0.22);
  stroke-width: 0.3;
}

.mk-construct circle {
  stroke-dasharray: 1.2 1.2;
  stroke: rgba(167, 243, 208, 0.5);
}

.mk-r {
  position: relative;
  width: 70%;
  height: auto;
  color: var(--mint);
}

.mk-specs {
  display: grid;
  gap: 2cqw;
}

.mk-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1cqw;
}

.mk-swatches span {
  display: flex;
  align-items: flex-end;
  height: 11cqw;
  padding: 1cqw;
  border-radius: 0.6cqw;
  font-family: var(--font-mono);
  font-size: 1.1cqw;
}

.mk-swatches .s-ink { background: var(--ink); color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint-line); }
.mk-swatches .s-mint { background: var(--mint); color: var(--ink); }
.mk-swatches .s-paper { background: var(--paper); color: var(--ink); }

.mk-type {
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 1.8cqw;
  border-radius: 0.6cqw;
  background: var(--paper);
}

.mk-aa {
  font-family: var(--font-display);
  font-size: 6.4cqw;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.mk-type-meta {
  flex: 1;
  display: grid;
  gap: 0.9cqw;
}

.mk-type-meta b {
  font-family: var(--font-mono);
  font-size: 1.3cqw;
  font-weight: 500;
}

.mk-bcard {
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 2cqw;
  border-radius: 0.6cqw;
  background: var(--white);
}

.mk-bcard svg {
  flex: none;
  width: 6cqw;
  height: 6cqw;
  color: var(--ink);
}

.mk-bcard-lines {
  flex: 1;
  display: grid;
  gap: 1cqw;
}

/* ==========================================================================
   CHAPTER 04 | Process: four steps, each with what the client receives
   ========================================================================== */
.process {
  padding: clamp(72px, 10vw, 128px) 0;
}

.process-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0 clamp(32px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 80px);
}

.process-head .chapter-label {
  grid-column: 1 / -1;
  margin-bottom: clamp(10px, 1.8vh, 18px);
}

.process-lead {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--ink-muted);
}

.steps {
  --step-gap: clamp(20px, 2.6vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 var(--step-gap);
}

/* Subgrid keeps titles, texts and "Recebes" boxes aligned across the 4 steps */
.step {
  position: relative;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
}

/* Hairline joining each node to the next */
.step::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 52px;
  right: calc(-1 * var(--step-gap) + 8px);
  height: 1px;
  background: var(--ink-soft);
}

.step:last-child::before {
  display: none;
}

.step-node {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.step h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.step > p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.step .step-get {
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--paper-alt);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%
  );
}

.step-get [data-i18n="stepGet"] {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .step {
    padding-bottom: 44px;
  }
  .step:nth-child(2n)::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .process-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .step {
    display: flex;
    flex-direction: column;
    padding: 0 0 36px 64px;
  }
  .step:last-child {
    padding-bottom: 0;
  }
  .step-node {
    position: absolute;
    left: 0;
    top: 0;
  }
  .step::before,
  .step:nth-child(2n)::before {
    display: block;
    top: 52px;
    bottom: 8px;
    left: 22px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .step:last-child::before {
    display: none;
  }
}

/* ==========================================================================
   CHAPTER 05 — Contact Close (Signature Mint Ink #A7F3D0 + Clean Form)
   ========================================================================== */
.section-mint {
  background: var(--mint);
  color: var(--ink);
  padding: clamp(84px, 11vw, 136px) 0;
  position: relative;
  overflow: clip;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.032em;
  margin: 0 0 20px;
}

.contact-copy h2 em {
  font-style: normal;
  font-weight: 500;
  color: rgba(6, 32, 24, 0.56);
}

.contact-copy p {
  margin: 0 0 32px;
  font-size: 16.5px;
  color: rgba(6, 32, 24, 0.76);
  max-width: 40ch;
}

.contact-direct {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(6, 32, 24, 0.18);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.contact-loc {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(6, 32, 24, 0.64);
}

/* Friction-free Architectural Form (Zero pills!) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scope-group {
  border: 0;
  padding: 0;
  margin: 0;
}

.scope-group legend {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: rgba(6, 32, 24, 0.72);
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .scope-grid {
    grid-template-columns: 1fr;
  }
}

.scope-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1.5px solid rgba(6, 32, 24, 0.28);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.scope-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.scope-option::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
}

.scope-option:has(input:checked) {
  background: var(--ink);
  color: var(--mint);
  border-color: var(--ink);
}

.scope-option:has(input:checked)::after {
  background: var(--mint);
}

.scope-option:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(6, 32, 24, 0.72);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 1.5px solid rgba(6, 32, 24, 0.34);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  transition: border-color 180ms ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 76px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(6, 32, 24, 0.42);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.form-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  min-height: 1.4em;
}

/* ==========================================================================
   Footer — Clean Dark Forest Bar
   ========================================================================== */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  padding: 36px 0;
  border-top: 1px solid var(--mint-line);
}

.form-privacy {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.form-privacy a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ==========================================================================
   Mobile contact bar (below 680px only, after the hero, hidden over #contacto)
   ========================================================================== */
.mobile-cta {
  display: none;
}

@media (max-width: 680px) {
  .mobile-cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: var(--mint);
    color: var(--ink);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(6, 32, 24, 0.18);
    /* Stepped raster corner, same language as the case frames */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-cta-meta {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.72;
  }

  .mobile-cta[data-visible="false"] {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }

  .mobile-cta ~ .site-footer {
    padding-bottom: 96px;
  }
}

@media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
  .mobile-cta {
    transition: transform 320ms var(--ease-out), opacity 220ms ease;
  }
}

/* ==========================================================================
   Legal page (privacidade.html)
   ========================================================================== */
.legal {
  padding: calc(74px + clamp(48px, 8vw, 96px)) 0 clamp(72px, 10vw, 120px);
  min-height: 100vh;
}

.legal-inner {
  max-width: 820px;
}

.legal .section-title {
  margin-bottom: 14px;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 clamp(36px, 5vw, 56px);
}

.legal-block {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px 40px;
  padding: 24px 0;
  border-top: 1px solid var(--ink-line);
}

.legal-block h2,
.legal-block h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.legal-block p {
  grid-column: 2;
  margin: 0 0 10px;
  font-size: 15.5px;
  color: var(--ink-muted);
  max-width: 60ch;
}

.legal-block p:last-child {
  margin-bottom: 0;
}

.legal-block a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.legal-en {
  margin-top: clamp(72px, 10vw, 120px);
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--ink);
}

/* 404 page */
.not-found {
  padding-block: clamp(24px, 6vh, 64px);
}

.not-found-text {
  max-width: 46ch;
  margin: 0 0 10px;
  color: var(--ink-muted);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 28px;
}

.not-found-links a:not(.btn-raster) {
  font-weight: 700;
  color: var(--ink);
  text-underline-offset: 4px;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.legal-nav a {
  text-decoration: none;
  opacity: 0.8;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 680px) {
  .legal-block {
    grid-template-columns: 1fr;
  }
  .legal-block p {
    grid-column: 1;
  }
  .legal-nav {
    gap: 14px;
  }
}

/* ==========================================================================
   Hero typewriter. "Construímos [word] ao pixel." The caret is one mint pixel.
   ========================================================================== */
.ht-line,
.ht-type {
  display: block;
  white-space: nowrap;
}

.ht-type {
  min-height: 1.04em;
  color: var(--mint);
}

.tw-caret {
  display: inline-block;
  width: 0.4em;
  height: 0.7em;
  margin-left: 0.08em;
  border-radius: 2px;
  background: var(--mint);
  vertical-align: -0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  .ht-type:not(.is-typing) .tw-caret {
    animation: tw-blink 1.1s steps(1) infinite;
  }
  @keyframes tw-blink {
    50% { opacity: 0; }
  }
}

.principle-item h3 {
  display: flex;
  gap: 10px;
}

.p-idx {
  color: var(--ink-muted);
}

/* ==========================================================================
   Header actions + full-screen menu (the site map lives here)
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
}

.menu-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0;
}

/* Visually hidden, still read out ("Menu" / "Fechar") */
.menu-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Three lines. The middle one is a step shorter (a raster offset) and
   closes the gap on hover. Open, the outer lines cross into an X. */
.menu-burger {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
}

.menu-burger i {
  position: absolute;
  right: 0;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
  transition: transform 420ms var(--ease-snap), opacity 220ms var(--ease-out);
}

.menu-burger i:nth-child(1) { top: 0; }
.menu-burger i:nth-child(2) { top: 6px; transform: scaleX(0.6); transform-origin: right center; }
.menu-burger i:nth-child(3) { top: 12px; }

.menu-toggle:hover .menu-burger i:nth-child(2) {
  transform: scaleX(1);
}

.menu-toggle[aria-expanded="true"] .menu-burger i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-burger i:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .menu-burger i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

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

/* Contact button in the bar. Starts as an outline on the home page and
   is filled by the pixels of the work devices (see app.js 6e). Elsewhere,
   or without motion, it is already full. */
.header-cta {
  --cta-fill: var(--mint);
  --cta-fill-hover: var(--mint-bright);
  --cta-on: var(--ink);
  --charge: 1;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: inherit;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 260ms var(--ease-out);
}

.header-cta[data-state="empty"] { --charge: 0; }

.header-cta-fill {
  position: absolute;
  inset: -1px;
  display: flex;
  align-items: center;
  padding: 0 17px;
  border-radius: var(--radius);
  background: var(--cta-fill);
  color: var(--cta-on);
  clip-path: inset(0 calc(100% - var(--charge) * 100%) 0 0);
  transition: clip-path 200ms var(--ease-out), background-color 260ms var(--ease-out);
}

/* Same loose pixel as .btn-raster, docking on hover */
.header-cta::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--cta-fill);
  opacity: var(--charge);
  transform: translate(4px, 4px) scale(0.55);
  transition: transform 420ms var(--ease-snap), opacity 200ms var(--ease-out), background-color 260ms var(--ease-out);
}

.header-cta:hover {
  transform: translateY(-1px);
}

.header-cta:hover .header-cta-fill,
.header-cta:hover::after {
  background: var(--cta-fill-hover);
}

.header-cta:hover::after {
  transform: translate(0, 0) scale(1);
}

.header-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* A burst of pixels landing gives a short kick */
.header-cta.is-hit {
  transform: translateY(-1px) scale(1.04);
  transition-duration: 120ms;
}

.site-header[data-theme="light"] .header-cta {
  --cta-fill: var(--mint);
  --cta-fill-hover: var(--mint-bright);
  --cta-on: var(--ink);
}

.site-header[data-theme="mint"] .header-cta {
  --cta-fill: var(--ink);
  --cta-fill-hover: var(--ink-deep);
  --cta-on: var(--mint);
}

.site-header.is-menu-open .header-cta {
  --cta-fill: var(--mint);
  --cta-fill-hover: var(--mint-bright);
  --cta-on: var(--ink);
}

@media (max-width: 680px) {
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .header-cta,
  .header-cta-fill,
  .header-cta::after {
    transition: none;
  }
}

/* Flying pixels: one fixed canvas above the bar, never catches clicks */
.pixel-flight {
  position: fixed;
  inset: 0;
  z-index: 102;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header.is-menu-open[data-theme] {
  color: var(--paper);
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
}

.site-header.is-menu-open[data-theme] .brand-mark {
  background: var(--mint);
  color: var(--ink);
}

.site-header.is-menu-open[data-theme] .lang-toggle button[aria-pressed="true"] span {
  color: var(--ink);
}

.site-header.is-menu-open ~ .scroll-meter {
  opacity: 0;
}

html.menu-locked,
html.menu-locked body {
  overflow: hidden;
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  overflow-y: auto;
  padding: 104px 0 36px;
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(167, 243, 208, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 243, 208, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--paper);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 540ms var(--ease-out);
}

.site-menu[hidden] {
  display: none;
}

.site-menu[data-state="open"] {
  clip-path: inset(0 0 0 0);
}

.site-menu-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: 40px clamp(40px, 6vw, 96px);
  width: min(100%, var(--container));
  margin: auto;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--mint-line);
}

.menu-item {
  border-bottom: 1px solid var(--mint-line);
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2vw, 24px);
  padding: clamp(10px, 1.9vh, 18px) 0;
  font-family: var(--font-display);
  font-size: clamp(26px, min(4vw, 6.2vh), 54px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.menu-link > span:last-child {
  transition: color 200ms ease;
}

.menu-link:hover > span:last-child,
.menu-link:focus-visible > span:last-child {
  color: var(--mint);
}

.menu-idx {
  min-width: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.menu-sub {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: -2px 0 0;
  padding: 0 0 clamp(12px, 2vh, 18px) calc(22px + clamp(14px, 2vw, 24px));
}

.menu-sub a {
  font-size: 15px;
  font-weight: 700;
  color: var(--white-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.menu-sub a:hover,
.menu-sub a:focus-visible {
  color: var(--mint);
  border-bottom-color: currentColor;
}

.menu-aside {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding-bottom: 6px;
}

.menu-label {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
}

.menu-mail {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.menu-mail:hover {
  color: var(--mint);
}

.menu-small {
  margin: 0;
  font-size: 15px;
  color: var(--white-muted);
  text-decoration: none;
}

a.menu-small:hover {
  color: var(--mint);
}

.menu-aside .btn-raster {
  margin-top: 14px;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .site-menu .menu-item,
  .site-menu .menu-aside > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 200ms ease, transform 200ms ease;
  }

  .site-menu[data-state="open"] .menu-item,
  .site-menu[data-state="open"] .menu-aside > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 360ms ease, transform 520ms var(--ease-out);
    transition-delay: calc(180ms + var(--i, 0) * 55ms);
  }
}

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

@media (max-width: 760px) {
  .site-menu {
    padding-top: 92px;
  }
  .site-menu-inner {
    grid-template-columns: 1fr;
    align-items: start;
    margin: 0 auto;
  }
}

/* "Saber mais" under each service on the home page */
.svc-more {
  display: inline-flex;
  gap: 6px;
  margin-left: 4px;
  padding: 6px 2px 4px;
  border-bottom: 1px solid var(--mint);
  color: var(--mint);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: gap 220ms var(--ease-out);
}

.svc-more:hover {
  gap: 10px;
}

/* ==========================================================================
   Questions (home + service pages)
   ========================================================================== */
.faq {
  padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 11vw, 136px);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: start;
}

.faq-head {
  position: sticky;
  top: 112px;
}

.faq-list {
  border-top: 1px solid var(--ink-line);
}

.faq-item {
  border-bottom: 1px solid var(--ink-line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
  font-size: clamp(17px, 1.45vw, 20px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-mark {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform 320ms var(--ease-out);
}

.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  inset: 6px 0;
  border-radius: 1px;
  background: currentColor;
}

.faq-mark::after {
  inset: 0 6px;
}

.faq-item[open] .faq-mark {
  transform: rotate(45deg);
}

.faq-answer {
  margin: 0;
  padding: 0 40px 24px 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-answer {
    animation: faq-in 340ms var(--ease-out) both;
  }
  @keyframes faq-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 900px) {
  .faq-layout {
    grid-template-columns: 1fr;
  }
  .faq-head {
    position: static;
  }
}

/* ==========================================================================
   Footer: the site map at the bottom of every page
   ========================================================================== */
.site-footer {
  padding: clamp(56px, 7vw, 88px) 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--mint-line);
}

.footer-brand {
  display: grid;
  gap: 18px;
  justify-items: start;
  align-content: start;
}

.footer-pitch {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  color: var(--white-muted);
}

.footer-h {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col li {
  font-size: 15px;
  color: var(--white-muted);
}

.footer-col a {
  color: var(--paper);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--mint);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--white-muted);
}

.footer-bottom a {
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--mint);
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Service pages (/criacao-de-sites, /aplicacoes, /software-a-medida,
   /design-e-marca). Built by _tools/build-pages.mjs.
   ========================================================================== */
.page-hero {
  padding: calc(74px + clamp(40px, 7vh, 84px)) 0 clamp(56px, 8vw, 104px);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(167, 243, 208, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 243, 208, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--paper);
  overflow: clip;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 40px clamp(32px, 5vw, 80px);
}

.page-hero-copy {
  display: grid;
  gap: clamp(16px, 2.6vh, 26px);
  justify-items: start;
}

.crumbs {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-muted);
}

.crumbs a {
  color: var(--mint);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, min(3.9vw, 7vh), 56px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.033em;
}

.page-title em {
  font-style: normal;
  color: var(--mint);
}

.page-lead {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--white-muted);
}

.page-kinds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-kinds li {
  padding: 6px 10px;
  border: 1px solid var(--mint-line);
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--white-muted);
}

.page-kinds .page-kinds-label {
  padding: 0;
  margin-right: 6px;
  border: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero .svc-screen {
  box-shadow: inset 0 0 0 1px var(--mint-line), 0 30px 80px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero .svc-screen {
    animation: screen-wipe 900ms var(--ease-out) 160ms both;
  }
  .page-hero .svc-screen .b {
    animation: hero-rise 520ms var(--ease-out) both;
    animation-delay: calc(560ms + var(--d, 0) * 80ms);
  }
  @keyframes screen-wipe {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

@media (max-width: 900px) {
  .page-hero-grid {
    grid-template-columns: 1fr;
  }
}

.page-section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.page-section + .page-section {
  padding-top: 0;
}

.page-section-head {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.inc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.inc-item {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px 28px 34px;
  border-bottom: 1px solid var(--ink-line);
}

.inc-item:nth-child(3n + 1) {
  padding-left: 0;
}

.inc-item:not(:nth-child(3n)) {
  border-right: 1px solid var(--ink-line);
}

.inc-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.inc-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.inc-item p {
  margin: 0;
  max-width: 36ch;
  font-size: 15.5px;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .inc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inc-item,
  .inc-item:nth-child(3n + 1),
  .inc-item:not(:nth-child(3n)) {
    padding: 24px 20px 28px 0;
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .inc-grid {
    grid-template-columns: 1fr;
  }
}

.mini-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.mini-step {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.mini-step .inc-idx {
  color: var(--ink);
}

.mini-step h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mini-step p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .mini-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .mini-steps {
    grid-template-columns: 1fr;
  }
}

.page-faq {
  padding-top: 0;
}

.other {
  padding: clamp(64px, 9vw, 112px) 0;
}

.other-head .chapter-label {
  color: var(--mint);
}

.other-head .section-title em {
  color: var(--mint);
}

.other-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mint-line);
}

.other-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.1fr) auto;
  align-items: center;
  gap: 8px 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--mint-line);
  text-decoration: none;
}

.other-link .svc-index {
  padding: 0;
}

.other-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.3vw, 32px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.other-desc {
  font-size: 15.5px;
  color: var(--white-muted);
}

.other-arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--mint);
  transition: transform 260ms var(--ease-out);
}

.other-link:hover .other-title,
.other-link:focus-visible .other-title {
  color: var(--mint);
}

.other-link:hover .other-arrow,
.other-link:focus-visible .other-arrow {
  transform: translateX(6px);
}

@media (max-width: 760px) {
  .other-link {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
  .other-desc {
    grid-column: 2 / 3;
    grid-row: 2;
  }
}

.liquid-seam-ink-to-mint {
  background: var(--ink);
  color: var(--mint);
}

.page-cta {
  padding: clamp(72px, 10vw, 128px) 0;
}

.page-cta-inner {
  display: grid;
  gap: 22px;
  justify-items: start;
  max-width: 760px;
}

.page-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.page-cta p {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.35vw, 19px);
}

.page-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 6px;
}

.page-cta-mail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  font-size: 15px;
}

.page-cta-mail a {
  font-weight: 700;
  text-underline-offset: 3px;
}

.page-cta h2 em {
  font-style: normal;
  color: rgba(6, 32, 24, 0.55);
}

.page-case .case-card {
  margin-top: 8px;
}

/* Two paper sections in a row: cover the sub-pixel hairline between them */
.section-paper + .section-paper {
  box-shadow: 0 -2px 0 var(--paper);
}

.page-faq {
  padding-top: clamp(24px, 3vw, 40px);
}
