/* ============================================================
   aborghi.fr — shared stylesheet
   Single source of truth for the landing page and case studies.
   ============================================================ */

:root {
  --bg:        #0c0d0f;
  --bg-elev:   #141619;
  --bg-elev-2: #191c21;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);
  --text:      #ecebe7;
  --muted:     #a3a49f;
  --faint:     #6f716c;
  --accent:    #cda15f;
  --accent-2:  #e0bd83;
  --accent-soft: rgba(205, 161, 95, 0.12);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 62ch;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--accent-2); }

a { color: inherit; text-decoration: none; }

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

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: 940px;
  margin-inline: auto;
  padding-inline: clamp(1.4rem, 5vw, 3rem);
}

section { padding-block: clamp(4rem, 9vw, 7rem); }

.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- Typographic details ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 2.4rem;
}
.section-index {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--faint);
  letter-spacing: 0.05em;
  padding-top: 0.15rem;
}
.section-head h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { max-width: var(--measure); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: clamp(6rem, 16vw, 11rem) clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto -10%;
  height: 620px;
  background: radial-gradient(58% 60% at 22% 12%, rgba(205, 161, 95, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

/* Signature network backdrop (assets/hero-net.svg). Sits on the right,
   opposite the warm glow, and fades out at the edges so it never fights
   the copy. Animation lives inside the SVG. */
.hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(92% 92% at 74% 26%, #000 28%, transparent 80%);
          mask-image: radial-gradient(92% 92% at 74% 26%, #000 28%, transparent 80%);
}

.avatar {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 4px rgba(205, 161, 95, 0.06), 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.8rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 640;
  margin: 1.1rem 0 0;
}
/* Oversized, two-line name — surname carried in the accent tint. */
.hero .name {
  font-size: clamp(2.9rem, 10vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 720;
}
.hero .name span { display: block; color: var(--accent-2); }
/* Short accent bar anchoring the name. */
.namebar {
  width: 104px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin: 1.5rem 0 0;
}
.lede {
  font-size: clamp(1.25rem, 3.2vw, 1.6rem);
  line-height: 1.4;
  color: var(--text);
  margin: 1.5rem 0 0;
  max-width: 24ch;
  font-weight: 450;
}
.lede em { color: var(--accent-2); font-style: normal; }
.intro { color: var(--muted); margin: 1.6rem 0 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.6rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.25rem;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 550;
  border: 1px solid var(--line-2);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg, .icon { width: 17px; height: 17px; display: block; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #17130a;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

/* ---- Approach cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 2.4rem;
}
.card { background: var(--bg-elev); padding: 1.9rem 1.7rem; }
.card .k {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0.9rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.card p { color: var(--muted); font-size: 0.96rem; margin: 0; max-width: none; }

.lead { color: var(--muted); font-size: 1.08rem; max-width: 54ch; }
.lead strong { color: var(--text); font-weight: 600; }

/* ---- Case study call-out (on the landing page) ---- */
.case {
  display: block;
  position: relative;
  background:
    linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 50%, var(--accent) 70%, transparent) top / 100% 1px no-repeat,
    radial-gradient(120% 160% at 100% 0%, rgba(205, 161, 95, 0.12), transparent 60%),
    var(--bg-elev);
  border: 1px solid rgba(205, 161, 95, 0.28);
  border-radius: 16px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: 0 24px 50px -28px rgba(205, 161, 95, 0.4);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.case:hover {
  border-color: rgba(224, 189, 131, 0.5);
  background:
    linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 50%, var(--accent) 70%, transparent) top / 100% 1px no-repeat,
    radial-gradient(120% 160% at 100% 0%, rgba(205, 161, 95, 0.18), transparent 60%),
    var(--bg-elev-2);
  transform: translateY(-2px);
  box-shadow: 0 28px 60px -24px rgba(205, 161, 95, 0.5);
}
.case-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--faint);
}
.case h3 {
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0.8rem 0 0;
  max-width: 22ch;
}
.case > p { color: var(--muted); margin: 1.2rem 0 0; }

.metrics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  padding: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
}
.metrics li { display: flex; flex-direction: column; gap: 0.25rem; }
.metrics strong {
  font-size: 1.55rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.metrics span { font-size: 0.88rem; color: var(--muted); max-width: 20ch; }

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  font-weight: 550;
  color: var(--accent-2);
}
.case-link .arrow { transition: transform 0.25s var(--ease); }
.case:hover .case-link .arrow { transform: translateX(4px); }

/* ---- Contact ---- */
.contact p { color: var(--muted); font-size: 1.08rem; margin: 0 0 2rem; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 2.4rem;
  color: var(--faint);
  font-size: 0.88rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
footer a:hover { color: var(--muted); }
.sig { font-family: var(--mono); letter-spacing: 0.03em; }
.footer-end { display: inline-flex; align-items: center; gap: 0.9rem; }
.footer-src { display: inline-flex; color: var(--faint); transition: color 0.15s ease; }
.footer-src .icon { width: 16px; height: 16px; }

/* ============================================================
   Case-study article
   ============================================================ */

.article {
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: clamp(1.4rem, 5vw, 3rem);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2.6rem;
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.backlink:hover { color: var(--accent-2); gap: 0.7rem; }

.article-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.article h1 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 640;
  margin: 1rem 0 0;
}

/* Opening summary — the promise of the piece, set larger. */
.standfirst {
  font-size: clamp(1.14rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  color: var(--text);
  margin: 1.9rem 0 0;
  max-width: none;
}
.standfirst strong { color: var(--accent-2); font-weight: 600; }

.article h2 {
  font-size: clamp(1.3rem, 3.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 3.2rem 0 0;
  scroll-margin-top: 2rem;
}
.article h3 {
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 2.1rem 0 0;
}

.article p { margin: 1.15rem 0 0; }
.article strong { color: var(--text); font-weight: 600; }
.article em { color: var(--accent-2); font-style: italic; }

.article ul, .article ol { margin: 1.2rem 0 0; padding-left: 1.35rem; }
.article li { margin: 0.55rem 0 0; padding-left: 0.25rem; }
.article li::marker { color: var(--accent); }

.article blockquote {
  margin: 1.9rem 0 0;
  padding: 0.1rem 0 0.1rem 1.5rem;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-style: italic;
}
.article blockquote p { margin: 0.7rem 0 0; }
.article blockquote p:first-child { margin-top: 0; }
.article blockquote .attribution {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--faint);
  margin-top: 0.9rem;
}

.article hr.divider { margin: 3rem 0 0; }

figure { margin: 1.6rem 0 0; overflow-x: auto; }
/* Typst's html.frame() bakes an inline width/height style onto the
   svg itself; !important is required to override it. */
figure svg { display: block; width: 100% !important; min-width: 300px; height: auto !important; }
figure figcaption {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  text-align: center;
}

/* Closing results strip, mirrors the landing-page metrics. */
.article .metrics { margin-top: 2.4rem; }

/* Closing call-to-action at the end of each case study. */
.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: clamp(1.1rem, 3vw, 1.6rem);
  margin-top: 3.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.8rem, 4vw, 2.5rem);
}
.cta-avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 4px rgba(205, 161, 95, 0.06), 0 8px 22px rgba(0, 0, 0, 0.4);
  margin-top: 0.25rem;
}
.cta-body { min-width: 0; }
.cta::before {
  content: "";
  position: absolute;
  inset: -55% -10% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(50% 50% at 72% 22%, rgba(205, 161, 95, 0.13), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 {
  font-size: clamp(1.28rem, 3.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.cta p { color: var(--muted); margin: 0.75rem 0 1.6rem; max-width: 44ch; }

/* ---- Responsive & motion ---- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .cta { flex-direction: column; }
  .cta-avatar { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
