/* =========================================================
   Atrium Engenharia Júnior — Landing Page
   Architectural blueprint aesthetic
   ========================================================= */

:root {
  --accent: #7A1E27;
  --accent-deep: #5C1620;
  --accent-soft: rgba(122, 30, 39, 0.08);
  --ink: #161A1F;
  --ink-2: #2C3138;
  --slate: #4F5560;
  --slate-2: #7A7F87;
  --line: #E5E3DE;
  --line-2: #D6D3CC;
  --bone: #F5F3EE;
  --paper: #FAF9F6;
  --white: #FFFFFF;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  width: 100%;
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-2);
}

.accent-text {
  color: var(--accent);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 500;
}

/* ============== Buttons ============== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.32s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn--lg { padding: 18px 28px; font-size: 15px; }
.btn--block { width: 100%; justify-content: center; }

.btn--primary {
  background: var(--accent);
  color: var(--bone);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(122, 30, 39, 0.55);
}
.btn--primary svg { transition: transform 0.32s var(--ease); }
.btn--primary:hover svg { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--bone);
}
.btn--ghost svg { transition: transform 0.32s var(--ease); }
.btn--ghost:hover svg { transform: translateX(4px); }

.btn--light {
  color: var(--bone);
  border-color: rgba(245, 243, 238, 0.4);
}
.btn--light:hover {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

/* ============== Header ============== */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(250, 249, 246, 0.86);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
/* When hero is in view, header text is light */
.site-header:not(.is-scrolled) .nav-link {
  color: var(--bone);
}
.site-header:not(.is-scrolled) .nav-link::after { background: var(--bone); }
.site-header:not(.is-scrolled) .hamburger { color: var(--bone); }

.brand {
  display: inline-flex;
  align-items: center;
  width: 220px;
  height: 64px;
  overflow: hidden;
  transition: opacity 0.3s var(--ease);
}
.brand:hover { opacity: 0.85; }
.brand__logo {
  display: block;
  position: relative;
  left: 50%;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}
.brand__logo--white { width: 440px; }
.brand__logo--red {
  width: 360px;
  transform: translateX(calc(-50% + 14px));
}

.primary-nav {
  display: flex;
  gap: 36px;
  margin-left: auto;
  margin-right: 32px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  height: 1px; width: 0;
  background: var(--ink);
  transition: width 0.32s var(--ease);
}
.nav-link:hover::after,
.nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after { background: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.hamburger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  padding: 16px var(--gutter) 24px;
  gap: 4px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 500;
}

/* ============== Hero ============== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--bone);
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__render { width: 100%; height: 100%; aspect-ratio: auto !important; }
.hero__render .render-slot__meta { top: 24px; right: 24px; left: auto; bottom: auto; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22,26,31,0.5) 0%, rgba(22,26,31,0.35) 40%, rgba(22,26,31,0.85) 100%),
    linear-gradient(90deg, rgba(22,26,31,0.55) 0%, rgba(22,26,31,0.15) 60%);
}
.hero__grid-overlay { position: absolute; inset: 0; pointer-events: none; }

.hero__content { position: relative; z-index: 2; max-width: 1280px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(245,243,238,0.3);
  border-radius: 999px;
  margin-bottom: 36px;
}
.hero__eyebrow .mono { color: var(--bone); font-size: 10.5px; }
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(122,30,39,0.3);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(122,30,39,0.0); }
  50% { box-shadow: 0 0 0 6px rgba(122,30,39,0.4); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 7.6vw, 108px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  max-width: 14ch;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  position: relative;
}

.hero__sub {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  max-width: 56ch;
  margin: 0 0 44px;
  color: rgba(245,243,238,0.82);
  text-wrap: pretty;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 80px; }
.hero__actions .btn--ghost {
  color: var(--bone);
  border-color: rgba(245,243,238,0.4);
}
.hero__actions .btn--ghost:hover {
  background: var(--bone); color: var(--ink); border-color: var(--bone);
}

.hero__stats {
  display: flex; align-items: center;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(245,243,238,0.15);
  max-width: 720px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__num em {
  color: var(--accent);
  font-style: normal;
  font-weight: 400;
  margin-left: 2px;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,243,238,0.6);
}
.stat__divider {
  width: 1px; height: 36px;
  background: rgba(245,243,238,0.18);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 36px; right: var(--gutter);
  display: flex; align-items: center; gap: 14px;
  z-index: 2;
}
.hero__scroll-hint .mono { color: rgba(245,243,238,0.7); }
.hero__scroll-line {
  display: block; width: 60px; height: 1px;
  background: rgba(245,243,238,0.4);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; left: -30px; top: 0;
  width: 30px; height: 100%;
  background: var(--bone);
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(0); }
  100% { transform: translateX(90px); }
}

/* ============== Render Slot (placeholder system) ============== */

.render-slot {
  position: relative;
  width: 100%;
  background: var(--bone);
  border: 1px solid var(--line);
  overflow: hidden;
}
.render-slot--dark {
  background: var(--ink-2);
  border-color: rgba(245,243,238,0.08);
}
.render-slot__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.render-slot.has-image .render-slot__stripes,
.render-slot.has-image .render-slot__meta { display: none; }
.render-slot__stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 14px,
    rgba(22,26,31,0.04) 14px,
    rgba(22,26,31,0.04) 15px
  );
}
.render-slot--dark .render-slot__stripes {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 14px,
    rgba(245,243,238,0.04) 14px,
    rgba(245,243,238,0.04) 15px
  );
}
.render-slot__meta {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 6px;
  max-width: 78%;
}
.render-slot__code {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-2);
  padding: 4px 8px;
  background: rgba(250,249,246,0.85);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.render-slot--dark .render-slot__code {
  background: rgba(22,26,31,0.6);
  border-color: rgba(245,243,238,0.15);
  color: rgba(245,243,238,0.7);
}
.render-slot__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  background: rgba(250,249,246,0.85);
  padding: 6px 10px;
  border: 1px solid var(--line);
  align-self: flex-start;
}
.render-slot--dark .render-slot__label {
  background: rgba(22,26,31,0.6);
  border-color: rgba(245,243,238,0.15);
  color: rgba(245,243,238,0.85);
}

/* ============== Section base ============== */

.section { padding: 65px 0; position: relative; }
.section--dark {
  background: var(--ink);
  color: var(--bone);
}

.section__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  min-width: 240px;
}
.section__eyebrow--light {
  border-bottom-color: rgba(245,243,238,0.2);
}
.section__eyebrow--light .mono { color: rgba(245,243,238,0.6); }

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.section__title--light { color: var(--bone); }

.section__head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 64px;
}
.section__head-right {
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate);
  text-wrap: pretty;
}

/* ============== About ============== */

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink);
  margin: 32px 0 24px;
  text-wrap: pretty;
}
.about__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--slate);
  margin: 0 0 36px;
  text-wrap: pretty;
}

.about__badges {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 44px;
}
.badge-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bone);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
.badge-card svg { color: var(--accent); flex-shrink: 0; }
.badge-card strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.badge-card span {
  font-size: 13px;
  color: var(--slate);
}

.about__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.about__meta > div { display: flex; flex-direction: column; gap: 6px; }
.about__meta strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}

.about__visual { position: relative; overflow: hidden; }
.about__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}.about__caption {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--slate);
}

/* ============== Solutions ============== */

.solutions__tabs {
  display: flex;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
  overflow-x: auto;
}
.solutions__tab {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 8px;
  padding: 22px 28px;
  flex: 1 1 0;
  text-align: left;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.solutions__tab:last-child { border-right: 0; }
.solutions__tab > span:last-child {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.solutions__tab .mono { color: var(--slate-2); }
.solutions__tab::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}
.solutions__tab.is-active::before { transform: scaleX(1); }
.solutions__tab.is-active { background: var(--bone); }
.solutions__tab.is-active > span:last-child { color: var(--accent); }
.solutions__tab:hover:not(.is-active) { background: rgba(122,30,39,0.04); }

.solutions__blurb {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 400;
  color: var(--slate);
  max-width: 60ch;
  margin: 0 0 40px;
}

.solutions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.sol-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  min-height: 132px;
}
.sol-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.4s var(--ease);
}
.sol-card:hover { background: var(--white); }
.sol-card:hover::after { transform: scaleY(1); }
.sol-card__icon {
  color: var(--ink);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.sol-card:hover .sol-card__icon { color: var(--accent); transform: scale(1.08); }
.sol-card__body { display: flex; flex-direction: column; gap: 6px; }
.sol-card__num { color: var(--slate-2); }
.sol-card__body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sol-card__arrow {
  color: var(--slate-2);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.sol-card:hover .sol-card__arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ============== Portfolio ============== */

.portfolio__filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.filter-chip {
  padding: 8px 16px;
  border: 1px solid rgba(245,243,238,0.25);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  color: rgba(245,243,238,0.75);
  transition: all 0.3s var(--ease);
  border-radius: 999px;
}
.filter-chip:hover { color: var(--bone); border-color: rgba(245,243,238,0.5); }
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bone);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.port-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.port-card__button {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
}
.port-card__button:focus-visible {
  outline: 3px solid var(--bone);
  outline-offset: -6px;
}
.port-card--lg { grid-column: span 4; grid-row: span 2; }
.port-card--md { grid-column: span 3; grid-row: span 2; }
.port-card--sm { grid-column: span 2; grid-row: span 2; }
.port-card__media { width: 100%; height: 100%; aspect-ratio: auto !important; }
.port-card__media .render-slot__meta { display: none; }
.port-card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,26,31,0) 30%, rgba(22,26,31,0.78) 100%);
  transition: background 0.5s var(--ease);
}
.port-card:hover .port-card__media::after {
  background: linear-gradient(180deg, rgba(122,30,39,0.18) 30%, rgba(22,26,31,0.85) 100%);
}
.port-card__media .render-slot__stripes { transition: transform 0.8s var(--ease); }
.port-card:hover .render-slot__stripes { transform: scale(1.06); }

.port-card__overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--bone);
  z-index: 2;
}
.port-card__overlay > div:first-child {
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(0);
  transition: transform 0.4s var(--ease);
}
.port-card__overlay .mono { color: rgba(245,243,238,0.65); }
.port-card__overlay h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 24px);
  margin: 0;
  letter-spacing: -0.01em;
}
.port-card__overlay p { margin: 0; font-size: 13px; opacity: 0.8; }
.port-card__cta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  margin-top: 14px;
  color: var(--bone);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.port-card:hover .port-card__cta { opacity: 1; transform: translateY(0); }

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 17, 23, 0.78);
  backdrop-filter: blur(8px);
}
.project-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  width: min(100%, 1080px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}
.project-modal__image-wrap {
  display: grid;
  min-height: 420px;
  background: var(--ink);
}
.project-modal__image {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
}
.project-modal__content {
  display: flex;
  flex-direction: column;
  padding: 40px 28px 28px;
  color: var(--ink);
}
.project-modal__content .mono { color: var(--slate-2); }
.project-modal__content h3 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
}
.project-modal__content p { margin: 0; color: var(--slate); line-height: 1.5; }
.project-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(22, 26, 31, 0.78);
  color: var(--bone);
  font-size: 26px;
  line-height: 1;
}
.project-modal__close:hover { background: var(--accent); }
.project-modal__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}
.project-modal__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid transparent;
}
.project-modal__thumb.is-active { border-color: var(--accent); }
.project-modal__thumb img { width: 100%; height: 100%; object-fit: cover; }

.portfolio__footer {
  margin-top: 40px;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  border-top: 1px solid rgba(245,243,238,0.15);
}
.portfolio__footer .mono { color: rgba(245,243,238,0.65); }

/* ============== Contact / Footer ============== */

.contact { background: var(--bone); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate);
  margin: 28px 0 40px;
}
.contact__details {
  list-style: none;
  padding: 0; margin: 0 0 44px;
  display: flex; flex-direction: column; gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.contact__details li {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 16px;
}
.contact__details a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}
.contact__details a:hover { color: var(--accent); }

.contact__qr {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
}
.qr-tile {
  width: 120px; height: 120px;
  overflow: hidden;
  background: #2b2b3b;
  border: 1px solid var(--ink);
}
.qr-tile img {
  display: block;
  width: 286px;
  max-width: none;
  height: auto;
  transform: translate(-83px, -18px);
}
.contact__qr .mono { color: var(--slate-2); }
.contact__qr strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  margin: 4px 0 6px;
}
.contact__qr p { margin: 0; font-size: 13px; color: var(--slate); line-height: 1.5; }

.contact__form {
  background: var(--white);
  padding: 40px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 22px;
}
.form-row { display: flex; flex-direction: column; }
.form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-row label { display: flex; flex-direction: column; gap: 8px; }
.form-row .mono { color: var(--slate-2); }
.form-row input,
.form-row textarea {
  font: inherit;
  font-size: 15px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: var(--white);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
  border-color: #B42318;
  background: #FFF6F5;
}
.form-error {
  display: block;
  margin-top: 6px;
  color: #B42318;
  font-size: 12px;
  line-height: 1.4;
}

.chip-select { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--slate);
  transition: all 0.3s var(--ease);
  border-radius: 999px;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}

.form-fine {
  font-size: 12px;
  color: var(--slate-2);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

.site-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-bottom: 28px;
}
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__logo-wrap {
  display: block;
  width: 130px;
  height: 48px;
  overflow: hidden;
}
.site-footer__logo {
  display: block;
  width: 215px;
  max-width: none;
  height: auto;
  transform: translate(-34px, -38px);
}
.site-footer__brand strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.site-footer__brand span {
  font-size: 12px;
  color: var(--slate);
}
.site-footer__links { display: flex; gap: 14px; }
.site-footer__links a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 0.3s var(--ease);
  border-radius: 50%;
}
.site-footer__links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bone);
}

/* ============== WhatsApp FAB ============== */

.wa-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 60;
  display: flex; align-items: center; gap: 0;
  height: 60px;
  padding: 0;
  background: #128C7E;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(18,140,126,0.55), 0 6px 14px -4px rgba(0,0,0,0.2);
  overflow: hidden;
  transition: padding 0.45s var(--ease), gap 0.45s var(--ease);
}
.wa-fab__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: waPulse 2.4s var(--ease) infinite;
  pointer-events: none;
}
.wa-fab__pulse--2 { animation-delay: 1.2s; }
@keyframes waPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
.wa-fab__icon {
  width: 60px; height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.wa-fab__label {
  display: flex; flex-direction: column;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.45s var(--ease), opacity 0.3s var(--ease), padding 0.45s var(--ease);
  padding: 0;
}
.wa-fab__label strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.1;
}
.wa-fab__label span {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.1;
}
.wa-fab.is-expanded { padding-right: 22px; }
.wa-fab.is-expanded .wa-fab__label {
  max-width: 240px;
  opacity: 1;
  padding-left: 6px;
}

/* ============== Responsive ============== */

@media (max-width: 960px) {
  .primary-nav { display: none; }
  .hamburger { display: inline-flex; }
  .header-cta .btn { display: none; }

  .section { padding: 80px 0; }
  .section__head { grid-template-columns: 1fr; gap: 24px; }
  .section__head-right { font-size: 15px; }

  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__meta { grid-template-columns: repeat(2, 1fr); }

  .solutions__tabs { flex-direction: column; }
  .solutions__tab { border-right: 0; border-bottom: 1px solid var(--line); }
  .solutions__tab:last-child { border-bottom: 0; }

  .portfolio__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .port-card--lg, .port-card--md, .port-card--sm { grid-column: span 2; }

  .project-modal__dialog { grid-template-columns: 1fr; max-width: 680px; overflow-y: auto; }
  .project-modal__image-wrap { min-height: 0; aspect-ratio: 4 / 3; }
  .project-modal__image { max-height: none; }
  .project-modal__content { padding: 24px; }
  .project-modal__gallery { margin-top: 16px; padding-top: 0; }

  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .contact__form { padding: 24px; }
  .form-row--2 { grid-template-columns: 1fr; }

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

  .hero__stats { gap: 18px; }
  .stat__divider { display: none; }
}
@media (max-width: 560px) {
  .site-header__inner { gap: 12px; }
  .header-cta { gap: 0; }
  .brand { width: 160px; }
  .brand__logo--white { width: 320px; }
  .brand__logo--red {
    width: 260px;
    transform: translateX(calc(-50% + 10px));
  }

  .section__eyebrow { min-width: 0; max-width: 100%; }
  .contact__qr { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .qr-tile { width: 96px; height: 96px; }
  .qr-tile img { width: 229px; transform: translate(-66px, -14px); }
  .hero__stats { flex-wrap: wrap; }
  .portfolio__grid { grid-template-columns: 1fr; }
  .port-card--lg, .port-card--md, .port-card--sm { grid-column: span 1; }
  .wa-fab.is-expanded .wa-fab__label { max-width: 180px; }
}

/* ============== Tweak-driven overrides ============== */

body.theme-onyx {
  --bone: #ECECEA;
  --paper: #ECECEA;
  --line: #DAD8D2;
}
body.layout-condensed { --gutter: clamp(16px, 3vw, 36px); }
