/* ==========================================================================
   sections.css — per-section layout and decorative animation
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 940px);
  padding-block: calc(var(--header-h) + var(--space-16)) var(--space-16);
  overflow: hidden;
}

/* Decorative background: dot grid + two drifting blurred orbs. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 32px 32px;
  /* Fade the grid out toward the edges so it never fights the content. */
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 20%, transparent 78%);
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.hero__orb--1 {
  width: min(46vw, 560px);
  aspect-ratio: 1;
  top: -14%;
  right: -8%;
  background: var(--orb-1);
  animation: drift-1 22s var(--ease-in-out) infinite alternate;
}
.hero__orb--2 {
  width: min(38vw, 460px);
  aspect-ratio: 1;
  bottom: -18%;
  left: -6%;
  background: var(--orb-2);
  animation: drift-2 26s var(--ease-in-out) infinite alternate;
}
@keyframes drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-7%, 9%, 0) scale(1.14); }
}
@keyframes drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to   { transform: translate3d(9%, -7%, 0) scale(1); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}
/* Must be positioned — the floating .code-badge chips anchor to it. */
.hero__visual { position: relative; }

/* Stacked, the headline stays first: most visitors arrive from an email link
   on a phone, and the first screen has to say who this is before the visual. */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
}

.hero__intro {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
}

/* A full sentence rather than a name, so it's set a step below the default
   <h1> size — at display size it ran to five lines in the half-width column. */
.hero__title {
  margin-block: var(--space-3) var(--space-5);
  font-size: clamp(2rem, 1.35rem + 2.5vw, 3.1rem);
}
.hero__title .gradient-text { display: block; }
/* Keep the hyphenated terms whole; balanced wrapping split them mid-word. */
.hero__title .nowrap { white-space: nowrap; }

.hero__lede {
  max-width: 52ch;
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block: var(--space-8) var(--space-8);
}

.hero__socials {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
/* ---- Hero expertise chips ------------------------------------------------ */

.hero__expertise {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  max-width: 34rem;
}
.expertise-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  /* --n staggers the chips so they bob out of step instead of as one row. */
  animation: float-chip 4.5s var(--ease-in-out) calc(var(--n, 0) * -0.65s) infinite alternate;
}
.expertise-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}
.expertise-chip--lead {
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  background: var(--brand-soft-bg);
  color: var(--brand-soft-fg);
}
.expertise-chip--lead::before { background: var(--gradient-brand); }
@keyframes float-chip {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -6px, 0); }
}

/* ---- Hero code window --------------------------------------------------- */

.code-window {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: float 7s var(--ease-in-out) infinite alternate;
  will-change: transform;
}
@keyframes float {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -14px, 0); }
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.code-window__dots { display: flex; gap: 6px; }
.code-window__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.code-window__dots span:nth-child(1) { background: #ff5f57; }
.code-window__dots span:nth-child(2) { background: #febc2e; }
.code-window__dots span:nth-child(3) { background: #28c840; }
.code-window__file {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #7d8ba1;
}

.code-window__code {
  margin: 0;
  padding: var(--space-5) var(--space-5) var(--space-6);
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 0.66rem + 0.42vw, 0.88rem);
  line-height: 1.75;
  color: var(--code-text);
  overflow-x: auto;
  tab-size: 2;
}
/* Syntax colours are fixed (the window is always dark in both themes). */
.tok-key { color: #c084fc; }
.tok-fn  { color: #60a5fa; }
.tok-str { color: #86efac; }
.tok-num { color: #fbbf24; }
.tok-prop{ color: #7dd3fc; }
/* #64748b only reached 3.96:1 on the window's near-black ground. */
.tok-com { color: #8896ad; font-style: italic; }
.tok-punc{ color: #94a3b8; }

/* Floating "badge" chips around the code window */
.code-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}
/* Straddle opposite outer corners of the window. Anchored to the corners
   rather than inset by a percentage so they never sit on top of the code. */
.code-badge--1 {
  top: -18px;
  right: -18px;
  animation: float-badge 5.5s var(--ease-in-out) infinite alternate;
}
.code-badge--2 {
  bottom: -18px;
  left: -18px;
  animation: float-badge 6.5s var(--ease-in-out) 0.6s infinite alternate-reverse;
}
@keyframes float-badge {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -12px, 0); }
}
@media (max-width: 560px) {
  .code-badge { display: none; }
}

.hero__scroll-cue {
  position: absolute;
  inset-block-end: var(--space-6);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.hero__scroll-cue .icon { animation: bob 1.8s var(--ease-in-out) infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}
@media (max-height: 760px), (max-width: 980px) {
  .hero__scroll-cue { display: none; }
}

/* --------------------------------------------------------------------------
   STATS STRIP
   -------------------------------------------------------------------------- */

.stats {
  border-block: 1px solid var(--border);
  background: var(--bg-subtle);
  padding-block: var(--space-10);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-4); }
}

.stat { text-align: center; }
.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat__label {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   SERVICES
   -------------------------------------------------------------------------- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}
.service__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.service__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.service__list .icon {
  width: 16px;
  height: 16px;
  margin-top: 0.32em;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   PROJECTS
   -------------------------------------------------------------------------- */

.projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.projects__head .section-head { margin-bottom: 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}
.filter-chip {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition:
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.filter-chip[aria-pressed="true"] {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
}
@media (max-width: 700px) {
  .projects__grid { grid-template-columns: 1fr; }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transform-style: preserve-3d;
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}
.project-card:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  box-shadow: var(--shadow-lg);
}

/* Filtered-out cards collapse out of the grid after fading. */
.project-card.is-filtered-out {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}
.project-card[hidden] { display: none; }

/* A featured project spans two columns and lays out side-by-side. */
.project-card--featured { grid-column: span 2; }
@media (min-width: 701px) {
  .project-card--featured {
    flex-direction: row;
    align-items: stretch;
  }
  .project-card--featured .project-card__media {
    flex: 0 0 46%;
    aspect-ratio: auto;
  }
  .project-card--featured .project-card__body { flex: 1; }
}
@media (max-width: 1000px) {
  .project-card--featured { grid-column: span 1; }
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-muted);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.project-card:hover .project-card__media img { transform: scale(1.06); }

/* Placeholder artwork used until real screenshots land — a gradient plate
   with the project initials. Remove .project-card__placeholder once the
   real <img> is in place. */
.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand) 22%, var(--bg-muted)),
      color-mix(in srgb, var(--accent) 22%, var(--bg-muted)));
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  letter-spacing: var(--tracking-tight);
  transition: transform var(--dur-slow) var(--ease-out);
}
.project-card:hover .project-card__placeholder { transform: scale(1.06); }

/* Per-project UI mockup inside the placeholder plate. */
.project-card__placeholder { overflow: hidden; }
.project-art { width: 100%; height: 100%; display: block; font-family: var(--font-sans, system-ui, sans-serif); }
.project-art .win,
.project-art .card { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.project-art .card { fill: var(--surface-raised, var(--surface)); }
.project-art .phone { fill: #0f172a; }
.project-art .scr { fill: var(--surface); }
.project-art .bar,
.project-art .sb { fill: var(--bg-muted); }
.project-art .dk { fill: #0b1220; }
.project-art .doc { fill: #fff; }
.project-art .ln { fill: color-mix(in srgb, var(--text) 13%, transparent); }
.project-art .ln2 { fill: var(--bg-muted); stroke: var(--border); }
.project-art .wl { fill: rgb(255 255 255 / 0.75); }
.project-art .fs { fill: var(--brand); }
.project-art .fx { fill: var(--accent); }
.project-art .fb { fill: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.project-art .fa { fill: color-mix(in srgb, var(--accent) 26%, var(--surface)); }
.project-art .fa2 { fill: #fbbf24; }
.project-art .fb2 { fill: #4ade80; }
.project-art .s,
.project-art .a,
.project-art .grid { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.project-art .s { stroke: var(--brand); }
.project-art .a { stroke: var(--accent); }
.project-art .grid { stroke: color-mix(in srgb, var(--text) 14%, transparent); stroke-width: 0.8; stroke-dasharray: 2 3; }
.project-art .rg { fill: none; stroke: color-mix(in srgb, var(--text) 13%, transparent); stroke-width: 4; }
.project-art .rv { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.project-art .t { fill: var(--text); }
.project-art .tm { fill: var(--text-muted); }
.project-art .wt { fill: #fff; }
.project-art .gn { fill: #16a34a; }
.project-art .dk2 { fill: #0f172a; }
.project-art .dk3 { fill: #64748b; }

/* EvluateAI card art — mirrors the real Evluate UI (teal on white). Colours
   use light-dark() so the mockup follows the theme. Two layouts: a portrait
   one for the side-by-side featured card and a landscape one when it stacks. */
.ev-art .ev-panel { fill: light-dark(#ffffff, #0b1220); stroke: light-dark(#c7e8e3, #1f3a3d); stroke-width: 1; }
.ev-art .ev-card { fill: light-dark(#ffffff, #0f1a2b); stroke: light-dark(#d6e4e2, #22364a); stroke-width: 0.8; }
.ev-art .ev-outl { fill: light-dark(#ffffff, #0f1a2b); stroke: #14b8a6; stroke-width: 0.9; }
.ev-art .ev-hl { fill: light-dark(#ecfdf5, #0f2a2a); }
.ev-art .ev-div { fill: light-dark(#e2e8f0, #1e2d40); }
.ev-art .ev-ink { fill: light-dark(#0f2a4a, #e6f0f7); }
.ev-art .ev-mut { fill: light-dark(#64748b, #94a3b8); }
.ev-art .ev-teal { fill: light-dark(#0f766e, #2dd4bf); }
.ev-art .ev-or { fill: light-dark(#d97706, #fbbf24); }
.ev-art .ev-ort { fill: light-dark(#b45309, #fcd34d); }
.ev-art .ev-orbg { fill: light-dark(#fef3c7, #422006); }
.ev-art .ev-chipl { fill: light-dark(#ccfbf1, #134e4a); }
.ev-art .ev-tbg { fill: #14b8a6; }
.ev-art .ev-tdbg { fill: light-dark(#0f766e, #0d9488); }
.ev-art .ev-t { fill: #0f766e; }
.ev-art .ev-w { fill: #ffffff; }
.ev-art .ev-track { fill: light-dark(#e2e8f0, #26364a); }
.ev-art .ev-avbg { fill: light-dark(#e2e8f0, #334155); }
.ev-art .ev-rt,
.ev-art .ev-rs-teal,
.ev-art .ev-rs-blue,
.ev-art .ev-rs-pur { fill: none; stroke-width: 3.6; stroke-linecap: round; }
.ev-art .ev-rt { stroke: light-dark(#e2e8f0, #26364a); }
.ev-art .ev-rs-teal { stroke: #14b8a6; }
.ev-art .ev-rs-blue { stroke: #60a5fa; }
.ev-art .ev-rs-pur { stroke: #a855f7; }
.ev-art--wide { display: none; }
@media (max-width: 700px) {
  .ev-art--tall { display: none; }
  .ev-art--wide { display: block; }
}

.project-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
}
.project-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.project-card__title { font-size: var(--text-xl); }
/* Problem -> what I built -> result, joined by a rail down the left edge. */
.project-card__story {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  margin-block: var(--space-1) var(--space-2);
}
.story-step {
  position: relative;
  padding-left: var(--space-5);
}
.story-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 9px;
  height: 9px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
}
.story-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.3rem + 11px);
  bottom: calc(var(--space-4) * -1 - 0.3rem + 2px);
  width: 1px;
  background: var(--border-strong);
}
.story-step dt {
  margin-bottom: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.story-step dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.story-step--result::before {
  border-color: transparent;
  background: var(--gradient-brand);
}
.story-step--result dt { color: var(--brand); }
.story-step--result dd { color: var(--text); font-weight: 500; }
.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  transition: color var(--dur-base) var(--ease-out),
              gap var(--dur-base) var(--ease-out);
}
.project-link:hover { color: var(--brand); gap: var(--space-3); }
.project-link--primary { color: var(--brand); margin-right: auto; }

.projects__empty {
  padding: var(--space-16) var(--space-6);
  text-align: center;
  color: var(--text-muted);
}

/* Case studies normally live hidden in the page and are cloned into the modal.
   Without JavaScript there is no modal, so show them inline instead — the copy
   stays readable rather than silently disappearing. */
html.no-js .case-study[hidden] {
  display: block;
  margin-top: var(--space-10);
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
html.no-js .filter-bar { display: none; }

/* --------------------------------------------------------------------------
   TECH STACK — collapsed under the services grid
   -------------------------------------------------------------------------- */

.stack-details {
  margin-top: var(--space-10);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stack-details__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  cursor: pointer;
  list-style: none;
}
.stack-details__summary::-webkit-details-marker { display: none; }
.stack-details__summary .icon {
  color: var(--brand);
  flex: none;
  transition: transform var(--dur-base) var(--ease-out);
}
.stack-details[open] .stack-details__summary .icon { transform: rotate(180deg); }
.stack-details__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}
.stack-details__hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.stack-details .stack__grid { padding: 0 var(--space-6) var(--space-6); }

.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  /* Cards deliberately stretch to the tallest in their row. `align-items:
     start` was tried so each sized to its content, but the group sizes vary
     enough that it left large floating gaps under the short cards — the even
     grid reads better than the ragged one. */
}
.stack-group__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-size: var(--text-base);
}
.stack-group__title .icon { color: var(--brand); }

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition:
    transform var(--dur-base) var(--ease-spring),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out);
}
.tech-chip:hover {
  transform: translateY(-3px);
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: var(--brand-soft-bg);
}

/* --------------------------------------------------------------------------
   PROCESS TIMELINE
   -------------------------------------------------------------------------- */

.process__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
/* The connecting line draws itself in when the section reveals. */
.process__steps::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 12.5%;
  width: 75%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
  opacity: 0.28;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease-out) 0.2s;
}
.process__steps.is-visible::before { transform: scaleX(1); }

@media (max-width: 860px) {
  .process__steps { grid-template-columns: 1fr; gap: var(--space-8); }
  .process__steps::before {
    top: 0;
    left: 27px;
    width: 2px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: 50% 0;
  }
  .process__steps.is-visible::before { transform: scaleY(1); }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); }
  .step__num { margin-bottom: 0; }
}

.step { position: relative; }
.step__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--brand);
  transition:
    transform var(--dur-base) var(--ease-spring),
    border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}
.step:hover .step__num {
  transform: translateY(-4px);
  border-color: var(--brand);
  background: var(--brand-soft-bg);
}
.step__title { margin-bottom: var(--space-2); }
.step__text { font-size: var(--text-sm); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   ABOUT
   -------------------------------------------------------------------------- */

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
}
@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; }
}

.about__portrait {
  position: relative;
  max-width: 380px;
}
/* Offset gradient frame behind the portrait. */
.about__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  opacity: 0.18;
  transition: transform var(--dur-slow) var(--ease-out);
}
.about__portrait:hover::before { transform: translate(10px, 10px); }
.about__portrait img,
.about__portrait .portrait-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.about__portrait img {
  display: block;
  box-shadow: var(--shadow-lg, 0 20px 40px -16px rgb(0 0 0 / 0.35));
}
.portrait-placeholder {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--brand) 16%, var(--bg-muted)),
      color-mix(in srgb, var(--accent) 16%, var(--bg-muted)));
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-6);
}
.portrait-placeholder .icon { width: 44px; height: 44px; }

.about__body p + p { margin-top: var(--space-4); }
.about__body p { color: var(--text-secondary); }

.about__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-block: var(--space-8);
  padding-block: var(--space-6);
  border-block: 1px solid var(--border);
}
.fact__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.fact__value { font-weight: 600; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   CLIENT FEEDBACK — screenshots of real messages, framed as conversation cards
   -------------------------------------------------------------------------- */

/* Columns rather than a grid: screenshots come in every height, and columns
   pack them without leaving gaps under the short ones. */
.feedback__grid {
  columns: 3 300px;
  column-gap: var(--space-6);
}
.chat-card {
  --chat-accent: var(--brand);
  break-inside: avoid;
  margin: 0 0 var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
/* Source colours are the apps' own, kept to the small label only. */
.chat-card--slack    { --chat-accent: light-dark(#611f69, #e0a4e6); }
.chat-card--whatsapp { --chat-accent: light-dark(#128c4b, #4ade80); }
.chat-card--email    { --chat-accent: var(--brand); }

.chat-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}
.chat-card__source {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--chat-accent);
}
.chat-card__source .icon { width: 16px; height: 16px; }
.chat-card__shot img {
  display: block;
  width: 100%;
  height: auto;
}
.chat-card__placeholder {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: var(--space-6);
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--chat-accent) 10%, var(--bg-muted)),
      var(--bg-muted));
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.chat-card--whatsapp .chat-card__placeholder { min-height: 280px; }

/* --------------------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------------------- */

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; }
}

.contact__methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block: var(--space-8);
}
.contact-method {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out);
}
.contact-method:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: var(--brand-soft-bg);
  color: var(--text);
}
.contact-method__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-soft-bg);
  color: var(--brand);
  flex: none;
}
.contact-method__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.contact-method__value {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  word-break: break-word;
}
.contact-method__hint {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* CTA banner above the footer */
.cta-banner {
  position: relative;
  padding: clamp(2.5rem, 2rem + 3vw, 4rem);
  border-radius: var(--radius-xl);
  background: var(--gradient-brand);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000, transparent 75%);
  pointer-events: none;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: #fff; }
.cta-banner p {
  max-width: 52ch;
  margin: var(--space-4) auto var(--space-8);
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-lg);
}
.cta-banner .btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cta-banner .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}
.cta-banner .btn--primary {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.cta-banner .btn--primary:hover { color: var(--brand-800); }
.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* --------------------------------------------------------------------------
   ALSO SHIPPED — compact list under the project grid for work that doesn't
   warrant a full case study.
   -------------------------------------------------------------------------- */

.also-shipped {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.also-shipped__title {
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.also-shipped__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}
.also-shipped__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-strong);
  transition: border-color var(--dur-base) var(--ease-out);
}
.also-shipped__item:hover { border-left-color: var(--brand); }
.also-shipped__item strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--text);
}
.also-shipped__item span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
