/* Synapse Digital — light theme, one accent. */

:root {
  --bg: #FFFFFF;
  --surface: #F5F6F4;
  --ink: #11161C;
  --muted: #5A636E;
  --border: #E3E6E3;
  --accent: #0F6B5C;
  --accent-hover: #0B5246;
  --placeholder: #E9ECE9;

  /* 8px spacing scale */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;
  --s14: 112px;

  --radius: 12px;
  --max: 1200px;
  --gutter: 24px;
  --header-h: 64px;

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s2));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1rem + .2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.375rem, 1.5rem + 3.4vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.03em;
}

h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 1.15rem + .4vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0; max-width: 65ch; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: var(--accent); text-decoration: none; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.accent { color: var(--accent); }

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

main:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: var(--s2);
  top: var(--s2);
  z-index: 200;
  padding: 12px var(--s2);
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 20px; height: 20px; }

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

.btn-secondary { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { color: var(--accent-hover); }

.btn-sm { min-height: 44px; padding: 10px 16px; font-size: .9375rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 18px; height: 18px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo-mark { width: 28px; height: 28px; color: var(--accent); flex: none; }
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 1.1875rem; letter-spacing: -.02em; }

.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: var(--s1); }
.nav-desktop a,
.mobile-menu a,
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.nav-desktop a { padding-inline: 12px; font-size: .9875rem; }
.nav-desktop a:hover,
.mobile-menu a:hover,
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }

/* Active/focus state for nav links: a thin accent underline, not the outline box */
.nav-desktop a:focus,
.nav-desktop a:active,
.mobile-menu a:focus,
.mobile-menu a:active,
.footer-nav a:focus,
.footer-nav a:active {
  outline: none;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.header-actions { display: flex; align-items: center; gap: var(--s1); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.mobile-menu ul { padding-block: var(--s1) var(--s2); }
.mobile-menu li + li { border-top: 1px solid var(--border); }
.mobile-menu a { display: flex; min-height: 56px; font-size: 1.125rem; }

/* Without JS the toggle can't work, so hide it. */
.no-js .menu-toggle { display: none; }

@media (max-width: 419px) {
  .hide-xs { display: none; }
  .header-inner { gap: var(--s1); }
  .logo { gap: 8px; }
  .logo-mark { width: 24px; height: 24px; }
  .logo-text { font-size: 1.0625rem; }
  .header-actions .btn-sm { gap: 8px; padding-inline: 12px; }
}

@media (min-width: 360px) and (max-width: 374px) {
  .header-actions .btn-sm .icon { display: none; }
}

/* Very narrow phones: icon-only header button (label stays for screen readers) */
@media (max-width: 359px) {
  .header-actions .btn-sm { width: 44px; padding: 0; }
  .header-actions .btn-sm > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

@media (min-width: 960px) {
  .nav-desktop { display: block; }
  .menu-toggle,
  .mobile-menu { display: none !important; }
}

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

.section { padding-block: clamp(var(--s8), 8vw, var(--s14)); }
.section-surface { background: var(--surface); }

.section-head { margin-bottom: clamp(var(--s4), 4vw, var(--s6)); }
.section-head p { margin-top: var(--s2); color: var(--muted); font-size: 1.125rem; }

.eyebrow {
  margin-bottom: var(--s2);
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.lead { margin-top: var(--s3); color: var(--muted); font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); }

.grid { display: grid; gap: var(--s3); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease);
}
.section-surface .card { background: var(--bg); }
.card:hover { transform: translateY(-2px); }

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

.hero { padding-block: clamp(var(--s5), 6vw, var(--s12)) clamp(var(--s6), 6vw, var(--s10)); }

.hero-grid {
  display: grid;
  gap: var(--s6);
  align-items: center;
}

.hero-copy .btn-row { margin-top: var(--s4); }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: var(--s8); }
}

.hero-visual {
  position: relative;
  padding-right: 18%;
  padding-bottom: 12%;
}

/* Browser-window frame */
.browser {
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D3D8D4;
}
.browser-url {
  flex: 1;
  max-width: 60%;
  height: 18px;
  margin-left: 12px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
}

/* Phone frame */
.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
  padding: 7px;
  background: var(--ink);
  border-radius: 26px;
}
/* Speaker slit sits in the bezel so it never covers the screenshot */
.phone-notch {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 22%;
  height: 3px;
  border-radius: 3px;
  background: #3A424C;
  transform: translateX(-50%);
  z-index: 1;
}
.phone .shot { border-radius: 20px; }

/* Screenshot placeholders (grey boxes at the final aspect ratio) */
.shot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--placeholder);
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-wide { aspect-ratio: 2 / 1; }
.shot-tall { aspect-ratio: 720 / 1412; }
.shot-portrait { aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--border); }
.shot-label {
  padding: var(--s1);
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
}
.phone .shot-label { font-size: .75rem; }

/* ---------- Recent-work strip ---------- */

.strip { border-block: 1px solid var(--border); }
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  padding-block: var(--s3);
}
.strip-label { color: var(--muted); font-size: .9375rem; }
.strip-names { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; max-width: none; }
.strip-names .sep { color: var(--muted); }
@media (max-width: 599px) {
  .strip-names { flex-direction: column; }
  .strip-names .sep { display: none; }
}

/* ---------- Services ---------- */

.service {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--s4);
}
.service h3 { margin-top: var(--s1); }
.service p { color: var(--muted); }
.service .text-link { margin-top: auto; padding-top: var(--s1); align-self: flex-start; }

/* 2 columns on tablets, one row of 4 on desktop. Subgrid lines up icon, title,
   text and link across cards so every bottom link sits on the same line. */
@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .service { padding: var(--s3); }
  .service h3 { font-size: 1.25rem; }
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 720px) {
    .services-grid { row-gap: var(--s3); }
    .service {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
      row-gap: 12px;
    }
    .service .text-link { margin-top: 0; align-self: end; }
  }
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E6F0EE;
  color: #0F6B5C;
}
.icon-tile .icon { width: 44px; height: 44px; }

.service-thumb {
  width: 100%;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  object-position: top;
}

.sub-head {
  margin-top: clamp(var(--s8), 6vw, var(--s10));
  margin-bottom: var(--s3);
  font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem);
}

.tiles { gap: var(--s2); }
.tile {
  display: flex;
  gap: var(--s2);
  padding: var(--s3);
  background: var(--surface);
}
.tile > .icon-tile { flex: none; }
.tile > div { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.tile h4 { margin-bottom: 4px; }
.tile p { color: var(--muted); font-size: 1rem; }
.tile .text-link { margin-top: auto; padding-top: 4px; font-size: 1rem; }

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

.cases { display: grid; gap: var(--s4); }

.case {
  display: grid;
  gap: var(--s4);
  padding: clamp(var(--s2), 3vw, var(--s5));
  align-items: center;
}
.case-body h3 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
.case-body .eyebrow { margin-bottom: var(--s1); }

.case-facts { margin: var(--s3) 0 var(--s2); display: grid; gap: var(--s2); }
.case-facts div { padding-top: var(--s2); border-top: 1px solid var(--border); }
.case-facts dt { font-weight: 500; color: var(--ink); }
.case-facts dd { margin: 4px 0 0; color: var(--muted); max-width: 65ch; }

@media (min-width: 900px) {
  .case { grid-template-columns: 7fr 5fr; gap: var(--s6); }
  .case-flip { grid-template-columns: 5fr 7fr; }
  .case-flip .case-media { order: 2; }
}

/* ---------- Demo ---------- */

.chatbot {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.chatbot-frame {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 560px;
  border: 1px solid #E3E6E3;
  border-radius: var(--radius);
  background: var(--bg);
}
@media (min-width: 600px) {
  .chatbot-frame { height: 640px; }
}
.chatbot-caption { max-width: 420px; color: var(--muted); font-size: .9375rem; text-align: center; }
.chatbot-caption a { display: flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 500; }
.nowrap { white-space: nowrap; }

/* ---------- Packages ---------- */

/* Equal-height cards; subgrid keeps name, price, list and button on shared lines
   so every "Get a quote" button sits at the same height. */
.package {
  display: flex;
  flex-direction: column;
  padding: var(--s4);
}
.package h3 { font-size: 1.5rem; }
.package-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); }
.package-note { margin-top: 4px; color: var(--muted); font-size: 1rem; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 720px) {
    .package {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
      row-gap: 0;
    }
  }
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.price-block { margin-top: var(--s2); }
.price { display: grid; }
.price-main { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.625rem, 1.4rem + .8vw, 2rem); letter-spacing: -.02em; }
.price-note { color: var(--muted); font-size: .9375rem; white-space: nowrap; }
.price-monthly { margin-top: 2px; color: var(--ink); font-weight: 500; }

.checklist {
  align-content: start;
  display: grid;
  gap: 10px;
  margin: var(--s3) 0 var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
}
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--ink); }

.package .btn { margin-top: auto; align-self: end; }

.package-featured {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

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

.step { padding: var(--s4); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s3);
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 700;
}
.step h3 { margin-bottom: var(--s1); font-size: 1.25rem; text-wrap: pretty; }
.step p { color: var(--muted); }

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

.about { display: grid; gap: var(--s5); align-items: center; }
.about-photo { max-width: 240px; width: 100%; }
.about-photo img { border-radius: var(--radius); object-fit: cover; }
.about-copy h2 { margin-bottom: var(--s3); }
.about-copy p + p { margin-top: var(--s2); }
.about-copy p:last-child { color: var(--muted); }

@media (min-width: 800px) {
  .about { grid-template-columns: minmax(240px, 360px) 1fr; gap: var(--s10); }
  .about-photo { max-width: 360px; }
}

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

.faq-wrap { max-width: 840px; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 64px;
  padding-block: var(--s2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .icon { transition: transform .2s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s3); color: var(--muted); }

/* ---------- Final CTA ---------- */

.cta-band { background: var(--accent); color: #fff; }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-block: clamp(var(--s8), 7vw, var(--s12));
}
.cta-band h2 { color: #fff; }
.cta-band :focus-visible { outline-color: #fff; }

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

.site-footer { padding-top: var(--s8); border-top: 1px solid var(--border); }
.footer-grid {
  display: grid;
  gap: var(--s4);
  padding-bottom: var(--s5);
}
.footer-place { margin-top: var(--s1); color: var(--muted); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--s3); }
.footer-contact { display: grid; gap: 0; }
.footer-contact li { display: flex; align-items: center; gap: var(--s1); min-height: 44px; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-key { min-width: 88px; color: var(--muted); }
.footer-base { padding-block: var(--s3) calc(var(--s3) + 72px); border-top: 1px solid var(--border); }
.footer-base p { color: var(--muted); font-size: .9375rem; }

@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
  .footer-nav ul { flex-direction: column; }
  .footer-base { padding-bottom: var(--s3); }
}

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

.wa-fab {
  position: fixed;
  right: calc(var(--s2) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(17, 22, 28, .14);
  transition: transform .2s var(--ease);
}
.wa-fab:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.wa-fab .icon { width: 28px; height: 28px; }

@media (min-width: 960px) {
  .wa-fab { right: calc(var(--s3) + env(safe-area-inset-right, 0px)); bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Lenis (subset of lenis.css; iframe rule left out so the chatbot embed stays clickable) ---------- */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .btn:hover,
  .card:hover,
  .wa-fab:hover { transform: none; }
}
