/* ==========================================================================
   Toque Digital — Home (ES / EN)
   Category standard at Stripe craft: light ground, near-black ink,
   one blue for actions, real product screenshots in device frames.
   ========================================================================== */

:root {
  --ground: #f7f7f7;
  --surface: #ffffff;
  --ink: #0b0c0f;
  --text: #3a3f4b;
  --muted: #5b6170;
  --line: #e3e4e8;
  --line-strong: #d2d4da;
  --chip: #ececef;
  --blue: #3366c4;
  --blue-hover: #2852a6;
  --blue-press: #22488f;
  --blue-ink: #2a58b0;
  --blue-wash: #eaf0fb;
  --cyan: #06b6d4;
  --navy: #1e3a5f;
  --danger: #b42318;

  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1080px;
  --gutter: 20px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 18px -8px rgba(16, 24, 40, 0.16);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.05), 0 14px 24px -12px rgba(16, 24, 40, 0.24);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.overflow-hidden { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

::selection { background: #cddcf6; color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
input, textarea { caret-color: var(--blue); }
html { scrollbar-color: #c9ccd3 var(--ground); }
::-webkit-scrollbar { width: 12px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #c9ccd3; border-radius: 99px; border: 3px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: #aeb2bb; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius);
  text-decoration: none; font-weight: 500; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Type ---------- */
.display, .h2, .h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-optical-sizing: auto;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.375rem, 1.6rem + 2.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.032em;
}
.h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.028em;
}
.h3 {
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.018em;
}
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.muted { color: var(--muted); }
.section-head { max-width: 680px; }
.section-head .lead { margin-top: 18px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-size: 16px; font-weight: 550; line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.18s, box-shadow 0.18s, transform 0.12s, border-color 0.18s, color 0.18s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 6px 14px -6px rgba(16, 24, 40, 0.35); }
.btn-primary:active { background: var(--blue-press); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: #b9bcc5; background: #fbfbfc; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.link {
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1.5px;
  text-underline-offset: 5px; text-decoration-color: #9aa0ad;
  transition: text-decoration-color 0.18s, color 0.18s;
}
.link:hover { text-decoration-color: var(--ink); }
.link-blue {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue-ink); font-weight: 550; text-decoration: none;
}
.link-blue .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease-out); }
.link-blue:hover { color: var(--blue-hover); }
.link-blue:hover .icon { transform: translateX(3px); }
.link-blue .icon-diag { transition: transform 0.2s var(--ease-out); }
.link-blue:hover .icon-diag { transform: translate(2px, -2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 247, 0);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}
.site-header.is-scrolled {
  background: rgba(247, 247, 247, 0.86);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 32px; height: 32px; }
.brand span { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }

.nav-links { display: none; align-items: center; gap: 4px; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 15.5px; font-weight: 500; color: var(--ink);
  text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: rgba(11, 12, 15, 0.05); }
.nav-link.is-active { color: var(--blue-ink); }
.nav-trigger .icon { width: 15px; height: 15px; color: var(--muted); transition: transform 0.2s var(--ease-out); }
.nav-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }

.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: -8px; min-width: 300px;
  padding: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.22s var(--ease-out), visibility 0s linear 0.22s;
}
.dropdown.is-open .dropdown-panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.18s, transform 0.22s var(--ease-out), visibility 0s;
}
.dropdown-panel a {
  display: block; padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.dropdown-panel a:hover { background: var(--ground); }
.dropdown-panel strong { display: block; font-size: 15px; font-weight: 600; }
.dropdown-panel span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex; align-items: center; padding: 3px;
  background: var(--chip); border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.lang a, .lang span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 30px; padding: 0 10px; border-radius: 999px;
  text-decoration: none; color: var(--muted);
  transition: color 0.15s, background-color 0.15s;
}
.lang a:hover { color: var(--ink); }
.lang [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 20px; height: 20px; }

.mobile-menu {
  position: fixed; inset: 72px 0 auto 0; z-index: 40;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 12px var(--gutter) 24px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0s; }
.mobile-menu nav a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.mobile-menu .btn { width: 100%; margin-top: 20px; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 28px; overflow-x: clip; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { max-width: 560px; }
.hero-copy .lead { margin-top: 22px; max-width: 34em; color: #333845; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 30px; }

.devices { position: relative; aspect-ratio: 2528 / 1696; width: 100%; }
.devices > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* feather the photo ground into the page ground so no rectangle shows */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
.screen { position: absolute; overflow: hidden; background: #0d1a2e; }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.screen-laptop { left: 13.212%; top: 8.903%; width: 67.919%; height: 68.219%; }
.screen-tablet { left: 60.522%; top: 21.58%; width: 12.263%; height: 65.979%; border-radius: 6% 0 0 6% / 1.6% 0 0 1.6%; }
.screen-phone {
  left: 74.248%; top: 23.29%; width: 19.699%; height: 65.33%; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 498 1108' preserveAspectRatio='none'%3E%3Cpath d='M56 0H131V20Q131 48 159 48H340Q368 48 368 20V0H442A56 56 0 0 1 498 56V1052A56 56 0 0 1 442 1108H56A56 56 0 0 1 0 1052V56A56 56 0 0 1 56 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 498 1108' preserveAspectRatio='none'%3E%3Cpath d='M56 0H131V20Q131 48 159 48H340Q368 48 368 20V0H442A56 56 0 0 1 498 56V1052A56 56 0 0 1 442 1108H56A56 56 0 0 1 0 1052V56A56 56 0 0 1 56 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.screen-phone img { object-position: top center; }

/* The one authored moment: the screens wake up, laptop first, then tablet and phone. */
@media (prefers-reduced-motion: no-preference) {
  .screen img { animation: screen-wake 1.1s var(--ease-out) both; }
  .screen-laptop img { animation-delay: 0.15s; }
  .screen-tablet img { animation-delay: 0.45s; }
  .screen-phone img { animation-delay: 0.65s; }
  @keyframes screen-wake {
    from { clip-path: inset(0 0 10% 0); filter: brightness(1.45) saturate(0.5); }
    to { clip-path: inset(0 0 0 0); filter: none; }
  }
}

/* Floating proof around the device cluster */
.hero-badge, .hero-stat {
  position: absolute; z-index: 2; display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.hero-badge { gap: 8px; padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.hero-badge b { font-weight: 650; color: var(--ink); }
.hero-badge i { width: 9px; height: 9px; border-radius: 50%; background: #1f9d5c; box-shadow: 0 0 0 3px rgba(31, 157, 92, 0.16); }
.hero-stat { gap: 12px; padding: 12px 16px; border-radius: 14px; }
.hero-stat strong { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--blue); }
.hero-stat span { font-size: 13px; line-height: 1.3; color: var(--muted); }
.hb-1 { top: 1%; left: 4%; }
.hb-2 { right: 1%; bottom: 3%; }
.hb-3 { left: -2%; bottom: 12%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-badge, .hero-stat { animation: hb-in 0.7s var(--ease-out) both, badge-float 6s ease-in-out infinite alternate; }
  .hb-1 { animation-delay: 1.1s, 1.8s; }
  .hb-3 { animation-delay: 1.3s, 2s; }
  .hb-2 { animation-delay: 1.5s, 2.2s; }
  @keyframes hb-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
}
@media (max-width: 639px) {
  .hero-badge { padding: 5px 10px 5px 9px; font-size: 12px; gap: 6px; }
  .hero-badge span { display: none; }
  .hero-stat { padding: 8px 11px; gap: 8px; }
  .hero-stat strong { font-size: 1.25rem; }
  .hero-stat span { font-size: 11.5px; }
  .hb-3 { left: 0; bottom: 6%; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px 0 11px;
  background: var(--chip); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: #2b303b; white-space: nowrap;
  gap: 6px;
}
.chip .icon { width: 15px; height: 15px; color: var(--blue); }

/* Service rail: starts on the container edge, runs off the right edge of the page. */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 262px); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 40px max(var(--gutter), calc((100% - var(--max)) / 2)) 28px;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  scrollbar-width: thin;
}
.rail-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column; min-height: 196px; padding: 24px 22px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.rail-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rail-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 16px;
  border-radius: 10px; background: var(--blue-wash); color: var(--blue);
  transition: background-color 0.25s, color 0.25s;
}
.rail-icon .icon { width: 20px; height: 20px; }
.rail-card:hover .rail-icon { background: var(--blue); color: #fff; }
.rail-title { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.rail-card p { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.rail-card .go { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 550; color: var(--blue-ink); }
.rail-card .go .icon { width: 15px; height: 15px; transition: transform 0.2s var(--ease-out); }
.rail-card:hover .go .icon { transform: translateX(3px); }

@media (min-width: 960px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 44px; }
  .devices { width: calc(100% + 72px); }
  .chips { margin-top: 36px; }
}
@media (min-width: 1200px) {
  .devices { width: calc(100% + 120px); }
}

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section + .section { border-top: 1px solid var(--line); }
.section-white { background: var(--surface); }
@media (min-width: 960px) { .section { padding-block: 128px; } }

/* Specialties */
.spec-head { display: grid; gap: 18px; }
.spec-head .lead { max-width: 36em; }
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.jump a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 15px; font-weight: 550; color: var(--ink); text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.jump a .icon { width: 16px; height: 16px; color: var(--blue); transition: transform 0.2s var(--ease-out); }
.jump a:hover { border-color: var(--blue); color: var(--blue-ink); background: var(--blue-wash); }
.jump a:hover .icon { transform: translateY(2px) rotate(90deg); }

.spec { display: grid; gap: 48px; align-items: start; margin-top: 72px; scroll-margin-top: 96px; }
.spec + .spec { margin-top: 112px; }
.spec-copy .h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.024em; }
.spec-copy > p { margin-top: 14px; max-width: 38em; }
.spec-copy > p a { color: var(--blue-ink); font-weight: 550; text-underline-offset: 4px; }
.checks { display: grid; gap: 10px 28px; margin-top: 26px; }
.checks li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: #2b303b; }
.checks .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }
.tiles { gap: 8px; }
.tiles li {
  align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--ground); border: 1px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.tiles li:hover { background: var(--surface); border-color: var(--line); }
.tiles .icon { width: 22px; height: 22px; margin-top: -1px; padding: 4px; border-radius: 50%; background: var(--blue-wash); }
.spec-copy .btn { margin-top: 30px; }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Layered product stage: browser frame + phone + capability badges */
.spec-stage { position: relative; padding: 0 6% 12% 0; }
.mini-phone {
  position: absolute; right: 0; bottom: 0; width: 27%; aspect-ratio: 9 / 19;
  overflow: hidden; border-radius: 22px; border: 5px solid #111318; background: #111318;
  box-shadow: var(--shadow-lg);
}
.mini-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 17px; }
.float-badge {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.fb-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--blue); color: #fff;
}
.fb-icon .icon { width: 15px; height: 15px; }
.fb-a { left: -12px; top: 62%; }
.fb-b { left: 10%; bottom: 2%; }
@media (prefers-reduced-motion: no-preference) {
  .float-badge { animation: badge-float 5.5s ease-in-out infinite alternate; }
  .fb-b { animation-delay: -2.75s; }
  @keyframes badge-float { from { transform: translateY(0); } to { transform: translateY(-7px); } }
}

.frame {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.frame-bar {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px;
  background: #f3f4f6; border-bottom: 1px solid var(--line);
}
.frame-dots { display: flex; gap: 6px; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5d7dd; }
.frame-url {
  flex: 1; max-width: 260px; margin-inline: auto; height: 24px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.frame-url .icon { width: 11px; height: 11px; }
.frame > img, .frame picture img { width: 100%; height: auto; }

@media (max-width: 639px) {
  .fb-a { left: 0; top: 58%; }
  .float-badge { font-size: 13px; padding: 6px 12px 6px 6px; }
  .fb-icon { width: 24px; height: 24px; }
  .mini-phone { border-width: 4px; border-radius: 16px; }
  .mini-phone img { border-radius: 12px; }
}
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .spec-head { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .spec { grid-template-columns: 1fr 1fr; gap: 64px; }
  .spec-media { position: sticky; top: 104px; }
  .spec-reverse .spec-media { order: 2; }
}


/* Portfolio: brand-colored scenes with the real product bleeding off the edge */
.cases { display: grid; gap: 20px; margin-top: 56px; }
.case {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
}
.case:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.case-visual { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--cv, #eef2f8); }
.cv-milab { --cv: #0c1b31; }
.cv-basal { --cv: #e3f1ec; }
.cv-madre { --cv: #f1e6d8; }
.cv-wl { --cv: #eaf0fb; }
.case-visual .shot {
  position: absolute; left: 22%; top: 13%; width: 96%; max-width: none; height: auto;
  border-radius: 10px 0 0 0; box-shadow: 0 22px 44px -14px rgba(8, 15, 30, 0.45);
  transition: transform 0.7s var(--ease-out);
}
.cv-milab .shot { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 22px 44px -14px rgba(0, 0, 0, 0.6); }
.case-visual .mini-phone { left: 5%; right: auto; top: 22%; bottom: auto; width: 25%; transition: transform 0.7s var(--ease-out); }
.case:hover .case-visual .shot { transform: translate(-6px, -6px); }
.case:hover .case-visual .mini-phone { transform: translateY(-8px); }

.case-body { display: flex; flex-direction: column; flex: 1; padding: 28px; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: #146c43; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1f9d5c; box-shadow: 0 0 0 3px rgba(31, 157, 92, 0.15); }
.soon { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--blue-ink); }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(51, 102, 196, 0.15); }
.case-body > p:not(.case-meta) { margin-top: 12px; color: var(--text); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 0; }
.stats div { padding: 16px 16px 14px; border-radius: 12px; background: var(--ground); }
.stats dt {
  font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; line-height: 1;
  letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stats dd { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }

.facts { margin-top: 18px; display: grid; border-top: 1px solid var(--line); }
.facts li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: #2b303b; }
.facts .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }
.case-foot { margin-top: auto; padding-top: 22px; }

/* White-label: one platform, many branded clinics */
.tenants { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 8%; }
.tenant {
  display: flex; align-items: center; gap: 12px; width: min(100%, 420px); padding: 12px 14px;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-md);
  font-size: 14px; color: var(--ink);
}
.tenant.t2 { margin-left: 8%; }
.tenant.t3 { margin-left: 16%; }
.tenant-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; background: var(--tc); }
.t1 { --tc: #2f7d6b; }
.t2 { --tc: #b2563f; }
.t3 { --tc: #5b4fb3; }
.tenant-url { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tenant-url .icon { width: 12px; height: 12px; color: var(--muted); flex: none; }
.tenant-tag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 14%, white); color: var(--tc); font-size: 12.5px; font-weight: 600; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .tenant { animation: badge-float 6s ease-in-out infinite alternate; }
  .tenant.t2 { animation-delay: -2s; }
  .tenant.t3 { animation-delay: -4s; }
}

@media (max-width: 639px) {
  .tenant-tag { display: none; }
  .stats dt { font-size: 1.5rem; }
}
@media (min-width: 900px) {
  .cases { grid-template-columns: 1fr 1fr; }
  .case-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
  .case-wide .case-visual { aspect-ratio: auto; min-height: 380px; }
  .case-wide .case-body { justify-content: center; padding: 40px; }
  .case-wide .shot { left: 18%; top: 12%; width: 92%; }
  .case-wide .mini-phone { width: 21%; }
}


/* Services: image-led cards */
.services { display: grid; gap: 20px; margin-top: 56px; }
.service-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.service-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef1f5; }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.service-card:hover .service-media img { transform: scale(1.045); }
.service-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 22px; }
.service-body .h3 { font-size: 1.25rem; }
.service-body > p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags li {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px;
  border-radius: 999px; background: var(--ground); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: #2b303b; white-space: nowrap;
}
.service-body .link-blue { margin-top: auto; padding-top: 20px; font-size: 15px; }
.svc-icon {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; background: var(--blue); color: #fff; box-shadow: var(--shadow-md);
}
.svc-icon .icon { width: 21px; height: 21px; }
.svc-chips { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.svc-chips span {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-md);
  font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
  transition: transform 0.35s var(--ease-out);
}
.svc-chips .icon { width: 14px; height: 14px; color: var(--blue); }
.service-card:hover .svc-chips span { transform: translateY(-3px); }
.service-card:hover .svc-chips span + span { transition-delay: 0.05s; }

/* Every project includes */
.includes { margin-top: 48px; padding: 28px; border-radius: var(--radius-xl); background: var(--ground); }
.includes-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.018em; line-height: 1.2; color: var(--ink); }
.include-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.include-grid li {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500; line-height: 1.3; color: #2b303b;
  transition: border-color 0.2s, transform 0.25s var(--ease-out);
}
.include-grid li:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.inc-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue-wash); color: var(--blue);
}
.inc-icon .icon { width: 18px; height: 18px; }
@media (min-width: 700px) { .include-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) {
  .includes { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
  .include-grid { margin-top: 0; grid-template-columns: repeat(6, 1fr); }
  .include-grid li { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px; }
}
@media (min-width: 900px) { .services { grid-template-columns: repeat(3, 1fr); } }

/* Process: timeline that fills as it scrolls into view */
.timeline { position: relative; margin-top: 64px; --node: 52px; --gap: 28px; }
.timeline-track {
  position: absolute; left: calc(var(--node) / 2 - 1px); top: calc(var(--node) / 2); bottom: calc(var(--node) / 2);
  width: 2px; background: var(--line-strong); border-radius: 2px; overflow: hidden;
}
.timeline-fill { position: absolute; inset: 0; background: var(--blue); transform-origin: top; transition: transform 1.6s var(--ease-out); }
.steps { display: grid; gap: 36px; position: relative; }
.step { position: relative; padding-left: calc(var(--node) + 20px); }
.step-node {
  position: absolute; left: 0; top: 0; width: var(--node); height: var(--node);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--blue); color: #fff; border: 2px solid var(--blue);
  box-shadow: 0 0 0 6px var(--ground);
  transition: background-color 0.45s, color 0.45s, border-color 0.45s, transform 0.45s var(--ease-out);
}
.step-node .icon { width: 22px; height: 22px; }
.step .h3 { font-size: 1.25rem; padding-top: 4px; }
.step-when {
  display: inline-flex; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--blue-wash); font-size: 13.5px; font-weight: 600; color: var(--blue-ink);
}
.step-text { margin-top: 10px; font-size: 15px; color: var(--muted); }
.step .tags li { background: var(--surface); }
/* mobile: stop the vertical line at the last node */
.step:last-child::after { content: ""; position: absolute; left: calc(var(--node) / 2 - 1px); top: var(--node); bottom: -4px; width: 2px; background: var(--ground); }

/* Phase vignettes: a small picture of what each phase hands over */
.vig {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  min-height: 150px; margin: 4px 0 20px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  font-size: 13px; color: #2b303b;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.vig .icon { width: 15px; height: 15px; flex: none; }
.vig-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vig-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.swatches { display: flex; gap: 5px; }
.swatches i { width: 22px; height: 22px; border-radius: 6px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.08); }
.type-sample { display: flex; align-items: baseline; gap: 8px; }
.type-sample b { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.type-sample span { font-size: 16px; font-weight: 500; color: var(--muted); }
.wire { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 9px 9px; gap: 4px; width: 92px; }
.wire i { border-radius: 3px; background: #dfe3ea; }
.wire i:first-child { grid-row: 1 / 3; background: var(--blue-wash); border: 1px solid #c9d7f2; }

.mini-bar {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px;
  background: var(--ground); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden;
}
.mini-bar .icon { width: 11px; height: 11px; }
.comment { display: flex; align-items: flex-start; gap: 8px; }
.comment .avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
  border-radius: 50%; background: #f1e6d8; color: #8a5a2b; font-size: 11.5px; font-weight: 700;
}
.comment span:last-child { padding: 6px 10px; border-radius: 4px 10px 10px 10px; background: #fff7e6; border: 1px solid #f3e1b8; line-height: 1.35; }
.resolved { display: inline-flex; align-self: flex-end; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #e7f6ee; color: #146c43; font-size: 12.5px; font-weight: 600; }

.device-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.device {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px;
  border-radius: 8px; background: var(--ground); color: var(--ink);
}
.device .icon { width: 22px; height: 22px; }
.device small { font-size: 11.5px; color: var(--muted); }
.device em, .pay-test em {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  background: #1f9d5c; color: #fff; font-style: normal;
}
.device em { position: absolute; top: 5px; right: 5px; }
.device em .icon, .pay-test em .icon { width: 10px; height: 10px; }
.pay-test { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--ground); }
.pay-test em { margin-left: auto; }

.vig-launch .mini-bar { background: var(--surface); color: var(--ink); font-weight: 500; }
.online {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 2px 8px; border-radius: 999px;
  background: #e7f6ee; color: #146c43; font-size: 11.5px; font-weight: 600;
}
.online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1f9d5c; }
.launch-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.launch-tags span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--blue-wash); color: var(--blue-ink); font-size: 12.5px; font-weight: 600; }
.launch-tags .icon { width: 12px; height: 12px; }
@media (min-width: 900px) { .vig { min-height: 168px; } }

/* JS-enhanced: start drawn-out, then fill (no-JS and reduced motion stay complete) */
@media (prefers-reduced-motion: no-preference) {
  .js .timeline .timeline-fill { transform: scaleY(0); }
  .js .timeline .step-node { background: var(--surface); color: var(--muted); border-color: var(--line-strong); transform: scale(0.9); }
  .js .timeline.is-in .timeline-fill { transform: none; }
  .js .timeline.is-in .step-node { background: var(--blue); color: #fff; border-color: var(--blue); transform: none; }
  .js .timeline.is-in .step:nth-child(2) .step-node { transition-delay: 0.4s; }
  .js .timeline.is-in .step:nth-child(3) .step-node { transition-delay: 0.8s; }
  .js .timeline.is-in .step:nth-child(4) .step-node { transition-delay: 1.2s; }
  .js .timeline .vig { opacity: 0; transform: translateY(12px); }
  .js .timeline.is-in .vig { opacity: 1; transform: none; }
  .js .timeline.is-in .step:nth-child(1) .vig { transition-delay: 0.15s; }
  .js .timeline.is-in .step:nth-child(2) .vig { transition-delay: 0.55s; }
  .js .timeline.is-in .step:nth-child(3) .vig { transition-delay: 0.95s; }
  .js .timeline.is-in .step:nth-child(4) .vig { transition-delay: 1.35s; }
}

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
  .step { padding-left: 0; padding-top: calc(var(--node) + 24px); }
  .step:last-child::after { display: none; }
  /* nodes sit centered over each column, and the line runs from the first center to the last */
  .step-node { left: calc(50% - var(--node) / 2); }
  .timeline-track {
    left: calc((100% - 3 * var(--gap)) / 8); right: calc((100% - 3 * var(--gap)) / 8);
    top: calc(var(--node) / 2 - 1px); bottom: auto; width: auto; height: 2px;
  }
  .timeline-fill { transform-origin: left; }
  @media (prefers-reduced-motion: no-preference) {
    .js .timeline .timeline-fill { transform: scaleX(0); }
  }
}

/* Business models */
.models { display: grid; gap: 20px; margin-top: 72px; }
.model {
  display: flex; flex-direction: column; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
}
.model-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 12px; background: var(--blue-wash); color: var(--blue);
}
.model-icon .icon { width: 24px; height: 24px; }
.model .h3 { margin-top: 18px; font-size: 1.25rem; }
.model > p { margin-top: 8px; color: var(--text); }
.model-viz { margin-top: auto; padding-top: 24px; }
.milestones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.milestones span { display: block; height: 8px; border-radius: 99px; background: var(--blue); }
.milestones span + span { background: #9db6e6; }
.milestones-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.months { display: flex; gap: 6px; }
.months span {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 32px;
  border-radius: 8px; background: var(--blue-wash); font-size: 13px; font-weight: 600; color: var(--blue-ink);
}
.months span:last-child { background: transparent; border: 1px dashed #9db6e6; }
.included { padding: 28px; border-radius: var(--radius-xl); background: var(--blue-wash); }
.included .h3 { font-size: 1.25rem; }
.included ul { margin-top: 18px; display: grid; gap: 12px; }
.included li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: #26324a; }
.included li span {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px; background: var(--surface); color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.included .icon { width: 19px; height: 19px; }
@media (min-width: 900px) { .models { grid-template-columns: 1fr 1fr 1fr; } }


/* Contact */
.contact-grid { display: grid; gap: 36px; grid-template-areas: "intro" "form" "preview" "meta"; }
.contact-intro { grid-area: intro; }
.contact-intro .lead { margin-top: 18px; }
.form-card { grid-area: form; }
.wa-preview { grid-area: preview; }
.contact-meta { grid-area: meta; }
.contact-list { display: grid; gap: 12px; }

/* Live WhatsApp preview: the message the form will send, written as the visitor types */
.wa-preview {
  margin: 0; overflow: hidden; border-radius: var(--radius-xl);
  border: 1px solid var(--line); box-shadow: var(--shadow-md); background: #efeae2;
}
.wa-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #008069; color: #fff; }
.wa-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; flex: none; }
.wa-avatar svg { width: 26px; height: 26px; }
.wa-who { display: flex; flex-direction: column; line-height: 1.25; }
.wa-who b { font-size: 15px; font-weight: 600; }
.wa-who small { font-size: 12.5px; color: rgba(255, 255, 255, 0.82); }
.wa-mark { width: 22px; height: 22px; margin-left: auto; }
.wa-body {
  display: flex; justify-content: flex-end; min-height: 220px; padding: 20px 16px 18px 24px;
  background-color: #efeae2; background-image: radial-gradient(rgba(17, 27, 33, 0.05) 1px, transparent 1px); background-size: 14px 14px;
}
.wa-bubble {
  position: relative; align-self: flex-start; max-width: 92%; padding: 10px 12px 6px;
  background: #d9fdd3; border-radius: 10px 0 10px 10px; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.1);
  font-size: 14.5px; line-height: 1.5; color: #111b21;
  transition: transform 0.25s var(--ease-out);
}
.wa-bubble::after { content: ""; position: absolute; top: 0; right: -8px; border-left: 8px solid #d9fdd3; border-bottom: 10px solid transparent; }
.wa-bubble.is-typing { transform: scale(1.012); }
#wa-preview-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#wa-preview-text .ph { color: #7b8a93; }
.wa-time { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: 11.5px; color: #667781; }
.wa-time svg { width: 16px; height: 11px; color: #53bdeb; }
.wa-preview figcaption { padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.contact-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
a.contact-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.contact-item .badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px; background: var(--ground); color: var(--ink);
}
.contact-item .badge .icon { width: 20px; height: 20px; }
.contact-item .badge-wa { background: #e7f6ee; color: #128c4f; }
.contact-item small { display: block; font-size: 13px; color: var(--muted); }
.contact-item b { display: block; font-size: 16px; font-weight: 600; }
.contact-item .icon-end { width: 18px; height: 18px; margin-left: auto; color: var(--muted); }
.contact-aside { margin-top: 20px; font-size: 14.5px; color: var(--muted); max-width: 30em; }

.form-card {
  padding: 28px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
}
.form-card .h3 { font-size: 1.375rem; }
.form-card > p { margin-top: 6px; font-size: 15px; color: var(--muted); }
.form { display: grid; gap: 18px; margin-top: 24px; }
.form-row { display: grid; gap: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 550; color: var(--ink); }
.field label .req { color: var(--blue); }
.field label .opt { font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 16px; line-height: 1.4; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #676c79; }
.input:hover { border-color: #b4b8c1; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 102, 196, 0.18); }
.input.has-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6170' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
select.input:invalid { color: #676c79; }
textarea.input { resize: vertical; min-height: 112px; }
.field-error { margin-top: 6px; font-size: 13.5px; color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.form-success {
  padding: 14px 16px; border-radius: var(--radius); background: #e7f6ee; color: #0f5132; font-size: 15px;
}
.form-success a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.form-privacy { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.form-privacy .icon { width: 15px; height: 15px; margin-top: 2px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-card { padding: 36px; } }
@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr; grid-template-rows: auto 1fr auto;
    grid-template-areas: "intro form" "preview form" "meta meta";
    column-gap: 64px; row-gap: 28px; align-items: start;
  }
  .contact-meta { margin-top: 20px; padding-top: 36px; border-top: 1px solid var(--line); }
  .contact-meta .contact-list { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ---------- Footer: dark closing band ---------- */
.site-footer {
  position: relative; overflow: hidden;
  background: #0b0d12; color: #a3a9b6; padding: 88px 0 0; font-size: 15px;
}
.site-footer ::selection { background: #2a4a85; color: #fff; }
.footer-cta { display: grid; gap: 28px; align-items: end; }
.footer-title {
  font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.032em; color: #fff; text-wrap: balance;
}
.footer-cta p { margin-top: 14px; max-width: 32em; font-size: 1.0625rem; color: #b6bcc8; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.4); }
.site-footer .btn-primary:hover { box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6); }

/* Real project thumbnails, fanned out; the whole strip links to the portfolio */
.footer-shots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 56px 0 0; padding: 12px 0 64px; text-decoration: none;
}
.shot-card {
  display: block; overflow: hidden; border-radius: 12px; background: #161a22;
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.7);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  transition: transform 0.5s var(--ease-out), border-color 0.3s;
}
.shot-card.s1 { --r: -2deg; --y: 6px; }
.shot-card.s2 { --r: 0deg; --y: -6px; }
.shot-card.s3 { --r: 2deg; --y: 6px; }
.footer-shots:hover .shot-card { --r: 0deg; --y: 0; border-color: rgba(255, 255, 255, 0.16); }
.footer-shots:focus-visible { outline-offset: 8px; border-radius: 14px; }
.shot-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; background: #1b1f28; }
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: #3a404c; }
.shot-bar b { margin-left: 8px; font-size: 11.5px; font-weight: 500; color: #8f96a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

.footer-grid { display: grid; gap: 36px; padding-top: 48px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.site-footer .brand { color: #fff; }
.footer-grid p { margin-top: 14px; max-width: 36em; color: #8f96a3; }
.footer-grid h3 { font-size: 14px; font-weight: 600; color: #fff; }
.footer-grid ul { margin-top: 14px; display: grid; gap: 10px; }
.footer-grid ul a { color: #a3a9b6; text-decoration: none; transition: color 0.15s; }
.footer-grid ul a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px; color: #8f96a3;
}
.footer-wordmark {
  margin-top: 36px; text-align: center; white-space: nowrap; user-select: none; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 14.5vw, 15rem);
  line-height: 0.78; letter-spacing: -0.04em; color: #181c26;
  transform: translateY(14%);
}

@media (max-width: 639px) {
  .footer-shots { gap: 8px; padding-bottom: 48px; }
  .shot-bar { height: 18px; padding: 0 6px; gap: 3px; }
  .shot-bar i { width: 5px; height: 5px; }
  .shot-bar b { display: none; }
}
@media (min-width: 480px) and (max-width: 899px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .footer-cta { grid-template-columns: 1fr auto; gap: 48px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}


/* Back to top */
.back-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0s; }
.back-top .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Logo intro (first visit per session) ----------
   The tap mark draws, the hand taps, two ripples leave the fingertip,
   then a circle opens from the mark and reveals the page. ~1.2s. */
@property --hole { syntax: "<length>"; inherits: false; initial-value: 0px; }
.intro-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--ground);
  --hole: 0px;
  -webkit-mask: radial-gradient(circle at 50% 47%, transparent var(--hole), #000 calc(var(--hole) + 1px));
          mask: radial-gradient(circle at 50% 47%, transparent var(--hole), #000 calc(var(--hole) + 1px));
}
html.intro .intro-overlay { display: flex; animation: intro-open 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.78s forwards; }
html.intro body { overflow: hidden; }
.intro-overlay.is-skipping { transition: opacity 0.2s; opacity: 0; }
@keyframes intro-open { to { --hole: 150vmax; } }

.intro-mark { position: relative; width: 92px; height: 92px; }
.intro-logo { width: 100%; height: 100%; overflow: visible; }
.intro-arc { stroke-dashoffset: var(--len); stroke-dasharray: var(--len); animation: intro-draw 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.intro-arc.a2 { --len: 23.5; animation-delay: 0.05s; }
.intro-arc.a1 { --len: 36; animation-delay: 0.16s; }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
.intro-hand {
  transform-box: fill-box; transform-origin: 30% 0%;
  animation: intro-hand-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both, intro-tap 0.24s ease-in-out 0.4s;
}
@keyframes intro-hand-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes intro-tap { 50% { transform: translateY(1.5px) scale(0.93); } }
.intro-ripple {
  position: absolute; left: 50.5%; top: 34%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid var(--cyan); border-radius: 50%; opacity: 0;
  animation: intro-ripple 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.48s;
}
.intro-ripple.r2 { animation-delay: 0.6s; border-color: #22b8d6; }
@keyframes intro-ripple { from { opacity: 0.9; transform: scale(0.4); } to { opacity: 0; transform: scale(7); } }
.intro-word {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink);
  opacity: 0; animation: intro-word 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.26s forwards;
}
@keyframes intro-word { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* While the intro plays, hold the hero's own entrance until the page is revealed */
html.intro-played .screen-laptop img { animation-delay: 1.1s; }
html.intro-played .screen-tablet img { animation-delay: 1.35s; }
html.intro-played .screen-phone img { animation-delay: 1.55s; }
html.intro-played .hb-1 { animation-delay: 2s, 2.7s; }
html.intro-played .hb-3 { animation-delay: 2.2s, 2.9s; }
html.intro-played .hb-2 { animation-delay: 2.4s, 3.1s; }
