:root {
  --bg: #080808;
  --ink: #f0ece6;
  --muted: #9a938c;
  --dim: #6b6560;
  --line: rgba(255,255,255,.1);
  --red: #c41e24;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #060606;
  background-image:
    radial-gradient(ellipse 70% 45% at 12% -8%, color-mix(in srgb, var(--brand-accent, var(--red)) 7%, transparent), transparent 58%),
    radial-gradient(ellipse 50% 35% at 92% 105%, rgba(255, 255, 255, 0.025), transparent 55%),
    linear-gradient(175deg, #0b0b0b 0%, #070707 45%, #050505 100%);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.45) 100%);
}

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

.page {
  position: relative;
  z-index: 1;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,8,8,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.navlinks {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--muted);
}

.navlinks a:hover {
  color: var(--ink);
}

.nav-phone {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.nav-phone:hover {
  color: var(--brand-accent, var(--red));
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 14px 26px 14px 24px;
  background: var(--brand-accent, var(--red));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 14px) 100%, 0 100%);
  transition: clip-path 0.15s ease, transform 0.15s ease, background 0.15s ease;
  border: none;
}

.btn-primary:hover {
  background: var(--red-hover, color-mix(in srgb, var(--brand-accent, var(--red)) 85%, #000));
  transform: translateX(2px);
}

.btn-ghost {
  display: inline-block;
  padding: 14px 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.btn-ghost:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

/* Hero — problem */
.hero {
  padding: 72px 0 96px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: start;
}

.kicker {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--dim);
  letter-spacing: .04em;
  display: inline-block;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--brand-accent, var(--red)) 70%, transparent);
}

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: 11ch;
}

.lead {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 42ch;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 36px;
}

/* Shared photo treatment (hero, gallery, about) */
.photo-wrap {
  position: relative;
  padding-top: 8px;
}

.photo-wrap::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -14px;
  right: 14px;
  bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-accent, var(--red)) 28%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
  pointer-events: none;
  z-index: 0;
}

/* Motion-blur speed streak, an automotive cue behind the hero photo. */
.hero-visual {
  position: relative;
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  top: 18%;
  left: -60px;
  width: 140px;
  height: 3px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-accent, var(--red)) 70%, transparent));
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}

.hero-visual::after {
  content: "";
  position: absolute;
  top: 24%;
  left: -40px;
  width: 88px;
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-accent, var(--red)) 45%, transparent));
  filter: blur(1.5px);
  z-index: 0;
  pointer-events: none;
}

.photo-wrap::after {
  content: "";
  position: absolute;
  inset: -14px 14px 14px -14px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.photo-frame {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  background: #080808;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to left, rgba(8, 8, 8, 0.62) 0%, transparent 48%),
    linear-gradient(to right, rgba(8, 8, 8, 0.22) 0%, transparent 16%),
    linear-gradient(to top, rgba(8, 8, 8, 0.32) 0%, transparent 28%);
}

.photo-frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  filter: contrast(1.05) saturate(0.9);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.45),
    0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-visual {
  margin: 0;
}

.hero-img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 28% 42%;
}

.hero-visual figcaption {
  margin-top: 16px;
  padding-left: 2px;
  font-size: 13px;
  color: var(--dim);
}

/* Work — proof */
.work {
  padding: 0 0 120px;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.work-side h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.work-side-lead {
  margin: 0 0 40px;
  color: var(--muted);
  max-width: 38ch;
  line-height: 1.65;
}

.work-now {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--ink);
}

.work-side-note {
  margin: 0 0 32px;
  font-size: 15px;
  color: var(--dim);
  max-width: 36ch;
  line-height: 1.6;
}

.gallery {
  width: 100%;
}

.gallery-viewport {
  position: relative;
  touch-action: pan-y;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.gallery-photo-wrap {
  height: 100%;
}

.gallery-photo-wrap .photo-frame {
  height: 100%;
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.32s ease;
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 100%;
  margin: 0;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.75);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.gallery-nav:hover {
  background: rgba(8, 8, 8, 0.92);
  border-color: rgba(255, 255, 255, 0.2);
}

.gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-swipe-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--dim);
  pointer-events: none;
  z-index: 5;
}

/* About — trust */
.about {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.about-photo {
  margin: 0;
}

.about-img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 12%;
}

.about-copy h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.about-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.7;
}

.about-contact a {
  color: var(--ink);
  font-weight: 600;
}

.about-contact a:hover {
  color: var(--brand-accent, var(--red));
}

.about-detail,
.about-area {
  font-size: 15px;
  color: var(--dim);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}

.reviews {
  position: relative;
  z-index: 1;
  padding: 72px 0 0;
  border-top: 1px solid var(--line);
}

.reviews-layout {
  display: grid;
  gap: 32px;
}

.reviews-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.reviews-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}

.reviews-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.review-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.review-stars {
  color: #f5c542;
  letter-spacing: 0.08em;
  font-size: 14px;
  margin-bottom: 12px;
}

.review-body {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.review-author {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* Prices — solution */
.prices {
  padding: 0 0 120px;
}

.prices-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

.prices-intro h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.prices-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.price-tables {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.price-block h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
  text-transform: lowercase;
  letter-spacing: .02em;
}

.price-block h3::first-letter {
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

thead th {
  text-align: left;
  padding: 0 16px 10px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

thead th:not(:first-child) {
  text-align: right;
  padding-right: 0;
}

tbody td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

tbody td:first-child {
  color: var(--ink);
  font-weight: 500;
}

tbody td:not(:first-child) {
  text-align: right;
  padding-right: 0;
  font-variant-numeric: tabular-nums;
}

.price-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--dim);
  margin-top: 2px;
}

/* Footer — action */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 48px;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.footer-hook {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--dim);
}

.footer-phone {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
}

.footer-phone:hover {
  color: var(--brand-accent, var(--red));
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 13px;
  color: var(--dim);
  text-align: right;
}

.footer-meta a:hover {
  color: var(--ink);
}

.footer-hours {
  max-width: 28ch;
  line-height: 1.5;
}

.footer-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social-row[hidden],
.footer-social[hidden] {
  display: none;
}

.footer-social {
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-social:hover {
  color: var(--ink);
}

.footer-credit {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--dim);
}

.footer-credit a {
  color: inherit;
}

.footer-credit a:hover {
  color: var(--ink);
}

/* Mobile text bar */
.mobile-text {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: var(--brand-accent, var(--red));
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

/* Lightbox */
/* Responsive */
@media (max-width: 900px) {
  .navlinks {
    display: none;
  }

  .hero-layout,
  .about-layout,
  .prices-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual::before,
  .hero-visual::after {
    display: none;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-img {
    aspect-ratio: 16 / 12;
    object-position: 30% 40%;
  }

  .photo-wrap::before,
  .photo-wrap::after {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .work-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .work-side-lead {
    margin-bottom: 24px;
  }

  .gallery-nav {
    display: none;
  }

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

  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 48px 0 72px;
  }

  .work,
  .about,
  .prices {
    padding-bottom: 80px;
  }

  .about {
    padding-top: 80px;
  }

  table {
    font-size: 13px;
  }

  thead th:nth-child(4),
  tbody td:nth-child(4) {
    display: none;
  }

  .mobile-text {
    display: block;
  }

  body {
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }

  .nav-phone {
    font-size: 13px;
  }
}

/* ---- Portal-managed promo banner (Ask Idenworks AI) ---- */
.promo-banner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--brand-accent, var(--red));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.promo-banner .promo-text { letter-spacing: 0.01em; }
.promo-banner .promo-cta {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-accent, var(--red));
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.promo-banner .promo-cta:hover { background: rgba(255,255,255,.88); }

/* ---- Portal-managed FAQ section (Ask Idenworks AI) ---- */
.faq { padding: 72px 0; }
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.faq-intro h2 { margin: 0 0 8px; color: var(--ink); }
.faq-intro p { margin: 0; color: var(--muted); }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.75);
  padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--brand-accent, var(--red));
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-answer {
  margin: 0;
  padding: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 760px) {
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq { padding: 56px 0; }
}

/* ---- Sub-page intro (packages/work/about/reviews/contact/faq) ---- */
.page-intro {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
  max-width: 20ch;
}

.page-intro .lead:last-child {
  margin-bottom: 0;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.section-head {
  margin: 0 0 32px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 50ch;
  line-height: 1.6;
}

.section-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-accent, var(--red)) 60%, transparent);
}

.section-link:hover {
  color: var(--brand-accent, var(--red));
}

.page-section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.page-section:first-of-type {
  border-top: none;
}

@media (max-width: 560px) {
  .page-intro { padding: 48px 0 40px; }
  .page-section { padding: 64px 0; }
}

/* ---- Reusable info cards (package details, how-it-works steps, trust points) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.info-card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.info-card-eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-accent, var(--red));
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.01em;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.info-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.info-card ul li {
  margin-bottom: 5px;
}

.info-card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}

.badge-popular {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-accent, var(--red));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ---- Full gallery grid (work.html) ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 36px 24px;
}

.gallery-grid .photo-wrap {
  margin: 0;
}

.gallery-grid-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.gallery-grid-item figcaption {
  margin-top: 14px;
  padding-left: 2px;
  font-size: 13px;
  color: var(--dim);
}

/* ---- Footer site links column ---- */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links-title {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

.footer-links a:hover {
  color: var(--ink);
}

/* Before / after reveal slider (inside gallery slides) */
.ba-slider {
  --ba: 50;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.ba-slider .ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  box-shadow: none;
}

.ba-slider .ba-after {
  z-index: 1;
}

.ba-slider .ba-before {
  z-index: 2;
  clip-path: inset(0 calc((100 - var(--ba)) * 1%) 0 0);
}

.ba-slider.is-dragging .ba-before {
  /* no transition while dragging for 1:1 tracking */
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--ba) * 1%);
  width: 2px;
  transform: translateX(-50%);
  background: var(--brand-accent, var(--red));
  box-shadow: 0 0 0 1px rgba(8, 8, 8, 0.35);
  z-index: 4;
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--brand-accent, var(--red));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease;
}

.ba-handle:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.ba-handle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.ba-handle-arrows {
  letter-spacing: -1px;
}

.ba-tag {
  position: absolute;
  bottom: 16px;
  z-index: 3;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 8, 8, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ba-tag-before { left: 16px; }
.ba-tag-after { right: 16px; }

@media (max-width: 760px) {
  .ba-handle { width: 40px; height: 40px; font-size: 16px; }
  .ba-tag { bottom: 12px; padding: 4px 10px; }
  .ba-tag-before { left: 12px; }
  .ba-tag-after { right: 12px; }
}

/* Portal themes + layouts (from published.json appearance) */
.btn-primary {
  background: var(--brand-accent, var(--red));
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--brand-accent, var(--red)) 85%, #000);
}
.nav-phone:hover {
  color: var(--brand-accent, var(--red));
}

body.layout-centered-hero .hero-layout {
  grid-template-columns: 1fr;
  text-align: center;
}
body.layout-centered-hero .hero-visual {
  order: -1;
  max-width: min(640px, 100%);
  margin: 0 auto;
}
body.layout-centered-hero .hero-actions {
  justify-content: center;
}

body.layout-compact .hero {
  padding-top: 48px;
  padding-bottom: 48px;
}
body.layout-compact .hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

/* Phase D: typography presets (only active once an owner picks one) */
body.has-font-preset { font-family: var(--font-body, inherit); }
body.has-font-preset h1,
body.has-font-preset h2,
body.has-font-preset h3,
body.has-font-preset .hero h1 { font-family: var(--font-heading, inherit); }

/* Phase E: structural layout packs (real reorders, from appearance.layoutId) */
/* Gallery first — pull the work section above the hero. */
body.layout-gallery-first .page { display: flex; flex-direction: column; }
body.layout-gallery-first nav { order: 0; }
body.layout-gallery-first #work { order: 1; }
body.layout-gallery-first .hero { order: 2; }
body.layout-gallery-first #about { order: 3; }
body.layout-gallery-first #prices { order: 4; }
body.layout-gallery-first #reviews { order: 5; }
body.layout-gallery-first #faq { order: 6; }
body.layout-gallery-first .site-footer { order: 7; }

/* Service grid — compact hero, pricing pulled up under it. */
body.layout-service-grid .hero { padding-top: 56px; padding-bottom: 40px; }
body.layout-service-grid .page { display: flex; flex-direction: column; }
body.layout-service-grid nav { order: 0; }
body.layout-service-grid .hero { order: 1; }
body.layout-service-grid #prices { order: 2; }
body.layout-service-grid #work { order: 3; }

/* Emergency forward — pin the nav (phone) and tighten the hero. */
body.layout-emergency-banner nav { position: sticky; top: 0; z-index: 50; }
body.layout-emergency-banner .hero { padding-top: 40px; padding-bottom: 40px; }
