:root {
  --paper: #fff;
  --line: #e8e8e8;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

/* Transparent over the sky at the top; the floating surface appears on scroll. */
.nav {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.nav-shell:not(.is-scrolled) .brand,
.nav-shell:not(.is-scrolled) .nav-links {
  color: #fff;
  text-shadow: 0 1px 10px #153b5c80;
}
.nav-shell:not(.is-scrolled) .nav-links>a:hover,
.nav-shell:not(.is-scrolled) .nav-drop-toggle:hover { color: #fff; }
.nav-shell:not(.is-scrolled) .mobile-toggle span { background: #fff; }
.nav-shell .services-menu,
.nav-shell:not(.is-scrolled) .nav-links.mobile-open {
  color: var(--ink);
  text-shadow: none;
}
.nav-shell:not(.is-scrolled) .nav-links.mobile-open .nav-drop-toggle:hover,
.nav-shell:not(.is-scrolled) .nav-links.mobile-open>a:hover { color: var(--ink); }
.nav-shell.is-scrolled .nav {
  background: #ffffffdc;
  border-color: #ffffff83;
  box-shadow: 0 4px 25px #1f42690a;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* The photo and the mockups move independently inside a clipped hero. */
.hero {
  background-image: none;
  border-radius: 0 0 28px 28px;
}
.hero-sky {
  position: absolute;
  inset: -25% 0;
  z-index: -1;
  background: linear-gradient(180deg,#9cb9e148,#a4c8eb4d 50%,#e9f3ff38), url('assets/sky.jpg') center 48% / cover;
  pointer-events: none;
}
.hero-content, .hero-devices, .hero-sky { backface-visibility: hidden; }
.hero-devices { position: relative; z-index: 3; transform-origin: center top; }
.button { gap: 0; }
.button:hover { transform: none; }
.footer-wordmark { background-image: linear-gradient(180deg,#252525 12%,#a2a2a2 80%,#ebebeb 102%); }

/* Ferrignos artwork is shown complete, at its original 4:3 proportion. */
.how-visual {
  min-height: 0;
  padding: 0;
  background: none;
  aspect-ratio: 4 / 3;
  position: relative;
}
.step-artwork { display: block; width: 100%; height: 100%; object-fit: contain; }
.step-artwork.animate { animation: artwork-in 300ms var(--ease-out); }
@keyframes artwork-in { from { opacity: .4; } to { opacity: 1; } }

/* An endless full orbit is clipped into an arch. Positions are scroll-linked. */
.integrations {
  width: min(1200px, calc(100% - 48px));
  height: 690px;
  min-height: 0;
  padding: 0;
  margin-top: 15px;
  margin-bottom: 30px;
  isolation: isolate;
}
.integration-arc {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, #000 73%, transparent 94%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 73%, transparent 94%);
}
.orbit-stage { position: absolute; inset: 0; }
.brand-orb {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #eeeeee;
  box-shadow: 0 8px 24px #00000005;
  transform: translate(-200px,-200px);
  contain: layout style;
}
.brand-orb img { width: 44px; height: 44px; object-fit: contain; display: block; }
.brand-github, .brand-x, .brand-chatgpt, .brand-figma { background: #111; border-color: #111; }
.brand-github img, .brand-chatgpt img { filter: invert(1); }
.brand-stripe { background: #f0edff; border-color: #e9e4ff; }
.brand-claude { background: #fbede7; border-color: #f8e7de; }
.brand-instagram { background: radial-gradient(circle at 30% 110%,#ffd776 0%,#f9a544 22%,#e94271 48%,#b12ba5 70%,#5e43ce 100%); border: 0; }
.brand-cloudflare img { width: 51px; }
.brand-figma img { width: 36px; }
.integration-copy {
  position: relative;
  padding-top: 200px;
  margin-inline: auto;
  max-width: 490px;
  z-index: 2;
}
.integration-copy h2 { font-size: 55px; margin-top: 22px; }
.integration-copy p { font-size: 14px; margin-top: 20px; }
.integration-copy .button { margin-top: 25px; }
.integration-footnote {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  font-size: 10px;
  z-index: 2;
}

/* Content stays visible without JS. Reveal runs once, when a block arrives. */
.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
  transition-delay: var(--reveal-delay,0ms);
}
.reveal-pending.is-revealed { opacity: 1; transform: none; }

/* A light optical edge; it never captures clicks or obscures navigation. */
.viewport-blur {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, #ffffff0d);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mask-image: linear-gradient(to bottom, transparent, #000 90%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 90%);
}
.whatsapp-float {
  position: fixed;
  right: max(27px, env(safe-area-inset-right));
  bottom: max(27px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 5px 20px #0e9c4130, 0 0 0 1px #ffffff70;
  transition: transform 200ms var(--ease-out), background-color 180ms ease, box-shadow 180ms ease;
}
.whatsapp-float img { width: 32px; height: 32px; display: block; }
.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 15px;
  background: #fff;
  color: #222;
  border: 1px solid #eee;
  box-shadow: 0 4px 20px #00000008;
  border-radius: 30px;
  opacity: 0;
  transform: translateX(5px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
.whatsapp-float:focus-visible .whatsapp-tooltip { opacity: 1; transform: none; }
.whatsapp-send { background: #157c3c; color: #fff; }
.whatsapp-send:hover { background: #0e6730; }
.result-actions { flex-wrap: wrap; }
@media (hover:hover) and (pointer:fine) {
  .whatsapp-float:hover { transform: translateY(-4px) scale(1.06); background: #20c05a; box-shadow: 0 10px 28px #0e9c4140; }
  .whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: none; }
}
.whatsapp-float:active { transform: scale(.96); }
@media(min-width:801px) {
  .integration-arc {
    mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 67%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 67%);
  }
}
@media(max-width:800px) {
  .integrations { height: 650px; width: calc(100% - 32px); }
  .integration-copy { padding-top: 190px; max-width: 390px; }
  .integration-copy h2 { font-size: 48px; }
  .integration-copy p { font-size: 13px; }
  .brand-orb { width: 65px; height: 65px; }
  .brand-orb img { width: 36px; height: 36px; }
  .brand-cloudflare img { width: 43px; }
  .brand-figma img { width: 30px; }
}
@media(max-width:580px) {
  .hero { border-radius: 0 0 20px 20px; }
  .integrations { width: calc(100% - 16px); height: 740px; margin-top: 0; margin-bottom: 10px; }
  .integration-arc { height: 490px; mask-image: linear-gradient(#000 0%,#000 80%,transparent 100%); -webkit-mask-image: linear-gradient(#000 0%,#000 80%,transparent 100%); }
  .integration-copy { padding-top: 225px; max-width: 280px; }
  .integration-copy h2 { font-size: 40px; margin-top: 17px; }
  .integration-copy p { font-size: 12px; max-width: 250px; margin-top: 20px; }
  .integration-copy .button { margin-top: 23px; font-size: 12px; }
  .integration-footnote { bottom: 31px; max-width: 250px; font-size: 8px; line-height: 1.7; }
  .brand-orb { width: 49px; height: 49px; }
  .brand-orb img { width: 29px; height: 29px; }
  .brand-cloudflare img { width: 34px; }
  .brand-figma img { width: 24px; }
  .whatsapp-float { width: 55px; height: 55px; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); }
  .whatsapp-float img { width: 29px; height: 29px; }
  .viewport-blur { height: 55px; }
}
@media(max-width:380px) {
  .integration-copy { max-width: 234px; }
  .integration-copy h2 { font-size: 36px; }
  .integration-copy p { max-width: 220px; }
  .brand-orb { width: 42px; height: 42px; }
  .brand-orb img { width: 25px; height: 25px; }
  .brand-cloudflare img { width: 30px; }
  .brand-figma img { width: 21px; }
}
@media(prefers-reduced-motion:reduce) {
  .reveal-pending { opacity: 1; transform: none; }
  .whatsapp-float:hover, .whatsapp-float:active { transform: none; }
  .hero-content, .hero-devices, .hero-sky { transform: none!important; opacity: 1!important; }
}
@media print {
  .reveal-pending { opacity: 1; transform: none; }
  .whatsapp-float, .viewport-blur { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { animation: hero-content-reveal 650ms var(--ease-out) both; }
  .hero-content > :nth-child(2) { animation-delay: 60ms; }
  .hero-content > :nth-child(3) { animation-delay: 120ms; }
  .hero-content > :nth-child(4) { animation-delay: 180ms; }
  @keyframes hero-content-reveal {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* The landscape blends into the white footer and frames the signature. */
.footer-landscape{height:clamp(360px,40vw,680px);margin-top:20px;display:flex;align-items:flex-end;overflow:hidden;background:linear-gradient(#fff,transparent 24%),url('assets/footer-landscape.png') center bottom/cover no-repeat}
.footer-landscape .footer-wordmark{width:100%;flex:none;margin-top:0;margin-bottom:-4.7vw;background-image:linear-gradient(180deg,#171c17 12%,#454d42 85%,#7d8973 105%)}
@media(max-width:580px){.footer-landscape{height:330px;margin-top:16px;background-position:center bottom}.footer-landscape .footer-wordmark{margin-top:0;margin-bottom:-4vw}}
