/* ===========================================================================
   VALIORO — shared brand layer for the multi-page site.
   Black #0A0A0A · Gold #B8962E · Cream #F5F0E8 · Slate #1C2331
   Cormorant Garamond (display) · Geist (sans) · Geist Mono (meta)
   Contrast-corrected per the accessibility review:
     - gold text on cream uses #7A6420 (5.0:1); brand gold lives on dark
     - muted-on-cream is #4A5468; muted-on-black small text is #98A0B0
     - focus outlines: #8E711E on light surfaces, #B8962E on dark
   =========================================================================== */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gold: #B8962E; --gold-light: #D4AF5A; --gold-deep: #8E711E; --gold-dark: #7A6420;
  --night: #0A0A0A; --cream: #F5F0E8; --cream-50: #FBF8F3; --cream-200: #ECE4D6;
  --cream-300: #DCD0BA; --cream-400: #B8AC95;
  --ink: #1C2331; --ink-700: #2C3445; --ink-600: #4A5468; --ink-500: #6B7588; --ink-400: #98A0B0;
  --fog: #BDB6A8; --line: #2A2A2A; --panel: #141414; --scard: #131A26; --sline: #2A3445;
}

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: var(--night); }

/* Gold italic accents inside display headings */
.display em { font-style: italic; font-weight: 400; color: var(--gold); }
.display-oncream em { font-style: italic; font-weight: 400; color: var(--gold-deep); }

/* Language toggle — paired PT/EN spans, one visible */
body[data-lang="pt"] .tr[lang="en"] { display: none !important; }
body[data-lang="en"] .tr[lang="pt"] { display: none !important; }

/* Scroll-reveal initial state (JS only; observer registers at parse time) */
html.js .rv { opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
html.js .rv.in { opacity: 1; transform: none; }

/* ===========================================================================
   NAV — fixed. Starts transparent; body[data-nav-start] sets the resting ink
   (dark pages start cream ink, light pages start black ink). Scrolling past
   60px always switches to the frosted-cream bar.
   =========================================================================== */
#nav { transition: background .25s ease, box-shadow .25s ease, border-color .25s ease; }
#nav.scrolled { background: rgba(245,240,232,0.86); -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--cream-300); }
#nav.scrolled .nav-ink, #nav.scrolled .nav-logo { color: var(--night); }
body[data-nav-start="dark"]  #nav:not(.scrolled) .nav-ink,
body[data-nav-start="dark"]  #nav:not(.scrolled) .nav-logo { color: var(--cream); }
body[data-nav-start="light"] #nav:not(.scrolled) .nav-ink,
body[data-nav-start="light"] #nav:not(.scrolled) .nav-logo { color: var(--night); }

#nav .nav-link { position: relative; }
#nav .nav-link::after { content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1.5px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
#nav .nav-link:hover::after, #nav .nav-link[aria-current="page"]::after { transform: scaleX(1); }
/* Active/hover gold adapts to the nav surface (AA on both) */
body[data-nav-start="dark"] #nav:not(.scrolled) .nav-link[aria-current="page"] { color: var(--gold) !important; }
body[data-nav-start="light"] #nav:not(.scrolled) .nav-link[aria-current="page"],
#nav.scrolled .nav-link[aria-current="page"] { color: var(--gold-dark) !important; }
body[data-nav-start="dark"] #nav:not(.scrolled) .nav-hover:hover { color: var(--gold-light); }
body[data-nav-start="light"] #nav:not(.scrolled) .nav-hover:hover,
#nav.scrolled .nav-hover:hover { color: var(--gold-dark); }
/* Active language chip (specificity beats the nav-ink rules) */
#nav .lang-btn.nav-ink[aria-pressed="true"] { background: var(--gold); color: var(--night); }

/* Mobile menu — full-screen modal overlay */
#mobileMenu { transition: opacity .35s var(--ease-out), visibility .35s; }
#mobileMenu.closed { opacity: 0; visibility: hidden; pointer-events: none; }
#mobileMenu .m-item { opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
#mobileMenu.open .m-item { opacity: 1; transform: none; }

/* ===========================================================================
   COMPONENTS
   =========================================================================== */

/* Buttons — labels may wrap on narrow phones */
.btn { display: inline-flex; align-items: center; gap: 10px; text-align: center;
  font-family: Geist, sans-serif; font-size: 14px; font-weight: 500; letter-spacing: .02em;
  border-radius: 4px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              box-shadow .18s ease, transform .18s ease; }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.btn-primary { background: var(--gold); color: var(--night); padding: 15px 28px; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-glow { box-shadow: 0 0 0 1px rgba(184,150,46,.4), 0 12px 40px -16px rgba(184,150,46,.45); }
.btn-ghost-dark { background: transparent; color: var(--cream); border-color: var(--cream); padding: 15px 28px; }
.btn-ghost-dark:hover { background: var(--cream); color: var(--night); }
.btn-ghost-light { background: transparent; color: var(--night); border-color: var(--night); padding: 15px 28px; }
.btn-ghost-light:hover { background: var(--night); color: var(--cream); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* Eyebrow with gold rule — dark gold on cream, brand gold on dark surfaces */
.eyebrow { display: inline-flex; align-items: center; gap: 14px;
  font-family: Geist, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold-dark); }
.on-dark .eyebrow, .bg-night .eyebrow, .bg-ink .eyebrow { color: var(--gold); }
.eyebrow::before { content: ""; width: 36px; height: 2px; background: var(--gold); flex-shrink: 0; }
.eyebrow-center::before { display: none; }

/* Hover-lift cards */
.lift { transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.lift:hover { transform: translateY(-4px);
  box-shadow: 0 8px 24px -12px rgba(28,35,49,.18), 0 0 0 1px rgba(28,35,49,.06); }

/* 3D tilt cards (JS drives --rx/--ry; desktop pointer only) */
.tilt { transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
html.js .tilt { transition: transform .35s var(--ease-out), box-shadow .3s var(--ease-out); }
html.js .tilt.tilting { transition: box-shadow .3s var(--ease-out); }

/* Link with sliding arrow */
.arrow-link .arr { display: inline-block; color: var(--gold); transition: transform .25s var(--ease-out); }
.arrow-link:hover .arr { transform: translateX(5px); }

/* Form fields — slate border = perceivable boundary (≥3:1) */
.field label { display: block; font-family: Geist, sans-serif; font-size: 12px;
  font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; background: var(--cream-50);
  border: 1px solid var(--ink-500); border-radius: 4px; padding: 13px 15px;
  font-family: Geist, sans-serif; font-size: 15px; color: var(--night); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(142,113,30,.35); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-600); }

/* Honeypot — kept on-page but off-screen so bots fill it and humans never see
   it. Off-screen (not display:none) because some bots skip hidden inputs. */
.hp { position: absolute !important; left: -9999px !important; top: auto;
  width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* Form submit error — injected by valioro.js when the POST fails. Solid light
   chip so it stays legible on both the cream and the dark (night) sections. */
.form-error { margin-top: 14px; padding: 12px 18px; border-radius: 4px;
  border: 1px solid #E0A6A3; background: #FBEDEC; color: #8E2A26;
  font: 14px/1.5 Geist, sans-serif; }

/* Submit button while the request is in flight */
button[aria-busy="true"] { opacity: .65; cursor: progress; }

/* FAQ accordion — collapsed answers leave the accessibility tree */
.faq-panel { display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows .4s var(--ease-out), visibility .4s; }
.faq-item.open .faq-panel { grid-template-rows: 1fr; visibility: visible; }
.faq-panel > div { overflow: hidden; }
.faq-plus { transition: transform .25s var(--ease-out); }
.faq-item.open .faq-plus { transform: rotate(45deg); }

/* Readiness bars: real width without JS, animated with JS */
.bar-fill { width: var(--w); }
html.js .bar-fill { width: 0; transition: width 1.2s var(--ease-out); }
html.js .bar-fill.go { width: var(--w); }

/* Program timeline rule */
html.js #programLine { transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s var(--ease-out); }
html.js #programLine.go { transform: scaleX(1); }

/* Hero entrance (index) — class-based so it never waits on a CDN */
html.js .hi { opacity: 0; transform: translateY(34px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
html.js .hi.go { opacity: 1; transform: none; }

/* ===========================================================================
   PAGE HERO (subpages, cream) + dark variant (investidores)
   =========================================================================== */
.page-hero { background: var(--cream); border-bottom: 1px solid var(--cream-300);
  padding: 168px 0 80px; position: relative; overflow: hidden; }
.page-hero--dark { background: var(--night); border-bottom-color: #1A1A1A; }
@media (max-width: 980px) { .page-hero { padding: 132px 0 56px; } }

/* ===========================================================================
   ARTICLE (blog post)
   =========================================================================== */
.article-body { font-family: Geist, sans-serif; font-size: 18px; line-height: 1.7; color: var(--ink-700); }
.article-body > p:first-of-type { font-size: 22px; line-height: 1.55; color: var(--ink); margin-bottom: 28px; }
.article-body p { margin: 0 0 20px; }
.article-body h2 { font-family: "Cormorant Garamond", serif; font-weight: 500;
  font-size: 32px; letter-spacing: -0.015em; color: var(--night); margin: 56px 0 18px; }
.article-body h3 { font-family: "Cormorant Garamond", serif; font-weight: 500;
  font-size: 24px; letter-spacing: -0.01em; color: var(--night); margin: 36px 0 12px; }
.article-body blockquote { margin: 36px 0; padding: 12px 0 12px 28px;
  border-left: 2px solid var(--gold); font-family: "Cormorant Garamond", serif;
  font-style: italic; font-size: 24px; line-height: 1.45; color: var(--ink); }
.article-body blockquote cite { display: block; font-family: Geist, sans-serif; font-style: normal;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600); margin-top: 14px; }
.article-body ul { margin: 0 0 24px; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 12px; }
.article-body ul li { display: flex; gap: 14px; align-items: flex-start; }
.article-body ul li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px;
  margin-top: 9px; background: var(--gold); transform: rotate(45deg); }
.article-body strong { color: var(--night); font-weight: 600; }

/* Brand fill — finished stand-in where a real photo isn't supplied yet */
.fill { position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(150deg, var(--ink-700), #0F141C); }
.fill::before { content: ""; position: absolute; inset: 0; opacity: .10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='18' viewBox='0 0 14 18' fill='none'%3E%3Cpath d='M2.75 4 V12 M5.25 2 V12 M7 1 V12.5 M8.75 2 V12 M11.25 4 V12' stroke='%23B8962E' stroke-width='1.2'/%3E%3Cpath d='M4 12 L7 16 L10 12' stroke='%23B8962E' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  background-size: 28px; }
.fill-mono { position: relative; font-family: "Cormorant Garamond", serif; font-weight: 500;
  letter-spacing: .04em; line-height: 1; color: var(--gold-light); }

/* Blog card cover */
.blog-cover { aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--cream-200), var(--cream-400)); }
.blog-cover::after { content: ""; position: absolute; inset: 0; opacity: .18;
  /* landscape mark (292x213): 52% height = ~45% width on the 16/10 card,
     ~36% on the 16/8 article hero — fills the cover without crowding it */
  background: url("logos/valioro-v-gold.png") center / auto 52% no-repeat; }

/* ===========================================================================
   CUSTOM CURSOR — gold dot + lagging ring. Pointer-fine devices only; both
   are aria-hidden and pointer-events:none, so nothing changes functionally.
   =========================================================================== */
@media (hover: hover) and (pointer: fine) {
  html.js.cursor-on, html.js.cursor-on a, html.js.cursor-on button,
  html.js.cursor-on input, html.js.cursor-on select, html.js.cursor-on textarea,
  html.js.cursor-on label, html.js.cursor-on summary { cursor: none; }
}
#cursorDot, #cursorRing { position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%; opacity: 0; will-change: transform; }
#cursorDot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--gold); }
/* Ring color follows the surface: ink over cream, gold over dark sections
   (mix-blend-difference looks off-brand on a gold/cream palette) */
#cursorRing { width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(28,35,49,.4);
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              margin .25s var(--ease-out), border-color .25s ease, background .25s ease; }
#cursorRing.on-dark { border-color: rgba(184,150,46,.55); }
html.cursor-on #cursorDot, html.cursor-on #cursorRing { opacity: 1; }
#cursorRing.is-link { width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-color: rgba(184,150,46,.85); background: rgba(184,150,46,.1); }
#cursorRing.is-down { width: 30px; height: 30px; margin: -15px 0 0 -15px; }

/* Hero particle canvas */
#heroCanvas, .ambient-canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; }

/* ===========================================================================
   ACCESSIBILITY
   =========================================================================== */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; }
.skip-link:focus { left: 16px; top: 16px; background: var(--gold); color: var(--night);
  padding: 10px 18px; border-radius: 4px; font-family: Geist, sans-serif; font-size: 14px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.bg-night a:focus-visible, .bg-night button:focus-visible, .bg-ink a:focus-visible,
.bg-ink button:focus-visible, .bg-night input:focus-visible,
.page-hero--dark a:focus-visible { outline-color: var(--gold); }

/* Reduced motion: land everything instantly, kill cursor + particles motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv, html.js .hi { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.js .bar-fill { width: var(--w) !important; }
  html.js #programLine { transform: none !important; }
  #cursorDot, #cursorRing { display: none !important; }
  html.js.cursor-on, html.js.cursor-on a, html.js.cursor-on button { cursor: auto; }
  .tilt { transform: none !important; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
