/* ====================================================================
   ARCOR INGÉNIERIE — Design tokens & base styles
   ==================================================================== */

:root {
  /* Palette — Paper / Carbone / Safety */
  --paper: #F2EEE6;
  --paper-warm: #ECE6D9;
  --carbon: #0E0C0A;
  --carbon-soft: #1C1916;
  --stone-900: #2A2724;
  --stone-700: #50494A;
  --stone-500: #7E7873;
  --stone-300: #B6AFA4;
  --stone-200: #D9D2C5;
  --stone-100: #E5DECF;
  --accent: #E04A1A;       /* Safety orange */
  --accent-deep: #B8390F;
  --accent-soft: #F7C9B0;
  --line: rgba(14, 12, 10, 0.12);
  --line-strong: rgba(14, 12, 10, 0.28);

  /* Type */
  --font-display: "Bricolage Grotesque", "Söhne", sans-serif;
  --font-sans: "Archivo", "Söhne", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  /* Layout */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--carbon);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ----- Typography scale ----- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-700);
}

.eyebrow-dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 2px;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "wdth" 95;
  font-size: clamp(56px, 11vw, 196px);
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "wdth" 100;
  font-size: clamp(44px, 7vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

.display-sm {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.serif-it {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.45;
  color: var(--stone-900);
  max-width: 56ch;
  text-wrap: pretty;
}

.body { font-size: 16px; line-height: 1.65; color: var(--stone-900); text-wrap: pretty; }
.body p + p { margin-top: 1em; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
.mono-sm { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone-700); }

/* ----- Containers ----- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap-full { padding-left: var(--gutter); padding-right: var(--gutter); }

section { position: relative; }

/* ----- Section header (eyebrow + index) ----- */
.section-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-700);
}
.section-tag .idx { color: var(--carbon); font-weight: 600; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--carbon);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { background: var(--accent); transform: translate(0, -1px); }
.btn .arrow {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--carbon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { background: var(--carbon); color: var(--paper); border-color: var(--carbon); }

/* ----- Placeholder image (construction site stripes) ----- */
.ph {
  position: relative;
  background: linear-gradient(135deg, var(--stone-900) 0%, var(--carbon-soft) 50%, var(--stone-700) 100%);
  overflow: hidden;
  color: var(--paper);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 28px,
      rgba(255,255,255,0.04) 28px,
      rgba(255,255,255,0.04) 56px
    );
  pointer-events: none;
}
.ph-hazard::before {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(224, 74, 26, 0) 0,
      rgba(224, 74, 26, 0) 30px,
      rgba(224, 74, 26, 0.25) 30px,
      rgba(224, 74, 26, 0.25) 60px
    );
}
.ph .ph-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 238, 230, 0.85);
  background: rgba(14, 12, 10, 0.5);
  padding: 6px 10px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.ph .ph-id {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(242, 238, 230, 0.7);
  letter-spacing: 0.12em;
}

/* ----- Marquee / ticker ----- */
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker 60s linear infinite;
}

/* ----- Scroll reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Dark variant ----- */
[data-theme="dark"] {
  --paper: #0E0C0A;
  --paper-warm: #161310;
  --carbon: #F2EEE6;
  --carbon-soft: #ECE6D9;
  --stone-900: #D9D2C5;
  --stone-700: #B6AFA4;
  --stone-500: #7E7873;
  --stone-300: #50494A;
  --stone-200: #2A2724;
  --stone-100: #1C1916;
  --line: rgba(242, 238, 230, 0.12);
  --line-strong: rgba(242, 238, 230, 0.28);
}
