/* ==========================================================================
   Nabil — portfolio
   Editorial, paper-and-ink design system. Accent: the oxblood red from the
   portrait. Fonts: Instrument Serif (display), Inter (body), JetBrains Mono (labels).
   ========================================================================== */

:root {
  /* colour tokens */
  --paper: #F6F2EB;
  --paper-2: #EDE7DC;
  --paper-3: #E4DCCF;
  --ink: #15120F;
  --ink-2: #3F3A34;
  --muted: #6B645B;
  --line: #D9D0C2;
  --line-strong: #BFB4A2;
  --red: #8E1B1B;
  --red-deep: #701313;
  --red-tint: #F2E2DD;
  --green: #2F7A4A;
  --white: #FFFFFF;

  /* on-dark tokens */
  --on-ink: #F6F2EB;
  --on-ink-muted: #B9B0A2;
  --ink-line: #2C2722;

  /* type */
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* scale */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
  --radius: 4px;
  --radius-lg: 10px;

  /* motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
  --t-slow: 700ms;

  --header-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.contact :focus-visible, .site-footer :focus-visible, .plan--featured :focus-visible { outline-color: var(--on-ink); }

.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: fixed; top: 12px; left: 12px; z-index: 1000;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: var(--radius);
  transform: translateY(-200%); transition: transform var(--t-fast);
}
.skip-link:focus { transform: none; }

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

/* ---------- typography ---------- */
.display, .display-2, .plan-price, .step-num { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.display { font-size: clamp(42px, 7.4vw, 92px); line-height: 0.98; text-wrap: balance; }
.display-2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; text-wrap: balance; }
.display em, .display-2 em { font-style: italic; color: var(--red); }
.contact .display em { color: #E8B5A8; }

.kicker, .index, .tag, .chips li, .plan-name, .eyebrow, .ticker, .chat-badge, .mobile-menu-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker { color: var(--red); margin-bottom: 20px; }
.kicker--light { color: #E8B5A8; }
.index { color: var(--muted); }

.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; color: var(--ink-2); max-width: 54ch; }
.lede--light { color: var(--on-ink-muted); }
.section-intro { font-size: 17px; color: var(--ink-2); max-width: 58ch; margin-top: 20px; }
.note { margin-top: 18px; padding: 14px 18px; border-left: 2px solid var(--red); background: var(--red-tint); color: var(--ink-2); font-size: 14.5px; max-width: 58ch; }
.note strong { color: var(--ink); font-weight: 600; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px; line-height: 1;
  border: 1px solid transparent;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  cursor: pointer; touch-action: manipulation; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 16px; height: 16px; transition: transform var(--t-med) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: #2A2520; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--white); }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: var(--ink-line); }
.btn-ghost:hover { border-color: var(--on-ink-muted); background: rgba(255,255,255,.05); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; font-weight: 500; font-size: 15px;
  color: var(--ink); position: relative;
}
.link-arrow::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t-med) var(--ease-out);
}
.link-arrow span, .link-arrow { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--t-med) var(--ease-out); }
.link-arrow:hover { background-size: calc(100% - 22px) 1px; }
.link-arrow:hover::after { transform: translate(3px, -3px); }

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

.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); position: relative; flex: none;
}
.status-dot--green { background: #5FC489; }
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0;
  animation: ping 2.2s var(--ease-out) infinite;
  color: inherit;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); letter-spacing: .06em; font-size: 11.5px; background: var(--paper); }

.check-list li, .dash-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.check-list li + li, .dash-list li + li { margin-top: 12px; }
.check-list .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--red); }
.dash-list li::before { content: ""; width: 14px; height: 1px; background: var(--red); margin-top: 11px; flex: none; }

.ribbon {
  position: absolute; top: -12px; left: 24px;
  background: var(--ink); color: var(--on-ink);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.ribbon--red { background: var(--red); color: var(--white); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 0%, transparent);
  transition: background-color var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--red); color: var(--white);
  display: grid; place-items: center;
  transition: transform var(--t-med) var(--ease-out);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand:hover .brand-mark { transform: rotate(-6deg); }
.brand-name { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.01em; }

.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  border-radius: 999px; transition: color var(--t-fast), background-color var(--t-fast);
}
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-left: 8px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
}
.menu-bar { width: 18px; height: 1.5px; background: var(--ink); transition: transform var(--t-med) var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-bar:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 90;
  background: var(--paper); padding: 28px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a:not(.btn) {
  font-family: var(--font-display); font-size: 40px; line-height: 1.2;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu nav .btn { margin-top: 24px; align-self: flex-start; }
.mobile-menu-meta { color: var(--muted); margin-top: 32px; letter-spacing: .08em; }

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 110px)); padding-bottom: clamp(56px, 8vw, 110px); position: relative; }
.hero::before {
  /* faint paper grain + warm wash, kept subtle */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(142,27,27,.07), transparent 65%),
    radial-gradient(700px 400px at 5% 90%, rgba(21,18,15,.05), transparent 60%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); margin-bottom: 28px; }
.eyebrow .status-dot { color: var(--red); }
.hero .lede { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2); font-weight: 500;
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 14px; height: 14px; color: var(--red); stroke-width: 2.8; }

.hero-figure { position: relative; margin: 0; max-width: 440px; justify-self: end; width: 100%; }
.hero-photo {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -30px rgba(21,18,15,.45), 0 0 0 1px rgba(21,18,15,.06);
  aspect-ratio: 4 / 5;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  border-radius: inherit; pointer-events: none;
}
.hero-plate {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.plate-name { font-family: var(--font-display); font-size: 24px; }
.plate-role { font-size: 13px; color: var(--muted); text-align: right; }
.hero-chip {
  position: absolute; top: 20px; left: -28px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  box-shadow: 0 12px 30px -16px rgba(21,18,15,.4);
}
.hero-chip .status-dot { color: var(--red); }

/* ---------- ticker ---------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; color: var(--ink-2); background: var(--paper); }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { padding: 16px 0 16px 32px; white-space: nowrap; display: inline-flex; align-items: center; gap: 32px; }
.ticker-track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: var(--section) 0; }
.section--tint { background: var(--paper-2); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.work-card { grid-column: span 2; display: flex; flex-direction: column; }
.work-card--lg { grid-column: span 3; }
.work-media {
  display: block; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--paper-3); aspect-ratio: 4 / 3;
  box-shadow: 0 1px 0 rgba(21,18,15,.06);
}
.work-card--lg .work-media { aspect-ratio: 16 / 11; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.work-card:hover .work-media img { transform: scale(1.035); }
.work-body { padding-top: 22px; margin-top: 2px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.work-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; }
.tag { color: var(--red); }
.work-card h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.work-card h3 a { background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--t-med) var(--ease-out); }
.work-card:hover h3 a { background-size: 100% 1px; }
.work-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--red); letter-spacing: .02em; margin-top: -6px; }
.work-card p:not(.work-sub) { color: var(--ink-2); font-size: 15px; }
.work-card .chips { margin-top: 4px; }
.work-card .link-arrow { margin-top: auto; padding-top: 6px; align-self: flex-start; }

/* ---------- demo ---------- */
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.demo-copy .check-list { margin-top: 28px; }
.demo-copy .chips { margin-top: 28px; }

.chat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -40px rgba(21,18,15,.45);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--ink); color: var(--on-ink); }
.chat-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; flex: none; }
.chat-avatar svg { width: 20px; height: 20px; }
.chat-avatar .status-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; background: #5FC489; border: 2px solid var(--ink); color: #5FC489; }
.chat-title { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 15px; }
.chat-status { font-size: 12.5px; color: var(--on-ink-muted); }
.chat-badge { border: 1px solid var(--ink-line); color: var(--on-ink-muted); padding: 6px 10px; border-radius: 999px; font-size: 10.5px; }

.chat-log { height: 380px; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; animation: msg-in var(--t-med) var(--ease-out) both; }
.msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }
.msg--user { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 4px; }
.msg--typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: dot 1s ease-in-out infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.chat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips[hidden] { display: none; }
.chat-chips button {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.chat-chips button:hover { border-color: var(--red); color: var(--red); background: var(--red-tint); }

.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--paper-2); }
.chat-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink);
  transition: border-color var(--t-fast);
}
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(142,27,27,.12); }
.chat-send { width: 46px; height: 46px; border-radius: 12px; background: var(--red); color: var(--white); display: grid; place-items: center; transition: background-color var(--t-fast), transform var(--t-fast); }
.chat-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chat-send:hover { background: var(--red-deep); }
.chat-send:active { transform: scale(.95); }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  position: relative; padding: 32px 28px 36px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.service:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 30px 50px -36px rgba(21,18,15,.5); }
.service--featured { background: var(--red-tint); border-color: #E3C7BF; }
.service-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.service-icon { width: 28px; height: 28px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; margin-bottom: 14px; }
.service p { color: var(--ink-2); font-size: 15px; }
.service .dash-list { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.service--featured .dash-list { border-top-color: #E3C7BF; }

/* ---------- automation ---------- */
.service-top .build-time { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: var(--paper); }
.service--featured .service-top .build-time { border-color: #E3C7BF; }
.service-price { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: 26px; color: var(--ink); }
.service--featured .service-price { border-top-color: #E3C7BF; }
.service .service-price { color: var(--ink); font-size: 26px; }

.flow {
  margin: 0 0 clamp(36px, 5vw, 56px);
  padding: 22px 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.flow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; }
.flow-badge { border-color: var(--line-strong); color: var(--ink-2); background: var(--paper); }
.flow-note { font-size: 13.5px; color: var(--muted); }
.flow-track { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.node {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 60px; padding: 10px 14px 10px 14px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.node-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.node + .node::before {
  content: ""; position: absolute; left: -10px; top: 50%; width: 10px; height: 1px; background: var(--line-strong);
}
.node--wait { background: transparent; border-style: dashed; color: var(--ink-2); }
.node--check { border-color: var(--red); }
.node--check .node-k { color: var(--red); }
.node--branch { gap: 6px; background: transparent; border: 0; padding: 0 0 0 4px; justify-content: center; }
.node--branch::before { display: none; }
.branch { display: inline-block; font-size: 12.5px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.branch--yes { border-color: #BFD9C8; color: var(--green); }
.branch--no { color: var(--ink-2); }
.node--end { border-color: var(--ink); }

.agency-band {
  margin-top: clamp(36px, 5vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--ink); color: var(--on-ink); border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.agency-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 300px at 100% 120%, rgba(142,27,27,.45), transparent 65%); }
.agency-copy { position: relative; max-width: 640px; }
.agency-copy .kicker { margin-bottom: 14px; }
.agency-copy h3 { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; margin-bottom: 14px; }
.agency-copy p:not(.kicker) { color: var(--on-ink-muted); font-size: 15.5px; }
.agency-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.link-arrow--light { color: var(--on-ink); }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; position: relative; }
.step { position: relative; padding: 36px 28px 0; border-top: 1px solid var(--line-strong); }
.step-num { position: absolute; top: -34px; left: 28px; font-size: 56px; line-height: 1; color: var(--red); background: var(--paper); padding-right: 14px; }
.step h3 { font-family: var(--font-display); font-size: 30px; margin-bottom: 12px; line-height: 1.1; }
.step p { color: var(--ink-2); font-size: 15px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 32px 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper);
  transition: border-color var(--t-med), transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.plan:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 30px 50px -36px rgba(21,18,15,.5); }
.plan--featured { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.plan-name { color: var(--muted); }
.plan--featured .plan-name { color: var(--on-ink-muted); }
.plan-price { font-size: clamp(28px, 2.7vw, 38px); margin-top: 14px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-tagline { font-size: 14px; color: var(--red); margin-top: 4px; }
.plan--featured .plan-tagline { color: #E8B5A8; }
.plan .check-list { margin: 26px 0 30px; padding-top: 24px; border-top: 1px solid var(--line); flex: 1; }
.plan--featured .check-list { border-top-color: var(--ink-line); }
.plan--featured .check-list li { color: var(--on-ink-muted); }
.plan--featured .check-list .icon { color: #E8B5A8; }
.plan .check-list li { font-size: 14.5px; }
.plan .btn { width: 100%; justify-content: center; }
.plans-foot { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 36px; }
.plans-foot a { color: var(--red); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 420px at 50% 115%, rgba(142,27,27,.45), transparent 65%);
}
.contact-inner { position: relative; max-width: 900px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .display { font-size: clamp(38px, 6.4vw, 80px); }
.contact .lede { margin-top: 28px; max-width: 60ch; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.contact-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; margin-top: 48px; font-size: 14px; color: var(--on-ink-muted); font-weight: 500; }
.contact-meta li { display: inline-flex; align-items: center; gap: 10px; }
.contact-meta .status-dot { color: #5FC489; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); border-top: 1px solid var(--ink-line); padding: 32px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer .brand-name { color: var(--on-ink); }
.footer-note { font-size: 13.5px; }
.footer-nav { display: flex; gap: 4px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; transition: color var(--t-fast); }
.footer-nav a:hover { color: var(--on-ink); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card, .work-card--lg { grid-column: span 1; }
  .work-card--lg .work-media { aspect-ratio: 4 / 3; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { justify-self: start; max-width: 420px; }
  .hero-chip { left: auto; right: -8px; top: 16px; }
  .demo-grid { grid-template-columns: 1fr; }
  .services, .steps { grid-template-columns: 1fr; }
  .steps { gap: 56px; }
  .flow-track { flex-direction: column; align-items: stretch; }
  .node + .node::before { left: 24px; top: -10px; width: 1px; height: 10px; }
  .node--branch { flex-direction: row; flex-wrap: wrap; padding: 0; }
  .agency-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand-mark { width: 32px; height: 32px; }
  .work-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .chat-log { height: 320px; }
  .hero-chip { display: none; }
  .hero-figure { max-width: 100%; }
  .hero-photo { aspect-ratio: 4 / 5; }
  .contact-meta { flex-direction: column; align-items: center; gap: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Liquid glass layer
   Soft colour blobs sit behind the page so blurred surfaces have something to
   refract. Glass surfaces use backdrop blur + saturation, a gradient fill, an
   inner top highlight, a hairline border and a specular highlight that follows
   the pointer (via --mx / --my set in script.js).
   ========================================================================== */
:root {
  --glass-fill: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.22));
  --glass-fill-dark: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  --glass-line: rgba(255,255,255,.65);
  --glass-line-dark: rgba(255,255,255,.14);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.75) inset, 0 -1px 0 rgba(21,18,15,.04) inset, 0 20px 50px -28px rgba(21,18,15,.45);
  --glass-shadow-dark: 0 1px 0 rgba(255,255,255,.12) inset, 0 30px 70px -40px rgba(0,0,0,.8);
}

.bg-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.blob--a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle at 30% 30%, rgba(142,27,27,.34), rgba(142,27,27,0) 70%); }
.blob--b { width: 40vw; height: 40vw; right: -10vw; top: 22vh; background: radial-gradient(circle at 50% 50%, rgba(232,181,168,.55), rgba(232,181,168,0) 70%); animation-duration: 34s; animation-delay: -8s; }
.blob--c { width: 52vw; height: 52vw; left: 20vw; bottom: -30vw; background: radial-gradient(circle at 50% 50%, rgba(191,180,162,.5), rgba(191,180,162,0) 70%); animation-duration: 40s; animation-delay: -16s; }
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(6vw, -4vh, 0) scale(1.08); }
  100% { transform: translate3d(-4vw, 6vh, 0) scale(.96); }
}
main, .site-footer, .mobile-menu { position: relative; z-index: 1; }
.site-header { z-index: 100; }
.mobile-menu { z-index: 90; }

/* core glass surface */
.glass, .glass-pill, .glass-sheet, .glass-dark {
  position: relative;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
          backdrop-filter: blur(18px) saturate(150%);
}
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}
.glass-dark {
  background: var(--glass-fill-dark), var(--ink);
  border: 1px solid var(--glass-line-dark);
  box-shadow: var(--glass-shadow-dark);
  color: var(--on-ink);
}
.glass::before, .glass-dark::before, .glass-pill::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px 200px at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.42), rgba(255,255,255,0) 70%);
  opacity: .9; mix-blend-mode: soft-light; transition: opacity var(--t-med);
}
.glass-dark::before { background: radial-gradient(300px 220px at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.28), rgba(255,255,255,0) 70%); mix-blend-mode: screen; opacity: .6; }
.glass::after, .glass-dark::after {
  /* edge refraction: a thin brighter rim along the top-left */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}
.glass-dark::after { background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(142,27,27,.45)); }
.glass > *, .glass-dark > * { position: relative; z-index: 1; }

/* header bar */
.site-header.glass-bar { background: transparent; border-bottom-color: transparent; }
.site-header.glass-bar.is-scrolled {
  background: linear-gradient(180deg, rgba(246,242,235,.72), rgba(246,242,235,.5));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 0 rgba(21,18,15,.05), 0 20px 40px -30px rgba(21,18,15,.35);
}
.glass-pill {
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.2));
  border: 1px solid rgba(255,255,255,.65); border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 24px -16px rgba(21,18,15,.35);
}
.site-nav.glass-pill { padding: 4px; }
.site-nav.glass-pill ul { gap: 2px; }
.site-nav a { min-height: 38px; }
.site-nav a.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(21,18,15,.08); }
.site-nav a.is-active::after { display: none; }
.menu-toggle.glass-pill { border: 1px solid rgba(255,255,255,.65); }

.glass-sheet {
  background: linear-gradient(180deg, rgba(246,242,235,.82), rgba(246,242,235,.7));
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
}
.mobile-menu nav a.is-active { color: var(--red); }

/* brand mark now carries its own tile in the SVG */
.brand-mark { background: transparent; border-radius: 10px; width: 38px; height: 38px; filter: drop-shadow(0 6px 14px rgba(142,27,27,.35)); }
.brand-mark svg { width: 38px; height: 38px; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }

/* glass applied to existing components */
.service, .plan:not(.plan--featured), .chat, .flow, .hero-chip, .work-body, .step {
  background: var(--glass-fill);
  border-color: var(--glass-line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
}
.work-body { padding: 22px 20px 24px; border: 1px solid var(--glass-line); border-radius: var(--radius-lg); margin-top: 14px; }
.work-meta { border-top: 0; padding-top: 0; }
.step { border: 1px solid var(--glass-line); border-radius: var(--radius-lg); padding: 44px 28px 28px; }
.step-num { background: transparent; top: -30px; left: 24px; }
.service--featured { background: linear-gradient(135deg, rgba(242,226,221,.85), rgba(242,226,221,.45)); }
.plan--featured, .agency-band, .contact .contact-inner { }
.plan--featured, .agency-band {
  background: var(--glass-fill-dark), var(--ink);
  border: 1px solid var(--glass-line-dark);
  box-shadow: var(--glass-shadow-dark);
}
.node { background: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.35)); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset; }
.chips li { background: rgba(255,255,255,.45); border-color: rgba(255,255,255,.7); }
.chat-form { background: rgba(237,231,220,.6); }
.chat-form input { background: rgba(255,255,255,.7); }

/* page hero (sub-pages) */
.page-hero { padding: calc(var(--header-h) + clamp(44px, 7vw, 96px)) 0 clamp(28px, 4vw, 48px); position: relative; }
.page-hero .display { font-size: clamp(40px, 6.2vw, 82px); max-width: 16ch; }
.page-hero .lede { margin-top: 24px; }
.page-hero + .section { padding-top: clamp(32px, 5vw, 56px); }
/* pages that open with a section instead of a page hero (demo) */
main > .section:first-child:not(.contact) { padding-top: calc(var(--header-h) + clamp(44px, 7vw, 96px)); }
.page-hero .note { margin-top: 22px; background: rgba(242,226,221,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* home overview */
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ov-card { display: flex; flex-direction: column; gap: 14px; padding: 30px 28px 28px; border-radius: var(--radius-lg); color: var(--ink); min-height: 300px; transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.ov-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255,255,255,.75) inset, 0 34px 60px -34px rgba(21,18,15,.55); }
.ov-card--featured { background: linear-gradient(135deg, rgba(242,226,221,.85), rgba(242,226,221,.45)); }
.ov-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--red); }
.ov-card h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.ov-card p { color: var(--ink-2); font-size: 15px; flex: 1; }
.ov-card .link-arrow { align-self: flex-start; }
.proof-row { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: clamp(32px, 4vw, 48px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.proof-row strong { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--ink); margin-right: 8px; }
.inline-link { color: var(--red); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

/* cta strip */
.cta-strip { padding-top: 0; }
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; padding: clamp(32px, 5vw, 56px); border-radius: var(--radius-lg); overflow: hidden; }
.cta-card::before { mix-blend-mode: screen; }
.cta-copy { max-width: 640px; }
.cta-copy .kicker { margin-bottom: 14px; }
.cta-copy .display-2 { font-size: clamp(30px, 3.8vw, 50px); }
.cta-copy .display-2 em { color: #E8B5A8; }
.cta-copy .lede { margin-top: 18px; font-size: 16.5px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact { padding-top: calc(var(--header-h) + clamp(56px, 9vw, 120px)); }

@media (max-width: 1100px) { .overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .cta-card { flex-direction: column; align-items: flex-start; }
  .blob { filter: blur(44px); opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .glass::before, .glass-dark::before, .glass-pill::before { transition: none; }
}
/* browsers without backdrop-filter still get readable solid cards */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .service, .plan:not(.plan--featured), .chat, .flow, .work-body, .step, .glass-pill, .glass-sheet { background: var(--paper); }
  .glass-dark, .plan--featured, .agency-band { background: var(--ink); }
  .site-header.glass-bar.is-scrolled { background: var(--paper); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .status-dot::after { animation: none; }
  .msg { animation: none; }
  .work-media img, .btn .icon, .link-arrow::after { transition: none; }
  .work-card:hover .work-media img { transform: none; }
}
