/* Ivorest - base: tokens, tipografia, capitulos, botoes, cabecalho, heros (Home e paginas),
   as listras do logo (curvas como no simbolo), faixa de contato e rodape.
   Estados escondidos para animar ficam sob html.motion; sem ele, tudo aparece no estado final. */

@font-face {
  font-family: "Newsreader"; src: url("../fonts/newsreader-latin-var.woff2") format("woff2"); font-weight: 300 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader"; src: url("../fonts/newsreader-latin-ext-var.woff2") format("woff2"); font-weight: 300 600; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; src: url("../fonts/geist-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist"; src: url("../fonts/geist-latin-ext-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --mist: #F2F5F7;
  --ice: #E4ECF1;
  --deep: #0B2D42;
  --blue: #0A7CAE;
  --cyan: #22ADD3;
  --btn: #D96C00;          /* laranja dos botoes: um tom abaixo do laranja do logo, com texto branco */
  --btn-hover: #B85A00;
  --white: #FFFFFF;
  --text: #1D2B36;
  --soft: #56646F;
  --rule: rgba(11, 45, 66, .16);
  --rule-inverse: rgba(255, 255, 255, .18);
  --track-off: #D3DEE6;    /* listra apagada */
  --noise: url("../texture/noise.png");

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --fs-display: clamp(38px, 4vw, 72px);
  --fs-h2: clamp(30px, 2.9vw, 50px);
  --fs-h3: clamp(24px, 2vw, 34px);
  --fs-serif-lead: clamp(21px, 1.7vw, 28px);
  --fs-lead: clamp(19px, 1.35vw, 23px);
  --fs-body: 18px;

  --col: min(1345px, 100% - 48px);
  --edge: max(24px, calc((100% - 1345px) / 2));   /* margem da coluna, para blocos posicionados */
  --gap: clamp(20px, 2.2vw, 32px);
  --chapter-pad: clamp(96px, 10vw, 168px);
  --radius: 16px;
  --header-h: 88px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
@media (max-width: 767px) {
  :root { --col: calc(100% - 32px); --edge: 16px; --header-h: 72px; --fs-body: 17px; }
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--mist); color: var(--text);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.012em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--deep); color: var(--white); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }

.wrap { width: var(--col); margin-inline: auto; }
.display { font-size: var(--fs-display); line-height: 1.02; }
.h2 { font-size: var(--fs-h2); line-height: 1.05; }
.h3 { font-size: var(--fs-h3); line-height: 1.12; }
.serif-lead { font-family: var(--serif); font-size: var(--fs-serif-lead); line-height: 1.28; letter-spacing: -.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; }
.prose { max-width: 64ch; }
.prose p + p { margin-top: 1.1em; }
.line { display: block; }

/* capitulos: claros e azul profundo, cortes retos; dois iguais seguidos viram um so */
.chapter { position: relative; padding-block: var(--chapter-pad); }
.chapter--mist { background: var(--mist); }
.chapter--deep { background: var(--deep) var(--noise); color: var(--white); }
.chapter--mist + .chapter--mist, .chapter--deep + .chapter--deep { padding-top: 0; }
.chapter--mist .lead, .chapter--mist .prose { color: var(--soft); }
.chapter--deep .lead, .chapter--deep .prose { color: rgba(255, 255, 255, .8); }

/* ------------------------------------------------------------- botoes */
.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 13px 28px; border-radius: 6px; border: 1px solid transparent;
  font: 600 16px/1.2 var(--sans); letter-spacing: .005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn--action { background: var(--btn); color: var(--white); }
.btn--action:hover { background: var(--btn-hover); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.chapter--deep .btn--ghost:hover, .page-hero .btn--ghost:hover { background: var(--white); color: var(--deep); border-color: var(--white); }
.chapter--mist .btn--ghost:hover { background: var(--deep); color: var(--white); border-color: var(--deep); }
.link-action { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link-action:hover { text-decoration-thickness: 2px; }

/* ----------------------------------------------------------- cabecalho */
/* transparente sobre o hero; depois dele, barra azul profundo (nunca branca) */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); color: var(--white);
  transition: transform .45s var(--ease-out), background-color .35s, box-shadow .35s;
}
.site-header.is-solid { background: var(--deep) var(--noise); box-shadow: 0 1px 0 var(--rule-inverse); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { width: var(--col); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 24px; position: relative; }
.brand { display: block; width: clamp(132px, 10vw, 158px); }
.brand img { width: 100%; }
.site-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 34px; }
.site-nav a { font-size: 16px; text-decoration: none; padding-block: 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease-out); }
.site-nav a:hover, .site-nav a[aria-current="page"] { background-size: 100% 1px; }
.site-nav__group { position: relative; }
.site-nav__sub {
  position: absolute; left: -22px; top: calc(100% + 10px); display: grid; gap: 2px; min-width: 300px; padding: 14px 22px;
  background: var(--white); color: var(--deep); border-radius: 10px; box-shadow: 0 16px 40px rgba(11, 45, 66, .18);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.site-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.site-nav__group:hover .site-nav__sub, .site-nav__group:focus-within .site-nav__sub { opacity: 1; visibility: visible; transform: none; }
.site-nav__sub a { padding-block: 7px; background: none; }
.site-nav__sub a:hover, .site-nav__sub a[aria-current="page"] { color: var(--blue); }
.site-header__cta { margin-left: auto; min-height: 44px; padding: 10px 22px; font-size: 15px; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .3s; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--deep) var(--noise); color: var(--white); padding: 20px 16px 32px; display: grid; gap: 2px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { font-family: var(--serif); font-size: 28px; line-height: 1.2; text-decoration: none; padding: 9px 0; border-bottom: 1px solid var(--rule-inverse); }
.mobile-menu a.mobile-menu__sub { font-family: var(--sans); font-size: 17px; padding: 8px 0 8px 16px; border-bottom: 0; opacity: .85; }
.mobile-menu .btn { margin-top: 20px; justify-self: start; }
.site-header.menu-open { background: var(--deep) var(--noise); }
@media (max-width: 1180px) { .site-nav { gap: 22px; } .site-nav a { font-size: 15px; } }
@media (max-width: 1024px) { .site-nav { display: none; } .menu-toggle { display: block; margin-left: 8px; } }
@media (max-width: 767px) { .site-header__cta { display: none; } }

/* ------------------------------------------------- as listras do logo (curvas) */
/* as mesmas faixas curvas do simbolo, subindo para a direita como trilhas na neve;
   pathLength=1 para poderem entrar e sair ao longo do proprio caminho */
.tracks { display: block; overflow: visible; pointer-events: none; }
.tracks path { fill: none; stroke: url(#ivo-track); stroke-linecap: butt; }
html.motion .cta-band__tracks path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }

/* -------------------------------------------- hero da Home: o pico */
/* a foto inteira com o veu azul por cima; titulo, frase e botao ficam no ceu, acima do cume, sem
   tocar a montanha. A foto e mais alta que a tela (60vh acima) para a camera poder subir */
.peak {
  --tsize: clamp(40px, 4.8vw, 92px);
  position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; container-type: inline-size;
  background: var(--deep); color: var(--white);
}
.peak__layer { position: absolute; inset: 0; }
.peak__layer img { width: 100%; height: 100%; object-fit: cover; object-position: 51% 50%; }
.peak__photo { z-index: 0; }
/* o veu tem a mesma textura dos capitulos azuis: o fim do hero emenda no capitulo seguinte */
.peak__dusk { position: absolute; inset: 0; z-index: 1; background: var(--deep) var(--noise); opacity: 0; }
.peak__copy { position: absolute; z-index: 2; left: var(--edge); right: var(--edge); top: calc(var(--header-h) + clamp(32px, 9vh, 110px)); }
.peak__title { font-size: var(--tsize); line-height: 1; letter-spacing: -.02em; text-wrap: initial; }
.peak__lead { margin-top: 28px; max-width: 46ch; font-size: var(--fs-lead); line-height: 1.55; color: rgba(255, 255, 255, .9); }
.peak__actions { margin-top: 36px; }
/* tela deitada: o cume fica em --apex da altura da tela (na foto ele esta a 50,98% da largura e a
   76,75% da largura medida do topo) */
@media (min-aspect-ratio: 3 / 4) {
  .peak { --apex: 68vh; --apex: 68svh; }
  .peak__layer { inset: -60vh 0 auto 0; height: 160vh; }
  .peak__layer img { object-position: 50.98% calc(var(--apex) + 60vh - 76.75cqw); }
  .peak__title .line { white-space: nowrap; }
}
@media (max-aspect-ratio: 3 / 4) {
  /* em pe (celular): a foto ja e vertical, o cume fica a ~51% da altura; o texto vai no ceu */
  .peak { --tsize: clamp(36px, 10vw, 64px); }
  .peak__copy { top: calc(var(--header-h) + 3vh); }
  .peak__title { line-height: 1.04; }
  .peak__lead { margin-top: 18px; font-size: 16px; }
  .peak__actions { margin-top: 24px; }
}
html.motion .peak__title .line, html.motion .peak__lead, html.motion .peak__actions { opacity: 0; transform: translateY(.5em); }
html.motion .peak__lead, html.motion .peak__actions { transform: translateY(16px); }
html.motion.is-loaded .peak__title .line, html.motion.is-loaded .peak__lead, html.motion.is-loaded .peak__actions { opacity: 1; transform: none; transition: opacity 1.3s var(--ease-out), transform 1.8s var(--ease-out); }
html.motion.is-loaded .peak__title .line + .line { transition-delay: .15s; }
html.motion.is-loaded .peak__lead { transition-delay: .35s; }
html.motion.is-loaded .peak__actions { transition-delay: .5s; }

/* ------------------------------------------ hero das paginas: a encosta azul */
/* a foto em tela cheia; o azul (com a textura dos capitulos) vira uma encosta na parte de baixo, com
   a borda na curva das trilhas do logo: plana e alta a esquerda, onde fica o texto, descendo ate perto
   da base a direita. Tres linhas finas acompanham a borda pelo lado da foto. Formas e linhas sao
   geradas por seam-gen.js */
.page-hero { --base-h: 60%; position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--deep) var(--noise); color: var(--white); }
.page-hero__photo { position: absolute; inset: 0; overflow: hidden; }
.page-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__base, .page-hero__lines { position: absolute; z-index: 1; left: 0; right: 0; bottom: -1px; height: var(--base-h); }
.page-hero__base {
  background: var(--deep) var(--noise);
  -webkit-mask: url(/assets/shapes/hero-slope.svg) 0 0 / 100% 100% no-repeat; mask: url(/assets/shapes/hero-slope.svg) 0 0 / 100% 100% no-repeat;
}
.page-hero__lines { pointer-events: none; }
.page-hero__lines svg { display: block; width: 100%; height: 100%; }
.page-hero__lines--m { display: none; }
.page-hero__copy { position: absolute; z-index: 2; left: var(--edge); bottom: clamp(48px, 9vh, 104px); width: min(40%, 680px); }
.page-hero__copy .display { max-width: 15ch; }
.page-hero__sub { margin-top: 18px; font-family: var(--serif); font-size: var(--fs-serif-lead); line-height: 1.25; color: rgba(255, 255, 255, .78); }
.page-hero__copy .actions { margin-top: 32px; }
html.motion .page-hero__base { transform: translateY(100%); }
html.motion .hero__line { clip-path: inset(0 100% 0 0); }
html.motion .page-hero__copy > * { opacity: 0; transform: translateY(24px); }
@media (max-width: 1024px) {
  /* celular e tablet: a foto em cima; a encosta e so a passagem curva da foto para o azul do texto */
  .page-hero { --ph: max(360px, 60svh); height: auto; min-height: 0; }
  .page-hero__photo { position: relative; height: 60vh; height: var(--ph); }
  .page-hero__base, .page-hero__lines { top: calc(var(--ph) - 16vw - 40px); bottom: auto; height: calc(16vw + 41px); }
  .page-hero__base { -webkit-mask-image: url(/assets/shapes/hero-slope-m.svg); mask-image: url(/assets/shapes/hero-slope-m.svg); }
  .page-hero__lines--d { display: none; }
  .page-hero__lines--m { display: block; }
  .page-hero__copy { position: relative; left: auto; bottom: auto; width: auto; padding: 12px var(--edge) 56px; }
}

/* ------------------------------------------------------- faixa de contato */
.cta-band { overflow: hidden; padding-block: clamp(120px, 13vw, 220px); }
.cta-band__tracks { position: absolute; top: 0; bottom: 0; right: 0; left: 38%; opacity: .55; }
.cta-band__tracks svg { width: 100%; height: 100%; }
.cta-band__inner { position: relative; z-index: 1; display: grid; gap: 44px; justify-items: start; }
.cta-band__title { font-size: clamp(40px, 4.8vw, 88px); line-height: .98; letter-spacing: -.02em; max-width: 12ch; }

/* ---------------------------------------------------------------- rodape */
.site-footer { background: var(--deep) var(--noise); color: rgba(255, 255, 255, .74); font-size: 15px; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px var(--gap); padding-block: 88px 48px; border-top: 1px solid var(--rule-inverse); }
.site-footer__brand img { width: 170px; }
.site-footer__title { font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: 0; color: var(--white); margin-bottom: 16px; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; color: rgba(255, 255, 255, .84); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer a[aria-current="page"] { color: var(--cyan); }
.site-footer__bottom { border-top: 1px solid var(--rule-inverse); padding-block: 24px 32px; font-size: 13px; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

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