/* ================================================
   BENYAN MUSANDAM — PREMIUM LAYER
   Loaded last on every page. Unifies heroes, headings,
   icons and fixes layout gaps left by earlier iterations.
   ================================================ */

:root {
  --brand-ink: #D35A10;           /* accent text on light backgrounds (≥3:1) */
  --hero-ink: #FB8A3C;            /* accent text on dark photography */
  --ico-bg: rgba(249, 115, 22, 0.08);
  --ico-border: rgba(249, 115, 22, 0.16);
}

/* ---------- Headings ---------- */
h1, h2, h3 { font-family: var(--font-display); }

/* Accent words: solid, italic, no smudgy glow on light backgrounds */
.engraved-heading,
.engraved-heading--hero {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--brand-ink) !important;
  filter: none !important;
  font-style: italic;
  font-weight: inherit;
  letter-spacing: -0.02em;
  padding-right: 0.04em;       /* keep italic overhang from clipping */
}
/* On dark photography, lift the accent and add a soft legibility shadow */
.cinematic-hero .engraved-heading,
.inner-hero .engraved-heading,
.calc-hero .engraved-heading,
.cta-dark .engraved-heading {
  color: var(--hero-ink) !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

/* ---------- Line icons (replace emojis) ---------- */
.ico {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.ico-badge,
.material-step__icon,
.capability-icon,
.spot-icon,
.note-card__icon,
.result-note-icon {
  width: 44px;
  height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ico-bg);
  border: 1px solid var(--ico-border);
  color: var(--brand-ink);
  font-size: 0 !important;
  line-height: 0 !important;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.result-note-icon { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 0; }
.result-note-icon .ico { width: 18px; height: 18px; }

/* ---------- Unified inner-page hero ---------- */
.inner-hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0B0C0E;
  isolation: isolate;
}
.inner-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transform: scale(1.04);
  animation: innerHeroDrift 18s ease-out forwards;
}
@keyframes innerHeroDrift { to { transform: scale(1); } }
.inner-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8,9,11,0.88) 0%, rgba(8,9,11,0.62) 38%, rgba(8,9,11,0.18) 70%, rgba(8,9,11,0.05) 100%),
    linear-gradient(0deg, rgba(8,9,11,0.70) 0%, rgba(8,9,11,0) 45%),
    linear-gradient(180deg, rgba(8,9,11,0.45) 0%, rgba(8,9,11,0) 22%);
}
.inner-hero__content {
  width: 100%;
  padding-top: 140px;
  padding-bottom: clamp(56px, 9vh, 96px);
}
.inner-hero__content > * { max-width: 680px; }
.inner-hero .eyebrow {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 22px;
}
.inner-hero__title {
  font-size: clamp(40px, 6.2vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #FAF8F3;
  margin-bottom: 22px;
}
.inner-hero__sub {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-bottom: 32px;
}
.inner-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.inner-hero > *:not(.inner-hero__bg):not(.inner-hero__shade) {
  animation: innerHeroRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes innerHeroRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Ghost button on dark */
.btn-ghost-light,
.cinematic-hero .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #FAF8F3;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost-light:hover,
.cinematic-hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .inner-hero__bg, .inner-hero > * { animation: none !important; transform: none; }
}
@media (max-width: 768px) {
  .inner-hero { min-height: 88vh; }
  .inner-hero__shade {
    background:
      linear-gradient(0deg, rgba(8,9,11,0.92) 0%, rgba(8,9,11,0.55) 55%, rgba(8,9,11,0.35) 100%);
  }
  .inner-hero__content { padding-top: 120px; }
}

/* ---------- Home: capabilities grid (was unstyled) ---------- */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.capability-card {
  position: relative;
  background: var(--bg);
  border: 1px solid rgba(26, 26, 24, 0.07);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease;
}
.capability-card::before {
  content: '';
  position: absolute;
  left: 24px; right: 24px; top: -1px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.capability-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.22);
  box-shadow: 0 18px 40px rgba(26, 26, 24, 0.07);
}
.capability-card:hover::before { transform: scaleX(1); }
.capability-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.capability-desc { font-size: 14px; line-height: 1.65; color: var(--ink-muted); margin-bottom: 18px; flex: 1; }
.capability-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.capability-tags .mix-tag,
.project-tags .mix-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(249, 115, 22, 0.2);
  background: rgba(249, 115, 22, 0.06);
  color: var(--brand-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 1024px) { .capabilities-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .capabilities-grid { grid-template-columns: 1fr; } }

/* ---------- Projects: masonry grid (spans were on the wrong element) ---------- */
.projects-masonry { grid-auto-flow: dense; }
.projects-masonry > .project-item { grid-column: span 6; min-width: 0; }
.projects-masonry > .project-item:nth-child(1),
.projects-masonry > .project-item:nth-child(4) { grid-column: span 8; }
.projects-masonry > .project-item:nth-child(2),
.projects-masonry > .project-item:nth-child(3) { grid-column: span 4; }
.projects-masonry .project-item__visual,
.projects-masonry .project-item__visual--tall,
.projects-masonry .project-item__visual--wide {
  grid-column: auto !important;
  height: clamp(320px, 34vw, 460px);
  aspect-ratio: auto;
}
.project-item__number { color: rgba(255, 255, 255, 0.28) !important; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tags .mix-tag { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); color: #fff; }
@media (max-width: 1024px) {
  .projects-masonry { grid-template-columns: repeat(2, 1fr) !important; }
  .projects-masonry > .project-item,
  .projects-masonry > .project-item:nth-child(n) { grid-column: span 1; }
}
@media (max-width: 640px) {
  .projects-masonry { grid-template-columns: 1fr !important; }
  .projects-masonry .project-item__visual { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Services: secondary cards are now real links ---------- */
a.secondary-service {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.secondary-service .ss-link { color: var(--brand-ink); }
a.secondary-service:hover .ss-link { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer contact rows can wrap long emails ---------- */
.footer-contact-value a { word-break: break-word; }

/* ---------- Navigation: active underline alignment ---------- */
.nav-links a.active::after { left: 14px; width: calc(100% - 28px); }
.nav-links a:not(.active):hover::after { left: 14px; width: calc(100% - 28px); }

/* ---------- Mobile menu (was never styled to open) ---------- */
.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px 10px;
  border: 1px solid rgba(26, 26, 24, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-btn { display: flex !important; }
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-links {
    display: flex !important;
    position: fixed;
    top: 80px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: rgba(250, 248, 243, 0.98);
    border: 1px solid rgba(26, 26, 24, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(26, 26, 24, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
    z-index: 200;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
  }
  .nav-links a { padding: 14px 16px; font-size: 16px; border-radius: 10px; }
  .nav-links a.active { background: rgba(249, 115, 22, 0.08); }
  .nav-links a::after { display: none !important; }
}
@media (max-width: 480px) {
  .nav-right .nav-cta { display: none !important; }
}

/* ---------- Projects: mix-type list ---------- */
.builder-stat-item .stat-number {
  font-family: var(--font-display) !important;
  font-style: italic;
  font-weight: 700;
  min-width: 190px;
  color: var(--brand-ink) !important;
}

/* ---------- Calculator: flexible input grids ---------- */
.calc-inputs--1 { grid-template-columns: 1fr; }
.calc-inputs--2 { grid-template-columns: repeat(2, 1fr); }
.calc-inputs--4 { grid-template-columns: repeat(4, 1fr); }
.calc-inputs label { display: block; }
.calc-inputs select { margin-top: 0; }
.calc-error {
  margin: 0;
  font-size: 13px;
  color: #FFB4A6;
  background: rgba(217, 45, 32, 0.12);
  border: 1px solid rgba(217, 45, 32, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
}
.calc-result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-wa {
  background: #25D366;
  color: #08320F;
  border-color: #25D366;
  font-weight: 700;
}
.btn-wa:hover { background: #1FBE5B; border-color: #1FBE5B; color: #04220A; transform: translateY(-2px); }
.calc-result-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
}
@media (max-width: 560px) {
  .calc-inputs, .calc-inputs--2, .calc-inputs--4 { grid-template-columns: 1fr 1fr; }
  .calc-inputs--1 { grid-template-columns: 1fr; }
}

/* ---------- Floating WhatsApp (all pages) ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.whatsapp-float:hover { transform: scale(1.06); box-shadow: 0 14px 36px rgba(37, 211, 102, 0.45); }
.whatsapp-float svg { width: 28px; height: 28px; fill: currentColor; }
@media (max-width: 560px) { .whatsapp-float { width: 50px; height: 50px; right: 16px; bottom: 16px; } }

/* ---------- Projects: filters ---------- */
.project-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0 4px;
}
.project-filter {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(26, 26, 24, 0.12);
  background: transparent;
  color: var(--ink-soft);
  font: 600 12.5px/1 var(--font-sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
}
.project-filter:hover { border-color: rgba(249, 115, 22, 0.4); color: var(--brand-ink); }
.project-filter.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}
.project-item[hidden] { display: none !important; }
.projects-empty { margin-top: 28px; color: var(--ink-muted); }
.projects-empty a { color: var(--brand-ink); font-weight: 600; }

.project-item__visual {
  width: 100%;
  padding: 0;
  border: 1px solid rgba(23, 26, 28, 0.06);
  font: inherit;
  text-align: left;
  display: block;
}
.project-item__visual:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 9, 11, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__figure { max-width: min(1100px, 92vw); margin: 0; }
.lightbox__figure img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
.lightbox__figure figcaption {
  margin-top: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
}
.lightbox__figure figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #FAF8F3;
  margin-bottom: 4px;
}
.lightbox__close,
.lightbox__nav {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FAF8F3;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.lightbox__nav { width: 48px; height: 48px; font-size: 26px; line-height: 1; }
.lightbox__close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; font-size: 26px; line-height: 1; }
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(249, 115, 22, 0.25); transform: scale(1.06); }
@media (max-width: 640px) {
  .lightbox { padding: 16px; gap: 4px; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 22px; }
  .lightbox__figure { max-width: calc(100vw - 110px); }
}

/* ---------- Logo lockup (3D SVG, transparent) ---------- */
.nav-logo { gap: 0; }
.nav-logo img,
.nav-logo-img {
  height: 46px;
  width: auto;
  filter: none;
  transition: transform 0.3s var(--ease-out);
}
.nav-logo:hover .nav-logo-img { transform: translateY(-1px); filter: none; }
.footer-logo {
  width: auto !important;
  height: 86px;
  filter: none !important;
  margin-bottom: 18px;
}
@media (max-width: 900px) { .nav-logo-img { height: 40px; } }
@media (max-width: 420px) { .nav-logo-img { height: 34px; } }
