/* ==========================================================================
   Magic of Insulation — magicofinsulation.ae
   Tokens taken verbatim from the approved design handoff (MOI Identity Canvas).
   ========================================================================== */

:root {
  /* Colour */
  --ink: #101A22;
  --paper: #FAFAF8;
  --accent: #A9743F;
  --accent-on-dark: #C08A52;
  --text-secondary: #3A4148;
  --text-muted: #6B7278;
  --text-faint: #9CA1A5;
  --grey-100: #F2F2F0;
  --grey-200: #E4E3DF;
  --grey-300: #C9CAC8;
  --hairline: #E9E8E4;
  --hairline-on-ink: #232F3A;
  --logo-divider: #D9D8D3;

  /* Type */
  --font-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Frame */
  --container: 1200px;
  --side-margin: 120px;
  --gutter: 30px;
  --nav-height: 84px;
  --hero-top: 128px;
  --section-y: 140px;
  --section-y-last: 170px;
  --footer-top: 70px;
  --radius: 0;
  --line: 1px;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; display: block; }
/* Without this, the HTML height attribute stays definite while max-width
   caps the width — the image ends up squashed or blown up. Rules that set
   an explicit height (.hero__img, .person__photo) override it. */
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-size: 15px;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ layout --- */
.wrap {
  width: 100%;
  /* --container is the CONTENT width; the side margins live outside it */
  max-width: calc(var(--container) + var(--side-margin) * 2);
  margin-inline: auto;
  padding-inline: var(--side-margin);
}

.section { padding-block: var(--section-y); }
.section--last { padding-bottom: var(--section-y-last); }
.section--tight { padding-block: 110px; }

.measure { max-width: 820px; }
.measure-wide { max-width: 800px; }

.rule { border: 0; border-top: var(--line) solid var(--hairline); margin: 0; }

/* -------------------------------------------------------------- type --- */
.display {
  font-size: 88px; line-height: 1.02; font-weight: 500; letter-spacing: -0.02em;
}
h1, .h1 {
  font-size: 72px; line-height: 1.05; font-weight: 500; letter-spacing: -0.02em;
}
h2, .h2 {
  font-size: 36px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em;
}
.h3-lg { font-size: 32px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
h3, .h3 { font-size: 24px; line-height: 1.3; font-weight: 500; }
.h3-sm { font-size: 21px; line-height: 1.3; font-weight: 500; }

.lead-lg { font-size: 28px; line-height: 1.55; font-weight: 400; }
.lead { font-size: 26px; line-height: 1.55; font-weight: 400; }
.sublead { font-size: 24px; line-height: 1.5; font-weight: 400; }
.body-lg { font-size: 18.5px; line-height: 1.65; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.faint { color: var(--text-faint); }
.caption { font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.label {
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
}

/* ------------------------------------------------------------- links --- */
.link-arrow {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: 15px; color: var(--accent); text-decoration: none;
  transition: gap .18s ease;
}
.link-arrow::after { content: '→'; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow--on-dark { color: var(--accent-on-dark); }

.link-underline {
  color: var(--ink); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px;
  text-decoration-color: var(--grey-300);
}
.link-underline:hover { text-decoration-color: var(--accent); }

/* ------------------------------------------------------------ header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: var(--line) solid var(--hairline);
}
.site-header__inner {
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-logo { display: block; }
.site-logo img { width: 184px; height: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 15px; text-decoration: none; color: var(--ink);
  padding-block: 4px; border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--grey-300); }
.nav a[aria-current='page'] { border-bottom-color: var(--ink); }

.lang { display: flex; align-items: baseline; gap: 6px; font-size: 12px;
        letter-spacing: .04em; color: var(--text-faint); }
/* the switcher lives inside .nav, so it has to opt out of the nav link styling */
.lang a { font-size: inherit; color: var(--text-faint); text-decoration: none;
          padding: 0; border-bottom: 0; }
.lang a:hover { color: var(--ink); border-bottom: 0; }
.lang [aria-current] { color: var(--ink); }

.nav-toggle { display: none; }

/* --------------------------------------------------------------- hero -- */
.hero {
  position: relative; min-height: 750px;
  display: flex; align-items: center;
  background: #55595c;
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(16,26,34,.55) 0%, rgba(16,26,34,.18) 55%, rgba(16,26,34,.05) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; color: #fff; }
.hero .display { color: #fff; }
.hero .sublead { color: rgba(255,255,255,.9); margin-top: 18px; max-width: 560px; }

.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 0;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .22em; color: rgba(255,255,255,.7);
}
.scroll-hint::after { content: ''; width: 1px; height: 44px; background: rgba(255,255,255,.45); }

/* ------------------------------------------------------------ pillars -- */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: var(--line) solid var(--hairline);
  border-bottom: var(--line) solid var(--hairline);
}
.pillars > * {
  padding: 40px 32px 42px 49px;
  border-left: var(--line) solid var(--hairline);
}
.pillars > *:first-child { padding-left: 0; border-left: 0; }
.pillars > *:last-child { padding-right: 0; }
.pillars h3 { font-size: 24px; }
.pillars p { margin-top: 14px; font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }
.pillars .link-arrow { margin-top: 26px; }

/* ---------------------------------------------------------------- map -- */
.map { margin-top: 26px; }
.map img { width: 100%; height: auto; }

/* ----------------------------------------------------------- cta band -- */
.band {
  background: var(--ink); color: var(--paper);
  padding-block: 84px;
}
.band__inner {
  display: flex; align-items: baseline; justify-content: space-between; gap: 40px;
}
.band h2 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }

/* ------------------------------------------------------- page heading -- */
.page-head { padding-top: var(--hero-top); }
.page-head .lead { margin-top: 30px; }

/* -------------------------------------------------------- stack items -- */
.stack-item + .stack-item { margin-top: 42px; }
.stack-item h3 { font-size: 21px; }
.stack-item p { margin-top: 10px; color: var(--text-secondary); font-size: 17px; }

/* two-column definition rows (About → How we work) */
.defrow {
  display: grid; grid-template-columns: 31.667% 50%; gap: 0;
  padding-block: 30px;
  border-top: var(--line) solid var(--hairline);
}
.defrow:last-of-type { border-bottom: var(--line) solid var(--hairline); }
.defrow h3 { font-size: 21px; }
.defrow p { color: var(--text-secondary); }

/* ------------------------------------------------------- shareholders -- */
.people {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11.5%; margin-left: 8.5%;
}
.person figure { margin: 0; }
.person__photo {
  /* `height: auto` is required: the HTML height attribute would otherwise stay
     definite and aspect-ratio would be ignored, blowing the box up to 1290px */
  width: 100%; height: auto; aspect-ratio: 3 / 4;
  background: var(--grey-100);
  border: var(--line) solid var(--grey-200);
  object-fit: cover; object-position: center top;
}
.person__photo--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  text-align: center; padding: 20px;
}
.person__name { margin-top: 24px; font-size: 32px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
.person__role { margin-top: 6px; font-size: 15px; color: var(--text-muted); }
.person__bio { margin-top: 20px; font-size: 17px; line-height: 1.62; color: var(--text-secondary); }

/* ----------------------------------------------------------- ventures -- */
.venture {
  display: grid; grid-template-columns: 48.75% 43.25%; gap: 8%;
  align-items: center;
}
.venture--flip { grid-template-columns: 43.25% 48.75%; }
.venture + .venture { margin-top: 96px; }
.venture--flip .venture__media { order: 2; }
.venture__media img { width: 100%; height: auto; }
.venture__name { font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
/* no `width: auto` here: it would beat the HTML width attribute and render
   the logo at its full 2x pixel size */
.venture__logo { max-width: 100%; height: auto; }
.venture__meta { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.venture__text { margin-top: 20px; font-size: 17px; line-height: 1.62; color: var(--text-secondary); }
.venture__partner { margin-top: 22px; font-size: 13px; color: var(--text-faint); }

.model { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: 40px; }
.model h3 { font-size: 21px; margin-bottom: 18px; }
.model li { font-size: 16.5px; line-height: 2.05; color: var(--text-secondary); }

/* --------------------------------------------------------------- steps -- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); margin-top: 40px; }
.step__num { font-size: 64px; line-height: 1; color: var(--logo-divider); font-weight: 400; }
.step h3 { margin-top: 18px; font-size: 21px; }
.step p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; color: var(--text-muted); }

/* ------------------------------------------------------------ contact -- */
.contact-grid { display: grid; grid-template-columns: 43.25% 48.75%; gap: 8%; align-items: start; }
.contact-entity { font-size: 21px; font-weight: 500; }
.contact-office { margin-top: 18px; font-size: 17.5px; line-height: 1.9; color: var(--text-secondary); }
.contact-lines { margin-top: 18px; font-size: 17.5px; line-height: 1.9; }
.contact-map {
  width: 100%; aspect-ratio: 16 / 11;
  border: var(--line) solid var(--grey-200);
  background: var(--grey-100);
}
.contact-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.contact-cols dd { margin: 8px 0 0; font-size: 17.5px; }

/* --------------------------------------------------------------- form -- */
.form { margin-top: 40px; max-width: 620px; }
.field + .field { margin-top: 24px; }
.field label { display: block; }
.field input, .field textarea {
  width: 100%; margin-top: 8px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: var(--line) solid var(--grey-300);
  border-radius: 0; padding: 10px 0;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); outline: none; }
.field--check { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; }
.field--check input { width: auto; margin: 5px 0 0; }
.btn {
  margin-top: 32px;
  display: inline-block; font: inherit; font-size: 15px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 0; padding: 15px 34px; cursor: pointer;
}
.btn:hover { background: #1b2a36; }
.form-note { margin-top: 16px; font-size: 13px; color: var(--text-faint); }

/* ------------------------------------------------------------ footer --- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: var(--footer-top); }
.site-footer__top {
  display: grid; grid-template-columns: 1fr auto auto; gap: 80px;
  padding-bottom: 56px;
}
.site-footer__logo img { width: 240px; height: auto; }
.site-footer nav a { display: block; font-size: 15px; line-height: 2.1; text-decoration: none; color: var(--grey-300); }
.site-footer nav a:hover { color: var(--paper); }
.site-footer address { font-style: normal; font-size: 15px; line-height: 2.1; color: var(--text-faint); }
.site-footer address strong { font-weight: 400; color: var(--grey-300); display: block; }
.site-footer__bottom {
  border-top: var(--line) solid var(--hairline-on-ink);
  padding-block: 26px;
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 13px; color: var(--text-faint);
}
.site-footer__bottom a { color: var(--text-faint); text-decoration: none; }
.site-footer__bottom a:hover { color: var(--paper); }
.site-footer__legal { display: flex; gap: 26px; }

/* ------------------------------------------------------------ 404 ------ */
.center-page { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }

/* ===================================================== responsive ======= */
@media (max-width: 1100px) {
  :root { --side-margin: 56px; --section-y: 104px; --section-y-last: 120px; --hero-top: 96px; }
  .display { font-size: 66px; }
  h1, .h1 { font-size: 56px; }
  .people { gap: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .site-footer__top { gap: 48px; }
}

@media (max-width: 760px) {
  :root {
    --side-margin: 20px;
    --nav-height: 60px;
    --section-y: 76px;
    --section-y-last: 84px;
    --hero-top: 64px;
  }
  body { font-size: 15px; }

  .display { font-size: 60px; line-height: 1.04; }
  h1, .h1 { font-size: 50px; line-height: 1.06; }
  h2, .h2 { font-size: 28px; }
  .h3-lg { font-size: 26px; }
  h3, .h3 { font-size: 24px; line-height: 1.2; }
  .h3-sm { font-size: 20px; }
  .lead-lg, .lead { font-size: 21px; line-height: 1.55; }
  .sublead { font-size: 17.5px; line-height: 1.5; }
  .body-lg { font-size: 16px; }
  .caption { font-size: 12.5px; }
  .label { font-size: 11px; }

  /* header → burger */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer; padding: 0;
  }
  .nav-toggle span { display: block; height: 1.5px; background: var(--ink); }
  .site-logo img { width: 150px; }
  .site-footer__logo img { width: 200px; }
  .site-header__inner .lang { display: none; }
  .nav {
    position: fixed; inset: var(--nav-height) 0 auto;
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper);
    border-bottom: var(--line) solid var(--hairline);
    padding: 8px var(--side-margin) 28px;
  }
  .nav[data-open='true'] { display: flex; }
  .nav a { font-size: 22px; padding-block: 14px; width: 100%; border-bottom: 0; }
  .nav a[aria-current='page'] { color: var(--accent); border-bottom: 0; }
  .nav .lang { display: flex; margin-top: 22px; font-size: 14px; gap: 8px; }

  .hero { min-height: 560px; }
  .hero .sublead { max-width: none; }

  .pillars { grid-template-columns: 1fr; }
  .pillars > * { padding: 30px 0 32px; border-left: 0; border-top: var(--line) solid var(--hairline); }
  .pillars > *:first-child { border-top: 0; padding-top: 30px; }

  .band { padding-block: 56px; }
  .band__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .band h2 { font-size: 30px; }

  .defrow { grid-template-columns: 1fr; gap: 10px; padding-block: 24px; }
  .people { grid-template-columns: 1fr; gap: 56px; margin-left: 0; }
  .person__name { font-size: 26px; margin-top: 20px; }
  .person__bio { font-size: 15px; }

  .venture, .venture--flip { grid-template-columns: 1fr; gap: 24px; }
  .venture + .venture { margin-top: 64px; }
  .venture--flip .venture__media { order: 0; }
  .venture__name { font-size: 26px; }
  .venture__logo { max-width: 70%; }
  .venture__text { font-size: 15px; }
  .model { grid-template-columns: 1fr; gap: 36px; }
  .model li { font-size: 15px; line-height: 1.9; }

  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .step__num { font-size: 48px; }

  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .pillars > * { padding: 30px 0 32px; }
  .contact-cols { grid-template-columns: 1fr; gap: 26px; }
  .contact-office, .contact-lines, .contact-cols dd { font-size: 16px; line-height: 1.8; }

  .site-footer__top { grid-template-columns: 1fr; gap: 34px; padding-bottom: 40px; }
  .site-footer__bottom { flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .scroll-hint, .nav-toggle { display: none; }
  body { background: #fff; }
}
