:root {
  --bg: #070707;
  --panel: #101010;
  --panel-soft: #141414;
  --text: #f6f2ed;
  --muted: #c2bcb6;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #d11f2f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --radius: 24px;
  --content-width: 1180px;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --clip-badge: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(209, 31, 47, 0.08), transparent 28%),
    linear-gradient(180deg, #050505 0%, #090909 100%);
  font-family: Satoshi, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 110%);
}

.site-header,
.section,
.site-footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 7, 7, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-tagline {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  clip-path: var(--clip-badge);
  padding: 0.7rem 1rem;
}

.section {
  padding: 6.5rem 0;
}

.hero {
  min-height: calc(100vh - 6rem);
  display: grid;
  grid-template-columns: 1.24fr 0.96fr;
  align-items: center;
  gap: 2.5rem;
  padding-top: 3.25rem;
}

.hero h1,
.page-hero h1,
.final-cta h2 {
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0.35rem 0 1.2rem;
  max-width: 11ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  clip-path: var(--clip-badge);
  border: 1px solid rgba(209, 31, 47, 0.35);
  background: rgba(209, 31, 47, 0.08);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(209, 31, 47, 0.32);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(209, 31, 47, 0);
  }
}

.final-cta .badge {
  margin-bottom: 0.6rem;
}

.page-hero h1 {
  max-width: 12ch;
}

/* Shorter hero headline reads better on 2-3 lines than the narrower 11ch cap */
.hero h1 {
  max-width: 16ch;
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: #cdc7c1;
  max-width: 44rem;
  margin: 0;
  line-height: 1.75;
}

.founder-signature {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-top: -0.4rem;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(209, 31, 47, 0.88);
}

.eyebrow::before,
.section-label::before {
  content: "//";
  color: rgba(209, 31, 47, 0.55);
  font-weight: 700;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--line);
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  border-color: transparent;
  color: white;
  box-shadow: 0 14px 30px rgba(209, 31, 47, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.32);
}

.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.hero-video {
  width: 100%;
  max-width: 114%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #000;
  transform: translateY(0.35rem) scale(1.035);
  filter: saturate(1.02) contrast(1.02);
  transition:
    transform 240ms ease,
    filter 240ms ease,
    box-shadow 240ms ease;
}

.hero-panel:hover .hero-video {
  transform: translateY(0.1rem) scale(1.045);
}

/* Placeholder used in place of a real product screenshot/video until one exists — see hero-visual usage in index.html */
.hero-visual {
  width: 100%;
  max-width: 114%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at top left, rgba(209, 31, 47, 0.22), transparent 32%),
    linear-gradient(135deg, #161616, #090909 55%, #131313);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  transform: translateY(0.35rem) scale(1.035);
  transition: transform 240ms ease;
}

.hero-panel:hover .hero-visual {
  transform: translateY(0.1rem) scale(1.045);
}

.hero-visual span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.panel-card,
.info-card,
.work-card,
.compare-card,
.contact-form,
.contact-note,
.featured-copy,
.media-card,
.portfolio-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 2.1rem;
  max-width: 28rem;
}

.panel-card p,
.panel-card li,
.section p,
.section li {
  color: var(--muted);
}

.panel-card ul,
.bullet-list,
.compare-card ul {
  padding-left: 1.1rem;
  margin: 1rem 0 0;
}

.split {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 2.4rem;
  align-items: start;
}

.positioning-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2.2rem;
  align-items: start;
}

.split h2,
.section-head h2,
.contact-note h2 {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0.45rem 0 1rem;
  max-width: 14ch;
}

.positioning-copy p {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.8;
  max-width: 34rem;
}

.section-head {
  margin-bottom: 2.4rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.three-up .info-card,
.work-card {
  padding: 1.45rem;
}

.work-card-large .work-preview {
  height: 13rem;
}

.info-card h3,
.work-card h3,
.compare-card span,
.process-list strong {
  font-size: 1.05rem;
  margin: 0 0 0.7rem;
}

.info-card p,
.work-card p,
.compare-card li,
.process-list span,
.contact-note p,
.featured-copy p,
.portfolio-card figcaption {
  line-height: 1.72;
}

.info-card,
.work-card,
.compare-card,
.portfolio-card,
.contact-form,
.contact-note,
.featured-copy,
.media-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.info-card:hover,
.work-card:hover,
.compare-card:hover,
.portfolio-card:hover,
.contact-form:hover,
.contact-note:hover,
.featured-copy:hover,
.media-card:hover {
  transform: translateY(-3px);
  border-color: rgba(209, 31, 47, 0.22);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.compare-card {
  padding: 1.55rem;
  display: flex;
  flex-direction: column;
}

.compare-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.compare-before {
  border-color: rgba(255, 255, 255, 0.1);
}

.compare-after {
  border-color: rgba(209, 31, 47, 0.35);
}

/* Pricing-specific type — used inside .compare-card on services.html */
.price-amount {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0.3rem 0 0.15rem;
}

.price-unit {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

.process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.process-list li {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.process-list span {
  color: var(--muted);
}

.process-section .section-head {
  text-align: center;
}

.process-section .section-head h2 {
  margin-left: auto;
  margin-right: auto;
}

.process-section .process-list li {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.process-section .process-list strong {
  margin: 0;
}

.work-preview {
  position: relative;
  height: 16rem;
  border-radius: 18px;
  margin-bottom: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(209, 31, 47, 0.28), transparent 28%),
    linear-gradient(135deg, #161616, #090909 55%, #131313);
  overflow: hidden;
}

.work-preview-two {
  background:
    radial-gradient(circle at top right, rgba(209, 31, 47, 0.22), transparent 26%),
    linear-gradient(135deg, #181818, #090909 55%, #151515);
}

.work-preview-three {
  background:
    radial-gradient(circle at center, rgba(209, 31, 47, 0.22), transparent 28%),
    linear-gradient(135deg, #151515, #070707 50%, #121212);
}

.work-preview-four {
  background:
    radial-gradient(circle at bottom left, rgba(209, 31, 47, 0.24), transparent 24%),
    linear-gradient(135deg, #141414, #060606 50%, #111111);
}

.work-preview-live {
  overflow: hidden;
}

.work-preview-live img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 260ms ease;
}

.work-card:hover .work-preview-live img,
.portfolio-card:hover img {
  transform: scale(1.02);
}

/* Concept-mockup label used on placeholder preview panels — no real screenshots yet */
.work-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-preview-empty span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  text-align: center;
  padding: 1.5rem;
}

.featured-case {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.featured-visual,
.media-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

.featured-visual {
  aspect-ratio: 16 / 11;
}

.featured-image,
.media-card img,
.media-card video {
  width: 100%;
  display: block;
}

.featured-image {
  height: 100%;
  object-fit: cover;
}

.featured-copy {
  padding: 1.5rem;
}

.featured-copy p,
.featured-copy li,
.featured-copy h3 {
  margin-bottom: 0;
}

.featured-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.featured-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 0.55rem;
}

.featured-copy h3 {
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 0.15rem;
}

.featured-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.portfolio-card {
  margin: 0;
  overflow: hidden;
  cursor: pointer;
}

.portfolio-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.portfolio-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
}

.portfolio-card figcaption {
  padding: 1rem 1.05rem 1.05rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.portfolio-card-large {
  grid-column: span 2;
}

.portfolio-empty {
  min-height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background:
    radial-gradient(circle at top, rgba(209, 31, 47, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.02);
}

.portfolio-empty span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  text-align: center;
  padding: 2rem;
}

/* Slideshow — concept mockup walkthroughs on work.html */
.slideshow {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The screens run from a near-square inventory grid to a wide footer strip,
   so the viewport takes its ratio from the active slide (script.js sets
   aspect-ratio inline) and the image is contained rather than cropped —
   nothing gets cut off. max-height stops the tallest screens from running
   past the viewport; those letterbox instead. */
/* No max-height here: clamping the height of an aspect-ratio box makes Chrome
   transfer the clamp back to the width, so the panel shrinks and sits
   off-centre. script.js caps the ratio against the viewport height instead. */
.slideshow-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  touch-action: pan-y;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.slideshow-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Without JS every slide stacks vertically, so the mockups stay viewable */
@media (scripting: none) {
  .slideshow-viewport {
    aspect-ratio: auto;
    display: grid;
    gap: 1px;
  }

  .slideshow-slide {
    position: static;
    opacity: 1;
    visibility: visible;
  }

  .slideshow-controls {
    display: none;
  }
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 7, 7, 0.62);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

.slideshow-nav svg {
  width: 1.1rem;
  height: 1.1rem;
}

.slideshow:hover .slideshow-nav,
.slideshow-nav:focus-visible {
  opacity: 1;
}

.slideshow-nav:hover {
  background: var(--accent);
  border-color: transparent;
}

.slideshow-prev {
  left: 1rem;
}

.slideshow-next {
  right: 1rem;
}

.slideshow-counter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.8rem;
  clip-path: var(--clip-badge);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 7, 7, 0.62);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.05rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line);
}

.slideshow-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.slideshow-caption strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.slideshow-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

.slideshow-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.slideshow-dot:hover {
  border-color: rgba(209, 31, 47, 0.7);
  transform: scale(1.2);
}

.slideshow-dot[aria-current="true"] {
  background: var(--accent);
  border-color: transparent;
}

.slideshow-nav:focus-visible,
.slideshow-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .slideshow-slide {
    transition: none;
  }
}

.media-card {
  margin: 0;
}

.media-card img,
.media-card video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-card video {
  background: #000;
}

.media-card figcaption {
  padding: 1rem 1.05rem 1.05rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.2rem;
  padding-bottom: 8.5rem;
  padding-top: 0.5rem;
}

.final-cta .button {
  min-width: 12rem;
}

.site-footer {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.footer-nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.15rem;
  align-items: start;
}

.contact-form,
.contact-note {
  padding: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.55rem;
  color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.95rem 1rem;
  font: inherit;
  outline: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(183, 176, 170, 0.7);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(209, 31, 47, 0.65);
  box-shadow: 0 0 0 4px rgba(209, 31, 47, 0.08);
}

.contact-message {
  margin: 0;
  color: #d12f47;
  font-size: 0.97rem;
  min-height: 1.5rem;
}

.contact-message.message-success {
  color: #2d7a45;
}

.chat-widget {
  position: fixed;
  right: 1.25rem;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 60;
}

.chat-toggle {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 30px rgba(209, 31, 47, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease;
}

.chat-toggle:hover {
  transform: translateY(-1px);
}

.chat-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.chat-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: calc(3.6rem + 0.9rem);
  width: min(360px, calc(100vw - 2.5rem));
  height: min(500px, calc(100vh - 8rem));
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-widget.open .chat-panel {
  display: flex;
}

.chat-widget.open .chat-toggle .chat-icon-open,
.chat-toggle .chat-icon-close {
  display: none;
}

.chat-widget.open .chat-toggle .chat-icon-close {
  display: block;
}

.chat-header {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.chat-header p {
  margin: 0;
}

.chat-header .eyebrow {
  margin: 0 0 0.2rem;
}

.chat-header-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.chat-message {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-message-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

.chat-message-user {
  align-self: flex-end;
  background: var(--accent);
  color: white;
}

.chat-message-system {
  align-self: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  max-width: 100%;
}

.chat-message-system a {
  color: var(--text);
  text-decoration: underline;
}

.chat-typing {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.2rem 0.85rem;
}

.chat-input-row {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem;
  border-top: 1px solid var(--line);
}

.chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.chat-input:focus {
  border-color: rgba(209, 31, 47, 0.65);
}

.chat-input:disabled {
  opacity: 0.5;
}

.chat-send {
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 640px) {
  .chat-widget {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .chat-panel {
    width: calc(100vw - 2rem);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (scripting: none) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .hero,
  .split,
  .contact-layout,
  .card-grid,
  .compare-grid,
  .featured-case,
  .featured-gallery,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .final-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .portfolio-card-large {
    grid-column: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .hero-copy {
    max-width: 44rem;
  }

  .hero-panel {
    justify-content: stretch;
  }

  .hero-video,
  .hero-visual {
    width: 100%;
    max-width: none;
  }

  .positioning-copy {
    grid-template-columns: 1fr;
  }

  .panel-card {
    max-width: none;
  }

  .site-header {
    position: relative;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 0 0.2rem;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .process-list li {
    grid-template-columns: 1fr;
  }

  /* Touch devices have no hover, so the arrows stay visible */
  .slideshow-nav {
    opacity: 1;
  }

  .slideshow-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 0;
  }

  .hero {
    gap: 1.75rem;
    padding-top: 3rem;
  }

  .hero-panel {
    width: 100%;
  }

  .hero-video,
  .hero-visual {
    transform: none;
  }

  .section-head {
    margin-bottom: 1.9rem;
  }

  .hero h1,
  .page-hero h1,
  .final-cta h2 {
    max-width: none;
  }

  .button {
    width: 100%;
  }

  .final-cta .button {
    min-width: 0;
  }

  /* 2.75rem keeps the arrows at the 44px minimum touch target */
  .slideshow-nav {
    width: 2.75rem;
    height: 2.75rem;
  }

  .slideshow-prev {
    left: 0.6rem;
  }

  .slideshow-next {
    right: 0.6rem;
  }

  .slideshow-controls {
    padding: 1rem;
  }
}
