/* base.css — reset + typo */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-mobile) + 12px);
}
@media (min-width: 768px) {
  html { scroll-padding-top: calc(var(--header-h) + 12px); }
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  /* TEX-4 grille fine discrete */
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, iframe, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1em; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: color-mix(in srgb, var(--accent) 70%, var(--text)); }

ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .3em; }

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
}

::selection {
  background: var(--accent);
  color: #fff;
}

::placeholder { color: var(--text-mute); opacity: 1; }

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

/* Scrollbar fine rebrandee */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 65%, var(--text));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { padding: 0 32px; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.muted { color: var(--text-mute); }

/* Underline accent translucide skewed (signature web-factory) */
.h-line {
  position: relative;
  display: inline-block;
}
.h-line::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: 6%;
  height: 0.45em;
  background: var(--accent-line);
  z-index: -1;
  transform: skewX(-8deg);
  border-radius: 2px;
}

/* Italic display */
em.display-em {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

/* Dropcap signature Craft */
.dropcap::first-letter {
  font-family: var(--ff-display);
  font-size: 3.2em;
  float: left;
  line-height: 0.95;
  padding: 0.05em 0.12em 0 0;
  color: var(--accent);
  font-weight: 500;
}
