/* ==========================================================================
   ARTIQUEA — REFRESH (light layer)
   Loaded after style.css. Same brand colours and logo; the page itself turns
   white and black: white sections with black type, black islands (order
   block, agents' nest, ticker, drawers) for contrast. Orange stays an accent.
   Overlays (preloader, drawers, lightbox, chat, desktop mode) keep the dark
   tokens from style.css, so scripts that hard-code dark colours still match.
   ========================================================================== */

/* ---------- Tone scopes ---------- */
/* Light: the foreground/background tokens swap, every rule written against
   them in style.css follows. Khaki gets a darker, readable twin on white. */
header,
.section,
footer,
.preloader,
.project-drawer,
.lightbox-modal,
.tone-light {
  --color-black: #FFFFFC;
  --color-porcelain: #080706;
  --color-khaki: #5F5A4D;
  --border-color: rgba(8, 7, 6, 0.1);
  --border-color-active: rgba(255, 63, 0, 0.45);
  --line-strong: rgba(8, 7, 6, 0.85);
}

/* Dark islands inside light areas */
#order,
.pg-console,
.tone-dark {
  --color-black: #080706;
  --color-porcelain: #FFFFFC;
  --color-khaki: #BEB7A4;
  --border-color: rgba(190, 183, 164, 0.15);
  --border-color-active: rgba(255, 127, 17, 0.4);
  --line-strong: rgba(255, 255, 252, 0.85);
}

.section,
footer {
  background-color: var(--color-black);
  color: var(--color-porcelain);
}

/* No dark flash between pages: the page behind the loading screen is white */
html {
  background-color: #FFFFFC;
}

.preloader-v-line {
  background-color: rgba(8, 7, 6, 0.06);
}

/* No blueprint grid lines over the page or the loading screen */
.designer-grid-lines,
.preloader-grid {
  display: none;
}

::selection {
  background: var(--color-flame);
  color: #FFFFFC;
}

/* ---------- Header: white bar, black type ---------- */
header {
  background: rgba(255, 255, 252, 0.88);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  padding: 1.15rem 4rem;
}

.nav-link {
  color: var(--color-khaki);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-porcelain);
}

.lang-btn.active {
  text-shadow: none;
}

.mobile-nav-toggle {
  color: var(--color-porcelain);
}

/* ---------- Type: same faces, more air ---------- */
p {
  line-height: 1.65;
}

.section {
  padding: 9rem 0;
}

.section-header p {
  max-width: 62ch;
}

/* ---------- Buttons: no wipe, no magnet, a calm colour change ---------- */
.btn-magnetic {
  padding: 1.15rem 2.4rem;
  transform: none !important; /* script.js pulls buttons towards the cursor */
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-magnetic::before {
  display: none;
}

.btn-primary {
  background: var(--color-porcelain);
  border-color: var(--color-porcelain);
  color: var(--color-black);
}

/* hover and press swap the fills: the solid button empties, the outlined one fills */
.btn-primary:hover,
.btn-primary:active {
  background: transparent;
  border-color: var(--color-porcelain);
  color: var(--color-porcelain);
}

.btn-secondary {
  border-color: var(--line-strong, var(--border-color));
}

.btn-secondary:hover,
.btn-secondary:active {
  background: var(--color-porcelain);
  border-color: var(--color-porcelain);
  color: var(--color-black);
}

/* ---------- Hero ---------- */
#hero {
  padding-top: 9rem;
  padding-bottom: 6rem;
}

.hero-text h1 {
  font-size: clamp(4rem, 8.2vw, 8rem);
  letter-spacing: -0.055em;
}

.hero-subtitle {
  color: var(--color-khaki);
}

.hero-text p {
  color: #2E2B25;
  font-size: 1.3rem;
}

.hero-visuals {
  border-left: none;
  padding-left: 3vw;
}

/* Agents' nest: the burst from the business card (hero-burst.js draws it) */
.agent-nest {
  position: relative;
  width: min(100%, 560px);
  min-height: 0;
  max-height: none;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: block;
  background: none;
  border: none;
  box-shadow: none;
  overflow: visible;
  cursor: pointer;
}

/* the burst canvas covers the whole hero; content sits above it */
#hero {
  position: relative;
  overflow: hidden;
}

#hero .hero-burst {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

#hero > .container {
  position: relative;
  z-index: 1;
}

.nest-stage {
  position: absolute;
  inset: 0;
}

/* the orbit the agents follow (agents.js measures it); not drawn */
.nest-ring {
  aspect-ratio: 1 / 1;
  border: none;
}

.nest-ring.r1 {
  width: 44%;
}

/* the black dot in the middle */
.nest-core {
  width: 11%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #080706;
}


/* ---------- Ticker: a light ribbon between two thin rules ----------
   Words alternate black and grey, separated by the flame dot from the logo. */
.marquee-band {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 1.6rem 0;
  background: #FFFFFC;
  transform: none;
  box-shadow: none;
  border-top: 1px solid rgba(8, 7, 6, 0.85);
  border-bottom: 1px solid rgba(8, 7, 6, 0.85);
}

/* a still, centred line: no scrolling, the copy for the loop is hidden */
.marquee-track {
  width: 100%;
  animation: none;
  justify-content: center;
}

.marquee-group + .marquee-group {
  display: none;
}

.marquee-group {
  flex-shrink: 1;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.9rem;
  padding: 0 1.5rem;
}

/* no dot after the last word */
.marquee-group .marquee-star:last-child {
  display: none;
}

.marquee-word {
  color: #080706;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  letter-spacing: -0.01em;
  padding: 0 2.2rem;
}

/* every other word in warm grey; each group holds an even number of words,
   so the rhythm does not break where the loop joins */
.marquee-group .marquee-word:nth-child(4n + 3) {
  color: #A39D8F;
}

/* the slash becomes a round flame dot */
.marquee-star {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-flame);
  font-size: 0;
  color: transparent;
}

/* ---------- What we do: palette of capabilities ---------- */
/* heading with the line under it, one column on the left */
.cap-section .section-header {
  max-width: 44rem;
  display: block;
  margin-bottom: 3.5rem;
}

.cap-section .section-header h2 {
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
  word-spacing: 0.08em;
}

.cap-section .section-header p {
  max-width: 36rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #2E2B25;
  text-wrap: pretty;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem;
}

.cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 1.1rem;
  border-top: 1px solid #080706;
  color: inherit;
  text-decoration: none;
}

.cap-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-khaki);
  margin-bottom: 1.25rem;
}

.cap-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #080706;
  margin-bottom: 1.75rem;
}

.cap-media img {
  display: block;
  object-position: center center;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.cap-media img[src*="meska-twierdza"] {
  /* the site screenshot reads from its left edge */
  object-position: left center;
}

.cap-card:hover .cap-media img {
  transform: scale(1.045);
}

.cap-card h3 {
  font-size: clamp(1.5rem, 2.1vw, 2.1rem);
  line-height: 0.95;
  margin-bottom: 0.9rem;
}

.cap-card p {
  font-size: 0.98rem;
  margin-bottom: 1.75rem;
  max-width: 34ch;
}

.cap-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-porcelain);
}

.cap-link::after {
  content: "→";
  font-family: var(--font-body);
  color: var(--color-flame);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cap-card:hover .cap-link::after {
  transform: translateX(5px);
}

.cap-card:hover h3 {
  color: var(--color-flame);
}

.cap-card h3 {
  transition: color 0.3s ease;
}

/* ---------- Projects page: the example console is a black panel ---------- */
.pg-console {
  background: #080706;
  border-color: #080706;
  color: #FFFFFC;
}

/* ---------- Order: black block ---------- */
#order {
  background-color: #080706;
  border-bottom: none;
}

#order .section-header h2 {
  font-size: clamp(3.5rem, 7vw, 6.5rem);
}

/* Services in the order block: plain columns under a white rule, no boxes */
.labs-router-grid {
  gap: 3rem;
  margin-top: 0;
}

.labs-router-card,
.labs-router-card:hover {
  padding: 1.6rem 0 0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 252, 0.85);
  box-shadow: none;
  transform: none;
}

.labs-router-card.spotlight-card::before {
  display: none;
}

.labs-router-card h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  margin-bottom: 0.9rem;
}

.labs-router-card p {
  font-family: var(--font-body);
  font-size: 1.02rem;
  max-width: 46ch;
  margin-bottom: 0;
}

/* Contacts: two quiet rows */
.order-contacts {
  gap: 3rem;
  margin-top: 4.5rem;
}

.order-contact {
  padding: 1.4rem 0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 252, 0.16);
  border-bottom: 1px solid rgba(255, 255, 252, 0.16);
  color: #FFFFFC;
}

.order-contact:hover {
  background: transparent;
  border-color: rgba(255, 255, 252, 0.16);
  color: #FFFFFC;
}

.order-contact-label {
  min-width: 4.5rem;
  color: var(--color-khaki);
}

.order-contact-value {
  transition: color 0.25s ease;
}

.order-contact:hover .order-contact-value {
  color: var(--color-flame);
}

.order-contact svg {
  color: #FFFFFC;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-contact:hover svg {
  transform: translate(3px, -3px);
}

@media (max-width: 768px) {
  .labs-router-grid,
  .order-contacts {
    gap: 2rem;
  }
}

/* ---------- Footer: white, oversized black wordmark ---------- */
footer {
  border-top: none;
  padding-top: 5rem;
}

.footer-wordmark {
  color: #080706;
  opacity: 0.06;
  transition: opacity 0.8s ease, color 0.8s ease;
}

footer:hover .footer-wordmark {
  color: var(--color-flame);
  opacity: 0.22;
}

.social-text-link {
  border-color: var(--line-strong);
  color: var(--color-porcelain);
}

.social-text-link:hover {
  background: var(--color-porcelain);
  color: var(--color-black);
  border-color: var(--color-porcelain);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 3.5rem;
  }
  .hero-visuals {
    padding-left: 0;
    margin-top: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }
  .section {
    padding: 6rem 0;
  }
  .cap-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3rem;
  }
  .marquee-band {
    padding: 0.9rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cap-media img,
  .cap-link::after {
    transition: none;
  }
}

/* ---------- Projects page: packgen is a card like the others ---------- */
.gallery-page-section .client-sites {
  margin-top: 0;
}

.client-body h3 .project-entry-status {
  display: inline-block;
  margin-left: 0.6rem;
  vertical-align: middle;
  transform: translateY(-0.15em);
}

/* an odd number of projects: no grey hole in the last row */
.client-grid {
  background: transparent;
  border: none;
  gap: 0;
}

.client-card {
  outline: 1px solid var(--border-color);
}

/* ---------- No orange glow on the blueprint lines ---------- */
.designer-grid-lines .grid-v-line.active-glow {
  background-color: rgba(8, 7, 6, 0.06) !important;
  box-shadow: none;
  animation: none;
  opacity: 1;
}

/* ---------- Assistant button (chat.js): black glass tile, white icon ---------- */
html #aq-fab {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 252, 0.14);
  border-radius: 18px;
  background: rgba(8, 7, 6, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: #FFFFFC;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html #aq-fab:hover {
  background: var(--color-flame);
  border-color: var(--color-flame);
  color: #FFFFFC;
  transform: translateY(-3px);
}

html #aq-fab:active {
  transform: translateY(0) scale(0.96);
}

html #aq-fab svg {
  width: 26px;
  height: 26px;
}

/* online dot */
html #aq-fab .dot {
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #080706;
  background: #3ddc84;
  transition: border-color 0.2s ease;
}

html #aq-fab:hover .dot {
  border-color: var(--color-flame);
}

/* ---------- Project drawer (gallery): white panel over frosted glass ---------- */
.drawer-overlay {
  background: rgba(255, 255, 252, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  backdrop-filter: blur(22px) saturate(1.15);
}

.drawer-content {
  background: #FFFFFC;
  border-left: 1px solid var(--border-color);
  box-shadow: -30px 0 80px -40px rgba(8, 7, 6, 0.35);
}

.drawer-close {
  color: var(--color-porcelain);
}

.drawer-close:hover {
  color: var(--color-flame);
}

.drawer-title {
  letter-spacing: -0.035em;
}

.drawer-description {
  color: #2E2B25;
}

.drawer-media {
  background-color: #EFEDE7;
  border-color: transparent;
}

/* Large preview: just the render, no black frame or bars */
.preview-inner {
  max-width: none;
  max-height: 86vh;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.preview-inner img {
  height: calc(100% - 2.75rem);
  background: transparent;
  border: none;
  filter: drop-shadow(0 30px 45px rgba(8, 7, 6, 0.28));
}

.preview-hud {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  color: var(--color-khaki);
}

#preview-filename {
  color: var(--color-flame);
}

/* Arrows: round glass buttons */
.drawer-nav-btn,
.mobile-nav-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 252, 0.8);
  background: rgba(255, 255, 252, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  color: #080706;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 30px -12px rgba(8, 7, 6, 0.35);
}

.mobile-nav-btn {
  width: 40px;
  height: 40px;
}

.drawer-nav-btn:hover,
.mobile-nav-btn:hover {
  background: #080706;
  border-color: #080706;
  color: #FFFFFC;
  box-shadow: 0 12px 30px -12px rgba(8, 7, 6, 0.5);
}

.drawer-nav-btn.prev-btn {
  left: 28px;
}

.drawer-nav-btn.next-btn {
  right: 28px;
}

.drawer-gallery-thumb {
  border-color: transparent;
  background: #EFEDE7;
}

.drawer-gallery-thumb:hover {
  border-color: #080706;
}

.drawer-gallery-thumb.active {
  border-color: var(--color-flame);
}

/* Fullscreen image: the same frosted white */
.lightbox-overlay {
  background: rgba(255, 255, 252, 0.82);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.lightbox-content img {
  border: none;
  box-shadow: 0 40px 80px -30px rgba(8, 7, 6, 0.45);
}

.lightbox-close {
  color: #080706;
}

.lightbox-hud {
  color: var(--color-flame);
  border-bottom-color: var(--border-color);
}

/* ---------- Assistant chat panel (chat.js): white glass, black type ---------- */
html #aq-chat {
  --o: #080706;          /* accent: user messages, send, buttons */
  --bg: #FFFFFC;         /* text on the accent */
  --fg: #080706;
  --kh: #5F5A4D;
  --line: rgba(8, 7, 6, 0.1);
}

html #aq-panel {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 252, 0.88);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(8, 7, 6, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 30px 80px -30px rgba(8, 7, 6, 0.45);
}

html #aq-head {
  padding: 14px 10px 12px 18px;
}

html #aq-head .ttl {
  font-size: 11.5px;
  color: #080706;
}

/* online dot instead of the pulsing orange square */
html #aq-head .ttl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  animation: none;
}

html #aq-head button {
  border-radius: 10px;
  color: #5F5A4D;
}

html #aq-head button:hover {
  background: rgba(8, 7, 6, 0.06);
  border-color: transparent;
  color: #080706;
}

html .aq-m {
  border-radius: 16px;
}

html .aq-m.bot {
  background: #F1EFE9;
  border-color: transparent;
  border-bottom-left-radius: 5px;
  color: #080706;
}

html .aq-m.me {
  border-bottom-right-radius: 5px;
}

html .aq-m a {
  color: var(--color-flame);
}

html .aq-m strong {
  color: #080706;
}

html .aq-order {
  border-radius: 12px;
  border-color: rgba(8, 7, 6, 0.12);
  background: #FFFFFC;
}

html .aq-order h4,
html .aq-sent {
  color: var(--color-flame);
}

html .aq-ordererr {
  color: #C2410C;
}

html .aq-m .aq-btn {
  border-radius: 10px;
}

html .aq-m .aq-btn:hover {
  filter: none;
  opacity: 0.85;
}

html #aq-chips button {
  border-radius: 999px;
  padding: 7px 12px;
  color: #2E2B25;
  border-color: rgba(8, 7, 6, 0.14);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

html #aq-chips button:hover {
  background: #080706;
  border-color: #080706;
  color: #FFFFFC;
}

html #aq-form {
  align-items: flex-end;
  padding: 12px 12px 8px;
}

html #aq-in {
  border-radius: 14px;
  background: #F1EFE9;
  border-color: transparent;
}

html #aq-in::placeholder {
  color: #8A8476;
}

html #aq-in:focus {
  border-color: #080706;
  background: #FFFFFC;
}

html #aq-send {
  height: 42px;
  border-radius: 14px;
  transition: background-color 0.2s ease;
}

html #aq-send:not(:disabled):hover {
  background: var(--color-flame);
}

html #aq-note {
  color: #8A8476;
}

/* Phones: the full-screen messenger, light */
@media (max-width: 640px) {
  html #aq-panel {
    border-radius: 0;
    border: none;
    background: #FFFFFC;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  html #aq-chat:before,
  html #aq-head,
  html #aq-form {
    background: #FFFFFC;
  }
  html #aq-head .ava {
    background: #080706;
    color: #FFFFFC;
  }
  html #aq-head .ava:after {
    border-color: #FFFFFC;
  }
  html .aq-m.bot {
    background: #F1EFE9;
    color: #080706;
  }
  html #aq-in {
    border-radius: 22px;
    background: #F1EFE9;
  }
  html #aq-send {
    height: 44px;
    border-radius: 50%;
  }
  html .aq-sys {
    color: #8A8476;
  }
}

html .aq-m p,
html .aq-m li {
  color: inherit;
}

/* ---------- Privacy policy and terms: a plain white document ---------- */
body.legal-page {
  background: #FFFFFC;
}

body.legal-page #bg-canvas {
  display: none;
}

body.legal-page .legal-container {
  background: #FFFFFC;
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 2rem 0 4rem;
}

body.legal-page .legal-container::before {
  display: none;
}

body.legal-page .back-btn {
  border-color: rgba(8, 7, 6, 0.85);
  color: #080706;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.legal-page .back-btn:hover {
  background: #080706;
  border-color: #080706;
  color: #FFFFFC;
}

body.legal-page .lang-btn.active {
  background: #080706;
  border-color: #080706;
  color: #FFFFFC;
}

body.legal-page .toc-item.active a {
  color: #080706;
  border-left-color: var(--color-flame);
}

body.legal-page .doc-section:hover h3 {
  color: #080706;
}

body.legal-page .doc-content p,
body.legal-page .doc-content li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: #2E2B25;
}

/* quicker reveal of the page after the loader or a transition */
.preloader {
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              visibility 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* drawer: no "04 / 11 — 1920 x 1080 px" line under the image */
.preview-hud {
  display: none;
}

/* gallery: images at full strength before hover, no white wash */
.portfolio-img,
.portfolio-card:hover .portfolio-img {
  opacity: 1;
  filter: none;
}

/* ---------- Scrollbar: light, to match the pages ---------- */
/* style.css sets a black track on every element ("*") */
* {
  scrollbar-color: rgba(8, 7, 6, 0.3) #FFFFFC;
}

::-webkit-scrollbar-track {
  background: #FFFFFC;
}

::-webkit-scrollbar-thumb {
  background: rgba(8, 7, 6, 0.3);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-flame);
}

/* ---------- Mobile menu: a white sheet with big black links ---------- */
.mobile-nav-toggle {
  color: #080706;
}

.mobile-nav-sheet {
  background: #FFFFFC;
  padding: 5.5rem 1.75rem 2rem;
  gap: 0;
}

.mobile-nav-sheet .logo {
  color: #080706;
}

.mobile-nav-sheet .nav-link,
.mobile-nav-sheet .nav-link.mobile-link {
  font-size: clamp(2.2rem, 11vw, 3rem);
  letter-spacing: -0.03em;
  color: #080706;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(8, 7, 6, 0.1);
}

.mobile-nav-sheet .nav-link::after {
  display: none;
}

.mobile-nav-sheet .nav-link.active {
  color: var(--color-flame);
  border-bottom-color: rgba(8, 7, 6, 0.1);
}

.mobile-nav-sheet .nav-link:hover {
  color: var(--color-flame);
}

.mobile-nav-close {
  top: 1.5rem;
  right: 1.25rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #080706;
  background: rgba(8, 7, 6, 0.06);
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  #hero {
    min-height: 0;
    padding-top: 6.5rem;
    padding-bottom: 1rem;
  }
  html .hero-text h1 {
    font-size: min(17.5vw, 5.5rem) !important; /* style.css forces 2.8rem below 480px */
    line-height: 0.95;
  }
  html .hero-subtitle {
    font-size: min(5.4vw, 1.6rem);
    margin-top: 0.5rem;
  }
  html .hero-text p {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  .hero-actions {
    margin-top: 2rem;
  }
  .hero-visuals {
    margin-top: 0.5rem;
  }
  .agent-nest {
    width: min(100%, 340px);
  }
  .section {
    padding: 4.5rem 0;
  }
  html .section-header h2,
  html .cap-section h2 {
    font-size: clamp(2.4rem, 11vw, 3.2rem) !important;
  }
  footer {
    padding-top: 3.5rem;
  }
}

/* ---------- Drawer preview and full-size image ---------- */
.drawer-left-preview {
  cursor: pointer;          /* a click beside the picture closes the drawer */
}

#drawer-large-img,
#drawer-img,
.drawer-carousel img {
  cursor: default;
}

/* the full-size view: a click beside the picture closes it */
.lightbox-content {
  pointer-events: none;
}

.lightbox-content img {
  pointer-events: auto;
}

.lightbox-hud {
  display: none;
}

/* small round close button at the top */
html .lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #080706;
  color: #FFFFFC;
  transition: background-color 0.2s ease;
}

html .lightbox-close svg {
  width: 18px;
  height: 18px;
}

html .lightbox-close:hover {
  background: var(--color-flame);
  color: #FFFFFC;
  transform: none;
}

/* drawer: light scrollbar, quiet close button, no grey strip under the dots */
.drawer-content::-webkit-scrollbar-track {
  background: #FFFFFC;
}

.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(8, 7, 6, 0.25);
}

html .drawer-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(8, 7, 6, 0.06);
  box-shadow: none;
  color: #080706;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html .drawer-close:hover {
  background: #080706;
  color: #FFFFFC;
  transform: none;
}

.drawer-carousel-dots {
  background: transparent;
}

/* phones: style.css forces an orange, shadowed close button */
@media (max-width: 768px) {
  html .drawer-close {
    background: rgba(8, 7, 6, 0.06) !important;
    border: none !important;
    box-shadow: none !important;
    color: #080706 !important;
  }
  html .drawer-close:active {
    background: #080706 !important;
    color: #FFFFFC !important;
  }
  html .drawer-carousel-dots {
    background: transparent !important;
  }
}

/* the drawer focuses its close button on open: no orange ring for that,
   a thin black one only for keyboard users */
html .drawer-close:focus {
  outline: none !important;
}

html .drawer-close:focus-visible {
  outline: 2px solid #080706 !important;
  outline-offset: 3px;
}

/* decorative bits: no selection and no blue tap flash on phones */
.agent-nest,
.agent-nest *,
#hero .hero-burst,
.marquee-band,
.marquee-band *,
#ag-trans,
#ag-boot,
.ag-cur,
.footer-wordmark {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* no grey tap flash on any link or button either */
a,
button {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .marquee-word {
    font-size: 1.15rem;
    padding: 0 0.9rem;
  }
  /* words wrap here, so the dots would hang at line ends; colour alone separates them */
  .marquee-star {
    display: none;
  }
  .marquee-group {
    row-gap: 0.6rem;
  }
}

/* a cover that must show whole (labels near its edges): fit it on a matching dark ground */
.portfolio-img.portfolio-img-whole {
  object-fit: contain;
  background: #151515;
}

/* intro lines broken where the sentence breaks (the line break is in the text,
   in every language, so lang.js keeps it) */
.text-lines {
  white-space: pre-line;
  max-width: none;
}

/* What we do: no rule and no numbers above the cards, the picture leads */
.cap-card {
  border-top: none;
  padding-top: 0;
}

.cap-num {
  display: none;
}

.cap-card h3 {
  word-spacing: 0.1em;
}

/* ---------- ai.html (summary for crawlers): a plain white document ---------- */
body.ai-page {
  background: #FFFFFC;
}

body.ai-page .ai-container {
  background: #FFFFFC;
  border: none;
  padding: 1rem 0 3rem;
}

body.ai-page h1 {
  color: #080706;
  border-bottom-color: rgba(8, 7, 6, 0.12);
}

body.ai-page h1::after {
  content: ".";
  color: var(--color-flame);
}

body.ai-page h2 {
  color: #080706;
}

body.ai-page h3 {
  color: #2E2B25;
}

body.ai-page p,
body.ai-page ul {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: #2E2B25;
}

body.ai-page .meta-box {
  border: none;
  background: #F1EFE9;
  border-radius: 12px;
}

body.ai-page a {
  color: #080706;
  text-decoration-color: var(--color-flame);
}

body.ai-page .back-btn {
  border-color: rgba(8, 7, 6, 0.85);
  color: #080706;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.ai-page .back-btn:hover {
  background: #080706;
  color: #FFFFFC;
}

/* footer: three columns of equal sides, so the links sit in the page centre */
@media (min-width: 769px) {
  .footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 2rem;
  }
  .footer-content > .social-links {
    justify-self: end;
  }
}
