/* ============================================================
   PAGES — inner-page components
   Showcases, browser mock, services, process, forms, articles
   ============================================================ */

/* ---------- Page intro ---------- */
.page-title { font-size: clamp(40px, 6vw, 84px); }
.page-lede { font-size: clamp(18px, 1.8vw, 23px); color: var(--ink-2); max-width: 52ch; margin-top: 20px; line-height: 1.5; text-wrap: pretty; }
.page-meta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ============================================================
   APP SHOWCASE (alternating)
   ============================================================ */
.show {
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 78px); align-items: center;
  padding-block: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line-soft);
}
.show:first-of-type { border-top: none; }
/* Let grid items shrink below their content's intrinsic width so the app
   "window" mocks (which clip their own overflow) can't widen the page on mobile. */
.show > * { min-width: 0; }
.show__media { max-width: 100%; }
.show--flip .show__media { order: -1; }
.show__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px; }
.show__head { display: flex; align-items: center; gap: 18px; margin-bottom: 4px; }
.show__head .show__icon { margin-bottom: 0; flex: none; }
.show__headtext { min-width: 0; }
.show__headtext h2 { margin-top: 2px; }
.show__domain { font-family: var(--mono); font-size: 13px; color: var(--honey-deep); }
.show h2 { font-size: clamp(32px, 4vw, 52px); margin-top: 10px; }
.show__desc { color: var(--ink-2); font-size: 17px; margin-top: 16px; max-width: 46ch; }
.show__feats { display: grid; gap: 12px; margin-top: 24px; }
.show__feat { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: var(--ink-2); }
.show__feat svg { flex: none; margin-top: 3px; color: var(--honey-deep); }
.show__cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Browser window mock ---------- */
.win {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  transform: perspective(1600px) rotateY(-3deg);
  transition: transform .6s var(--ease);
}
.show--flip .win { transform: perspective(1600px) rotateY(3deg); }
.win:hover { transform: perspective(1600px) rotateY(0deg); }
.win__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line-soft); }
.win__dots { display: flex; gap: 7px; }
.win__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.win__dots i:nth-child(1) { background: #e9795f; }
.win__dots i:nth-child(2) { background: #e7bb4a; }
.win__dots i:nth-child(3) { background: #6fbf73; }
.win__url { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--ink-3); background: var(--card); border-radius: 100px; padding: 6px 14px; border: 1px solid var(--line-soft); }
.win__body { aspect-ratio: 16/11; position: relative; overflow: hidden; background: var(--paper); }
.win--dark .win__body { background: var(--hive); }
.win--dark .win__bar { background: var(--hive-2); border-color: var(--hive-line); }
.win--dark .win__url { background: var(--hive-3); border-color: var(--hive-line); color: rgba(244,241,251,0.55); }

/* mock content building blocks */
.mock { position: absolute; inset: 0; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.mock__row { display: flex; gap: 12px; align-items: center; }
.mock__chip { height: 26px; border-radius: 100px; background: var(--paper-2); flex: none; }
.mock__bar { height: 12px; border-radius: 100px; background: var(--paper-2); }
.mock__card { border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card); flex: 1; }
.mock--dark .mock__chip, .mock--dark .mock__bar { background: rgba(244,37,94,0.12); }
.mock--dark .mock__card { background: var(--hive-2); border-color: var(--hive-line); }

/* swatch grid for colour-index mock */
.mock__swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; flex: 1; }
.mock__swatches i { border-radius: 8px; }

/* ============================================================
   SERVICES — pillars + process
   ============================================================ */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.pillar { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--card); display: flex; flex-direction: column; gap: 12px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar__icon { width: 48px; height: 48px; border-radius: 13px; background: var(--paper-2); display: grid; place-items: center; color: var(--honey-deep); margin-bottom: 6px; }
.pillar h3 { font-size: 21px; font-weight: 600; }
.pillar p { color: var(--ink-3); font-size: 15px; }
.pillar ul { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 6px; }
.pillar li { font-size: 14.5px; color: var(--ink-2); display: flex; gap: 9px; align-items: center; }
.pillar li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--honey); flex: none; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.process__step { position: relative; padding-top: 28px; }
.process__step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 16px; font-family: var(--mono); font-size: 13px; color: var(--honey-deep); }

/* The white bar at the top of each step. On hover it fills to primary (left→
   right), pops particles off the end + flashes white, then stays primary. A
   step only fires once the previous one has (see fire() in services/+page). */
.process__bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--ink); overflow: hidden; }
.process__bar::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-primary);
  transform: scaleX(0); transform-origin: left center;
}
.process__step.is-on .process__bar::after { transform: scaleX(1); transition: transform 500ms cubic-bezier(0.45, 0, 0.15, 1); }
/* idle hint on the first (Map) bar while the section is in view: rest at 25%,
   jump to 50% every few seconds to invite a hover */
.process__step.hint .process__bar::after { transform: scaleX(0.25); transition: transform 0.5s ease; animation: proc-hint 3.4s ease-in-out 0.5s infinite; }
@keyframes proc-hint { 0%, 55% { transform: scaleX(0.25); } 68% { transform: scaleX(0.5); } 82%, 100% { transform: scaleX(0.25); } }
/* one white flash as the fill lands */
.process__bar::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #fff; opacity: 0; pointer-events: none; }
.process__step.flash .process__bar::before { animation: proc-flash 240ms ease-out; }
@keyframes proc-flash { 0% { opacity: 0; } 35% { opacity: 0.95; } 100% { opacity: 0; } }

/* burst/firework particles (appended to <body>) */
.proc-particle { position: fixed; left: 0; top: 0; z-index: 60; border-radius: 50%; background: var(--honey); box-shadow: 0 0 6px var(--honey-soft); pointer-events: none; will-change: transform, opacity; }
.process__step h4 { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 14px; }
.process__step p { color: var(--ink-3); font-size: 14.5px; margin-top: 8px; }

/* ============================================================
   FILTER PILLS (work / blog)
   ============================================================ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.filter {
  padding: 9px 18px; border-radius: 100px; border: 1px solid var(--line);
  background: var(--card); font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: all .2s; white-space: nowrap;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--bg-base); border-color: var(--ink); }

/* ============================================================
   STORY (single case study)
   ============================================================ */
.story-hero { background: var(--hive); color: var(--ink); padding-top: clamp(130px, 16vh, 190px); padding-bottom: clamp(48px, 6vw, 84px); position: relative; overflow: hidden; }
.story-hero__glow { position: absolute; inset: 0; background: radial-gradient(70% 90% at 80% 0%, rgba(244,37,94,0.16), transparent 60%); }
.story-hero h1 { font-size: clamp(34px, 5vw, 68px); max-width: 24ch; margin-top: 20px; }
.story-hero .breadcrumb a, .story-hero .breadcrumb { color: rgba(244,241,251,0.6); }
.story-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: -60px; position: relative; z-index: 3; }
.story-metric { background: var(--card); padding: 26px; }
.story-metric .v { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.02em; color: var(--ink); }
.story-metric .k { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }

/* article body (story + blog) */
.prose { max-width: 68ch; margin-inline: auto; }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin-top: 48px; }
.prose h3 { font-size: 22px; margin-top: 32px; }
.prose p { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.prose ul { padding-left: 22px; display: grid; gap: 10px; }
.prose li { font-size: 17px; color: var(--ink-2); }
.prose blockquote {
  border-left: 3px solid var(--honey); padding: 6px 0 6px 24px; margin-block: 32px;
  font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); font-style: normal;
}
.prose figure { margin-block: 36px; }
.prose figure .ph { aspect-ratio: 16/9; border-radius: var(--radius); background: var(--paper-3); }
.prose figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-top: 12px; text-align: center; }

/* ============================================================
   BLOG single header
   ============================================================ */
.article-hero { padding-top: clamp(130px, 16vh, 180px); padding-bottom: 30px; }
.article-hero h1 { font-size: clamp(32px, 4.6vw, 60px); max-width: 20ch; margin-top: 18px; }
.article-cover { aspect-ratio: 21/9; border-radius: var(--radius-lg); overflow: hidden; margin-block: 8px clamp(36px, 5vw, 64px); position: relative; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.byline__avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--honey), var(--honey-deep)); flex: none; }
.byline__name { font-weight: 600; font-size: 15px; }
.byline__meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 15.5px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--honey-deep); box-shadow: 0 0 0 3px rgba(244,37,94,0.18);
}
/* custom chevron so the arrow sits off the right edge, not flush against it */
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A82A4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field textarea { resize: vertical; min-height: 130px; }
.contact-aside { background: var(--hive); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 48px); position: relative; overflow: hidden; }
.contact-aside h3 { font-size: 26px; }
.contact-aside .lede { color: rgba(244,241,251,0.7); margin-top: 12px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--hive-line); }
.contact-item:first-of-type { margin-top: 26px; }
.contact-item svg { color: var(--honey); flex: none; margin-top: 2px; }
.contact-item .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,241,251,0.5); }
.contact-item .v { font-size: 16px; margin-top: 3px; display: block; }
.contact-email { color: var(--honey); text-decoration: none; transition: color .2s; }
.contact-email:hover { color: var(--honey-bright); text-decoration: underline; }

/* ============================================================
   INTEGRATIONS grid
   ============================================================ */
.int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.int-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--card); display: flex; flex-direction: column; gap: 12px; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.int-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.int-card__logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.int-card h4 { font-size: 17px; font-weight: 600; }
.int-card p { font-size: 13.5px; color: var(--ink-3); }
.int-cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--honey-deep); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .show { grid-template-columns: 1fr; gap: 32px; }
  .show--flip .show__media { order: 0; }
  .win, .show--flip .win { transform: none; }
  .pillars { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .story-metrics { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .int-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .form__row { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .story-metrics { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .int-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CATALOGUE DOC — integration / application detail pages
   Sticky left "hive index" ToC + long-form article
   ============================================================ */
.doc-head { padding-bottom: clamp(28px, 4vw, 48px); }
.doc-title { max-width: 20ch; }

/* App connector header — the tools this page links together */
.doc-apps { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.doc-app { display: inline-flex; align-items: center; gap: 11px; padding: 9px 16px 9px 9px; border-radius: 100px; border: 1px solid var(--line); background: var(--card); transition: border-color .25s, transform .25s var(--ease); }
.doc-app:hover { border-color: var(--honey-deep); transform: translateY(-2px); }
.doc-app__logo { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.doc-app__logo img { width: 100%; height: 100%; object-fit: contain; }
.doc-app__mono { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--paper); }
.doc-app__name { font-weight: 600; font-size: 14.5px; }
.doc-apps__join { font-family: var(--mono); color: var(--honey-deep); font-size: 18px; font-weight: 600; }
.doc-official { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); padding: 9px 14px; border-radius: 100px; border: 1px dashed var(--line); transition: color .2s, border-color .2s; }
.doc-official:hover { color: var(--honey-bright); border-color: var(--honey-deep); }

/* Two-column doc layout */
.doc-wrap { padding-bottom: clamp(48px, 7vw, 96px); }
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(36px, 5vw, 84px); align-items: start; }
.doc__toc { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.doc-toc { max-height: calc(100vh - 32px); overflow-y: auto; }
.doc-toc__label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); margin-bottom: 14px; }
.doc-toc ul { list-style: none; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc-toc__link { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; color: var(--ink-3); line-height: 1.35; transition: color .2s, border-color .2s; }
.doc-toc__link:hover { color: var(--ink-2); }
.doc-toc__link.is-active { color: var(--honey-bright); border-left-color: var(--honey); font-weight: 500; }

/* Article column (override .prose centering inside the grid) */
.doc .doc__main { max-width: 760px; margin-inline: 0; }
.doc .doc-lede p { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.55; color: var(--ink); }
.doc-section { scroll-margin-top: 96px; }
#intro { scroll-margin-top: 96px; }
.doc-section h2 { font-size: clamp(24px, 2.8vw, 34px); margin-top: 52px; padding-top: 8px; }
.doc-section :where(h3) { font-size: 21px; margin-top: 30px; }
.doc-section :where(a) { color: var(--honey-bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--honey-soft); transition: text-decoration-color .2s; }
.doc-section :where(a):hover { text-decoration-color: var(--honey); }

/* FAQ accordion (native details/summary) */
.faq { display: grid; gap: 10px; margin-top: 8px; }
.faq__item { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.faq__item[open] { border-color: var(--line); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--ink); list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__chev { color: var(--honey-deep); flex: none; transition: transform .3s var(--ease); }
.faq__item[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 20px 20px; }
.faq__a :where(p) { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.faq__a :where(p + p) { margin-top: 12px; }

/* Related cross-links */
.doc-related h2 { font-size: clamp(22px, 2.4vw, 30px); margin-top: 56px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 22px; }
.rel-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--card); transition: transform .4s var(--ease), border-color .3s; }
.rel-card:hover { transform: translateY(-3px); border-color: var(--line); }
.rel-card__logos { display: flex; }
.rel-card__logo { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; margin-left: -6px; border: 2px solid var(--card); }
.rel-card__logo:first-child { margin-left: 0; }
.rel-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.rel-card__title { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.rel-card__sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* Catalogue search input */
.field-search { font: inherit; font-size: 15.5px; width: 100%; max-width: 420px; padding: 13px 18px; border-radius: 100px; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field-search::placeholder { color: var(--ink-3); }
.field-search:focus { outline: none; border-color: var(--honey-deep); box-shadow: 0 0 0 3px rgba(244,37,94,0.18); }

/* Catalogue listing — application cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--card); transition: transform .35s var(--ease), border-color .3s; }
.cat-card:hover { transform: translateY(-3px); border-color: var(--honey-deep); }
.cat-card__logo { width: 42px; height: 42px; border-radius: 11px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.cat-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.cat-card__name { font-weight: 600; font-size: 15px; }
.cat-card__meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }

@media (prefers-reduced-motion: no-preference) {
  :where(html) { scroll-behavior: smooth; }
}
@media (max-width: 980px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc__toc { display: none; }
  .rel-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
