@import "/assets/fonts/fonts.css";

/* ============================================================
   Coffee Thinking · sistema visual (Fase 04, editorial/autoral)
   Tokens em 04-design/direcao-visual.md
   ============================================================ */

:root {
  --ct-paper:      #FBF7F1;
  --ct-paper-2:    #F3ECE1;
  --ct-ink:        #1A1613;
  --ct-ink-soft:   #5F564C;
  --ct-hairline:   #E4DACE;
  --ct-card:       #FFFFFF;
  --ct-accent:     #BE4A22;
  --ct-accent-ink: #FBF7F1;
  --ct-accent-hover:#A23D1B;
  --ct-dark:       #16110D;
  --ct-on-dark:    #F1E9DD;
  --ct-on-dark-soft:#B9AC9B;

  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 74rem;
  --wrap-text: 40rem;
  --ease: cubic-bezier(.2,.6,.2,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ct-paper);
  color: var(--ct-ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }

img, video { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: var(--ct-accent); color: var(--ct-accent-ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.measure { max-width: var(--wrap-text); }
.section__head { max-width: var(--wrap-text); }

.eyebrow {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ct-ink-soft); margin: 0 0 1rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.4rem; border-radius: 2px; text-decoration: none;
  background: var(--ct-accent); color: var(--ct-accent-ink);
  border: 1px solid var(--ct-accent); cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--ct-accent-hover); border-color: var(--ct-accent-hover); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(0,0,0,.05); }
.on-dark .btn--ghost { color: var(--ct-on-dark); }
.on-dark .btn--ghost:hover { background: rgba(255,255,255,.1); }

a.link {
  text-decoration: none; border-bottom: 1px solid var(--ct-hairline);
  padding-bottom: 1px; transition: border-color .2s var(--ease), color .2s var(--ease);
}
a.link:hover { color: var(--ct-accent); border-color: var(--ct-accent); }

:focus-visible { outline: 2px solid var(--ct-accent); outline-offset: 2px; border-radius: 1px; }
.on-dark :focus-visible { outline-color: var(--ct-on-dark); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header__in {
  max-width: var(--wrap); margin-inline: auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 768px) { .site-header__in { padding: 18px 32px; } }
.site-header[data-scrolled="true"] { background: var(--ct-paper); border-bottom-color: var(--ct-hairline); }
.site-header.is-hero:not([data-scrolled="true"]) { color: var(--ct-on-dark); }

.brand { display: block; text-decoration: none; color: inherit; }
.logo { display: block; width: auto; height: 50px; }
@media (max-width: 767px) { .logo { height: 40px; } }
.site-header[data-scrolled="true"] .logo { color: var(--ct-ink); }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1.15rem; font-size: .95rem; }
.nav a { text-decoration: none; padding: .3rem 0; transition: color .2s var(--ease); }
.nav a:hover { color: var(--ct-accent); }
.nav .lang { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; }
.nav .lang [aria-current] { color: var(--ct-accent); }

.nav-toggle { display: none; }
@media (max-width: 767px) {
  .nav {
    position: fixed; inset: 0; background: var(--ct-dark); color: var(--ct-on-dark);
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 1.2rem; padding: 0 2rem; font-size: 1.5rem; font-family: var(--serif);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; }
  .nav a:hover { color: var(--ct-accent); }
  .nav .lang { font-size: 1.1rem; margin-top: .6rem; }
  .nav-toggle {
    display: block; position: relative; z-index: 60; background: none; border: 0; cursor: pointer;
    font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
    color: inherit; padding: .4rem;
  }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 86vh; display: flex; align-items: flex-end; overflow: hidden;
  background: var(--ct-dark) center/cover no-repeat; color: var(--ct-on-dark); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,17,13,.15) 0%, rgba(22,17,13,.32) 42%, rgba(22,17,13,.86) 100%); }
.hero__in { position: relative; z-index: 2; max-width: var(--wrap); margin-inline: auto; width: 100%;
  min-width: 0; padding: 6rem 20px 2.8rem; }
.hero .eyebrow { color: var(--ct-on-dark); opacity: .8; }
.hero h1, .hero__sub, .hero__sig { text-shadow: 0 1px 24px rgba(0,0,0,.35); }
@media (min-width: 768px) { .hero__in { padding: 9rem 32px 4rem; } }
.hero h1 { font-size: clamp(2.2rem, 6.2vw, 4rem); max-width: 15ch; margin: 0 0 1rem; }
.hero__sub { font-size: clamp(1rem, 2.1vw, 1.22rem); max-width: 44ch; margin: 0 0 1.1rem; color: var(--ct-on-dark); }
.hero__sig { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ct-on-dark-soft);
  max-width: 40ch; margin: 0 0 1.8rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hero__cta .btn { flex: 0 1 auto; }

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 12vw, 128px); }
.section--paper2 { background: var(--ct-paper-2); }
.section--dark { background: var(--ct-dark); color: var(--ct-on-dark); }
.section--dark .eyebrow { color: var(--ct-on-dark-soft); }
.section__head { max-width: var(--wrap-text); margin-bottom: 2.5rem; }
.section__head h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.lede { font-size: 1.15rem; color: var(--ct-ink-soft); }
.section--dark .lede { color: var(--ct-on-dark-soft); }

/* ---------- grainstorming steps ---------- */
.steps { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none;
  background: var(--ct-hairline); border-block: 1px solid var(--ct-hairline); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { background: var(--ct-paper); padding: 1.6rem 1.4rem; list-style: none; }
.step__n, .step__t, .step__d { display: block; }
.step__n { font-family: var(--mono); font-size: .78rem; color: var(--ct-accent); }
.step__t { font-family: var(--serif); font-size: 1.12rem; margin: .4rem 0 .55rem; line-height: 1.2; }
.step__d { font-size: .95rem; color: var(--ct-ink-soft); margin: 0; }

/* ---------- case grid ---------- */
.cases { display: grid; gap: 2.5rem 2rem; }
@media (min-width: 760px) { .cases { grid-template-columns: 1fr 1fr; } }
.case { text-decoration: none; color: inherit; display: block; }
.case__img, .case__t, .case__meta, .case__r { display: block; }
.case__img { position: relative; aspect-ratio: 16/10; background: var(--ct-paper-2);
  overflow: hidden; border: 1px solid var(--ct-hairline); }
.case__img::after { content: "à venir"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ct-ink-soft); opacity: .5; }
.case__img:has(img)::after { display: none; }
.case__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.case:hover .case__img img { transform: scale(1.04); }
.case__t { font-family: var(--serif); font-size: 1.25rem; margin: .9rem 0 .3rem; transition: color .2s var(--ease); }
.case:hover .case__t { color: var(--ct-accent); }
.case__meta { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ct-ink-soft); }
.case__r { font-size: .95rem; color: var(--ct-ink-soft); margin: .35rem 0 0; }

/* ---------- how it works ---------- */
.how { display: grid; gap: 1.5rem; counter-reset: how; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { list-style: none; padding-top: 1rem; border-top: 1px solid var(--ct-hairline); }
.how li::before { counter-increment: how; content: counter(how, decimal-leading-zero);
  font-family: var(--mono); font-size: .78rem; color: var(--ct-accent); display: block; margin-bottom: .4rem; }

/* ---------- quote / proof ---------- */
.quote { font-family: var(--serif); font-size: clamp(1.3rem, 3.2vw, 2rem); line-height: 1.35; max-width: 24ch; }
.quote cite { display: block; font-family: var(--mono); font-style: normal; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ct-on-dark-soft); margin-top: 1.2rem; }

/* ---------- final cta ---------- */
.cta-final { text-align: left; }
.cta-final h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); max-width: 18ch; margin-bottom: 1.6rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ct-dark); color: var(--ct-on-dark-soft); padding-block: 4rem 3rem; font-size: .92rem; }
.site-footer__logo { display: inline-block; color: var(--ct-on-dark); margin: 0 0 2rem; }
.site-footer__logo .logo { height: 46px; }
.site-footer__sig { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ct-on-dark);
  max-width: 34ch; margin: 0 0 2.5rem; }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-footer a { text-decoration: none; transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--ct-on-dark); }
.site-footer__legal { margin-top: 2.5rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ct-on-dark-soft); }

/* ---------- interior pages ---------- */
.page { padding: 9rem 0 6rem; }
.page__head { max-width: var(--wrap-text); margin-bottom: 3rem; }
.page__head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.prose { max-width: var(--wrap-text); }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.5rem 0 .8rem; }
.prose h3 { font-family: var(--serif); font-size: 1.2rem; margin: 2rem 0 .5rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin: .3rem 0; }
.prose blockquote { border-left: 2px solid var(--ct-accent); margin: 1.5rem 0; padding-left: 1.1rem;
  font-family: var(--serif); font-style: italic; color: var(--ct-ink-soft); }

/* ---------- scroll reveal (progressive enhancement) ----------
   Conteúdo SEMPRE visível por padrão. O JS marca com .pre só os elementos
   que estão de fato abaixo da dobra no load; a IntersectionObserver revela
   (.is-in) ao rolar. Timer de segurança revela tudo depois de 2,5s. */
.js-reveal [data-reveal].pre { opacity: 0; transform: translateY(14px); }
.js-reveal [data-reveal] { transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__bg { display: none; }
  .js-reveal [data-reveal].pre { opacity: 1; transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
