:root {
  --cream: #f2ede0;
  --cream-deep: #e8e0d0;
  --ink: #000000;
  --ink-soft: #1a1a1a;
  --body: rgba(0, 0, 0, 0.72);
  --muted: rgba(0, 0, 0, 0.48);
  --line: rgba(0, 0, 0, 0.12);
  --white: #ffffff;
  --pad-x: clamp(1.25rem, 4vw, 4rem);
  --header-h: 4.5rem;
  --max: 72rem;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Shared crop for building styles + portfolio preview tiles */
  --media-ratio: 4 / 3;
  --radius: 1rem;
  --radius-sm: 0.7rem;
  --radius-lg: 1.35rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .portfolio-tile,
  .detail-panel {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  opacity: 0.72;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
  color: var(--body);
}

.container {
  width: min(100% - (var(--pad-x) * 2), var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section--tight {
  padding-top: 2.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: 18ch;
}

.section-title--oneline {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.05rem, 3.4vw, 2.75rem);
  letter-spacing: 0.08em;
}

.section-lead {
  max-width: 38rem;
  font-size: 1.05rem;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(242, 237, 224, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100% - (var(--pad-x) * 2), var(--max));
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-link img {
  height: 1.35rem;
  width: auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  line-height: 1;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  border-color: var(--ink);
}

.lang-switch span {
  opacity: 0.45;
}

.lang-switch span.is-active {
  opacity: 1;
}

.lang-switch__sep {
  opacity: 0.35 !important;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav a,
.nav-drop__toggle {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.nav a[aria-current="page"],
.nav-drop__toggle[aria-current="page"],
.nav-drop.is-current > .nav-drop__toggle {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.15rem;
}

.nav-drop {
  position: relative;
}

.nav-drop__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-drop__toggle::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.7;
}

.nav-drop__menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 0;
  min-width: 13.5rem;
  padding: 0.45rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 0.15rem;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.25rem);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.nav-drop.is-open > .nav-drop__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.nav-drop.is-open > .nav-drop__toggle::after {
  transform: rotate(225deg) translateY(-1px);
}

@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover > .nav-drop__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-drop:hover > .nav-drop__toggle::after {
    transform: rotate(225deg) translateY(-1px);
  }
}

.nav-drop__menu a {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: calc(var(--radius-sm) - 2px);
  border-bottom: 0;
}

.nav-drop__menu a:hover,
.nav-drop__menu a:focus-visible,
.nav-drop__menu a[aria-current="page"] {
  background: rgba(0, 0, 0, 0.06);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    margin-left: 0;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad-x) 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .header-actions {
    margin-left: auto;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a,
  .nav-drop {
    width: 100%;
  }

  .nav > a,
  .nav-drop__toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-drop__menu {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s var(--ease), max-height 0.25s var(--ease), visibility 0.2s;
  }

  .nav-drop.is-open > .nav-drop__menu {
    max-height: 16rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.35rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-drop__menu a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-drop__menu a:last-child {
    border-bottom: 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s;
}

.btn:hover {
  opacity: 1;
}

.btn--solid {
  background: var(--ink);
  color: var(--cream);
}

.btn--solid:hover {
  background: transparent;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: center;
  padding: clamp(3rem, 10vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% 20%, rgba(255, 255, 255, 0.45), transparent 60%),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
  z-index: -1;
}

.hero--photo {
  color: var(--ink);
}

.hero--photo::before {
  background:
    linear-gradient(
      105deg,
      rgba(242, 237, 224, 0.92) 0%,
      rgba(242, 237, 224, 0.78) 34%,
      rgba(242, 237, 224, 0.28) 58%,
      rgba(242, 237, 224, 0.08) 100%
    ),
    linear-gradient(180deg, rgba(242, 237, 224, 0.35) 0%, transparent 28%, transparent 72%, rgba(232, 224, 208, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero-brand {
  max-width: min(100%, 42rem);
  margin-bottom: 2rem;
}

.hero-brand img {
  width: min(100%, 28rem);
  height: auto;
}

.hero h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  max-width: 22ch;
}

.hero-tag {
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero--photo .hero-tag {
  color: rgba(0, 0, 0, 0.62);
}

.hero--photo .btn--ghost {
  background: rgba(242, 237, 224, 0.55);
  backdrop-filter: blur(6px);
}

@media (max-width: 720px) {
  .hero--photo::before {
    background:
      linear-gradient(
        180deg,
        rgba(242, 237, 224, 0.88) 0%,
        rgba(242, 237, 224, 0.72) 42%,
        rgba(242, 237, 224, 0.35) 70%,
        rgba(242, 237, 224, 0.18) 100%
      );
  }

  .hero__media img {
    object-position: 58% center;
  }
}

.moon {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  border: 1.5px solid var(--ink);
  vertical-align: middle;
  margin: 0 0.15em;
}

/* Snippets / offer blocks */
.snippet-grid {
  display: grid;
  gap: 0;
}

.snippet {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.35s var(--ease);
}

.snippet:last-child {
  border-bottom: 1px solid var(--line);
}

.snippet:hover {
  padding-left: 0.5rem;
  opacity: 1;
}

.snippet-label {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.snippet h3 {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.snippet p {
  margin: 0;
  max-width: 36rem;
}

.snippet-meta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .snippet {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .snippet-meta {
    white-space: normal;
  }
}

/* Pricing tables */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  background: transparent;
  border: 0;
  margin: 2rem 0;
}

.price-card {
  background: var(--cream);
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.price-card h3 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.price-card .amount {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}

.price-card p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
}

.price-card--action {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.price-card--action:hover,
.price-card--action:focus-visible {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(40, 28, 16, 0.08);
  outline: none;
}

.price-card__hint {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Info drawer (requirements sidebar) */
.info-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.info-drawer[hidden] {
  display: none;
}

.info-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 16, 0.42);
  border: 0;
  cursor: pointer;
}

.info-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(28rem, 100%);
  background: var(--cream, #f3eee4);
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 48px rgba(28, 22, 16, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow: hidden;
}

.info-drawer.is-open .info-drawer__panel {
  transform: translateX(0);
}

.info-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.35rem 1rem;
  border-bottom: 1px solid var(--line);
}

.info-drawer__head h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: none;
}

.info-drawer__sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-drawer__close {
  flex-shrink: 0;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.info-drawer__close:hover,
.info-drawer__close:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.info-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.35rem 1.5rem;
}

.info-drawer__block + .info-drawer__block {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.info-drawer__block h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.info-drawer__block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.info-drawer__block li {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.info-drawer__block li:last-child {
  margin-bottom: 0;
}

.info-drawer__foot {
  padding: 1rem 1.35rem 1.35rem;
  border-top: 1px solid var(--line);
}

body.has-info-drawer {
  overflow: hidden;
}

@media (max-width: 760px) {
  .price-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.03);
}

table.data tr:last-child td {
  border-bottom: 0;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Service lists */
.phase-timeline {
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
}

.phase-item {
  border-bottom: 1px solid var(--line);
}

.phase-item__toggle {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.85rem 1.1rem;
  align-items: baseline;
  width: 100%;
  margin: 0;
  padding: 1.15rem 0.15rem 1.15rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phase-item__toggle:hover .phase-item__title,
.phase-item__toggle:focus-visible .phase-item__title {
  color: var(--ink);
}

.phase-item__toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.phase-item__num {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.phase-item__title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
}

.phase-item__chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  align-self: center;
  opacity: 0.55;
}

.phase-item.is-open .phase-item__chevron {
  transform: rotate(-135deg);
  opacity: 1;
}

.phase-item__panel {
  padding: 0 0 1.5rem;
}

.phase-item__panel[hidden] {
  display: none;
}

.phase-item__lead {
  margin: 0 0 1.15rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.phase-detail + .phase-detail {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.phase-detail h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phase-detail ul {
  margin: 0;
  padding-left: 1.1rem;
}

.phase-detail li {
  margin: 0 0 0.45rem;
  line-height: 1.5;
  max-width: 44rem;
}

.phase-detail li:last-child {
  margin-bottom: 0;
}

.phase-detail__links {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.phase-detail__links a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

@media (max-width: 640px) {
  .phase-item__toggle {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .phase-item__num {
    grid-column: 1 / -1;
    margin-bottom: -0.35rem;
  }
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
}

.service-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0;
}

.service-list span {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Service + sector cards: grid on desktop, clipped swipe stack on phones */
.deck {
  margin-top: 2rem;
}

.deck__stage {
  display: contents;
}

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

.deck--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
  align-items: stretch;
}

.deck__card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-align: center;
}

.deck--4 .deck__card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.deck--4 .deck__card strong {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.deck--4 .deck__card span {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.5;
}

.deck__card img {
  width: 100%;
  height: auto;
  display: block;
}

.deck--3 .deck__card {
  display: flex;
  flex-direction: column;
}

.deck--3 .deck__card img {
  aspect-ratio: 560 / 421;
  object-fit: cover;
  object-position: center;
}

.deck--3 .deck__body {
  flex: 1;
}

.deck__body {
  padding: 1.05rem 1rem 1.25rem;
}

.deck__body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.55rem;
}

.deck__body p {
  margin: 0 auto;
  max-width: 32ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--body);
}

.deck__dots {
  display: none;
}

@media (max-width: 760px) {
  .deck.is-deck {
    display: block;
  }

  .deck.is-deck .deck__stage {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;
  }

  .deck.is-deck .deck__card {
    position: absolute;
    left: 50%;
    top: 0;
    background: #f7f2e7;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    transform-origin: top center;
  }

  .deck.is-deck .deck__dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
  }

  .deck__dot {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
  }

  .deck__dot.is-active {
    width: 1.25rem;
    background: var(--ink);
  }

  .deck.is-dragging .deck__card {
    transition: none;
  }

  .deck.is-deck .deck__card {
    transition: transform 0.35s var(--ease);
  }
}

@media (max-width: 900px) {
  .deck--4:not(.is-deck),
  .deck--3:not(.is-deck) {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .deck--4:not(.is-deck),
  .deck--3:not(.is-deck) {
    grid-template-columns: 1fr;
  }
}

/* Portfolio */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.filter-btn {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.portfolio-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.25s;
}

.portfolio-tile:hover,
.portfolio-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ink);
  outline: none;
}

.tile-visual {
  flex: none;
  aspect-ratio: var(--media-ratio);
  width: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.04), transparent 55%),
    var(--cream-deep);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.tile-visual img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.tile-initials {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  color: var(--ink);
  opacity: 0.55;
}

.detail-gallery {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
}

.detail-gallery img {
  width: 100%;
  height: auto;
  max-height: 14rem;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
}

.detail-gallery img:first-child {
  max-height: 16rem;
}

.style-card {
  border-top: 1px solid var(--ink);
  padding-top: 0;
  overflow: hidden;
}

.style-card img {
  width: 100%;
  aspect-ratio: var(--media-ratio);
  height: auto;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-deep);
}

.style-card h3 {
  padding-top: 0.25rem;
}

.tile-status {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: var(--cream);
}

.tile-body {
  padding: 1rem 1.05rem 1.15rem;
}

.tile-segment {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.tile-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.35rem;
  min-width: 0;
}

.tile-logo {
  height: 1.75rem;
  width: auto;
  max-width: 5.5rem;
  object-fit: contain;
  flex: none;
}

.tile-logo.is-mark {
  height: 2.25rem;
  width: 2.25rem;
  max-width: 2.25rem;
  border-radius: var(--radius-sm);
}

.tile-title-row h3,
.tile-body h3 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.tile-meta {
  font-size: 0.85rem;
  color: var(--body);
  margin: 0;
}

.portfolio-empty {
  grid-column: 1 / -1;
  padding: 2rem 0;
  color: var(--muted);
}

/* Detail panel */
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 50;
}

.detail-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 28rem);
  height: 100%;
  background: var(--cream);
  border-left: 1px solid var(--line);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  z-index: 60;
  transform: translateX(105%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-panel.is-open {
  transform: translateX(0);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  min-width: 0;
}

.detail-logo {
  height: 2.1rem;
  width: auto;
  max-width: 6rem;
  object-fit: contain;
  flex: none;
}

.detail-logo.is-mark {
  height: 2.6rem;
  width: 2.6rem;
  max-width: 2.6rem;
  border-radius: var(--radius-sm);
}

.detail-header h2,
.detail-title {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.detail-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.detail-expand,
.detail-close {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 2.15rem;
  height: 2.15rem;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
}

.detail-expand:hover,
.detail-close:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--ink);
}

.detail-close {
  font-size: 1.05rem;
  line-height: 1;
}

.detail-expand__shrink,
.detail-panel.is-fullscreen .detail-expand__grow {
  display: none;
}

.detail-panel.is-fullscreen .detail-expand__shrink {
  display: block;
}

.detail-panel.is-fullscreen {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  border-left: 0;
  border-radius: 0;
}

.detail-panel.is-fullscreen .detail-header {
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.detail-panel.is-fullscreen .detail-body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
}

.detail-panel.is-fullscreen .detail-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.detail-panel.is-fullscreen .detail-gallery img,
.detail-panel.is-fullscreen .detail-gallery img:first-child {
  max-height: none;
  height: auto;
  width: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--cream-deep);
}

body.portfolio-detail-full {
  overflow: hidden;
}

@media (max-width: 640px) {
  .detail-expand {
    display: none;
  }
}

.detail-body {
  padding: 1.35rem;
  overflow-y: auto;
  flex: 1;
}

.detail-body .metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.detail-body .metrics li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  min-height: 2rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  box-sizing: border-box;
}

.detail-body h3 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 1.4rem 0 0.55rem;
}

.detail-body ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--body);
}

.detail-body li + li {
  margin-top: 0.35rem;
}

/* Case studies */
.case {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.case:last-child {
  border-bottom: 1px solid var(--line);
}

.case--reverse {
  direction: rtl;
}

.case--reverse > * {
  direction: ltr;
}

.case-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-deep);
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
}

.case-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.case-visual.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 2rem;
  text-align: center;
}

.feature-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
  font-size: 0.95rem;
  color: var(--body);
}

.feature-list li:last-child {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 800px) {
  .case,
  .case--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* Module tabs for systems */
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0 1rem;
}

.module-tab {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.module-tab.is-active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.module-panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.25);
}

.module-panel.is-active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: center;
}

.module-panel img {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #111;
}

.barcode-examples {
  display: grid;
  gap: 0.75rem;
}

.barcode-shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f7f4ec;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.barcode-shot:hover,
.barcode-shot:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(40, 28, 16, 0.12);
  outline: none;
}

.barcode-shot img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .module-panel.is-active {
    grid-template-columns: 1fr;
  }
}

/* Reviews */
.section-title--wide {
  max-width: 28ch;
}

.reviews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.review {
  margin: 0;
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
}

.review__person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

.review__photo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.review__meta {
  min-width: 0;
}

.review__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.review__role {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.review__stars {
  display: block;
  width: 5.5rem;
  height: auto;
  margin: 0 0 0.7rem;
}

.review__quote {
  margin: 0;
}

.review__quote p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--body);
}

@media (max-width: 720px) {
  .reviews {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .reviews {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.28);
  min-width: 0;
}

.contact-card h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-card h3 .icon {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--ink);
}

.contact-card a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.contact-card p {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

.icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  vertical-align: middle;
}

.wa-form {
  margin-top: 2.5rem;
  max-width: 32rem;
}

.wa-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 1rem 0 0.4rem;
}

.wa-form input,
.wa-form textarea,
.wa-form select {
  width: 100%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
}

.wa-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.wa-form input:focus,
.wa-form textarea:focus,
.wa-form select:focus {
  outline: none;
  border-bottom-width: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0 1.35rem;
  margin-top: 1.5rem;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: min(100%, 16rem);
}

.site-footer .logo-link img {
  height: 0.95rem;
  margin-bottom: 0.15rem;
}

.site-footer p,
.site-footer a {
  font-size: 0.8rem;
  color: var(--body);
  text-decoration: none;
  margin: 0;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--body);
  text-decoration: none;
}

.footer-link .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--ink);
}

.footer-link:hover span,
.footer-link:focus-visible span {
  text-decoration: underline;
}

.footer-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

@media (max-width: 700px) {
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.page-hero {
  padding: clamp(3rem, 8vw, 5rem) 0 1rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  max-width: 14ch;
}

.page-hero--contact .page-hero__contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: start;
}

.page-hero--contact .page-hero__copy {
  min-width: 0;
}

.page-hero--contact .page-hero__copy h1 {
  max-width: none;
}

.page-hero--contact .page-hero__copy .section-lead {
  margin-bottom: 0;
  max-width: 36rem;
}

.contact-slideshow {
  width: 100%;
  min-width: 0;
  align-self: start;
}

.contact-slideshow__stage {
  position: relative;
  width: 100%;
  height: var(--contact-slideshow-h, auto);
  min-height: 10rem;
  background: transparent;
}

.contact-slideshow__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.contact-slideshow__slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.contact-slideshow__slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
}

.contact-slideshow__caption {
  display: none;
}

@media (max-width: 720px) {
  .page-hero--contact .page-hero__contact {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-slideshow {
    height: auto;
  }

  .contact-slideshow__stage {
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 11rem;
  }
}

.page-hero--video {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
}

.page-hero--video .page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  width: min(100% - (var(--pad-x) * 2), var(--max));
}

.page-hero--video .page-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 28rem;
  padding: 0;
}

.page-hero--video .page-hero__copy h1 {
  max-width: 12ch;
}

.page-hero--video .page-hero__copy .section-lead {
  max-width: 32ch;
  margin-bottom: 0;
}

.page-hero__actions {
  margin-top: 1.35rem;
}

.page-hero--video .page-hero__media {
  position: relative;
  width: min(100%, 26rem);
  margin-inline: auto;
  aspect-ratio: 9 / 14;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream-deep), #d9d0bd);
}

.page-hero--video .page-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .page-hero--video {
    min-height: 0;
    align-items: stretch;
  }

  .page-hero--video .page-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .page-hero--video .page-hero__copy {
    max-width: none;
  }

  .page-hero--video .page-hero__copy h1 {
    max-width: 14ch;
  }

  .page-hero__actions .btn {
    width: 100%;
  }

  .page-hero--video .page-hero__media {
    width: 100%;
    max-width: 26rem;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
  }
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.badge {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.wa-float svg {
  width: 1.7rem;
  height: 1.7rem;
}

.wa-float:hover,
.wa-float:focus-visible {
  opacity: 1;
  color: #fff;
  transform: translateY(-2px);
}

/* Live embeds */
.preview-block {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.preview-block--solo {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.preview-stage {
  margin-top: 1.25rem;
}

.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(255, 255, 255, 0.45);
}

.preview-stage .preview-tabs {
  position: relative;
  z-index: 2;
}

.preview-tab {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.preview-tab.is-active,
.preview-tab:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.preview-frame-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  overflow: hidden;
  position: relative;
}

.preview-stage .preview-frame-wrap {
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.preview-frame-wrap iframe {
  display: block;
  width: 100%;
  height: min(78vh, 52rem);
  border: 0;
  background: var(--cream);
}

.preview-frame-wrap--site iframe {
  height: min(82vh, 56rem);
  background: #0b0b0b;
  color-scheme: dark;
}

.preview-frame-wrap--erp {
  background: #f0ebe3;
  min-height: 85vh;
  height: 85vh;
}

.preview-frame-wrap--erp iframe {
  background: #f0ebe3;
  height: 85vh;
  min-height: 40rem;
  color-scheme: light;
}

@media (max-width: 800px) {
  .preview-frame-wrap--erp,
  .preview-frame-wrap--erp iframe {
    height: 75vh;
    min-height: 28rem;
  }
}

.preview-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.preview-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Full-screen preview overlay */
.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #111;
}

.preview-overlay[hidden] {
  display: none !important;
}

body.has-preview-overlay {
  overflow: hidden;
}

body.has-preview-overlay .wa-float {
  visibility: hidden;
  pointer-events: none;
}

.preview-overlay__chrome {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 3.25rem;
  margin: 0.75rem 0.75rem 0;
  padding: 0.55rem 0.85rem;
  padding-right: max(0.85rem, env(safe-area-inset-right));
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-overlay__leading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.preview-overlay__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
}

.preview-overlay__views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.preview-overlay__views[hidden] {
  display: none !important;
}

.preview-overlay__view {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  line-height: 1;
}

.preview-overlay__view.is-active,
.preview-overlay__view:hover,
.preview-overlay__view:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.preview-overlay__btn {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  line-height: 1;
  flex: none;
}

.preview-overlay__btn--close {
  background: var(--ink);
  color: var(--cream);
}

.preview-overlay__btn:hover,
.preview-overlay__btn:focus-visible {
  opacity: 0.88;
}

.preview-overlay__stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
}

@media (max-width: 720px) {
  .preview-overlay__chrome {
    flex-wrap: wrap;
  }

  .preview-overlay__leading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
  }

  .preview-overlay__btn--close {
    margin-left: auto;
  }
}

.preview-overlay__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--cream);
}

.preview-panel[hidden] {
  display: none !important;
}
