/* Mahjani Interactive — site styles
   Palette comes from a tangent-space normal map: a flat surface encodes
   as RGB(128,128,255), which is the periwinkle used throughout. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
}

:root {
  --flat: #8080ff;      /* flat normal */
  --ink: #17153b;       /* text, deep indigo */
  --paper: #f6f5fb;     /* page */
  --lit: #fff4e0;       /* lit surface, warm white */
  --tilt: #c7a6ff;      /* a normal leaning left */
  --line: rgba(23, 21, 59, 0.16);
  --muted: rgba(23, 21, 59, 0.72);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --font: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.16em; }

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

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: 0.4rem;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  padding-block: 1.4rem;
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
}
.wordmark {
  font-weight: 700; font-stretch: 85%; font-size: 1.2rem;
  letter-spacing: -0.01em; text-decoration: none;
}
.site-nav { display: flex; gap: 0.25rem 1.6rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 500; padding-block: 0.25rem; }
.site-nav a:hover { text-decoration: underline; }

.site-header.plain {
  position: static;
  border-bottom: 1px solid var(--line);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(92svh, 56rem);
  display: flex; align-items: flex-end;
  background:
    radial-gradient(60% 70% at 72% 34%, var(--lit) 0%, rgba(255, 244, 224, 0) 62%),
    linear-gradient(135deg, #9a86ff 0%, var(--flat) 45%, #6f9cff 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: -1;
}
.hero .wrap { padding-block: 7rem clamp(2rem, 5vw, 3.5rem); }

.hero h1 {
  font-size: clamp(3rem, 8.2vw, 7.25rem);
  font-weight: 650;
  font-stretch: 78%;
  line-height: 0.92;
  letter-spacing: -0.025em;
  max-width: 13ch;
  text-wrap: balance;
}
.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem 3rem; flex-wrap: wrap;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.hero-lede { max-width: 34rem; font-size: 1.2rem; line-height: 1.45; font-weight: 450; }
.hero-note { font-size: 0.95rem; max-width: 17rem; font-weight: 500; }
.hero-note[hidden] { display: none; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.split > header { position: sticky; top: 2rem; }

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 620;
  font-stretch: 82%;
  line-height: 1;
  letter-spacing: -0.02em;
}
.split > header p { margin-top: 1rem; color: var(--muted); max-width: 22rem; }

/* Services: a ruled list, not cards */
.services > li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.6rem 2rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}
.services > li:first-child { border-top: 0; padding-top: 0; }
.services h3 {
  font-size: 1.45rem; font-weight: 600; font-stretch: 86%;
  line-height: 1.12; letter-spacing: -0.01em;
}
.services p + p { margin-top: 0.6rem; color: var(--muted); font-size: 0.98rem; }

/* Process: a real sequence, so it is numbered */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem clamp(1.5rem, 4vw, 3.5rem);
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 3.4rem; font-weight: 700; font-stretch: 75%;
  line-height: 1; color: var(--flat);
  margin-bottom: 0.5rem;
}
.steps h3 { font-size: 1.2rem; font-weight: 620; margin-bottom: 0.35rem; }
.steps p { color: var(--muted); }

/* Company facts */
.facts { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); }
.facts dt, .facts dd { padding-block: 0.85rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-right: 1.5rem; }
.facts dd { font-weight: 520; }
.facts dt:first-of-type, .facts dd:first-of-type { border-top: 0; padding-top: 0; }
.prose-block { max-width: 40rem; margin-bottom: 2.2rem; }
.prose-block p + p { margin-top: 0.9rem; }

/* Contact band */
.contact { background: var(--flat); }
.contact .wrap { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.contact p { max-width: 34rem; font-size: 1.15rem; font-weight: 450; margin-top: 1rem; }
.contact .mail {
  display: inline-block; margin-top: 1.8rem;
  font-size: clamp(1.5rem, 4.6vw, 3.4rem);
  font-weight: 650; font-stretch: 80%; letter-spacing: -0.02em; line-height: 1.05;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); font-size: 0.95rem; }
.site-footer .wrap {
  padding-block: 2.2rem;
  display: flex; justify-content: space-between; gap: 1.2rem 3rem; flex-wrap: wrap;
}
.site-footer p { max-width: 44rem; opacity: 0.86; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer :focus-visible { outline-color: var(--paper); }

/* ---------- Text pages (legal, privacy) ---------- */

.page-title { background: var(--flat); }
.page-title .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-title h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  font-weight: 650; font-stretch: 78%; line-height: 0.95; letter-spacing: -0.025em;
}
.page-title p { margin-top: 0.8rem; font-weight: 500; }

.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.doc > * { max-width: 42rem; }
.doc h2 { font-size: 1.6rem; margin-top: 2.6rem; margin-bottom: 0.7rem; }
.doc h2:first-child { margin-top: 0; }
.doc p + p, .doc ul + p, .doc p + ul { margin-top: 0.9rem; }
.doc ul { list-style: disc; padding-left: 1.2rem; }
.doc li + li { margin-top: 0.35rem; }
.doc .facts { max-width: 46rem; margin-top: 0.4rem; }

/* Details still to be filled in before publishing */
mark.todo {
  background: #ffe14d; color: #000;
  padding: 0.05em 0.35em; border-radius: 0.2em; font-weight: 600;
}

/* ---------- Small screens ---------- */

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > header { position: static; }
  .services > li { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding-bottom: 0; }
  .facts dd { border-top: 0; padding-top: 0.15rem; }
  .facts dd:first-of-type { padding-top: 0.15rem; }
}
@media (max-width: 34rem) {
  .site-nav { gap: 0.25rem 1rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-top: 8.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
