/* guilhermeciccarelli.com.br — folha única para todas as páginas.
   Direção: papel e tinta, linhas de livro-razão, serifa de display. */

:root {
  --paper:   #f4f1ea;
  --paper-2: #ebe7de;
  --ink:     #16141b;
  --ink-2:   #45414d;
  --muted:   #6a6573; /* 5:1 no papel, 4,6:1 no papel-2 (WCAG AA) */
  --rule:    #d6d1c6;
  --accent:  #5a2bd4;
  --accent-soft: rgba(90, 43, 212, 0.08);

  --display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #121016;
    --paper-2: #1b1921;
    --ink:     #efecf4;
    --ink-2:   #bdb8c7;
    --muted:   #8a8596;
    --rule:    #2d2a35;
    --accent:  #b39cff;
    --accent-soft: rgba(179, 156, 255, 0.10);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

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

/* ── tipografia ─────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(44px, 6.6vw, 86px); line-height: 1; }
h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; }
h3 { font-size: 27px; line-height: 1.1; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; color: var(--ink-2); }
strong { color: var(--ink); font-weight: 600; }
code {
  font: 500 0.86em var(--mono);
  background: var(--paper-2); border: 1px solid var(--rule);
  padding: 1px 6px; border-radius: 4px; color: var(--ink);
}

.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 40em; }

.link {
  color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat;
  transition: background-size .25s, color .2s;
}
.link:hover { color: var(--accent); background-size: 100% 2px; }
.arrow { display: inline-block; transition: transform .2s; }
a:hover .arrow { transform: translate(3px, -3px); }

/* ── nav ────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.nav-name { font: 400 22px/1 var(--display); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 18px; } }
@media (max-width: 380px) { .nav-links { gap: 12px; } .nav-links a { font-size: 13px; } .nav-name { font-size: 17px; } .nav .wrap { gap: 10px; } }

/* ── seções ─────────────────────────────────────────────── */
section { padding: clamp(56px, 7vw, 96px) 0; }
section + section { border-top: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; align-items: end; margin-bottom: 48px; }
.sec-head p { margin: 0; max-width: 34em; }
@media (max-width: 800px) { .sec-head { grid-template-columns: 1fr; } }

/* ── hero ───────────────────────────────────────────────── */
.hero { padding-top: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 80px); align-items: end; }
.hero h1 { margin: 18px 0 28px; }
.hero .lede { margin-bottom: 36px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; border-radius: 3px; filter: saturate(0.9); }
.hero-photo figcaption { margin-top: 10px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: 132px; }
  .hero-photo figcaption { display: none; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font: 500 15px/1 var(--sans); text-decoration: none;
  padding: 15px 22px; border-radius: 999px;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.actions .link { font-size: 15px; }

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ink);
}
.facts div { padding: 16px 20px 0 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 16px; }
}

/* ── livro-razão (lista de trabalhos) ───────────────────── */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger a {
  display: grid; grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 1.6fr) 150px 24px;
  gap: 8px 24px; align-items: baseline;
  padding: 24px 12px 24px 0; text-decoration: none;
  transition: background .2s, padding .2s;
}
.ledger a:hover { background: var(--paper-2); padding-left: 12px; }
.ledger .n { font: 500 13px var(--mono); color: var(--muted); }
.ledger h3 { transition: color .2s; }
.ledger a:hover h3 { color: var(--accent); }
.ledger p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.ledger .tag { font: 500 12px/1.5 var(--mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.ledger .arrow { color: var(--muted); justify-self: end; }
.ledger a:hover .arrow { color: var(--accent); }
.status { display: inline-block; margin-top: 4px; }
.status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--muted); vertical-align: 1px; }
.status.live::before { background: #2f9e5b; }
.status.retired::before { background: transparent; border: 1px solid var(--muted); }
@media (max-width: 860px) {
  .ledger a { grid-template-columns: 32px minmax(0, 1fr) 20px; }
  .ledger p, .ledger .tag { grid-column: 2; }
  .ledger .arrow { grid-column: 3; grid-row: 1; }
}

/* ── built at bee6 ──────────────────────────────────────── */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.shelf h3 { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.shelf ul { list-style: none; margin: 0 0 32px; padding: 0; }
.shelf li { border-bottom: 1px solid var(--rule); }
.shelf a { display: block; padding: 14px 0; text-decoration: none; }
.shelf a strong { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; }
.shelf a span { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.shelf a:hover strong { color: var(--accent); }
@media (max-width: 900px) { .shelf { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .shelf { grid-template-columns: 1fr; } }

/* ── about ──────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; }
.about-grid .prose { max-width: 38em; }
.about-grid .prose p { font-size: 18px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px 20px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.kv dt { font: 500 12px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 12px; } }

/* ── contato ────────────────────────────────────────────── */
.contact h2 { font-size: clamp(40px, 7vw, 88px); line-height: 1; }
.contact .big { font: 400 clamp(26px, 4.4vw, 52px)/1.1 var(--display); text-decoration: none; word-break: break-word; }
.contact .big:hover { color: var(--accent); }
.contact .actions { margin-top: 28px; }

/* ── footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer p { margin: 0; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ── páginas de case ────────────────────────────────────── */
.case-hero { padding-top: clamp(40px, 6vw, 80px); }
.case-hero h1 { font-size: clamp(44px, 6.6vw, 84px); margin: 16px 0 24px; max-width: 14em; }
.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--ink); }
.meta > div { padding: 14px 20px 0 0; }
.meta > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.meta p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 700px) {
  .meta { grid-template-columns: 1fr; }
  .meta > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 14px; }
}

.case-body { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; }
.case-body > h2 { position: sticky; top: 84px; align-self: start; font-size: clamp(30px, 3.6vw, 44px); }
.case-body .prose { max-width: 40em; min-width: 0; }
@media (max-width: 800px) { .case-body { grid-template-columns: 1fr; } .case-body > h2 { position: static; } }

.steps { list-style: none; margin: 28px 0; padding: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step, decimal-leading-zero); font: 500 13px/2 var(--mono); color: var(--muted); grid-row: span 2; }
.steps h3 { font-size: 24px; }
.steps p { margin: 4px 0 0; font-size: 15.5px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 28px 0; }
.cards > div { background: var(--paper); padding: 20px 22px; }
.cards h3 { font-size: 23px; margin-bottom: 6px; }
.cards p { margin: 0; font-size: 15px; }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.tags li { font: 500 12.5px/1 var(--mono); color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 12px; }

.note { border-left: 2px solid var(--accent); background: var(--accent-soft); padding: 18px 22px; margin: 0 0 28px; }
.note p:last-child { margin-bottom: 0; }

.next { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; text-decoration: none; padding: 32px 0; border-top: 1px solid var(--ink); }
.next h2 { transition: color .2s; }
.next:hover h2 { color: var(--accent); }

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

/* ── dentro do visualizador do desktop (iframe) ─────────── */
.embed .nav, .embed footer, .embed .back, .embed section:has(> .wrap > .next) { display: none; }
.embed .case-hero { padding-top: 32px; }
