/* =============================================================================
   pages.css — styles shared by every NON-home public page (about, services,
   portfolio, blog, careers, contact, service-detail, case-study-detail,
   blog-article, components, privacy, terms).
   -----------------------------------------------------------------------------
   Provides:
     • .page-hero, .page-hero-grid, .page-hero-glow, .page-hero-canvas,
       .page-hero-content, .page-hero-meta — the consistent inner-page hero.
     • Layout primitives: .two-col, .values, .value, .team-grid, .team-card,
       .work-card, .blog-row, .role-row, .perks, .perk, .info-block.
     • A subtle hover/parallax behaviour for inner-page cards.

   New components added in components.css (cards, CTA blocks, stats, badges,
   chatbot, etc.) layer on top of these primitives — they don't replace them.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   .cta--align-start  —  alignment modifier for the closing-CTA section.
   -----------------------------------------------------------------------------
   The default `.cta` (defined in home.css) is centered: text-align:center, with
   action rows that use `justify-content:center`. That's right for the homepage
   hero-style closing CTA, but on inner pages (about, services, portfolio,
   careers) the closing CTA should align with the content column above it —
   flush left, same horizontal inset as the surrounding `.container` blocks —
   so headlines like "Curious yet? Say hi." don't appear to wander to the
   center of the page.

   Apply by adding the modifier alongside `.cta`:
       <section class="cta cta--align-start"> ... </section>
   The modifier:
     • forces text-align:left
     • constrains the inner column to the page's max measure
     • flips action rows to flex-start
     • neutralizes the inline `margin:auto`/`text-align:center` overrides used
       in the legacy markup so they don't fight the alignment
-------------------------------------------------------------------------- */
/* Inner-page closing CTAs: every text and flex child is forced flush left so
 * the section's content edge lines up with the .container sections above. We
 * use !important to defeat the legacy inline styles (`text-align:center`,
 * `margin:0 auto`, `justify-content:center`) that were copy-pasted into the
 * markup before this modifier existed. The selectors target both the
 * structural elements (h2, .display, p, .lede, .form) and any element whose
 * inline style still contains the substring "justify-content:center" — so
 * future copy-paste markup self-corrects under .cta--align-start. */
.cta.cta--align-start { text-align: left !important; }
.cta.cta--align-start > div {
  max-width: var(--container-max, 1200px);
  margin: 0 !important;
}
/* Headlines + lede + paragraphs — all flush left, no auto inline margins. */
.cta.cta--align-start h2,
.cta.cta--align-start .display,
.cta.cta--align-start .h2,
.cta.cta--align-start p,
.cta.cta--align-start .lede {
  text-align: left !important;
  margin-inline: 0 !important;
}
.cta.cta--align-start .display,
.cta.cta--align-start .h2 { max-width: 22ch; }
.cta.cta--align-start .lede,
.cta.cta--align-start p   { max-width: 56ch; }
/* Action / button rows + inline forms with `justify-content:center` */
.cta.cta--align-start [style*="justify-content:center"],
.cta.cta--align-start [style*="justify-content: center"] {
  justify-content: flex-start !important;
}
/* Inline forms (.form) sometimes set their own flex alignment via inline
 * styles. Force them too. */
.cta.cta--align-start .form { justify-content: flex-start !important; }

.page-hero {
  position: relative;
  min-height: 70vh;
  padding: 180px var(--pad-x) 100px;
  overflow: hidden;
  display: flex;
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.page-hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.7; pointer-events: none; }
.page-hero-canvas canvas { width: 100%; height: 100%; display: block; }
.page-hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 30% 60%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 60%, black 20%, transparent 70%);
  opacity: 0.5;
}
.page-hero-glow {
  position: absolute;
  inset: 10% 30% 10% 30%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.page-hero-content {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  width: 100%;
}
.page-hero-content h1 { max-width: none; }
.page-hero-meta { display: flex; flex-direction: column; gap: 18px; }

.crumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 24px;
}
.crumb a { color: var(--fg-1); }
.crumb span { color: var(--fg-3); margin: 0 10px; }

/* Two-col content */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

/* Values list */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-1) 70%, transparent), color-mix(in oklab, var(--bg-1) 20%, transparent));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease, background .35s ease;
}
.value:hover { transform: translateY(-4px); border-color: var(--line-strong); background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 6%, var(--bg-1)), color-mix(in oklab, var(--bg-1) 20%, transparent)); }
.value-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* Team grid */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: color-mix(in oklab, var(--bg-1) 80%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease;
}
.team-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.team-photo {
  aspect-ratio: 1/1;
  background-image:
    linear-gradient(135deg, color-mix(in oklab, var(--accent) 40%, var(--bg-1)), var(--bg-2));
  background-size: 12px 12px;
  background-image:
    repeating-linear-gradient(45deg, color-mix(in oklab, var(--accent) 12%, transparent) 0 1px, transparent 1px 12px),
    linear-gradient(135deg, var(--bg-2), var(--bg-1));
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
}
.team-meta { padding: 20px; }
.team-name { font-weight: 500; font-size: 18px; }
.team-role { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; color: var(--fg-2); text-transform: uppercase; margin-top: 6px; }

/* Service detail rows — glassmorphism cards.
 * Each row is a discrete frosted-glass card. Hover only animates the
 * card's CHROME (border, glow, background) — content position is fixed
 * so text never shifts horizontally or vertically. (Earlier drafts
 * indented padding on hover, which animated the text leftwards; that
 * behaviour was deliberately removed.)
 *
 * Glass recipe:
 *   • Semi-transparent background (color-mix on --bg-1)
 *   • backdrop-filter: blur + saturation boost
 *   • Subtle border at rest, accent-tinted border on hover
 *   • Soft accent radial in the top-left corner via ::before, fades in
 *   • Box-shadow on hover for the floating-glass feel
 *
 * isolation:isolate confines the ::before's z-index:-1 to this row's
 * stacking context so the highlight pool sits behind the row's content
 * but doesn't bleed under the page background.
 */
.svc-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 32px;
  padding: 40px 32px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--bg-1) 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  align-items: start;
  position: relative;
  isolation: isolate;
  transition:
    border-color .4s cubic-bezier(.2,.7,.2,1),
    background   .4s ease,
    box-shadow   .4s ease;
}
/* Accent-tinted radial pool that fades in on hover. Positioned
 * behind the content via z-index:-1 (contained by the parent's
 * isolation:isolate context). */
.svc-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    ellipse at 0% 0%,
    color-mix(in oklab, var(--accent) 14%, transparent),
    transparent 55%
  );
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.svc-row:hover,
.svc-row:focus-within {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line-strong));
  background: color-mix(in oklab, var(--bg-1) 75%, transparent);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in oklab, var(--accent) 25%, transparent);
}
.svc-row:hover::before,
.svc-row:focus-within::before { opacity: 1; }
.svc-row:last-child { margin-bottom: 0; }
.svc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.12em;
}
.svc-row h3 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.02em; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------------------------------------------------------------------------
   Service detail block (.svc-detail) — the rich right-hand column on each
   .svc-row. Provides a small infographic feel without committing the
   studio to specific timelines or team sizes (which were intentionally
   removed for liability reasons — the discovery call is the right place
   to discuss those).

   Anatomy:
     <aside class="svc-detail">
       <p class="svc-detail__for">
         <span class="svc-detail__for-lab">For</span> use case sentence…
       </p>
       <div class="svc-detail__delivers">
         <div class="svc-detail__delivers-lab">What you get</div>
         <ul><li>Item 1</li>…</ul>
       </div>
     </aside>

   Note for future contributors:
     • Do NOT add a `.svc-detail__stats` block back here with hard
       numbers (engagement length, team size, fixed prices, throughput
       guarantees). Anything that could read as a contractual promise
       belongs in the discovery-call conversation, not on the marketing
       site. If you need a visual third element, prefer something
       qualitative (e.g., a short tooling list or "We work with…" pill
       row) and route any quantitative claim through Legal first.
   ------------------------------------------------------------------------ */
.svc-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.svc-detail__for {
  margin: 0;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.55;
}
.svc-detail__for-lab {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  vertical-align: 1px;
}
.svc-detail__delivers-lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.svc-detail__delivers ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.svc-detail__delivers li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-1);
}
/* Checkbox tile — drawn entirely in CSS so we don't ship 4 SVG files
 * per row. The ::before is the box, ::after is the tick. */
.svc-detail__delivers li::before {
  content: '';
  position: absolute;
  left: 0; top: 3px;
  width: 16px; height: 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
}
.svc-detail__delivers li::after {
  content: '';
  position: absolute;
  left: 4px; top: 6px;
  width: 8px; height: 4px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg-1);
}

/* Portfolio big grid */
.port-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.port-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  background: var(--bg-1);
}
.port-card.span6 { grid-column: span 6; }
.port-card.span4 { grid-column: span 4; }
.port-card.span8 { grid-column: span 8; aspect-ratio: 16/9; }
.port-card.span12 { grid-column: span 12; aspect-ratio: 21/9; }
.port-card-bg {
  position: absolute; inset: 0;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.port-card:hover .port-card-bg { transform: scale(1.04); }
.port-card-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px;
  background: linear-gradient(0deg, color-mix(in oklab, var(--bg-0) 90%, transparent), transparent);
}
.port-card .tag { background: color-mix(in oklab, var(--bg-0) 70%, transparent); }

/* Blog list */
.blog-list { display: flex; flex-direction: column; }
.blog-row {
  display: grid;
  grid-template-columns: 120px 2fr 1fr 80px;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: padding .3s ease;
}
.blog-row:hover { padding-left: 24px; }
.blog-row:last-child { border-bottom: 1px solid var(--line); }
.blog-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--fg-2); letter-spacing: 0.1em; }
.blog-title { font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.015em; }
.blog-cat { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.blog-arrow { justify-self: end; transition: transform .3s ease; color: var(--fg-2); }
.blog-row:hover .blog-arrow { transform: translate(4px, -4px); color: var(--fg-0); }

/* Careers */
.role-list { display: flex; flex-direction: column; }
.role-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: padding-left .4s cubic-bezier(.2,.7,.2,1), background .4s ease;
}
.role-row:hover { padding-left: 16px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 5%, transparent), transparent 60%); }
.role-row:last-child { border-bottom: 1px solid var(--line); }
.role-title { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.role-meta { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.1em; color: var(--fg-2); text-transform: uppercase; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.perk { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in oklab, var(--bg-1) 60%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s ease; }
.perk:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.perk-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--grad); margin-bottom: 16px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
}
.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 0;
  color: var(--fg-0);
  font: inherit;
  font-size: 18px;
  outline: none;
  transition: border-color .25s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 80px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
}
.chip.on { background: var(--fg-0); color: var(--bg-0); border-color: var(--fg-0); }

.contact-info { display: flex; flex-direction: column; gap: 32px; }
.info-block { padding: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in oklab, var(--bg-1) 60%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: border-color .35s ease, transform .35s ease; }
.info-block:hover { border-color: var(--line-strong); transform: translateY(-2px); }

/* Tablet — iPad Pro / large tablet (901–1100px) */
@media (max-width: 1100px) {
  .page-hero { padding: 140px var(--pad-x) 72px; min-height: 56vh; }
  .page-hero-content { gap: 40px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .port-card.span4 { grid-column: span 6; }
  /* Contact form/aside cramps at this breakpoint with chips wrapping
   * awkwardly. Stack vertically — the form gets full width, aside drops
   * under it. */
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  /* Role row: drop the dept column at this width to give the title +
   * location more room (Spanish titles otherwise wrap to 3 lines). */
  .role-row {
    grid-template-columns: 1fr auto auto;
    gap: 16px 24px;
  }
  .role-row .role-meta:nth-of-type(1) { display: none; }
}

/* Tablet portrait / iPad Mini band (601–900px) — preserves more of the
 * portfolio grid variety than the bare 1-up mobile cascade below. */
@media (max-width: 900px) and (min-width: 601px) {
  .port-card.span6, .port-card.span4 { grid-column: span 6; }
  .port-card.span12, .port-card.span8 { grid-column: span 12; }
}

/* Mobile */
@media (max-width: 900px) {
  .page-hero { padding: 120px var(--pad-x) 56px; min-height: 50vh; }
  .page-hero-content { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .crumb { margin-bottom: 16px; }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .values, .perks { grid-template-columns: 1fr; gap: 16px; }
  .value, .perk { padding: 24px; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .team-meta { padding: 16px; }
  .port-grid { gap: 16px; }
  .port-card.span6, .port-card.span4, .port-card.span8, .port-card.span12 { grid-column: span 12; aspect-ratio: 4/3; }
  .port-card-meta { padding: 20px; }
  /* Glass card on mobile: keep horizontal padding so the card edge
   * stays visible; tighten vertical to compensate for the stacked
   * 1-col layout. */
  .svc-row { grid-template-columns: 1fr; gap: 16px; padding: 28px 22px; margin-bottom: 12px; }
  .blog-row { grid-template-columns: auto 1fr auto; gap: 12px 16px; padding: 24px 0; }
  .blog-row:hover { padding-left: 0; }
  .blog-title { grid-column: 1 / -1; order: 2; }
  .blog-date { order: 1; }
  .blog-cat { order: 3; }
  .blog-arrow { order: 4; }
  .role-row { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 20px 0; }
  .role-row .role-title { grid-column: 1 / -1; }
  .field input, .field textarea, .field select { font-size: 16px; }
}

/* Mobile portrait */
@media (max-width: 600px) {
  .page-hero { padding: 100px var(--pad-x) 40px; }
  .team-grid { grid-template-columns: 1fr; }
  .info-block { padding: 24px; }
}
