/* ============================================================
   STAFFBOARD — landing page
   Direction: pixel brutalism. Cool paper, full-strength ink,
   one ember accent, zero radius, hard offset shadows.
   ============================================================ */

/* ---------- 1. TOKENS ---------------------------------------------------- */
:root {
  /* neutrals — 70-90% of pixels */
  --bg:        #eef0ec;
  --surface:   #ffffff;
  --fg:        #12140f;
  --muted:     #5a5f56;
  --border:    #12140f;
  --invert-fg: #f6f7f4;
  --invert-muted: #a7ada2;

  /* accent — one only, max 2 visible uses per screen.
     --accent is a FILL (3.4:1 vs white — ok for UI, not for text).
     --accent-ink is the same hue darkened to 5.4:1 for accent-coloured text. */
  --accent:     #ff4a17;
  --accent-ink: #c8300a;

  /* status */
  --live:      #1c7a4a;

  /* type */
  --font-display: 'Silkscreen', 'Courier New', ui-monospace, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
               Arial, sans-serif;

  /* structure */
  --stroke: 2px;
  --shadow: 6px 6px 0 var(--fg);
  --shadow-sm: 4px 4px 0 var(--fg);
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1240px;
}

/* ---------- 2. RESET + BASE ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
svg { shape-rendering: crispEdges; }

a { color: inherit; }

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

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

/* ---------- 3. TYPOGRAPHY ------------------------------------------------ */
.h-display,
.h-1, .h-2, .h-3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0; /* bitmap faces are already tight — negative tracking collides pixels */
  text-wrap: balance;
}
.h-display { font-size: clamp(30px, 5.4vw, 60px); }
.h-1       { font-size: clamp(24px, 3.4vw, 40px); }
.h-2       { font-size: clamp(19px, 2.1vw, 26px); line-height: 1.2; }
.h-3       { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.35; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
}

.lead {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  max-width: 58ch;
  color: var(--fg);
  text-wrap: pretty;
}

.body { max-width: 62ch; color: var(--muted); text-wrap: pretty; }

.mono-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- 4. LAYOUT ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 108px); }
/* anchors must clear the sticky header */
section[id] { scroll-margin-top: 82px; }
.section--tight { padding-block: clamp(44px, 6vw, 76px); }

.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .h-1 { margin-top: 10px; }
.section-head .body { margin-top: 14px; }

.rule {
  border: 0;
  border-top: var(--stroke) solid var(--border);
}

/* ---------- 5. PIXEL TEXTURE (one use, hero only) ------------------------ */
.dither {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--fg) 1px, transparent 1px),
    linear-gradient(to bottom, var(--fg) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.05;
}

/* ---------- 6. BUTTONS --------------------------------------------------- */
.btn {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: var(--stroke) solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--fg); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--fg); }

.btn--primary { background: var(--accent); color: var(--fg); }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }

.btn--invert {
  background: var(--invert-fg);
  color: var(--fg);
  border-color: var(--invert-fg);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.22);
}
.btn--invert:hover { box-shadow: 5px 5px 0 rgba(255, 255, 255, 0.22); }
.btn--invert:active { box-shadow: 0 0 0 rgba(255, 255, 255, 0); }

/* ---------- 7. HEADER ---------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: var(--stroke) solid var(--border);
}
.header__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.logo__mark { width: 22px; height: 22px; color: var(--fg); }
.logo__word {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.nav { display: flex; gap: 22px; }
.nav a {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: var(--stroke) solid transparent;
}
.nav a:hover { border-bottom-color: var(--fg); }

/* language selector */
.langs {
  display: flex;
  border: var(--stroke) solid var(--border);
  background: var(--surface);
}
.langs button {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-right: var(--stroke) solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.langs button:last-child { border-right: 0; }
.langs button[aria-pressed='true'] { background: var(--fg); color: var(--invert-fg); }

.nav-toggle { display: none; }

/* ---------- 8. HERO ------------------------------------------------------ */
.hero { position: relative; overflow: hidden; border-bottom: var(--stroke) solid var(--border); }
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(48px, 7vw, 96px);
}
.hero__copy > * + * { margin-top: 20px; }

/* the ::selection look, made permanent on the hero headline.
   clone = every wrapped line gets its own padded block, so it reads as
   selection bars instead of one rectangle over the ragged right edge. */
.hero__copy .h-display { line-height: 1.36; }
.hero__copy .hl {
  background: var(--accent);
  color: var(--fg);
  padding: 0.1em 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* invert on real selection, otherwise selecting the headline shows nothing */
.hero__copy .hl::selection { background: var(--fg); color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px !important; }
.hero__note {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 22px !important;
}

/* the one flourish: pixel-art panel. The illustration keeps its own palette
   (deliberate exception) — the brutal frame is what ties it to the system. */
.hero__art {
  width: min(100%, 460px);
  margin: 0 0 0 auto;
  padding: 8px;
  background: var(--surface);
  border: var(--stroke) solid var(--border);
  box-shadow: var(--shadow);
}
.hero__art img { width: 100%; height: auto; image-rendering: pixelated; }

/* ---------- 8b. MARQUEE (ink band, borrowed from the Lovable draft) ------- */
.marquee {
  overflow: hidden;
  background: var(--fg);
  color: var(--invert-fg);
  border-bottom: var(--stroke) solid var(--border);
  padding-block: 11px;
}
.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.09em;
  animation: sb-marquee 28s linear infinite;
}
/* padding (not gap/margin) so each span has identical box width and the
   -50% translate lands exactly on a copy boundary — seamless loop */
.marquee__track span { padding-right: 56px; }
@keyframes sb-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- 9. SERVICES -------------------------------------------------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 0;
  border: var(--stroke) solid var(--border);
  background: var(--surface);
}
.svc {
  padding: clamp(22px, 2.6vw, 32px);
  border-right: var(--stroke) solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.svc:last-child { border-right: 0; }
.svc__icon { width: 34px; height: 34px; color: var(--fg); }
.svc__body { color: var(--muted); font-size: 15px; }
.svc__num {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--muted);
}

/* ---------- 10. WORK ----------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(20px, 2.6vw, 28px);
}
.card {
  background: var(--surface);
  border: var(--stroke) solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: var(--stroke) solid var(--border);
}
/* pixel-art panel per product — own palette by design, framed by the border */
.card__art {
  border-bottom: var(--stroke) solid var(--border);
  padding: 18px;
  display: grid;
  place-items: center;
}
.card__art img { width: min(100%, 240px); height: auto; image-rendering: pixelated; }
.card__body { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 16px; flex: 1; }
.card__desc { color: var(--muted); font-size: 15px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--live);
}
.status::before {
  content: '';
  width: 8px; height: 8px;
  background: currentColor;
}
.status--wip { color: var(--muted); }

.feats { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.feats li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.5;
}
.feats li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  background: var(--fg);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.07em;
  padding: 5px 8px;
  border: var(--stroke) solid var(--border);
  color: var(--muted);
}

/* the card's outbound link, promoted to a button (composes with .btn).
   11px / 16px padding instead of the .btn default so the longest label
   ("barber.staffboard.com.br") still clears a 320px card at 360px viewport. */
.card__cta {
  margin-top: auto;
  align-self: flex-start;
  max-width: 100%;
  font-size: 11px;
  padding: 0 16px;
}
.card__cta span:last-child { transition: transform 0.1s steps(2); }
.card__cta:hover span:last-child { transform: translateX(4px); }

.work-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- 11. METHOD (inverted band) ----------------------------------- */
.method {
  background: var(--fg);
  color: var(--invert-fg);
  border-block: var(--stroke) solid var(--border);
}
.method .eyebrow { color: var(--invert-muted); }
.method .body { color: var(--invert-muted); }
.method__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.method__copy > * + * { margin-top: 18px; }

.proofs { display: flex; flex-direction: column; }
.proof {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.proof:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.proof__k {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.proof__v { font-size: 14px; color: var(--invert-muted); line-height: 1.5; }

/* ---------- 12. CONTACT -------------------------------------------------- */
/* honeypot: off-screen, not display:none — some bots skip hidden inputs */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.form {
  background: var(--surface);
  border: var(--stroke) solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  /* 14px rather than 18px: each field now carries a reserved error slot,
     so the rhythm between rows stays close to what it was before */
  gap: 14px;
}
/* align-content:start stops the grid rows from stretching. Without it, a field
   showing an error grows taller and its neighbour in the same .form__row
   stretches its input to match — the two inputs stop lining up. */
.field { display: grid; gap: 7px; align-content: start; }
.field > label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field .opt { color: var(--muted); }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  border: var(--stroke) solid var(--border);
  min-height: 48px;
  padding: 12px 14px;
  width: 100%;
  border-radius: 0;
  appearance: none;
}
.field textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%),
                    linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.field[data-invalid='true'] input,
.field[data-invalid='true'] select { border-color: var(--accent); }

/* the slot is always reserved, so showing or clearing an error never shifts
   the rest of the form down. Empty it just renders as blank space. */
.err {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--accent-ink);
  min-height: 1.35em;
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__foot { display: flex; flex-direction: column; gap: 12px; }
.form__note { font-size: 12.5px; color: var(--muted); }

.sent {
  border: var(--stroke) solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(26px, 3.4vw, 40px);
  display: grid;
  gap: 14px;
  place-items: start;
}
.sent__mark { width: 40px; height: 40px; color: var(--fg); }
[hidden] { display: none !important; }

.contact__side > * + * { margin-top: 18px; }
.direct {
  border: var(--stroke) solid var(--border);
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}
.direct a {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: var(--stroke) solid var(--fg);
  justify-self: start;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* ---------- 13. FOOTER --------------------------------------------------- */
.footer {
  border-top: var(--stroke) solid var(--border);
  padding-block: 30px;
}
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 26px;
}
.footer__bar .logo { margin-right: auto; }
.footer small {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer nav a:hover { color: var(--fg); }

/* ---------- 14. RESPONSIVE ----------------------------------------------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__art { margin-left: 0; }
  .method__grid,
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .svc { border-right: 0; border-bottom: var(--stroke) solid var(--border); }
  .svc:last-child { border-bottom: 0; }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc:nth-child(odd) { border-right: var(--stroke) solid var(--border); }
  .svc:nth-child(3), .svc:nth-child(4) { border-bottom: 0; }
}

@media (max-width: 1000px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: var(--stroke) solid var(--border);
    padding: 6px var(--gutter) 14px;
  }
  .nav[data-open='true'] { display: flex; }
  .nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(18, 20, 15, 0.12);
  }
  .nav a:last-child { border-bottom: 0; }
  .header__bar { position: relative; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    border: var(--stroke) solid var(--border);
    background: var(--surface);
    cursor: pointer;
    color: var(--fg);
  }
  .header__bar > .btn { display: none; }
}

@media (max-width: 620px) {
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .svc { border-right: 0 !important; border-bottom: var(--stroke) solid var(--border); }
  .svc:last-child { border-bottom: 0; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { width: 100%; }
  .header__bar { gap: 12px; }
  :root { --shadow: 4px 4px 0 var(--fg); }
}

@media (max-width: 400px) {
  .logo__word { font-size: 13px; }
  .logo__mark { width: 18px; height: 18px; }
  .langs button { padding: 0 8px; min-height: 30px; }
  .footer__bar { gap: 12px 18px; }
}

/* ---------- 15. PRINT ---------------------------------------------------- */
@media print {
  .header, .nav-toggle, .langs { display: none !important; }
  body { background: #fff; }
  .card, .form { box-shadow: none; }
}
