@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Manrope:wght@400;500;600&display=swap");
:root {
  --ink: #171916;
  --soft-ink: #53564f;
  --paper: #f3f1eb;
  --cream: #e9e6dc;
  --line: rgba(23, 25, 22, 0.14);
  --accent: #c8dc68;
  --dark: #111310;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.section {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding-inline: clamp(24px, 5vw, 78px);
}

.hero {
  position: relative;
  min-height: 810px;
  height: 100svh;
  overflow: hidden;
  color: white;
  background: #1b211d;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center 52%;
  transform: scale(1.01);
  animation: settle 1.4s ease-out both;
}

@keyframes settle {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1.01); }
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(10, 14, 11, 0.62) 0%, rgba(10, 14, 11, 0.05) 38%, rgba(8, 11, 9, 0.78) 100%),
    linear-gradient(90deg, rgba(10, 13, 10, 0.42), transparent 62%);
}

.nav-shell {
  position: fixed;
  z-index: 10;
  top: 24px;
  left: 0;
  width: 100%;
  padding-inline: clamp(16px, 3.5vw, 54px);
}

/* Keep the shared public header visible across all inner pages. */
.inner-page .inner-nav-shell {
  position: fixed;
  top: 24px;
  padding-top: 0;
}

.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  max-width: 1370px;
  height: 68px;
  margin: 0 auto;
  padding: 8px 9px 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 18px;
  background: rgba(15, 19, 16, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  flex-shrink: 0;
}

.logo-mark {
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.08em;
}

.logo-word {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  opacity: 0.6;
}

.logo-light {
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 31px);
  flex: 1;
}

.nav-links a,
.nav-login {
  position: relative;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-login:hover {
  color: white;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.nav-cta svg {
  width: 15px;
  transition: transform 180ms ease;
}

.nav-cta:hover svg,
.button:hover svg,
.text-link:hover svg,
.footer-cta:hover svg {
  transform: translateX(4px);
}

.menu-button,
.mobile-cta,
.mobile-login {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: min(100%, 1440px);
  height: 100%;
  margin: 0 auto;
  padding: 150px clamp(24px, 5vw, 78px) clamp(48px, 7vh, 72px);
}

.hero-copy {
  max-width: 960px;
  animation: rise 1s 0.2s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--soft-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 22px;
  height: 1px;
  background: currentColor;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.72);
}

.hero h1,
.section-heading h2,
.why h2,
.process h2,
.footer-main h2 {
  font-family: "Manrope", sans-serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero h1 {
  margin: 25px 0 24px;
  max-width: 1050px;
  font-size: clamp(54px, 6.3vw, 94px);
  line-height: 0.98;
}

em {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.hero h1 em {
  color: var(--accent);
}

.hero-copy > p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 16px;
  line-height: 1.55;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 52px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
}

.button svg,
.text-link svg,
.footer-cta svg {
  transition: transform 180ms ease;
}

.button-light {
  color: var(--ink);
  background: white;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: white;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.services {
  padding-block: clamp(92px, 10vw, 150px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.55fr);
  align-items: end;
  gap: 70px;
}

.section-heading h2,
.why h2,
.process h2,
.footer-main h2 {
  margin: 24px 0 0;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.05;
}

.section-heading > p,
.why-intro > p {
  margin: 0 0 6px;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.7;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 70px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.28);
  transition: transform 250ms ease, background 250ms ease, box-shadow 250ms ease;
}

.service-card:hover {
  transform: translateY(-6px);
  background: #faf9f4;
  box-shadow: 0 22px 55px rgba(28, 32, 25, 0.08);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.service-number,
.project-type,
.project-year {
  color: #777a73;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-arrow {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.service-card:hover .service-arrow {
  color: var(--dark);
  background: var(--accent);
  border-color: var(--accent);
}

.service-card h3 {
  max-width: 220px;
  margin: 0 0 17px;
  font-family: "Manrope", sans-serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.service-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.65;
}

.service-tag {
  padding-top: 21px;
  border-top: 1px solid var(--line);
  color: #797c75;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work {
  padding-block: clamp(90px, 9vw, 130px);
  color: white;
  background: var(--dark);
}

.work-heading .section-heading {
  align-items: end;
}

.work .section-heading h2 {
  color: white;
}

.work .section-heading h2 em,
.process h2 em,
.footer-main h2 em {
  color: var(--accent);
}

.text-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 8px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.27);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px 18px;
  margin-top: 76px;
}

.project {
  display: block;
  color: inherit;
}

.project-visual {
  position: relative;
  height: clamp(360px, 38vw, 550px);
  overflow: hidden;
  border-radius: 18px;
  transition: transform 400ms ease;
}

.portfolio-project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project:hover .project-visual {
  transform: scale(0.992);
}

.project-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px 5px 0;
}

.project-info h3 {
  margin: 7px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  font-weight: 500;
}

.portfolio-empty {
  grid-column: 1 / -1;
  padding: 42px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.portfolio-empty p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.browser-bar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  gap: 5px;
  width: 100%;
  height: 26px;
  padding: 10px;
  background: rgba(246, 241, 230, 0.9);
}

.browser-bar span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(27, 31, 25, 0.3);
}

.northstar {
  background: linear-gradient(125deg, #d8d2c2, #aeb6a2);
}

.northstar-copy {
  position: absolute;
  z-index: 2;
  top: 21%;
  left: 7%;
  color: #23291f;
}

.northstar-copy > span {
  display: block;
  margin-bottom: 40px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.northstar-copy strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(34px, 4vw, 59px);
  font-weight: 400;
  line-height: 0.98;
}

.northstar-copy i {
  display: inline-block;
  margin-top: 30px;
  padding: 11px 14px;
  border: 1px solid rgba(25, 30, 24, 0.35);
  border-radius: 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-style: normal;
}

.building-shape {
  position: absolute;
  right: 5%;
  bottom: -8%;
  width: 47%;
  height: 79%;
  background:
    repeating-linear-gradient(90deg, transparent 0 12%, rgba(222, 221, 203, 0.62) 12% 16%),
    repeating-linear-gradient(0deg, #3a453a 0 8%, #708070 8% 12%);
  clip-path: polygon(15% 10%, 88% 0, 100% 100%, 0 100%);
  box-shadow: -30px 20px 80px rgba(35, 42, 34, 0.25);
}

.atlas {
  display: flex;
  padding: 8%;
  color: #17221d;
  background: #dce4df;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 23px;
  width: 15%;
  padding-top: 7%;
  border-radius: 13px 0 0 13px;
  color: white;
  background: #172c26;
}

.mini-logo {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-bottom: 15px;
  border-radius: 7px;
  color: #15251f;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-nav i {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.dashboard-content {
  flex: 1;
  padding: 8% 6%;
  border-radius: 0 13px 13px 0;
  background: #f7f8f4;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(15px, 2vw, 23px);
  font-weight: 600;
}

.dash-header b {
  padding: 8px 10px;
  border: 1px solid #d8ddd7;
  border-radius: 6px;
  color: #6e7772;
  font-size: 7px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10%;
}

.metric-row div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10%;
  border: 1px solid #e2e4df;
  border-radius: 8px;
  background: white;
}

.metric-row small {
  color: #7c8580;
  font-size: 7px;
}

.metric-row strong {
  font-size: clamp(13px, 2vw, 23px);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 5%;
  height: 31%;
  margin-top: 7%;
  padding: 0 5%;
  border-bottom: 1px solid #daddd8;
}

.chart i {
  width: 8%;
  border-radius: 3px 3px 0 0;
  background: #bfd466;
}

.chart i:nth-child(1) { height: 34%; }
.chart i:nth-child(2) { height: 48%; }
.chart i:nth-child(3) { height: 43%; }
.chart i:nth-child(4) { height: 68%; }
.chart i:nth-child(5) { height: 54%; }
.chart i:nth-child(6) { height: 77%; }
.chart i:nth-child(7) { height: 63%; }
.chart i:nth-child(8) { height: 91%; }

.sila {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10%;
  padding: 7%;
  color: #28352e;
  background: #c6d2c9;
}

.phone {
  display: flex;
  flex-direction: column;
  width: 43%;
  min-width: 200px;
  height: 105%;
  padding: 7% 5%;
  border: 5px solid #203027;
  border-radius: 28px;
  background: #f6f5ef;
  box-shadow: 20px 25px 55px rgba(26, 42, 33, 0.18);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18%;
  font-size: 10px;
  font-weight: 700;
}

.phone-top i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #d5dfd7;
}

.phone > small {
  color: #8b938e;
  font-size: 6px;
  text-transform: uppercase;
}

.phone > strong {
  margin-top: 4px;
  font-family: Georgia, serif;
  font-size: clamp(16px, 2.1vw, 29px);
  font-weight: 400;
  line-height: 1;
}

.appointment {
  display: flex;
  gap: 10px;
  margin-top: 17%;
  padding: 10px;
  border-radius: 8px;
  background: #e3e9df;
}

.appointment > span {
  font-size: 5px;
}

.appointment b {
  font-size: 14px;
}

.appointment p {
  margin: 1px 0;
  font-size: 8px;
  font-weight: 600;
}

.appointment p small {
  display: block;
  margin-top: 3px;
  color: #7a837e;
  font-size: 6px;
  font-weight: 400;
}

.phone-button {
  margin-top: auto;
  padding: 9px;
  border-radius: 20px;
  color: white;
  background: #23342b;
  font-size: 7px;
  text-align: center;
}

.sila-copy {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 150px;
}

.sila-copy span {
  font-family: Georgia, serif;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}

.sila-copy i {
  color: #637068;
  font-size: 9px;
  font-style: normal;
}

.found {
  padding: 6% 7%;
  color: #2d2925;
  background: #ddd0c1;
}

.found-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4%;
  border-bottom: 1px solid rgba(54, 45, 39, 0.25);
}

.found-header b {
  font-family: Georgia, serif;
  font-size: 24px;
}

.found-header span {
  font-size: 7px;
  text-transform: uppercase;
}

.found-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4%;
  height: 85%;
  padding-top: 6%;
}

.found-product {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #b5aa98;
}

.found-product span {
  width: 44%;
  height: 57%;
  border-radius: 49% 49% 15% 15%;
  background: linear-gradient(90deg, #443e35, #7f7564 47%, #3e3932);
  box-shadow: 15px 20px 35px rgba(62, 49, 40, 0.25);
}

.product-two {
  background: #eae2d5;
}

.product-two span {
  width: 53%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #d5ccb9, #7e7565 63%, #403c35);
}

.found-title {
  position: absolute;
  z-index: 3;
  top: 38%;
  left: 19%;
  padding: 13px 18px;
  background: rgba(230, 220, 206, 0.89);
  font-family: "Manrope", sans-serif;
  font-size: clamp(25px, 3vw, 44px);
  line-height: 0.98;
  text-align: center;
}

.why {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(70px, 10vw, 150px);
  padding-block: clamp(100px, 11vw, 160px);
}

.why-intro {
  align-self: start;
  position: sticky;
  top: 80px;
}

.why h2 {
  font-size: clamp(40px, 4.2vw, 61px);
}

.why-intro > p {
  max-width: 490px;
  margin-top: 32px;
}

.strength {
  display: grid;
  grid-template-columns: 42px 1fr 36px;
  align-items: center;
  min-height: 93px;
  border-bottom: 1px solid var(--line);
}

.strength:first-child {
  border-top: 1px solid var(--line);
}

.strength > span {
  color: #8a8d86;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.strength h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.strength i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--soft-ink);
  background: #e8e5dd;
  transition: background 180ms ease;
}

.strength:hover i {
  background: var(--accent);
}

.process {
  padding-block: clamp(92px, 10vw, 145px);
  color: white;
  background: #282c26;
}

.process-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.process-heading .eyebrow {
  margin-top: 12px;
}

.process h2 {
  width: 60%;
  margin-top: 0;
}

.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 100px;
}

.process-grid::before {
  position: absolute;
  top: 49px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  content: "";
}

.process-step {
  position: relative;
  padding-right: 16%;
}

.process-step > span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.process-dot {
  position: relative;
  z-index: 2;
  width: 10px;
  height: 10px;
  margin: 35px 0 35px;
  border: 3px solid #282c26;
  border-radius: 50%;
  outline: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--accent);
}

.process-step h3 {
  margin: 0 0 15px;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  font-weight: 400;
}

.process-step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.65;
}

footer {
  color: white;
  background: #0e100e;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 70px;
  padding-block: clamp(100px, 11vw, 160px);
}

.footer-main h2 {
  font-size: clamp(43px, 5.5vw, 78px);
}

.footer-cta {
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

.footer-cta svg {
  width: 25px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr auto;
  align-items: end;
  gap: 35px;
  padding-block: 35px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.footer-company {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-company span,
.copyright {
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-company strong {
  font-size: 11px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
}

.footer-link-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, max-content));
  gap: 32px;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
}

.footer-link-group strong {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-link-group a {
  transition: color 180ms ease;
}

.footer-link-group a:hover {
  color: #ffffff;
}

.policy-document-page .inner-nav-shell {
  display: none;
}

.copyright {
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .nav-bar {
    gap: 20px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a,
  .nav-login {
    font-size: 10px;
  }

  .nav-actions {
    gap: 12px;
  }

  .nav-cta {
    gap: 7px;
    padding-inline: 12px;
  }

  .hero-meta {
    display: none;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-card {
    min-height: 340px;
  }
}

/* ========================================================================
   M+ LABS — RESPONSIVE NAVIGATION
   ========================================================================

   Navigation structure expected by this stylesheet:

   .nav-shell
     .nav-bar
       .logo
       .site-nav
         .nav-links
           main navigation links
           .mobile-nav-actions
         .nav-actions
         .menu-button

   Desktop:
     - Main links are visible.
     - Login + consultation CTA are visible.
     - Hamburger is hidden.
     - Mobile actions are hidden.

   Tablet / mobile (<= 900px):
     - Desktop actions are hidden.
     - Hamburger is visible.
     - .nav-links becomes the dropdown.
     - .mobile-nav-actions appears inside the dropdown.
     - JavaScript toggles .is-open.

   IMPORTANT:
     There should be ONE .nav-links, ONE .nav-actions and ONE
     .menu-button in home.html.
   ======================================================================== */


/* ------------------------------------------------------------------------
   TABLET / MOBILE
   ------------------------------------------------------------------------ */

@media (max-width: 900px) {

  /* Keep the fixed header and its full menu usable on short screens. */
  .nav-shell {
    position: fixed;
  }

  .site-nav .nav-links {
    max-height: calc(100vh - 112px);
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /*
   * Give the navbar enough room for the logo and hamburger.
   */
  .nav-bar {
    height: 60px;
    padding: 8px 10px 8px 18px;
    border-radius: 15px;
  }

  /*
   * Keep the site-nav as the right-side control area.
   * The dropdown itself is positioned against .nav-bar.
   */
  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  /*
   * Hide desktop Login + CTA.
   * Their mobile versions live inside .mobile-nav-actions.
   */
  .nav-actions {
    display: none;
  }

  /*
   * Hamburger button.
   */
  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: transparent;

    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    gap: 6px;
  }

  .menu-button span {
    display: block;
    width: 22px;
    height: 2px;

    border-radius: 2px;
    background: currentColor;

    transition:
      transform 220ms ease,
      opacity 180ms ease;
  }

  /*
   * Mobile dropdown.
   *
   * It is hidden by default. JavaScript adds .is-open.
   */
  .nav-links {
    position: absolute;

    top: calc(100% + 10px);
    left: 0;
    right: 0;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;

    flex: none;

    padding: 14px 22px 20px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;

    background: rgba(15, 19, 16, 0.97);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-8px);

    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease;

    z-index: 1000;
  }

  /*
   * Open state controlled by home.html JavaScript.
   */
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  /*
   * Main mobile links.
   */
  .nav-links > a {
    display: block;
    width: 100%;

    padding: 15px 0;

    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    transition: color 180ms ease;
  }

  .nav-links > a:hover {
    color: #ffffff;
  }

  /*
   * Mobile Login + Consultation CTA.
   *
   * This wrapper is inside .nav-links, so it must be explicitly
   * displayed on mobile.
   */
  .mobile-nav-actions {
    display: flex;

    flex-direction: column;
    gap: 8px;

    margin-top: 10px;
    padding-top: 8px;
  }

  .mobile-nav-login {
    display: block;

    padding: 13px 0;

    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 500;

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }

  .mobile-nav-login:hover {
    color: #ffffff;
  }

  .mobile-nav-cta {
    display: flex !important;
    align-items: center;
    justify-content: space-between;

    width: 100% !important;
    margin-top: 4px;
    padding: 15px 17px !important;

    color: var(--ink) !important;
    background: var(--accent);

    border: 0 !important;
    border-radius: 12px;

    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;

    transition:
      transform 180ms ease,
      background 180ms ease;
  }

  .mobile-nav-cta:hover {
    color: var(--ink) !important;
    background: #d5e978;
    transform: translateY(-1px);
  }

  /*
   * Hamburger -> X when menu is open.
   */
  .menu-button.is-open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-button.is-open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }


  /* ----------------------------------------------------------------------
     Hero adjustments
     ---------------------------------------------------------------------- */

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding-top: 130px;
  }

  .hero h1 {
    font-size: clamp(48px, 8vw, 72px);
  }

  .hero-meta {
    display: none;
  }


  /* ----------------------------------------------------------------------
     Services
     ---------------------------------------------------------------------- */

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-card {
    min-height: 340px;
  }


  /* ----------------------------------------------------------------------
     Why M+ Labs
     ---------------------------------------------------------------------- */

  .why {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .why-intro {
    position: static;
  }


  /* ----------------------------------------------------------------------
     Process
     ---------------------------------------------------------------------- */

  .process-heading {
    flex-direction: column;
    gap: 30px;
  }

  .process h2 {
    width: 100%;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
    gap: 55px 20px;
  }

  .process-grid::before {
    display: none;
  }


  /* ----------------------------------------------------------------------
     Footer
     ---------------------------------------------------------------------- */

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    grid-template-columns: 1fr 1fr;
  }
}


/* ------------------------------------------------------------------------
   SMALL PHONES
   ------------------------------------------------------------------------ */

@media (max-width: 600px) {

  .nav-shell {
    top: 12px;
    padding-inline: 12px;
  }

  .inner-page .inner-nav-shell {
    top: 12px;
    padding-top: 0;
  }

  .nav-bar {
    height: 58px;
    padding-left: 16px;
    padding-right: 7px;
  }

  .logo {
    gap: 7px;
  }

  .logo-mark {
    font-size: 22px;
  }

  .logo-word {
    font-size: 9px;
  }

  .nav-links {
    top: calc(100% + 8px);
    padding: 12px 18px 18px;
    border-radius: 16px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding:
      125px 24px 42px;
  }

  .hero h1 {
    margin-top: 20px;
    font-size: clamp(43px, 11vw, 58px);
    line-height: 0.99;
  }

  .hero-copy > p {
    font-size: 14px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .section-heading h2,
  .why h2,
  .process h2,
  .footer-main h2 {
    font-size: clamp(38px, 10vw, 52px);
  }

  .service-grid {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .service-card {
    min-height: 330px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .project-visual {
    height: 430px;
  }

  .sila {
    gap: 5%;
    padding: 5%;
  }

  .phone {
    min-width: 165px;
    width: 47%;
  }

  .sila-copy {
    max-width: 120px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 45px;
    margin-top: 65px;
  }

  .process-step {
    padding-right: 0;
  }

  .footer-main {
    padding-block: 90px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-links {
    gap: 14px;
  }
}


/* ------------------------------------------------------------------------
   VERY SMALL PHONES
   ------------------------------------------------------------------------ */

@media (max-width: 380px) {

  .hero h1 {
    font-size: 40px;
  }

  .nav-bar {
    padding-left: 14px;
  }

  .nav-links {
    padding-inline: 16px;
  }

  .service-card {
    padding: 22px;
  }
}

/* ========================================================================
   M+ LABS — FINAL NAVIGATION LAYOUT FIX
   ======================================================================== */

/* ------------------------------------------------------------------------
   DESKTOP NAVIGATION
   ------------------------------------------------------------------------ */

@media (min-width: 901px) {

    /*
     * The navbar itself is the horizontal container.
     */
    .nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;
        min-height: 72px;

        padding: 8px 14px 8px 24px;
    }


    /*
     * Logo stays on the left.
     */
    .logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;

        text-decoration: none;
    }


    /*
     * EVERYTHING inside .site-nav must sit on ONE row.
     */
    .site-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;

        flex: 1 1 auto;
        min-width: 0;

        margin-left: auto;
    }


    /*
     * Desktop navigation links.
     */
    .site-nav .nav-links {
        display: flex;
        align-items: center;
        justify-content: flex-end;

        flex: 0 1 auto;

        gap: 30px;

        margin: 0;
        padding: 0;

        position: static;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: none;

        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }


    /*
     * Main navigation links.
     */
    .site-nav .nav-links > a {
        display: inline-flex;
        align-items: center;

        width: auto;

        padding: 8px 0;

        color: rgba(255, 255, 255, 0.72);

        font-size: 14px;
        font-weight: 500;
        line-height: 1;

        white-space: nowrap;

        text-decoration: none;

        border: 0;

        transition:
            color 180ms ease,
            opacity 180ms ease;
    }


    .site-nav .nav-links > a:hover {
        color: #ffffff;
    }


    /*
     * Mobile-only Login + CTA must NOT appear inside the desktop links.
     */
    .site-nav .mobile-nav-actions {
        display: none !important;
    }


    /*
     * Desktop Login + CTA.
     */
    .site-nav .nav-actions {
        display: flex;
        align-items: center;

        flex: 0 0 auto;

        gap: 24px;

        margin-left: 32px;
        padding: 0;
    }


    /*
     * Desktop Login.
     */
    .site-nav .nav-login {
        display: inline-flex;
        align-items: center;

        padding: 8px 0;

        color: rgba(255, 255, 255, 0.78);

        font-size: 14px;
        font-weight: 500;

        white-space: nowrap;

        text-decoration: none;
    }


    .site-nav .nav-login:hover {
        color: #ffffff;
    }


    /*
     * Desktop consultation button.
     */
    .site-nav .nav-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 22px;

        min-height: 56px;

        padding: 0 22px;

        color: var(--ink);
        background: var(--accent);

        border-radius: 12px;

        font-size: 14px;
        font-weight: 600;

        white-space: nowrap;

        text-decoration: none;

        transition:
            transform 180ms ease,
            background 180ms ease;
    }


    .site-nav .nav-cta:hover {
        color: var(--ink);

        background: #d5e978;

        transform: translateY(-1px);
    }


    /*
     * Arrow SVG inside the desktop CTA.
     */
    .site-nav .nav-cta svg {
        width: 18px;
        height: 18px;

        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
    }


    /*
     * Hamburger must NEVER appear on desktop.
     */
    .site-nav .menu-button {
        display: none !important;
    }
}


/* ========================================================================
   TABLET / MOBILE
   ======================================================================== */

@media (max-width: 900px) {

    .nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;
    }


    .site-nav {
        display: flex;
        align-items: center;

        margin-left: auto;
    }


    /*
     * Hide desktop actions.
     */
    .site-nav .nav-actions {
        display: none !important;
    }


    /*
     * Show hamburger.
     */
    .site-nav .menu-button {
        display: flex;

        align-items: center;
        justify-content: center;
        flex-direction: column;

        width: 44px;
        height: 44px;

        padding: 0;
        margin: 0;

        gap: 6px;

        border: 0;
        border-radius: 10px;

        background: transparent;
        color: #ffffff;

        cursor: pointer;
    }


    .site-nav .menu-button span {
        display: block;

        width: 22px;
        height: 2px;

        background: currentColor;

        border-radius: 2px;

        transition:
            transform 220ms ease,
            opacity 180ms ease;
    }


    /*
     * Closed mobile menu.
     */
    .site-nav .nav-links {
        position: absolute;

        top: calc(100% + 10px);
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 14px 22px 20px;

        background: rgba(15, 19, 16, 0.97);

        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 18px;

        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px);

        z-index: 1000;

        transition:
            opacity 180ms ease,
            transform 180ms ease,
            visibility 180ms ease;
    }


    /*
     * Open mobile menu.
     */
    .site-nav .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }


    /*
     * Mobile links.
     */
    .site-nav .nav-links > a {
        display: block;

        width: 100%;

        padding: 15px 0;

        color: rgba(255, 255, 255, 0.82);

        font-size: 15px;
        font-weight: 500;

        text-decoration: none;

        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }


    .site-nav .nav-links > a:hover {
        color: #ffffff;
    }


    /*
     * Mobile Login + CTA.
     */
    .site-nav .mobile-nav-actions {
        display: flex;

        flex-direction: column;
        gap: 8px;

        margin-top: 10px;
        padding-top: 8px;
    }


    .site-nav .mobile-nav-login {
        display: block;

        padding: 13px 0;

        color: rgba(255, 255, 255, 0.82);

        font-size: 15px;
        font-weight: 500;

        text-decoration: none;
    }


    .site-nav .mobile-nav-cta {
        display: flex !important;

        align-items: center;
        justify-content: space-between;

        width: 100% !important;

        padding: 15px 17px !important;

        color: var(--ink) !important;
        background: var(--accent);

        border: 0 !important;
        border-radius: 12px;

        font-size: 14px !important;
        font-weight: 600 !important;

        text-decoration: none;
    }


    /*
     * Hamburger -> X.
     */
    .site-nav .menu-button.is-open span:first-child {
        transform: translateY(4px) rotate(45deg);
    }


    .site-nav .menu-button.is-open span:last-child {
        transform: translateY(-4px) rotate(-45deg);
    }
}


/* ========================================================================
   SMALL PHONES
   ======================================================================== */

@media (max-width: 600px) {

    .nav-bar {
        min-height: 58px;
    }

    .site-nav .nav-links {
        padding: 12px 18px 18px;
    }
}

/* =========================================================
   MOBILE NAVIGATION — TEXT VISIBILITY
   ========================================================= */

@media (max-width: 900px) {

    .site-nav .nav-links > a,
    .site-nav .nav-links > a:visited {
        color: rgba(255, 255, 255, 0.90) !important;
    }

    .site-nav .nav-links > a:hover,
    .site-nav .nav-links > a:focus {
        color: #ffffff !important;
    }

    .site-nav .mobile-nav-login,
    .site-nav .mobile-nav-login:visited {
        color: rgba(255, 255, 255, 0.90) !important;
    }

    .site-nav .mobile-nav-login:hover,
    .site-nav .mobile-nav-login:focus {
        color: #ffffff !important;
    }

}

/* =========================================
   ACCOUNT AND CLIENT PORTAL NAVIGATION FIX
   ========================================= */

/*
 * Login and client portal pages use their own
 * layouts, so hide the public website navigation.
 */

body.account-page .inner-nav-shell,
body.client-portal-page .inner-nav-shell {
    display: none !important;
}

/*
 * Keep the public navigation unchanged on
 * all other pages.
 */

body.account-page > footer.site-footer,
body.client-portal-page > footer.site-footer {
    display: none;
}

/* Compact the fixed navigation after scrolling, then restore it at the top. */
.nav-shell {
    transition: top 220ms ease;
}

.nav-bar {
    transition: height 220ms ease, min-height 220ms ease, padding 220ms ease,
        border-radius 220ms ease;
}

.nav-shell.is-scrolled {
    top: 10px;
}

.nav-shell.is-scrolled .nav-bar {
    height: 58px;
    min-height: 58px;
    padding-block: 5px;
    border-radius: 15px;
}

@media (min-width: 901px) {
    .site-nav {
        position: static;
        justify-content: flex-end;
    }

    .site-nav .nav-links {
        position: absolute;
        left: 50%;
        flex: none;
        justify-content: center;
        margin: 0;
        transform: translateX(-50%);
    }

    .site-nav .nav-actions {
        margin-left: auto;
    }

    .nav-shell.is-scrolled .nav-bar {
        height: 60px;
        min-height: 60px;
    }

    .nav-shell.is-scrolled .site-nav .nav-cta {
        min-height: 44px;
        gap: 12px;
        padding-inline: 16px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .nav-shell.is-scrolled .nav-bar {
        height: 52px;
        min-height: 52px;
    }
}

/* Gentle rise and fade for content as it enters the viewport. */
.scroll-reveal-ready .scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.985);
    transition:
        opacity 650ms ease,
        transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1);
    transition-delay: var(--scroll-reveal-delay, 0ms);
    will-change: opacity, transform;
}

.scroll-reveal-ready .scroll-reveal.scroll-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal-ready .scroll-reveal,
    .scroll-reveal-ready .scroll-reveal.scroll-revealed {
        opacity: 1;
        transform: none;
        transition: none;
        transition-delay: 0ms;
    }
}
