/* Caio Barreto · portfolio. Editorial de engenharia, rubro-negro sóbrio, sem framework. */
:root {
  --bg: #0A0A0C;
  --bg-raise: #0F0F13;
  --accent: #E84A50;
  --accent-deep: #C52613;
  --text: #EDEDEF;
  --prose: #C9C9CF;
  --muted: #A3A3AC;
  --faint: #8A8A93;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --radius: 4px;
  --container: 1080px;
  --gutter: 24px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip {
  position: absolute;
  left: -9999px;
  top: 16px;
  z-index: 50;
  background: var(--accent-deep);
  color: #fff;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip:focus { left: 16px; }

.top-bar { height: 3px; background: var(--accent-deep); }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }
.brand-dot { color: var(--accent-deep); }
.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }

/* DECORAÇÃO: listras 135° (única alusão geométrica) */
.stripes {
  position: absolute;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(197, 38, 19, 0.5) 0px, rgba(197, 38, 19, 0.5) 2px, transparent 2px, transparent 17px);
}
.stripes-hero { right: -40px; top: 64px; width: 300px; height: 300px; opacity: 0.5; }
.stripes-contact { left: -60px; bottom: -60px; width: 260px; height: 260px; opacity: 0.4; }
/* Decoração nunca atrás de texto: em tela estreita, some */
@media (max-width: 720px) {
  .stripes { display: none; }
}

/* HERO */
.hero { position: relative; overflow: hidden; }
.hero-inner { padding-top: 104px; padding-bottom: 88px; position: relative; }
.kicker {
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 820px;
}
.accent { color: var(--accent); }
.lead {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.6;
  color: #B9B9C1;
  max-width: 660px;
  text-wrap: pretty;
}
.cta-row { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; align-items: center; }

/* BOTÕES E LINKS */
.btn-primary {
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent); }
.btn-lg { font-size: 16px; padding: 15px 30px; }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-copy {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }

/* BANDAS E CABEÇALHOS DE SEÇÃO */
.band { background: var(--bg-raise); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { padding-top: 88px; padding-bottom: 88px; }
.band-inner-sm { padding-top: 72px; padding-bottom: 72px; }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 56px; }
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.rule { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.10); }

/* CASE STUDIES */
.cases { padding-top: 24px; }
.case { display: flex; flex-wrap: wrap; gap: 48px; padding: 64px 0; border-bottom: 1px solid var(--line); }
.case-flagship { padding: 0; border-bottom: none; }
.case-last { border-bottom: none; }

.case-meta {
  flex: 1 1 230px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12.5px;
}
.meta-group { display: flex; flex-direction: column; gap: 6px; }
.meta-label { color: var(--faint); letter-spacing: 0.08em; }
.meta-value { color: var(--text); }
.case-num { font-size: 30px; color: var(--accent); font-weight: 500; }
.meta-link { color: var(--accent); text-decoration: none; }
.meta-link:hover { text-decoration: underline; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 3px;
  color: var(--muted);
}

.case-body { flex: 999 1 460px; display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.case-head { display: flex; flex-direction: column; gap: 10px; }
.case-title { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; font-weight: 600; line-height: 1.15; }
.case-title-lg { font-size: clamp(28px, 3.6vw, 38px); }
.case-sub { font-family: var(--serif); font-size: 17px; color: var(--muted); font-style: italic; }
.case-flagship .case-sub { font-size: 18px; }

.case-block { display: flex; flex-direction: column; gap: 13px; }
.case-h3 {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}
.case-prose { font-family: var(--serif); font-size: 17px; line-height: 1.65; color: var(--prose); text-wrap: pretty; }
.case-flagship .case-prose { font-size: 17.5px; }

.decision { display: flex; gap: 16px; }
.decision-num { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.decision p { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--prose); text-wrap: pretty; }
.case-flagship .decision p { font-size: 17px; }

.metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.metric {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #D7A0A3;
  background: rgba(197, 38, 19, 0.10);
  border: 1px dashed rgba(232, 74, 80, 0.45);
  padding: 5px 10px;
  border-radius: var(--radius);
}

/* STACK */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.stack-group { display: flex; flex-direction: column; gap: 12px; }
.stack-group h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.stack-group p { font-family: var(--mono); font-size: 13px; line-height: 2; color: var(--muted); }

/* SOBRE */
.about { padding-top: 80px; padding-bottom: 80px; }
.about .section-head { margin-bottom: 36px; }
.about-prose {
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.6;
  color: var(--prose);
  max-width: 720px;
  text-wrap: pretty;
}
.about-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 74, 80, 0.4);
  transition: border-color 0.15s;
}
.about-prose a:hover { border-bottom-color: var(--accent); }

/* CONTATO */
.contact { border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact-inner { padding-top: 96px; padding-bottom: 104px; position: relative; }
.contact-h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -0.02em; font-weight: 600; max-width: 640px; line-height: 1.12; }
.contact-sub { margin-top: 18px; font-family: var(--serif); font-size: 18px; color: var(--muted); max-width: 560px; line-height: 1.6; text-wrap: pretty; }
.contact .cta-row { margin-top: 36px; }
.mono-links { display: flex; gap: 26px; margin-top: 32px; font-family: var(--mono); font-size: 13px; }
.mono-links a { color: var(--muted); text-decoration: none; }
.mono-links a:hover { color: var(--accent); }

/* FOOTER */
footer { border-top: 1px solid var(--line); }
.foot-inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
