/* ==========================================================================
   SCALEVA — Global stylesheet
   Brand palette (official HEX values — do not change)
   ========================================================================== */
:root {
  --burgundy: #5A0D1C;
  --wine-rose: #8B2D3B;
  --dusty-rose: #C88B94;
  --beige: #E8D9C8;
  --ivory: #F7F4EE;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --header-h: 84px;
}

/* ---------- Fonts (stored locally, SIL Open Font License) ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-latin-700-italic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--burgundy);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--burgundy); color: var(--ivory); }
:focus-visible { outline: 2px solid var(--wine-rose); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--burgundy);
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.75rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
em, .italic { font-style: italic; }
h1 em, h2 em { color: var(--wine-rose); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.bg-beige { background: var(--beige); }
.bg-wine { background: var(--wine-rose); color: var(--ivory); }
.bg-wine h2, .bg-wine h2 em { color: var(--ivory); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .9rem;
  font-family: var(--font-body); font-weight: 500;
  font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--wine-rose); margin: 0 0 1.5rem;
}
.eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: var(--dusty-rose); }
.lead { font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.6; max-width: 34ch; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--burgundy); color: var(--ivory); padding: .75rem 1.25rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  font-family: var(--font-body); font-weight: 500; font-size: .8125rem;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 2rem; border: 1px solid var(--burgundy);
  background: var(--burgundy); color: var(--ivory);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  cursor: pointer;
}
.btn:hover { background: var(--wine-rose); border-color: var(--wine-rose); }
.btn--ghost { background: transparent; color: var(--burgundy); }
.btn--ghost:hover { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.btn--ivory { background: var(--ivory); color: var(--burgundy); border-color: var(--ivory); }
.btn--ivory:hover { background: var(--beige); border-color: var(--beige); color: var(--burgundy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

.text-link {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 500; font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--burgundy);
  padding-bottom: .35rem; border-bottom: 1px solid var(--dusty-rose);
  transition: color .25s ease, border-color .25s ease;
}
.text-link:hover { color: var(--wine-rose); border-color: var(--wine-rose); }
.arrow { display: inline-block; transition: transform .25s ease; }
.text-link:hover .arrow, .btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ivory); border-bottom: 1px solid var(--beige);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 2rem; }
.brand { display: block; flex-shrink: 0; }
.brand img { height: 28px; width: auto; }
.nav { display: flex; align-items: center; gap: 2.5rem; }
.nav-list { display: flex; gap: 2.1rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--burgundy); padding: .4rem 0;
  border-bottom: 1px solid transparent; transition: border-color .25s ease, color .25s ease;
}
.nav-list a:hover { color: var(--wine-rose); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--dusty-rose); }
.nav .btn { padding: .8rem 1.4rem; font-size: .75rem; }
.nav-toggle {
  display: none; background: none; border: 0; padding: .5rem; margin-right: -.5rem;
  cursor: pointer; color: var(--burgundy);
}
.nav-toggle span { display: block; width: 28px; height: 1.5px; background: var(--burgundy); transition: transform .3s ease; }
.nav-toggle span + span { margin-top: 8px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.75px) rotate(-45deg); }

@media (max-width: 1020px) {
  :root { --header-h: 72px; }
  .brand img { height: 24px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem;
    background: var(--ivory); padding: 2.5rem var(--gutter) 3rem;
    transform: translateX(100%); visibility: hidden;
    transition: transform .4s ease, visibility 0s linear .4s;
    overflow-y: auto;
  }
  .nav.is-open { transform: none; visibility: visible; transition: transform .4s ease; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--beige); }
  .nav-list a {
    display: block; padding: 1.1rem 0; border: 0;
    font-family: var(--font-display); font-weight: 700; font-size: 2rem;
    letter-spacing: 0; text-transform: none;
  }
  .nav-list a[aria-current="page"] { color: var(--wine-rose); font-style: italic; }
  .nav .btn { padding: 1.1rem 2rem; font-size: .8125rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Home: hero ---------- */
.hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.hero h1 { font-size: clamp(3rem, 7.6vw, 7.25rem); line-height: .98; letter-spacing: -0.02em; }
.hero h1 .line { display: block; }
.hero-sub { margin: 2.25rem 0 2.5rem; font-size: clamp(1.125rem, 1.5vw, 1.3rem); max-width: 30ch; line-height: 1.55; }
.hero-art { position: relative; aspect-ratio: 4 / 5; max-height: 600px; justify-self: end; width: 100%; max-width: 460px; }
.arch {
  position: absolute; inset: 0;
  background: var(--beige);
  border-radius: 999px 999px 0 0;
}
.arch-inner {
  position: absolute; left: 14%; right: 14%; bottom: 0; top: 16%;
  background: var(--burgundy);
  border-radius: 999px 999px 0 0;
}
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .dot {
  position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%;
  background: var(--dusty-rose); right: -4%; top: 30%;
}

/* ---------- Home: introduction ---------- */
.split { align-items: start; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); }
.intro-statement { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3.4vw, 3rem); line-height: 1.18; letter-spacing: -0.01em; max-width: 22ch; }
.intro-body { margin-top: 2rem; max-width: 46ch; font-size: 1.125rem; }

/* ---------- Home: services overview ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); flex-wrap: wrap; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--burgundy); }
.trio-item { padding: 2.25rem 2.5rem 0 0; }
.trio-item + .trio-item { padding-left: 2.5rem; border-left: 1px solid var(--dusty-rose); }
.num {
  display: block; font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: 1rem; color: var(--wine-rose); margin-bottom: 2.75rem; letter-spacing: .04em;
}
.trio-item h3 { margin-bottom: .9rem; }
.trio-item p { max-width: 30ch; }

/* ---------- Home: industries teaser ---------- */
.industry-cloud {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.3vw, 2.9rem); line-height: 1.35; letter-spacing: -0.01em;
  margin: 0 0 3rem; padding: 0; list-style: none;
}
.industry-cloud li { display: inline; }
.industry-cloud li span { white-space: nowrap; }
.industry-cloud li:nth-child(even) { font-style: italic; color: var(--wine-rose); }
.industry-cloud li:not(:last-child)::after {
  content: ""; display: inline-block; width: .32em; height: .32em; border-radius: 50%;
  background: var(--dusty-rose); margin: 0 .55em; vertical-align: .2em;
}

/* ---------- CTA band ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 18ch; margin: 0 auto 2.5rem; font-size: clamp(2.2rem, 4.6vw, 4rem); }
.cta-rule { width: 1px; height: 64px; background: var(--dusty-rose); margin: 0 auto 2.5rem; }
.bg-wine .cta-rule { background: var(--beige); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--beige); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.page-hero .lead { margin: 0; }

/* ---------- About ---------- */
.beliefs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--burgundy); }
.belief {
  display: grid; grid-template-columns: 5rem minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem; padding: 2.25rem 0; border-bottom: 1px solid var(--dusty-rose); align-items: baseline;
}
.belief .num { margin: 0; }
.belief p { max-width: 42ch; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding-top: 2.75rem; }
.step::before {
  content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--burgundy);
}
.step::after { content: ""; position: absolute; top: 6px; left: 26px; right: -1rem; height: 1px; background: var(--dusty-rose); }
.step:last-child::after { right: 0; }
.step h3 { margin-bottom: .6rem; }

.founder { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center; }
.founder-photo { position: relative; margin: 0; padding: 0 1.25rem 1.25rem 0; }
.founder-photo::before {
  content: ""; position: absolute; top: 1.25rem; left: 1.25rem; right: 0; bottom: 0;
  border: 1px solid var(--dusty-rose);
}
.founder-photo img { position: relative; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.founder-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1; margin: 0 0 .6rem; }
.founder-title { font-size: .8125rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--wine-rose); margin: 0 0 2rem; }
.founder-text p { max-width: 40ch; font-size: 1.125rem; }
.founder-text .text-link { margin-top: 1.75rem; }

/* ---------- Services ---------- */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.service + .service { margin-top: clamp(4.5rem, 9vw, 8rem); }
.service:nth-of-type(even) .service-media { order: 2; }
.service-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 3vw, 2.5rem);
}
.service-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media--beige { background: var(--beige); color: var(--burgundy); }
.media--burgundy { background: var(--burgundy); color: var(--ivory); }
.media--rose { background: var(--dusty-rose); color: var(--burgundy); }
.media-label { font-size: .75rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.media-num {
  font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: clamp(7rem, 16vw, 13rem); line-height: .8; letter-spacing: -0.04em;
}
.media--beige .media-num { color: var(--wine-rose); }
.media--burgundy .media-num { color: var(--dusty-rose); }
.media-mark { position: absolute; right: -18%; top: -12%; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 1px solid currentColor; }
.media--burgundy .media-mark { border-color: var(--wine-rose); }
.media--beige .media-mark { border-color: var(--dusty-rose); }
.media--rose .media-mark { border-color: var(--wine-rose); }
.service h2 { margin-bottom: 1.25rem; }
.service-value { font-size: 1.1875rem; max-width: 36ch; margin-bottom: 2rem; }
.ticks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--beige); max-width: 30rem; }
.ticks li { display: flex; gap: 1rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--beige); }
.ticks li::before { content: ""; flex: 0 0 18px; height: 1px; background: var(--wine-rose); transform: translateY(-.3em); }

/* ---------- Who We Help ---------- */
.industries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 6vw, 6rem); list-style: none; margin: 0; padding: 0; }
.industry {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem;
  padding: 2rem 0; border-top: 1px solid var(--dusty-rose);
}
.industry .num { margin: .35rem 0 0; }
.industry h3 { margin-bottom: .5rem; transition: color .25s ease; }
.industry:hover h3 { color: var(--wine-rose); font-style: italic; }
.industry p { max-width: 34ch; }

.where { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.where h2 { margin-bottom: 1.25rem; }
.where p { max-width: 38ch; }
.countries { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.countries li {
  break-inside: avoid; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem); padding: .7rem 0; border-bottom: 1px solid var(--dusty-rose);
}
.countries li:last-child { font-style: italic; color: var(--wine-rose); }

/* ---------- Contact ---------- */
.contact { padding: clamp(4rem, 9vw, 8rem) 0 clamp(5rem, 10vw, 9rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: end; }
.contact h1 { font-size: clamp(2.8rem, 6.8vw, 6.25rem); line-height: 1; }
.contact-intro { margin: 2rem 0 0; font-size: 1.1875rem; max-width: 34ch; }
.contact-card { background: var(--beige); padding: clamp(2rem, 4vw, 3rem); }
.contact-card .label { font-size: .75rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--wine-rose); margin: 0 0 .75rem; }
.contact-email {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem); text-decoration: none; word-break: break-word;
  border-bottom: 1px solid var(--dusty-rose); padding-bottom: .2rem; margin-bottom: 2rem;
  transition: color .25s ease, border-color .25s ease;
}
.contact-email:hover { color: var(--wine-rose); border-color: var(--wine-rose); }
.contact-card .btn { width: 100%; }
.social-wrap { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--dusty-rose); }

/* ---------- Social icons ---------- */
.social { display: flex; gap: .8rem; list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--burgundy); color: var(--burgundy);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.social a:hover { background: var(--burgundy); color: var(--ivory); }
.social svg { width: 19px; height: 19px; }
.social a.is-pending { cursor: default; border-style: dashed; }
.social a.is-pending:hover { background: transparent; color: var(--burgundy); }
.site-footer .social a { border-color: var(--ivory); color: var(--ivory); }
.site-footer .social a:hover { background: var(--ivory); color: var(--burgundy); }
.site-footer .social a.is-pending:hover { background: transparent; color: var(--ivory); }

/* ---------- Footer ---------- */
.site-footer { background: var(--burgundy); color: var(--ivory); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding-bottom: 2.5rem; border-bottom: 1px solid var(--wine-rose); }
.footer-logo { display: inline-block; background: var(--ivory); padding: 1rem 1.4rem; }
.footer-logo img { height: 26px; width: auto; }
.footer-email { color: var(--ivory); text-decoration: none; font-size: 1.0625rem; border-bottom: 1px solid var(--dusty-rose); padding-bottom: .15rem; }
.footer-email:hover { border-color: var(--ivory); }
.footer-contact { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.75rem; font-size: .8125rem; letter-spacing: .06em; }
.footer-bottom a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid var(--dusty-rose); }
.footer-bottom a:hover { border-color: var(--ivory); }
.footer-bottom p { margin: 0; }

/* ---------- Legal & 404 ---------- */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin: 3rem 0 1rem; }
.prose a { color: var(--wine-rose); }
.prose ul { padding-left: 1.2rem; }
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .media-num { color: var(--dusty-rose); display: block; margin-bottom: 1.5rem; font-size: clamp(6rem, 18vw, 12rem); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .page-hero-grid, .split, .founder, .service, .where, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: start; max-width: 340px; aspect-ratio: 5 / 4; order: -1; display: none; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .trio-item, .trio-item + .trio-item { padding: 2rem 0; border-left: 0; }
  .trio-item + .trio-item { border-top: 1px solid var(--dusty-rose); }
  .num { margin-bottom: 1rem; }
  .belief { grid-template-columns: 3rem minmax(0, 1fr); }
  .belief { row-gap: .6rem; }
  .belief p { grid-column: 2; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 0 0 2.25rem 2.5rem; }
  .step::after { top: 20px; left: 6px; right: auto; bottom: 0; width: 1px; height: auto; }
  .step:last-child::after { display: none; }
  .service:nth-of-type(even) .service-media { order: 0; }
  .service-media { aspect-ratio: 16 / 11; }
  .industries { grid-template-columns: minmax(0, 1fr); }
  .founder-photo { max-width: 520px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .btn-row .btn { width: 100%; }
  .countries { columns: 1; }
  .footer-top, .footer-contact { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media (min-width: 961px) {
  .service:nth-of-type(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}
