/* ============================================================
   Providenz — stylesheet
   Laurent Paoletti, freelance web developer
   ============================================================ */

/* ---------- Fonts (self-hosted) ----------
   Drop .woff2 files into /fonts and these @font-face rules
   will pick them up. Suggested filenames included below.
------------------------------------------------------------ */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-VF.woff2') format('woff2-variations'),
       url('fonts/BricolageGrotesque-VF.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/InstrumentSerif-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/InstrumentSerif-Italic.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2');
}

/* ---------- Tokens ---------- */

:root {
  --accent:      #C94A1E;
  --accent-deep: #9E3812;
  --cream:       #FBF0E5;
  --cream-deep:  #F3E2CE;
  --ink:         #2B1810;
  --muted:       #6B5548;
  --paper:       #FFFAF3;
  --rule:        #E7D4BD;

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------- Base ---------- */

/* Skip links (a11y) — visible on focus only */
.skip-links {
  margin: 0;
  padding: 0;
  width: 100%;
  list-style: none;
  height: 0;
  background: var(--paper);
  opacity: 0;
  overflow: hidden;
  text-align: center;
}
.skip-links li { display: inline; margin-right: 1rem; }
.skip-links li a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.skip-links:focus-within {
  padding: 0.75rem;
  opacity: 1;
  z-index: 300;
  height: auto;
  border-bottom: 1px solid var(--rule);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a       { color: inherit; text-decoration: none; }
img     { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

/* ---------- Nav ---------- */

.nav-bg {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 20px;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 18px; }
.brand-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
  display: block;
  margin-top: -10px;
}
.brand .tagline {
  font-size: 13px;
  color: var(--accent);
  line-height: 1.2;
  padding-left: 18px;
  border-left: 1px solid var(--rule);
  align-self: center;
}

.nav-right  { display: flex; align-items: center; gap: 28px; }
.nav-links  { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* Language toggle — two plain <a> links, CSS marks the current one. */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
}
.lang-toggle a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.lang-toggle a[aria-current="page"] {
  background: var(--accent);
  color: var(--cream);
}

@media (max-width: 920px) { .brand .tagline { display: none; } }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { flex-wrap: wrap; }
}

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

.hero { padding: 6px 0 40px; }
.hero-illus {
  width: 100vw;
  max-width: 100%;
  display: block;
  max-height: 520px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  padding-top: 36px;
}
@media (max-width: 860px) { .hero-body { grid-template-columns: 1fr; gap: 28px; } }

.hero-title {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.1;
}
.hero-underline {
  width: 64px; height: 2px; background: var(--accent);
  border: 0; margin: 18px 0 22px;
}
.hero-lede {
  font-size: clamp(19px, 1.6vw, 22px);
  color: var(--accent);
  line-height: 1.35;
  max-width: 34ch;
  margin: 0;
}
.hero-scroll {
  justify-self: end;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-scroll .line {
  width: 40px; height: 1px; background: var(--muted);
}

/* ---------- Section scaffolding ---------- */

section.block { padding: 110px 0 20px; position: relative; }
@media (max-width: 720px) { section.block { padding: 72px 0 10px; } }

/* Decorative cutouts from the hero */
.cutout {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.cutout.c-lolo   { top: 84px; right: 0;   width: 130px; height: 130px; transform: rotate(-4deg); }
.cutout.c-flag   { top: 94px; right: 10px; transform: rotate(5deg); }
.cutout.c-coffee { top: 96px; right: 0;   width: 120px; height: 120px; transform: rotate(-6deg); }
.cutout.c-marmot { top: 20px; right: 40px; width: 120px; height: 120px; transform: rotate(3deg); z-index: 3; }

@media (max-width: 860px) {
  .cutout { width: 80px !important; height: 80px !important; top: 48px !important; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.eyebrow .num { color: var(--muted); }
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px; height: 1px; background: var(--accent);
}

.section-title {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  white-space: nowrap;
  margin-bottom: 14px;
}
@media (max-width: 860px) {
  .section-title { white-space: normal; font-size: clamp(28px, 6vw, 40px); }
}
.section-title em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
}
.section-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 60ch;
  line-height: 1.55;
  margin: 0 0 48px;
}

/* ---------- About ---------- */

.about {
  background: var(--paper);
  border-radius: 18px;
  padding: 56px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) {
  .about { padding: 40px 28px; grid-template-columns: 1fr; gap: 24px; }
}
.about p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}
.about .lead-cap {
  float: left;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 58px;
  line-height: 0.9;
  color: var(--accent);
  padding: 6px 10px 0 0;
}
.principles {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 14px;
}
.principles li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 15.5px;
  color: var(--muted);
}
.principles .mark {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}
.principles strong { color: var(--ink); font-weight: 600; }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }

.service {
  padding: 40px 36px 44px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background .3s ease;
}
.service:nth-child(3n) { border-right: 0; }
@media (max-width: 860px) {
  .service { border-right: 0; padding: 32px 0; }
}
.service:hover { background: var(--paper); }

.service-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.15em;
}
.service h3 {
  font-size: 22px;
  margin: 20px 0 14px;
  line-height: 1.15;
  max-width: 16ch;
}
.service p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.service-mark {
  position: absolute;
  top: 36px; right: 28px;
  width: 28px; height: 28px;
  color: var(--accent);
  opacity: 0.35;
  transition: opacity .3s, transform .3s;
}
.service:hover .service-mark {
  opacity: 1;
  transform: rotate(8deg) scale(1.05);
}

/* ---------- Toolkit ---------- */

.outils {
  background: var(--paper);
  border-radius: 18px;
  padding: 56px 56px 48px;
}
@media (max-width: 720px) { .outils { padding: 36px 24px; } }

.stack-group + .stack-group { margin-top: 32px; }
.stack-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 14.5px;
  background: var(--cream);
  transition: border-color .2s, color .2s, transform .2s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
.chip.primary {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
}
.chip.primary .dot { background: var(--cream); opacity: 1; }

.principles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px dashed var(--rule);
}
@media (max-width: 720px) {
  .principles-row { grid-template-columns: 1fr; gap: 24px; }
}
.principle h5 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--accent);
  margin: 0 0 8px;
}
.principle p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Engagement ---------- */

.engagement {
  background: var(--ink);
  color: var(--cream);
  border-radius: 22px;
  padding: 72px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .engagement { padding: 48px 28px; border-radius: 16px; }
}
.engagement::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right,
              rgba(201, 74, 30, 0.35), transparent 55%);
  pointer-events: none;
}
.engagement > * { position: relative; }
.engagement .eyebrow { color: #EFB996; }
.engagement .eyebrow::before { background: #EFB996; }
.engagement h2 {
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.022em;
  margin-bottom: 28px;
}
.engagement h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #F2A978;
}
.engagement-lede {
  max-width: 60ch;
  color: rgba(251, 240, 229, 0.82);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}
.engagement .values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid rgba(239, 185, 150, 0.2);
}
@media (max-width: 720px) {
  .engagement .values { grid-template-columns: 1fr; gap: 28px; }
}
.value h5 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: #F2A978;
  margin: 0 0 8px;
}
.value p {
  margin: 0;
  font-size: 15px;
  color: rgba(251, 240, 229, 0.78);
  line-height: 1.55;
}

/* ---------- Footer ---------- */

footer {
  margin-top: 120px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 720px) {
  footer { grid-template-columns: 1fr; gap: 28px; }
}
footer .f-brand .wordmark {
  height: 36px;
  width: auto;
  display: block;
}
footer .f-brand p {
  margin: 14px 0 0;
  max-width: 36ch;
}
footer h6 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 4px 0 14px;
}
footer ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
footer a { color: var(--ink); transition: color .2s; }
footer a:hover { color: var(--accent); }

.email-link .nospam {
  display: none;
}

footer .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13.5px;
  margin-top: 14px;
}
footer .status .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(201, 74, 30, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(201, 74, 30, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(201, 74, 30, 0); }
  100% { box-shadow: 0 0 0 0   rgba(201, 74, 30, 0); }
}

.footer-legal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  border-top: 1px dashed var(--rule);
}
.footer-legal a { color: inherit; border-bottom: 1px solid var(--rule); text-transform: none; }
.footer-legal a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-legal .built-with { text-align: center; }
.footer-legal .heart { color: var(--accent); text-transform: none; font-size: 13px; vertical-align: -1px; }
@media (max-width: 720px) {
  .footer-legal {
    flex-direction: column;
    gap: 10px;
    padding: 24px 22px 32px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
