/* ==========================================================================
   Guilherme Bernardo — Site institucional (protótipo v1)
   ========================================================================== */

:root {
  color-scheme: light;
  --navy-deep: #070c16;
  --navy: #0d1626;
  --navy-soft: #131f34;
  --cream: #f8f4ec;
  --cream-soft: #f1ebdd;
  --ink: #1b2130;
  --muted: #5c6373;
  --muted-light: #8b93a3;
  --gold: #b8934f;
  --gold-light: #d9bb7e;
  --gold-deep: #8f7038;
  --line: rgba(184, 147, 79, 0.28);
  --line-dark: rgba(248, 244, 236, 0.14);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1160px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* Defensive rule: grid items default to a min-width equal to their
   content's min-content size, which can silently force a column (and the
   whole page) wider than the viewport on narrow screens. Resetting it to
   0 lets long words/links/buttons wrap or shrink instead of overflowing. */
.hero-inner > *,
.apresentacao-grid > *,
.pillars > *,
.video-list > *,
.formacao-grid > *,
.sobre-grid > *,
.sobre-columns > *,
.contato-grid > * {
  min-width: 0;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.section-inner,
.header-inner,
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.9em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  border-color: var(--gold);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-outline-light {
  border-color: rgba(248, 244, 236, 0.45);
  color: var(--cream);
}
.btn-outline-light:hover { border-color: var(--gold-light); color: var(--gold-light); }

.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-deep);
  box-shadow: 0 1px 0 var(--line);
  padding: 1rem 0;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo-link { display: block; flex-shrink: 0; }
.logo-img {
  height: 50px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 1.7rem;
  margin: 0 auto 0 2.5rem;
}
.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.78;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.is-active {
  opacity: 1;
  border-color: var(--gold);
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--cream);
  width: 100%;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--navy-deep);
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
}
.mobile-nav a {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
}
.mobile-nav.is-open { display: flex; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: radial-gradient(ellipse 120% 100% at 15% 0%, var(--navy-soft) 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: var(--cream);
  min-height: calc(100svh - 83px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  width: 100%;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  color: var(--cream);
  margin-bottom: 1.6rem;
}
.hero-copy h1 span {
  color: var(--gold-light);
  font-style: italic;
}

.hero-lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 500;
  color: var(--cream);
  max-width: 34em;
  margin-bottom: 1.3rem;
}

.hero-desc {
  color: var(--muted-light);
  max-width: 38em;
  font-size: 1rem;
  margin-bottom: 2.3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-media { position: relative; }
.hero-photo-frame {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
.hero-photo-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,12,22,0) 55%, rgba(7,12,22,0.55) 100%);
}
.hero-photo-frame::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--line);
  z-index: 2;
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Hero tab strip: hidden on desktop (nav already lives in the header
   there); shown on mobile, see media query below, so the person looking
   at the hero immediately sees there are several sections to move
   between, not just one page. */
.hero-tabs { display: none; }

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: var(--line-dark);
}
.scroll-cue span {
  position: absolute;
  top: 0; left: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold-light);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { top: 0; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 46px; opacity: 0; }
}

/* ==========================================================================
   Pages (tab navigation)
   ========================================================================== */
.page { display: none; }
.page.is-active { display: block; }

/* ==========================================================================
   Sections — shared
   ========================================================================== */
.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
}
.section-dark {
  background: var(--navy);
  color: var(--cream);
}

.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.section-dark .section-kicker { color: var(--gold-light); }

.section h2 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  max-width: 18em;
  margin-bottom: 1.4rem;
}

.section-intro {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 42em;
  margin-bottom: 3.5rem;
}
.section-dark .section-intro { color: var(--muted-light); }

/* ==========================================================================
   Apresentação
   ========================================================================== */
.apresentacao-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: var(--gap);
  align-items: start;
  margin-bottom: 5rem;
}
.apresentacao-text p { color: var(--muted); font-size: 1.02rem; }
.apresentacao-media img {
  border-radius: 3px;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}
.pillar-index {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.pillar h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.pillar p { color: var(--muted); font-size: 0.96rem; }

/* ==========================================================================
   Textos
   ========================================================================== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line-dark);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.article-card {
  background: var(--navy);
  padding: 2.6rem 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  cursor: pointer;
  transition: background 0.25s ease;
}
.article-card:hover { background: var(--navy-soft); }
.article-index {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold-deep);
  line-height: 1;
}
.article-meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.9rem;
}
.article-card h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--cream);
  margin-bottom: 0.9rem;
  max-width: 22em;
}
.article-excerpt {
  color: var(--muted-light);
  max-width: 42em;
  margin-bottom: 1.2rem;
}
.article-link {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-light);
}

/* ==========================================================================
   Vídeos
   ========================================================================== */
.video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--ink) center/cover no-repeat;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}
.video-embed::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10, 14, 22, 0.25);
  transition: background 0.2s ease;
}
.video-embed:hover::after { background: rgba(10, 14, 22, 0.1); }
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(248, 244, 236, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.2s ease;
}
.video-embed:hover .video-play { transform: translate(-50%, -50%) scale(1.06); }
.video-play::after {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--navy-deep);
  margin-left: 4px;
}
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-card-body { padding-top: 1.4rem; }
.video-card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.video-card-body p { color: var(--muted); margin-bottom: 0.8rem; }
.video-link {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   Formação
   ========================================================================== */
.formacao { background: var(--cream-soft); }
.formacao-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap);
  align-items: start;
}
.formacao-intro { margin-bottom: 2rem; }
.formacao-text p { color: var(--muted); margin-bottom: 1.1em; }
.formacao-text strong { color: var(--ink); }
.formacao-btn { margin-top: 1.5rem; }

.formacao-card {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(2rem, 3vw, 2.75rem);
  border-radius: 3px;
}
.formacao-card h3 {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}
.formacao-card h3:not(:first-child) { margin-top: 2.4rem; }

.formacao-modulos {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.formacao-modulos li {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--muted-light);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-dark);
}
.formacao-modulos li:last-child { border-bottom: none; padding-bottom: 0; }
.formacao-modulos li span {
  flex-shrink: 0;
  font-family: var(--font-display);
  color: var(--gold-light);
  width: 3.4em;
}

.formacao-preco {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.formacao-preco:last-child { border-bottom: none; }
.formacao-preco strong {
  display: block;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 0.2rem;
}
.formacao-preco span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-light);
}
.formacao-preco em {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.5rem;
  color: var(--gold-light);
  white-space: nowrap;
}

/* ==========================================================================
   Sobre
   ========================================================================== */
.sobre-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--gap);
  align-items: start;
  margin-bottom: 4rem;
}
.sobre-media img {
  border-radius: 3px;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.sobre-text p { color: var(--muted-light); margin-bottom: 1.1em; }

.sobre-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 3rem;
  margin-bottom: 3.5rem;
}
.sobre-col h3 {
  font-size: 1.25rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.sobre-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.sobre-col li {
  color: var(--muted-light);
  font-size: 0.95rem;
  padding-left: 1rem;
  position: relative;
}
.sobre-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 1px;
  background: var(--gold);
}

/* ==========================================================================
   Contato
   ========================================================================== */
.contato { background: var(--cream-soft); }
.contato-inner { text-align: left; }
.contato .section-intro { margin-bottom: 3rem; }

.contato-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--gap);
}

.contato-channels {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.contato-channel {
  background: var(--cream-soft);
  padding: 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: padding-left 0.2s ease;
}
.contato-channel:hover { padding-left: 0.6rem; }
.contato-channel-featured {
  background: var(--navy);
  padding: 1.4rem 1rem;
  margin-bottom: 1px;
}
.contato-channel-featured:hover { padding-left: 1.6rem; }
.contato-channel-featured .contato-channel-label { color: var(--gold-light); }
.contato-channel-featured .contato-channel-value { color: var(--cream); }
.contato-channel-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.contato-channel-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}

.contato-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.contato-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.contato-form input,
.contato-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  color: var(--ink);
  resize: vertical;
}
.contato-form input:focus,
.contato-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.contato-form .btn-primary { margin-top: 0.4rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-deep);
  color: var(--muted-light);
  text-align: center;
  padding: 5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
}
.footer-logo img {
  height: 128px;
  width: auto;
  margin: 0 auto 1.8rem;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-nav span { color: var(--line); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-meta { font-size: 0.85rem; margin-bottom: 0.6rem; }
.footer-copy { font-size: 0.78rem; color: var(--muted); }

/* ==========================================================================
   Article reader overlay
   ========================================================================== */
.article-reader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--cream);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.article-reader.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.article-reader-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(5rem, 8vw, 7rem) clamp(1.25rem, 4vw, 2.5rem) 6rem;
}
.article-close {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  cursor: pointer;
  margin-bottom: 3rem;
  padding: 0;
}
.article-full .article-meta { color: var(--gold-deep); }
.article-full h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 2rem;
}
.article-full p {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.75;
}
.article-reader-footer {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 380px; margin: 0 auto; }
  .apresentacao-grid,
  .sobre-grid,
  .formacao-grid,
  .contato-grid { grid-template-columns: 1fr; }
  .apresentacao-media { order: -1; max-width: 380px; }
  .pillars { grid-template-columns: 1fr; gap: 2.2rem; }
  .sobre-columns { grid-template-columns: 1fr; gap: 2.2rem; }
  .video-list { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero { flex-direction: column; align-items: stretch; }
  .hero-inner { width: 100%; }

  .hero-tabs {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    gap: 0.6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 2rem 0 0;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  }
  .hero-tabs::-webkit-scrollbar { display: none; }
  .hero-tabs a {
    flex-shrink: 0;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cream);
    opacity: 0.7;
    padding: 0.55rem 1rem;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    white-space: nowrap;
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }
  .hero-tabs a.is-active {
    opacity: 1;
    color: var(--navy-deep);
    background: var(--gold-light);
    border-color: var(--gold-light);
  }
  .hero-tabs-contact {
    color: var(--gold-light) !important;
    opacity: 1 !important;
    border-color: var(--gold) !important;
  }
  .hero-tabs-contact.is-active {
    color: var(--navy-deep) !important;
  }

  .article-card { grid-template-columns: 1fr; gap: 0.8rem; }
}
