/* ==========================================================================
   ClickRelay website styles
   Palette: warm ivory, deep ink, electric cobalt (primary accent),
   signal orange (small highlights only, never body text), soft grey lines.
   Shape rule: buttons are full pills, panels/cards are 24px,
   media frames are 20px, form inputs are 12px. Keep to this everywhere.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours */
  --ivory: #F7F6F2;
  --ink: #111318;
  --cobalt: #4357FF;
  --cobalt-hover: #2E43EB;
  --orange: #FF7048;
  --grey: #E7E7E2;

  /* Derived tokens */
  --bg: var(--ivory);
  --surface: #FFFFFF;
  --text: #2F323A;
  --muted: #5D606A;
  --line: var(--grey);
  --field-border: #8E9099;
  --on-dark: #F7F6F2;
  --on-dark-muted: #A7AAB4;
  --cobalt-on-dark: #A9B3FF;
  --error: #B42318;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-panel: 24px;
  --radius-media: 20px;
  --radius-field: 12px;

  --container: 1240px;
  --gutter: 24px;
  --section-y: clamp(80px, 10vw, 136px);

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(67, 87, 255, 0.14);
}

a, button, select, label { touch-action: manipulation; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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 {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  text-decoration: none; transition: top 0.3s var(--ease);
}
.skip:focus { top: 16px; }

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

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

/* ---------- Type scale ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
}
h1 {
  font-size: clamp(3.1rem, 8.2vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.5s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:has(.btn-icon) { padding-right: 10px; }

.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-hover); }

.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(17, 19, 24, 0.22); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-whatsapp { background: var(--ink); color: #fff; }
.btn-whatsapp:hover { background: #262A33; }

.btn-sm { min-height: 42px; padding: 8px 18px; font-size: 0.92rem; }

.btn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.5s var(--ease);
}
.btn-icon svg { width: 16px; height: 16px; fill: currentColor; }
.btn:hover .btn-icon { transform: translate(2px, -2px) scale(1.05); }
.btn-lead-icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- Brand ---------- */
/* Logo files live in assets/img/brand/. Height drives size; width follows the
   logo's own 960:152 proportions, so it is never stretched. */
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.brand-logo { display: block; height: 28px; width: auto; }
.brand--footer .brand-logo { height: 36px; }

/* ---------- Navigation (floating island) ---------- */
.nav-wrap {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 40;
  padding: 0 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  margin: 0 auto;
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 8px 8px 8px 18px;
  min-height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.07), 0 10px 30px -16px rgba(17, 19, 24, 0.25);
}
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  cursor: pointer;
}
.menu-toggle .bar {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.menu-toggle .bar:nth-of-type(2) { top: 18px; }
.menu-toggle .bar:nth-of-type(3) { top: 25px; }
.menu-toggle[aria-expanded="true"] .bar:nth-of-type(2) { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-of-type(3) { top: 21.5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 40px;
  padding: 110px 24px 40px;
  background: rgba(247, 246, 242, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  overscroll-behavior: contain;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { display: grid; gap: 4px; margin-top: auto; }  /* auto margins centre it, but never push it above the top */
.mobile-menu li a {
  display: block;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu-ctas { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: auto; }
.mobile-menu.is-open li,
.mobile-menu.is-open .mobile-menu-ctas { animation: rise 0.7s var(--ease-out) both; }
.mobile-menu.is-open li:nth-child(2) { animation-delay: 0.04s; }
.mobile-menu.is-open li:nth-child(3) { animation-delay: 0.08s; }
.mobile-menu.is-open li:nth-child(4) { animation-delay: 0.12s; }
.mobile-menu.is-open li:nth-child(5) { animation-delay: 0.16s; }
.mobile-menu.is-open .mobile-menu-ctas { animation-delay: 0.2s; }

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

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(136px, 15vw, 184px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.hero-tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 26px;
}
.hero-tagline::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
}
.hero h1 { max-width: 10.5em; }
.hero-bottom {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}
.hero-sub {
  max-width: 36em;
  font-size: clamp(1.04rem, 1.3vw, 1.16rem);
  color: var(--text);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

/* ---------- Journey (the one dark panel) ---------- */
.journey { padding-bottom: clamp(24px, 4vw, 40px); }
.journey-panel {
  padding: clamp(40px, 6.5vw, 96px);
  border-radius: var(--radius-panel);
  background: var(--ink);
  color: var(--on-dark-muted);
}
.journey-head { max-width: 760px; }
.journey-head h2 { color: var(--on-dark); }
.journey-head p { margin-top: 18px; font-size: 1.08rem; max-width: 34em; }

.stages {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.stage { position: relative; padding-top: 44px; }
.stage-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--cobalt);
  box-shadow: 0 0 0 5px rgba(67, 87, 255, 0.22);
}
.stage--last .stage-node {
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 112, 72, 0.22);
}
/* Connector from each node to the next stage's node */
.stage:not(.stage--last)::after {
  content: "";
  position: absolute;
  top: 7.5px;
  left: 28px;
  width: calc(100% + 48px - 40px);
  height: 1px;
  background: rgba(247, 246, 242, 0.28);
  transform-origin: left center;
}
.stage h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  letter-spacing: -0.035em;
  color: var(--on-dark);
}
.stage p { margin-top: 12px; max-width: 26em; }
.stage-services { margin-top: 12px; display: grid; gap: 0; }
.stage-services a {
  display: inline-block;
  padding: 10px 0;
  color: var(--cobalt-on-dark);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}
.stage-services a:hover { text-decoration: underline; text-underline-offset: 4px; }

.journey-line {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  box-shadow: inset 0 1px 0 rgba(247, 246, 242, 0.12);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  max-width: 34em;
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 34em;
}

/* ---------- Services: one gapless grid, hairline dividers ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.service {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.6vw, 48px);
  background: var(--surface);
  scroll-margin-top: 96px;
}
.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.service-icon { width: 34px; height: 34px; fill: var(--cobalt); }
.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.stage-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cobalt);
}
.stage-tag--respond::before { background: var(--orange); }
.service h3 { margin-top: 36px; font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -0.03em; }
.service p { margin-top: 12px; max-width: 34em; }
.service p.fine { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
.service-link {
  margin-top: auto;
  padding-top: 28px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cobalt);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
}
.service-link svg { width: 14px; height: 14px; fill: currentColor; transition: transform 0.4s var(--ease); }
.service-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.service-link:hover svg { transform: translate(2px, -2px); }

/* ---------- Concept work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px;
}
.work-item { margin: 0; }
.work-item--a { grid-column: 1 / span 7; }
.work-item--b { grid-column: 8 / span 5; margin-top: clamp(0px, 8vw, 104px); }
.work-item--c { grid-column: 3 / span 6; }
.work-frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-media);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
/* Placeholder media: shown until real screenshots are added */
.media-slot {
  position: relative;
  background:
    linear-gradient(135deg, rgba(67, 87, 255, 0.06), transparent 55%),
    #EFEEE9;
}
.slot-note {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
}
.work-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.work-title { font-weight: 550; color: var(--ink); letter-spacing: -0.01em; }
.tag {
  flex: none;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--cobalt);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(67, 87, 255, 0.4);
}

/* ---------- Process ---------- */
.process { padding-top: clamp(40px, 5vw, 64px); }
.process-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 48px;
}
.process-head p { margin-top: 14px; color: var(--muted); font-size: 1.06rem; }
.steps { display: grid; }
.steps li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 24px 0;
  box-shadow: inset 0 1px 0 var(--line);
}
.steps li:last-child { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.steps .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.2rem; }
.steps p { margin-top: 6px; color: var(--muted); max-width: 40em; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-intro p { margin-top: 18px; color: var(--muted); font-size: 1.06rem; max-width: 26em; }
.contact-intro .btn-whatsapp { margin-top: 32px; }
.contact-alt { margin-top: 36px; display: grid; gap: 20px; }
.contact-alt li { display: flex; gap: 14px; align-items: flex-start; }
.contact-alt svg { flex: none; width: 22px; height: 22px; fill: var(--ink); margin-top: 3px; }
.alt-label { display: block; font-size: 0.84rem; color: var(--muted); }
.alt-value {
  display: inline-block;
  padding: 10px 0;
  font-weight: 550;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(67, 87, 255, 0.45);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.alt-value:hover { color: var(--cobalt); }

.form-card {
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px -32px rgba(17, 19, 24, 0.18);
}
.inquiry { display: grid; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: 0.92rem; font-weight: 550; color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-field);
  background: #FCFCFA;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(67, 87, 255, 0.18);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.help { font-size: 0.86rem; color: var(--muted); }
.error { font-size: 0.86rem; color: var(--error); }
.error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 0.86rem; color: var(--muted); }
.form-note { font-size: 0.86rem; color: var(--muted); margin-top: -8px; }
.form-note[hidden] { display: none; }
.btn-submit { justify-self: start; }
.btn-submit[disabled] { opacity: 0.6; cursor: progress; }

.form-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius-field);
  font-size: 0.95rem;
}
/* kept in the page (not display:none) so screen readers announce new messages */
.form-status:empty { padding: 0; }
.form-status svg { flex: none; width: 22px; height: 22px; fill: currentColor; margin-top: 1px; }
.form-status a { font-weight: 600; text-underline-offset: 3px; }
.form-status.is-success { background: #E6F4EC; color: #0B4A2E; }
.form-status.is-info { background: #ECEEFF; color: #1E2A8F; }
.form-status.is-error { background: #FBEAE8; color: #8F1C13; }

/* ---------- Closing ---------- */
.closing { padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 9vw, 120px); }
.closing-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.closing h2 {
  font-size: clamp(2.3rem, 5.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 13em;
}

/* ---------- Footer ---------- */
.footer { padding-bottom: 32px; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 40px;
  padding-top: 48px;
  box-shadow: inset 0 1px 0 var(--line);
}
.footer-descriptor { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.footer-tagline {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.footer-base-line { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.footer-heading {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-links { display: grid; gap: 0; align-content: start; font-size: 0.94rem; }
.footer-links a { display: inline-block; padding: 12px 0; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--cobalt); text-underline-offset: 4px; }
.footer-base { margin-top: 48px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  /* ivory ring keeps it visible over the dark journey panel */
  box-shadow: 0 0 0 2px var(--ivory), 0 12px 30px -12px rgba(17, 19, 24, 0.45);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0s, background-color 0.3s var(--ease);
}
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }
.wa-float-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.wa-float:hover { background: #262A33; }
.wa-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}

/* ---------- No-JavaScript fallbacks ---------- */
/* The form needs main.js (it opens WhatsApp); without it, show the direct contact links instead */
html:not(.js) .form-card,
html:not(.js) .wa-float { display: none; }
.noscript-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-field);
  background: #ECEEFF;
  color: #1E2A8F;
  font-size: 0.95rem;
}

/* ---------- Concept work: compact "in progress" rows until a real screenshot replaces .media-slot ---------- */
.work-status { display: none; }
.work-item:has(.media-slot) { grid-column: 1 / -1; margin-top: 0; }
.work-item:has(.media-slot) .work-frame { display: none; }
.work-item:has(.media-slot) figcaption {
  margin-top: 0;
  padding: 20px 0;
  box-shadow: inset 0 1px 0 var(--line);
}
.work-item:has(.media-slot) .work-status {
  display: inline;
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.86rem;
  color: var(--muted);
}
.work-grid:has(.media-slot) { gap: 0; }
.work-grid:has(.media-slot) .work-item:last-child figcaption { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }

/* ---------- 404 page ---------- */
.notfound { min-height: 100dvh; display: grid; align-content: center; gap: 28px; padding-top: 48px; padding-bottom: 48px; }
.notfound .brand-logo { height: 30px; }
.notfound h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 12em; }
.notfound p { max-width: 32em; color: var(--muted); font-size: 1.06rem; }
.notfound-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Scroll reveal (only when JS is on and motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  /* Journey connectors draw left to right as each stage appears */
  .js .stage.reveal:not(.stage--last)::after {
    transform: scaleX(0);
    transition: transform 1s var(--ease-out) 0.25s;
  }
  .js .stage.reveal.is-in:not(.stage--last)::after { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 22px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 960px) {
  .nav-links,
  .nav-cta { display: none; }
  .js .menu-toggle { display: block; }
  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-bottom { grid-template-columns: 1fr; }
  .hero-ctas { justify-content: flex-start; }

  .stages { grid-template-columns: 1fr; gap: 36px; }
  .stage { padding-top: 0; padding-left: 40px; }
  .stage-node { top: 6px; }
  .stage:not(.stage--last)::after {
    top: 30px;
    left: 7.5px;
    width: 1px;
    height: calc(100% - 30px + 36px + 6px);
    transform-origin: center top;
  }
  .js .stage.reveal:not(.stage--last)::after { transform: scaleY(0); }
  .js .stage.reveal.is-in:not(.stage--last)::after { transform: scaleY(1); }

  .service-grid { grid-template-columns: 1fr; }

  .work-item--a,
  .work-item--b,
  .work-item--c { grid-column: 1 / -1; margin-top: 0; }

  .process-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-wrap { top: calc(10px + env(safe-area-inset-top, 0px)); padding: 0 10px; }
  .brand-logo { height: 25px; }
  .brand--footer .brand-logo { height: 32px; }
  .hero-ctas .btn { width: 100%; justify-content: space-between; }
  .hero-ctas .btn-ghost { justify-content: center; }
  .journey-panel { border-radius: 20px; padding: 36px 22px; }
  .field-row { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 48px 1fr; gap: 14px; }
  .btn-submit { justify-self: stretch; justify-content: space-between; }
  .contact-intro .btn-whatsapp { width: 100%; justify-content: center; }
  .closing-inner .btn { width: 100%; justify-content: space-between; }
  .footer-inner { grid-template-columns: 1fr; }
  .wa-float { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}


/* ---------- Real project portfolio ---------- */
#work .section-head .eyebrow { margin-bottom: 12px; }
#work .work-grid--portfolio {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 4.5vw, 64px) 28px;
  margin-top: clamp(36px, 5vw, 64px);
}
#work .work-item,
#work .work-item--a,
#work .work-item--b,
#work .work-item--c {
  grid-column: auto;
  margin-top: 0;
  min-width: 0;
}
#work .work-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: #e9e8e2;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 24, .08);
  isolation: isolate;
}
#work .work-preview::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(17, 19, 24, .46));
  opacity: .72;
  transition: opacity .3s ease;
}
#work .work-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .65s var(--ease);
}
#work .work-preview:hover img,
#work .work-preview:focus-visible img { transform: scale(1.035); }
#work .work-preview:hover::after,
#work .work-preview:focus-visible::after { opacity: 1; }
#work .work-preview-cta {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
}
#work .work-card-copy { padding: 18px 2px 0; }
#work .work-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
#work .work-kind {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}
#work .work-title {
  margin-top: 14px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
}
#work .work-title a { text-decoration: none; }
#work .work-title a:hover { color: var(--cobalt); }
#work .work-title a span { font-size: .75em; color: var(--cobalt); }
#work .work-description {
  margin-top: 10px;
  max-width: 54ch;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.65;
}
#work .work-text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#work .work-text-link:hover { color: var(--cobalt); }
#work .work-footnote {
  margin-top: 32px;
  color: var(--muted);
  font-size: .88rem;
}
@media (max-width: 700px) {
  #work .work-grid--portfolio { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  #work .work-card-top { align-items: flex-start; }
  #work .work-title { font-size: 1.6rem; }
  #work .work-preview-cta { right: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #work .work-preview img,
  #work .work-preview::after { transition: none; }
}
