/* ============================================================
   Integra AI — Software Development landing page
   One linear build narrative: Idea -> Design -> Code -> Live,
   echoed later as the real team process (Discover..Launch).
   ============================================================ */

:root {
  --ink: #0a0807;
  --ink-2: #120c09;
  --ink-3: #1a120d;
  --ink-4: #221610;
  --brand: #ff4d1f;
  --brand-bright: #ff6a3c;
  --text: #f2ede7;
  --text-dim: rgba(242, 237, 231, 0.64);
  --text-dim2: rgba(242, 237, 231, 0.4);
  --line: rgba(242, 237, 231, 0.1);
  --line-soft: rgba(242, 237, 231, 0.06);

  --c-idea: #ffcf5c;
  --c-design: #7c9eff;
  --c-code: #35e0c0;
  --c-test: #b18cff;
  --c-live: var(--brand-bright);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
svg { overflow: visible; }
.mono { font-family: var(--mono); }
.accent { color: var(--brand-bright); }
section[id] { scroll-margin-top: 84px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.btn--primary { background: var(--brand); color: #180b06; }
.btn--primary:hover { background: var(--brand-bright); box-shadow: 0 10px 30px -8px rgba(255, 77, 31, 0.65); }
.btn--lg { padding: 16px 34px; font-size: 1.02rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em;
  color: var(--brand-bright); margin: 0 0 14px;
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; text-align: left; gap: 20px; }
.section-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -0.02em; font-weight: 700; margin: 0; line-height: 1.2; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.topbar__fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--c-idea), var(--c-design), var(--c-code), var(--c-test), var(--c-live)); transition: width 0.08s linear; }

/* ============================================================
   NAV
   ============================================================ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(10, 8, 7, 0.72); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line-soft); }
.nav__inner { max-width: 1280px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 28px; }
.nav__back {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  margin-right: -14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav__back:hover { color: var(--brand-bright); border-color: var(--brand-bright); transform: translateX(-2px); }

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; }
.brand__word { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand__ai { color: var(--brand-bright); }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__link { font-size: 0.9rem; color: var(--text-dim); position: relative; padding: 4px 0; transition: color 0.2s var(--ease); }
.nav__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px; background: var(--brand-bright); transition: right 0.25s var(--ease); }
.nav__link:hover { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { right: 0; }
.nav__link.is-active { color: var(--text); }
.nav__cta { padding: 10px 20px; font-size: 0.88rem; }
.nav__burger { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.nav__burger span { width: 16px; height: 1.5px; background: var(--text); transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }

@media (max-width: 860px) {
  /* Not `inset: 62px 0 0 0` — .nav has backdrop-filter, which makes it the
     containing block for this fixed-position descendant, so `bottom: 0`
     resolves against .nav's own ~62px height instead of the viewport. An
     explicit viewport-unit height sidesteps that. */
  .nav__links { position: fixed; top: 62px; left: 0; right: 0; height: calc(100vh - 62px); height: calc(100dvh - 62px); background: var(--ink); flex-direction: column; justify-content: center; gap: 30px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
  .nav__links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__links .nav__link { font-size: 1.3rem; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  body.menu-open .nav__burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
  body.menu-open .nav__burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 150px 24px 70px; overflow: hidden; }
.hero__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 50% 25%, black 30%, transparent 75%); }
.hero__glow { position: absolute; top: -12%; left: 50%; width: 900px; height: 700px; transform: translateX(-50%) translateY(var(--py, 0px)); background: radial-gradient(closest-side, rgba(255, 77, 31, 0.2), transparent 70%); filter: blur(10px); pointer-events: none; }
.hero__copy { position: relative; max-width: 740px; z-index: 2; }
.hero__title { font-size: clamp(2.3rem, 5.2vw, 4.1rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 22px; }
.hero__sub { font-size: clamp(1rem, 1.6vw, 1.16rem); line-height: 1.6; color: var(--text-dim); max-width: 560px; margin: 0 auto 32px; }
.hero__cta { margin-bottom: 10px; }

.hero__scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--text-dim2); }
.hero__scroll-line { width: 1px; height: 28px; background: linear-gradient(180deg, var(--text-dim2), transparent); }

/* --- morph card: Idea -> Design -> Code -> Live --- */
.morph { position: relative; z-index: 2; margin-top: 46px; width: min(420px, 92vw); }
.morph__card { position: relative; height: 260px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(155deg, rgba(255, 255, 255, 0.03), var(--ink-3) 55%); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); overflow: hidden; }
.morph__panel { position: absolute; inset: 0; padding: 22px; opacity: 0; transform: scale(0.97); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); display: flex; flex-direction: column; gap: 16px; }
.morph__panel.is-active { opacity: 1; transform: scale(1); }
.morph__tag { align-self: flex-start; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); }

.morph__panel--idea .morph__tag { color: var(--c-idea); border-color: rgba(255, 207, 92, 0.35); }
.sketch { display: flex; flex-direction: column; gap: 10px; }
.sketch__line { height: 8px; border-radius: 4px; border: 1.5px dashed rgba(255, 207, 92, 0.45); }
.sketch__box { border-radius: 8px; border: 1.5px dashed rgba(255, 207, 92, 0.45); }
.sketch__box--round { width: 44px; height: 44px; border-radius: 50%; align-self: flex-end; margin-top: -8px; }

.morph__panel--design .morph__tag { color: var(--c-design); border-color: rgba(124, 158, 255, 0.35); }
.mock { display: flex; flex-direction: column; gap: 10px; }
.mock__nav { height: 14px; border-radius: 6px; background: rgba(124, 158, 255, 0.22); width: 60%; }
.mock__hero { height: 70px; border-radius: 10px; background: linear-gradient(135deg, rgba(124, 158, 255, 0.3), rgba(124, 158, 255, 0.08)); }
.mock__row { display: flex; gap: 8px; }
.mock__row span { flex: 1; height: 34px; border-radius: 8px; background: rgba(124, 158, 255, 0.16); }

.morph__panel--code .morph__tag { color: var(--c-code); border-color: rgba(53, 224, 192, 0.35); }
.code-mini { margin: 0; font-family: var(--mono); font-size: 0.78rem; line-height: 1.75; color: var(--text-dim); }
.tok-kw { color: var(--c-design); }
.tok-fn { color: var(--c-code); }
.tok-var { color: #ffd9b8; }
.cursor-blink { color: var(--c-code); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.morph__panel--live .morph__tag { color: var(--c-live); border-color: rgba(255, 106, 60, 0.35); }
.livecard { position: relative; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--ink-2); }
.livecard__chrome { display: flex; gap: 5px; padding: 8px 10px; background: var(--ink-4); }
.livecard__chrome span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.livecard__body { padding: 14px; }
.livecard__hero { display: block; height: 44px; border-radius: 8px; background: linear-gradient(135deg, rgba(255, 106, 60, 0.35), rgba(255, 106, 60, 0.08)); margin-bottom: 12px; }
.livecard__stats { display: flex; gap: 14px; }
.livecard__stats b { display: block; font-size: 0.92rem; }
.livecard__stats i { display: block; font-style: normal; font-size: 0.62rem; color: var(--text-dim2); }
.livecard__pill { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; background: rgba(53, 224, 192, 0.12); border: 1px solid rgba(53, 224, 192, 0.35); color: var(--c-code); }
.livecard__pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-code); box-shadow: 0 0 6px var(--c-code); }

.morph__rail { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.morph__line { width: 22px; height: 1px; background: var(--line); }
.morph__step { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--text-dim2); padding: 5px 10px; border-radius: 999px; transition: color 0.3s var(--ease), background 0.3s var(--ease); }
.morph__step.is-active { color: var(--text); background: var(--ink-3); }
.morph__step[data-step="0"].is-active { color: var(--c-idea); }
.morph__step[data-step="1"].is-active { color: var(--c-design); }
.morph__step[data-step="2"].is-active { color: var(--c-code); }
.morph__step[data-step="3"].is-active { color: var(--c-live); }

/* ============================================================
   SERVICES — bento grid
   ============================================================ */
.services { max-width: 1280px; margin: 0 auto; padding: 120px 28px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento__card { position: relative; grid-column: span 2; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(155deg, rgba(255, 255, 255, 0.025), var(--ink-3) 60%); transition: border-color 0.3s var(--ease), transform 0.15s ease; will-change: transform; }
.bento__card--lg { grid-column: span 3; padding: 38px; }
.bento__card:hover { border-color: rgba(255, 106, 60, 0.35); }
.bento__icon { width: 26px; height: 26px; fill: none; stroke: var(--brand-bright); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.bento__card h3 { font-size: 1.18rem; margin: 0 0 10px; letter-spacing: -0.01em; }
.bento__card p { font-size: 0.92rem; line-height: 1.6; color: var(--text-dim); margin: 0 0 18px; }
.bento__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bento__tags span { font-family: var(--mono); font-size: 0.66rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim2); }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento__card, .bento__card--lg { grid-column: span 1; }
}

/* ============================================================
   PROCESS — sticky scroll-synced glowing line
   ============================================================ */
.process { position: relative; min-height: 260vh; }
.process__sticky { position: sticky; top: 0; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 110px 28px; text-align: center; }
.process__track { position: relative; display: flex; align-items: center; justify-content: space-between; width: min(920px, 100%); margin: 0 auto; padding: 20px 0; }
.process__line-bg { position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); background: var(--line); }
.process__line-fill { position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%); background: linear-gradient(90deg, var(--c-idea), var(--c-design), var(--c-code), var(--c-test), var(--c-live)); clip-path: inset(0 100% 0 0); filter: drop-shadow(0 0 8px rgba(255, 207, 92, 0.5)); transition: clip-path 0.05s linear; }

.process__stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--ink); padding: 0 4px; }
.process__stage[data-stage="0"] { --stage-color: var(--c-idea); }
.process__stage[data-stage="1"] { --stage-color: var(--c-design); }
.process__stage[data-stage="2"] { --stage-color: var(--c-code); }
.process__stage[data-stage="3"] { --stage-color: var(--c-test); }
.process__stage[data-stage="4"] { --stage-color: var(--c-live); }
.process__dot { width: clamp(9px, 2.4vw, 13px); height: clamp(9px, 2.4vw, 13px); border-radius: 50%; background: var(--ink-3); border: 2px solid var(--line); transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.process__stage.is-active .process__dot { background: var(--stage-color); border-color: var(--stage-color); box-shadow: 0 0 16px var(--stage-color); }
.process__label { font-family: var(--mono); font-size: clamp(0.58rem, 2.4vw, 0.78rem); letter-spacing: 0.02em; color: var(--text-dim); white-space: nowrap; transition: color 0.3s var(--ease); }
.process__stage.is-active .process__label { color: var(--text); }

.process__detail { margin: 34px 0 0; max-width: 480px; font-size: 0.98rem; line-height: 1.6; color: var(--text-dim); min-height: 3.2em; }

/* Same sticky scroll-scrubbed diagram at every width — the glowing
   line still fills in as you scroll through the section, same 5
   horizontal stages, just fluidly sized down for a narrow phone
   rather than collapsing into a plain static list. */
@media (max-width: 760px) {
  .process__sticky { padding: 90px 20px; }
  .process__track { padding: 16px 0; gap: 4px; }
  .process__stage { padding: 0 1px; gap: 8px; }
}

/* ============================================================
   TECHNOLOGIES — floating field
   ============================================================ */
.tech { max-width: 1280px; margin: 0 auto; padding: 100px 28px 60px; }
.tech-field { position: relative; width: 100%; aspect-ratio: 16 / 7; max-height: 420px; }
.tech-chip {
  position: absolute; left: var(--tx); top: var(--ty); transform: translate(-50%, -50%);
  padding: clamp(6px, 2vw, 11px) clamp(10px, 3.5vw, 20px); border-radius: 999px; font-size: clamp(0.64rem, 2.6vw, 0.92rem); font-weight: 600;
  background: rgba(18, 12, 9, 0.75); backdrop-filter: blur(6px); border: 1px solid var(--line);
  animation: chip-float var(--tdur) ease-in-out infinite; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: default; white-space: nowrap;
}
.tech-chip:hover { border-color: currentColor; box-shadow: 0 0 24px -6px currentColor; }
@keyframes chip-float { 0%, 100% { margin-top: 0; } 50% { margin-top: -12px; } }
.tech-chip--fe { color: var(--c-design); }
.tech-chip--be { color: var(--c-code); }
.tech-chip--db { color: var(--c-test); }
.tech-chip--cloud { color: var(--c-live); }
@media (prefers-reduced-motion: reduce) { .tech-chip { animation: none; } }

.tech-legend { display: flex; justify-content: center; gap: 26px; margin-top: 24px; flex-wrap: wrap; }
.tech-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim); }
.tech-legend__dot { width: 8px; height: 8px; border-radius: 50%; }
.tech-legend__dot--fe { background: var(--c-design); }
.tech-legend__dot--be { background: var(--c-code); }
.tech-legend__dot--db { background: var(--c-test); }
.tech-legend__dot--cloud { background: var(--c-live); }

/* Same floating, animated field at every width — just a taller aspect
   ratio on narrow phones so the same 7 organically-scattered chips
   (tuned for a wide 16:7 canvas) have enough vertical room. */
@media (max-width: 640px) {
  .tech-field { aspect-ratio: 3 / 4; max-height: 560px; }
}

/* ============================================================
   PROJECTS — horizontal scroll rail
   ============================================================ */
.projects { max-width: 1280px; margin: 0 auto; padding: 100px 0 60px; }
.projects .section-head--row { padding: 0 28px; margin-bottom: 40px; }
.rail-nav { display: flex; gap: 10px; flex: none; }
.rail-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.rail-btn:hover { border-color: var(--brand-bright); background: rgba(255, 106, 60, 0.08); }

.rail { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 28px 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.project-card { flex: 0 0 min(560px, 82vw); scroll-snap-align: start; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(155deg, rgba(255, 255, 255, 0.025), var(--ink-3) 60%); overflow: hidden; }
.project-card__preview { position: relative; height: 220px; }
.project-card__preview--a { background: linear-gradient(135deg, rgba(124, 158, 255, 0.35), rgba(124, 158, 255, 0.05)); }
.project-card__preview--b { background: linear-gradient(135deg, rgba(53, 224, 192, 0.35), rgba(53, 224, 192, 0.05)); }
.project-card__preview--c { background: linear-gradient(135deg, rgba(177, 140, 255, 0.35), rgba(177, 140, 255, 0.05)); }
.project-card__preview--d { background: linear-gradient(135deg, rgba(255, 106, 60, 0.35), rgba(255, 106, 60, 0.05)); }
.project-card .livecard__chrome { background: rgba(10, 8, 7, 0.35); }
.preview-body { position: absolute; inset: 34px 16px 16px; }

/* -- a: commerce -- */
.preview-shop { display: flex; flex-direction: column; gap: 10px; }
.shop__banner { display: block; height: 46px; border-radius: 8px; background: rgba(124, 158, 255, 0.28); }
.shop__grid { display: flex; gap: 8px; }
.shop__grid span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 96px; padding: 8px; border-radius: 8px; background: rgba(124, 158, 255, 0.14); border: 1px solid rgba(124, 158, 255, 0.22); }
.shop__grid i { display: block; flex: 1; border-radius: 6px; background: rgba(124, 158, 255, 0.22); }
.shop__grid b { font-family: var(--mono); font-size: 0.7rem; color: #dbe4ff; }

/* -- b: mobile schedule -- */
.preview-phone { display: flex; align-items: center; justify-content: center; }
.phone-mini { width: 148px; padding: 12px 10px; border-radius: 18px; background: rgba(53, 224, 192, 0.1); border: 1px solid rgba(53, 224, 192, 0.3); }
.phone-mini__notch { display: block; width: 30px; height: 4px; border-radius: 3px; background: rgba(53, 224, 192, 0.45); margin: 0 auto 12px; }
.phone-mini__list { display: flex; flex-direction: column; gap: 8px; }
.phone-mini__list span { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.62rem; color: #cdece2; background: rgba(53, 224, 192, 0.1); border-radius: 7px; padding: 7px 8px; }
.phone-mini__list i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-code); flex: none; }

/* -- c: ops dashboard -- */
.preview-dash { display: flex; flex-direction: column; gap: 14px; }
.dash__stats { display: flex; gap: 14px; }
.dash__stats span { display: flex; flex-direction: column; gap: 2px; }
.dash__stats b { font-size: 0.92rem; color: var(--text); }
.dash__stats i { font-style: normal; font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim2); }
.dash__chart { display: flex; align-items: flex-end; gap: 6px; flex: 1; }
.dash__chart i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, rgba(177, 140, 255, 0.75), rgba(177, 140, 255, 0.18)); }

/* -- d: ai chat -- */
.preview-chat { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.preview-chat .chat-bubble { font-size: 0.76rem; line-height: 1.5; padding: 9px 12px; border-radius: 12px; max-width: 88%; }
.preview-chat .chat-bubble--user { align-self: flex-end; background: rgba(10, 8, 7, 0.4); border: 1px solid var(--line); color: var(--text-dim); }
.preview-chat .chat-bubble--bot { align-self: flex-start; background: rgba(255, 106, 60, 0.14); border: 1px solid rgba(255, 106, 60, 0.3); color: #ffd9c4; }
.project-card h3 { font-size: 1.15rem; margin: 22px 24px 10px; }
.project-card p { font-size: 0.9rem; line-height: 1.6; color: var(--text-dim); margin: 0 24px 18px; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 24px 24px; }
.project-card__tags span { font-family: var(--mono); font-size: 0.66rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim2); }

.rail-dashes { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.rail-dashes span { width: 22px; height: 3px; border-radius: 3px; background: var(--line); transition: background 0.3s var(--ease); }
.rail-dashes span.is-active { background: var(--brand-bright); }

/* ============================================================
   FINALE
   ============================================================ */
.finale { position: relative; min-height: 78vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 100px 24px; overflow: hidden; }
.finale__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 65% 60% at 50% 50%, black 30%, transparent 78%); }
.finale__mesh { position: absolute; left: 50%; top: 50%; width: 640px; height: 640px; transform: translate(-50%, -50%) translateY(var(--py, 0px)); background: radial-gradient(closest-side, rgba(255, 77, 31, 0.24), transparent 70%); filter: blur(8px); }
.finale__content { position: relative; z-index: 2; max-width: 620px; }
.finale__title { font-size: clamp(2.1rem, 4.4vw, 3.3rem); letter-spacing: -0.02em; font-weight: 700; margin: 0 0 18px; }
.finale__sub { font-size: 1.06rem; color: var(--text-dim); margin: 0 0 32px; line-height: 1.6; }
.finale__cta { margin-bottom: 24px; }
.finale__email { font-size: 0.86rem; color: var(--text-dim2); }
.finale__email .mono { letter-spacing: 0.08em; color: var(--brand-bright); margin-right: 8px; font-size: 0.72rem; }
.finale__email a { border-bottom: 1px solid var(--line); transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.finale__email a:hover { color: var(--brand-bright); border-color: var(--brand-bright); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line-soft); padding: 40px 28px; }
.site-footer__inner { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.brand--footer .brand__mark { opacity: 0.85; }
.site-footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer__links a { font-size: 0.85rem; color: var(--text-dim); transition: color 0.2s var(--ease); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__copy { font-size: 0.78rem; color: var(--text-dim2); margin: 0; width: 100%; text-align: center; }
@media (min-width: 640px) { .site-footer__copy { width: auto; text-align: right; } }

/* ============================================================
   Shared site-wide widgets: AI Chatbot + Callbot launcher
   (verbatim from the main site's styles.css, plus the few
   tokens that widget CSS expects but this page doesn't define)
   ============================================================ */
:root {
  --white: #f7f4f2;
  --fog: #9a938e;
  --mist: #6e6661;
  --line-2: rgba(255, 77, 31, 0.28);
  --r-lg: 14px;
}
.brand__dot { color: var(--brand); }

.chatbot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
}
.chatbot__launcher {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--brand-bright), var(--brand));
  box-shadow: 0 12px 30px rgba(255, 77, 31, 0.4);
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.25s var(--ease);
}
.chatbot__launcher:hover {
  transform: scale(1.06);
}
.chatbot__launcher-mascot {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.chatbot__launcher-ping {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--brand-bright);
  opacity: 0.55;
  animation: chatbotPing 2.4s var(--ease) infinite;
}
@keyframes chatbotPing {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
.chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  /* vh includes the mobile browser's address/toolbar space, which can leave
     this panel taller than what's actually visible and cut off at the top —
     dvh tracks the real visible viewport (and updates as that chrome
     shows/hides), same fallback pattern as .entrance above. */
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.chatbot.is-open .chatbot__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.chatbot__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chatbot__header-mascot {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 77, 31, 0.12);
  padding: 4px;
}
.chatbot__header-copy {
  flex: 1;
  min-width: 0;
}
.chatbot__header-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--white);
}
.chatbot__header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--fog);
  margin-top: 2px;
}
.chatbot__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35d07f;
  box-shadow: 0 0 6px #35d07f;
}
.chatbot__history-btn {
  border: none;
  background: transparent;
  color: var(--fog);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.2s var(--ease);
}
.chatbot__history-btn svg {
  width: 18px;
  height: 18px;
}
.chatbot__history-btn:hover {
  color: var(--white);
}
.chatbot__close {
  border: none;
  background: transparent;
  color: var(--fog);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.chatbot__close:hover {
  color: var(--white);
}
.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chatbot__history-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.chatbot__history-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.chatbot__history-back {
  border: none;
  background: transparent;
  color: var(--fog);
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.2s var(--ease);
}
.chatbot__history-back svg {
  width: 18px;
  height: 18px;
}
.chatbot__history-back:hover {
  color: var(--white);
}
.chatbot__history-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.chatbot__history-new {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--brand-bright);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s var(--ease);
}
.chatbot__history-new svg {
  width: 14px;
  height: 14px;
}
.chatbot__history-new:hover {
  background: rgba(255, 77, 31, 0.1);
}
.chatbot__history-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}
.chatbot__history-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--fog);
}
.chatbot__history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px 14px;
  text-align: left;
  transition: background 0.2s var(--ease);
}
.chatbot__history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.chatbot__history-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 77, 31, 0.12);
  padding: 5px;
  flex-shrink: 0;
}
.chatbot__history-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chatbot__history-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
.chatbot__history-item-preview {
  font-size: 12px;
  color: var(--fog);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chatbot__history-item-time {
  font-size: 10.5px;
  color: var(--fog);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
/* Each of these sets its own display: value at the same specificity as the
   UA [hidden] rule but later in the cascade, so it silently wins and the
   element stays visible (same bug as chatbot__typing / [data-auth] above)
   — needed since JS toggles the history view by setting hidden on these. */
.chatbot__messages[hidden],
.chatbot__form[hidden],
.chatbot__history-view[hidden] {
  display: none !important;
}
.chatbot__msg {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chatbot__msg--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.chatbot__msg-text {
  flex: 1;
  min-width: 0;
}
.chatbot__msg-speak {
  /* Visually compact but a full 32px tap target — a 20px box is too easy
     to miss on a touchscreen right next to the message text. */
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: -6px -6px -6px 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s var(--ease);
}
.chatbot__msg-speak svg {
  width: 16px;
  height: 16px;
}
.chatbot__msg-speak:hover,
.chatbot__msg-speak.is-speaking {
  color: var(--brand-bright);
}
.chatbot__msg--user {
  align-self: flex-end;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  color: #1a0a04;
  border-bottom-right-radius: 4px;
}
.chatbot__msg--error {
  align-self: flex-start;
  background: rgba(255, 77, 31, 0.1);
  color: var(--ember);
  border: 1px solid var(--line-2);
}
.chatbot__typing {
  display: flex;
  gap: 4px;
  padding: 0 16px 10px;
  flex-shrink: 0;
}
.chatbot__typing[hidden] {
  /* The [hidden] attribute's UA display:none loses to the class rule above
     without this — same specificity, but the class rule comes later in the
     cascade, so the dots stayed visible even before a message was sent. */
  display: none;
}
.chatbot__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mist);
  animation: chatbotTyping 1.1s ease-in-out infinite;
}
.chatbot__typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chatbot__typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chatbotTyping {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.chatbot__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  flex-shrink: 0;
}
.chatbot__input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 9px 14px;
  color: var(--white);
  /* Same iOS auto-zoom threshold as .field input — under 16px, tapping this
     zoomed the whole page in and left the panel looking cut off/misplaced. */
  font-size: 16px;
  font-family: var(--sans);
}
.chatbot__input:focus {
  outline: none;
  border-color: var(--line-2);
}
.chatbot__input::placeholder {
  color: var(--mist);
}
.chatbot__send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.chatbot__send:hover {
  background: var(--brand-bright);
}
.chatbot__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* ── CALLBOT (quick call / email launcher) ──── */
.callbot {
  position: fixed;
  right: 96px;
  bottom: 24px;
  z-index: 900;
}
.callbot__launcher {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--ink-2);
  color: var(--brand-bright);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.25s var(--ease);
}
.callbot__launcher:hover {
  transform: scale(1.06);
}
.callbot__launcher-icon {
  width: 22px;
  height: 22px;
}
.callbot__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.callbot.is-open .callbot__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.callbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 4px;
}
.callbot__header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 4px;
}
.callbot__header-sub {
  font-size: 13px;
  color: var(--fog);
  margin: 0;
}
.callbot__close {
  background: none;
  border: none;
  color: var(--fog);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s;
}
.callbot__close:hover {
  color: var(--white);
}
.callbot__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px 20px;
}
.callbot__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.callbot__card:hover {
  border-color: var(--brand-bright);
  transform: translateY(-2px);
}
.callbot__card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 77, 31, 0.12);
  color: var(--brand-bright);
  display: grid;
  place-items: center;
}
.callbot__card-icon svg {
  width: 20px;
  height: 20px;
}
.callbot__card-title {
  font-size: 14px;
  font-weight: 600;
}
.callbot__card-sub {
  font-size: 12px;
  color: var(--fog);
}

@media (max-width: 480px) {
  .chatbot {
    right: 16px;
    bottom: 16px;
  }
  .callbot {
    right: 86px;
    bottom: 16px;
  }
  .callbot__launcher {
    width: 46px;
    height: 46px;
  }
  .callbot__panel {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .callbot__header {
    padding: 24px 24px 8px;
  }
  .callbot__options {
    grid-template-columns: 1fr;
    padding: 20px 24px 24px;
  }
  html.callbot-open {
    overflow: hidden;
  }
  .chatbot__panel {
    /* On a phone the on-screen keyboard doesn't get its own space the way a
       physical keyboard does — it just covers the bottom of the same
       screen — so a floating panel with margins kept getting part of
       itself pushed under the keyboard, or clipped by browser chrome. A
       full-screen takeover (WhatsApp-style: one screen is either the site
       or the chat, never both at once) sidesteps that entirely — the
       panel's size IS the screen, so there's nothing for the keyboard to
       push it out of. */
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
  }
  html.chatbot-open {
    overflow: hidden;
  }
  /* The chat panel takes over the whole screen here, but it's a sibling of
     .callbot rather than an ancestor — without this, the call/email bubble
     still floats on top of the open chat since it shares the same z-index
     and comes later in the DOM. */
  html.chatbot-open .callbot {
    display: none;
  }
}

/* Section rhythm tuned for desktop reads as oversized empty space once
   sections stack full-width on a phone — tighten just the vertical
   padding, leaving each section's own horizontal/side values alone. */
@media (max-width: 640px) {
  .services { padding-top: 76px; padding-bottom: 76px; }
  .tech { padding-top: 70px; }
  .projects { padding-top: 70px; }
  .finale { padding-top: 80px; padding-bottom: 80px; }
}
