/* ============================================================
   Wegers — shared structural base
   All visual identity comes from CSS variables set per site.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: var(--display-weight, 600); line-height: 1.04; letter-spacing: var(--display-tracking, -0.02em); }

.wrap { max-width: var(--maxw, 1240px); margin: 0 auto; padding-inline: var(--pad, clamp(20px, 5vw, 64px)); }
.sec-pad { padding: clamp(72px, 9vw, 132px) 0; }
section { position: relative; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }

/* ---------- Section head ---------- */
.sec-head { max-width: 64ch; }
.sec-head h2 { font-size: clamp(30px, 4.6vw, 56px); margin-top: 16px; }
.sec-head p { color: var(--ink-soft); margin-top: 18px; font-size: 18px; max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em;
  padding: 13px 22px;
  border-radius: var(--btn-radius, 100px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent, #fff); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--accent-glow, none); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Nav ---------- */
header.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; flex: none; }
.brand .dot {
  width: 26px; height: 28px; flex: none;
  background: var(--mark-bg, var(--accent));
  clip-path: polygon(12% 2%, 100% 50%, 12% 98%);
  transition: transform .25s ease, background .25s ease;
}
.brand:hover .dot { transform: translateX(3px) rotate(8deg); }
.brand .b-sub { color: var(--accent); }

.nav-mid { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); font-weight: 500; position: relative; transition: color .2s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; height: 1.5px; width: 0; background: var(--accent); transition: width .25s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 14px; flex: none; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle span { display: block; width: 18px; height: 1.6px; background: var(--ink); position: relative; transition: transform .25s ease; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; background: var(--ink); transition: transform .25s ease, top .25s ease; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Brand switcher (family) ---------- */
.switch { display: inline-flex; align-items: center; padding: 4px; border: 1px solid var(--line-strong); border-radius: 100px; gap: 2px; }
.switch a {
  font-family: var(--font-display); font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 100px; color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.switch a:hover { color: var(--ink); }
.switch a.active { background: var(--accent); color: var(--on-accent, #fff); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 76px 0 0 0; z-index: 99;
  background: var(--paper);
  transform: translateY(-115%);
  transition: transform .4s cubic-bezier(.7,0,.2,1);
  padding: 28px var(--pad, 24px) 40px;
  display: flex; flex-direction: column; gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-y: auto;
}
body.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a.m-link { font-family: var(--font-display); font-size: 28px; font-weight: 500; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.mobile-menu .switch { margin-top: 22px; align-self: flex-start; }
.mobile-menu .btn { margin-top: 18px; justify-content: center; }

/* ---------- Placeholder ---------- */
.ph {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, var(--ph-a) 0 11px, var(--ph-b) 11px 22px);
  display: flex; align-items: flex-end; justify-content: flex-start; position: relative;
}
.ph .ph-tag {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 7px; margin: 14px; letter-spacing: 0.02em;
}

/* ---------- Marquee ---------- */
.marquee-sec { padding: 38px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.marquee { display: flex; gap: 14px; width: max-content; animation: scroll-x 40s linear infinite; }
.marquee-sec:hover .marquee { animation-play-state: paused; }
.chip { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--ink-soft); padding: 11px 22px; border: 1px solid var(--line-strong); border-radius: 100px; white-space: nowrap; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; flex-wrap: wrap; } }

/* ---------- Form ---------- */
form .field { margin-bottom: 18px; }
form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
form label .req { color: var(--accent); }
form input, form select, form textarea {
  width: 100%; font-family: inherit; font-size: 16px;
  padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--input-radius, 11px);
  background: var(--input-bg, var(--paper)); color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
form textarea { resize: vertical; min-height: 130px; }
form input::placeholder, form textarea::placeholder { color: var(--muted); }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
form .field.invalid input, form .field.invalid select, form .field.invalid textarea { border-color: oklch(0.62 0.2 25); }
form .err { color: oklch(0.62 0.2 25); font-size: 13px; margin-top: 6px; display: none; }
form .field.invalid .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-success { display: none; text-align: center; padding: 40px 24px; border: 1px solid var(--line); border-radius: var(--r, 14px); background: var(--input-bg, var(--paper)); }
.form-success.show { display: block; animation: fade-up .4s ease both; }
.form-success .check { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); display: grid; place-items: center; margin: 0 auto 18px; font-size: 26px; }
.form-success h3 { font-size: 24px; }
.form-success p { color: var(--ink-soft); margin-top: 8px; }

/* ---------- Footer ---------- */
footer.site { background: var(--foot-bg); color: var(--foot-fg); padding: 72px 0 36px; }
.foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; border-bottom: 1px solid var(--foot-line); }
.foot-brand .brand { color: var(--foot-fg); }
.foot-brand p { color: var(--foot-muted); margin-top: 18px; max-width: 32ch; font-size: 15px; }
.foot-fam { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.foot-fam a { font-family: var(--font-display); font-size: 13px; font-weight: 500; padding: 7px 14px; border: 1px solid var(--foot-line); border-radius: 100px; color: var(--foot-muted); transition: border-color .2s, color .2s; }
.foot-fam a:hover { color: var(--foot-fg); border-color: var(--foot-fg); }
.foot-fam a.active { color: var(--accent); border-color: var(--accent); }
.foot-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--foot-muted); margin-bottom: 16px; }
.foot-col a, .foot-col p { display: block; color: var(--foot-fg-soft); padding: 6px 0; font-size: 15px; transition: color .2s ease; }
.foot-col a:hover { color: var(--foot-fg); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; flex-wrap: wrap; }
.foot-bottom .made { font-family: var(--font-mono); font-size: 12.5px; color: var(--foot-muted); letter-spacing: 0.03em; }
.foot-bottom .legal { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-bottom .legal a { font-size: 13.5px; color: var(--foot-muted); }
.foot-bottom .legal a:hover { color: var(--foot-fg); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive base ---------- */
@media (max-width: 1040px) {
  .nav-links, .nav-cta .switch, .nav-cta .btn { display: none; }
  .menu-toggle { display: flex; }
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 460px) {
  .foot-top { grid-template-columns: 1fr; }
}
