/* Moreira & Ponciano — escritório especializado em previdenciário.
   Page CSS shared by every page, loaded after the kit (system.css, layout.css).
   Client's asks that override the kit: navy grounds #0d1232f2 and a blurred header (blur 12px). */

:root { --p-inv-bg: #0d1232f2; }

/* header: the client's navy, see-through at 95% with a 12px blur (client's ask) */
.nav.nav--tone {
  background-color: var(--p-inv-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* the client's logo file only (gold on transparent: it needs the navy) */
.nav__logo img { height: 34px; width: auto; display: block; }
@media (max-width: 639px) { .nav__logo img { height: 26px; } }
.footer .nav__logo img { height: 40px; }

/* hero photograph: the subject of each picture */
.hero__media > img { object-position: var(--ly-pos, 50% 40%); }

/* the team: each portrait (4:5) and its words as two cells on the column lines */
.person-photo { --tile-ratio: 4 / 5; }
.person-text ul { display: grid; gap: var(--s-2); padding-left: 1.1em; color: var(--ink); }
.person-text .oab { color: var(--muted); font-size: var(--t-small); }
@media (max-width: 1023px) { .person-photo, .person-text { grid-column: auto / span 6; } }

/* WhatsApp form on contato.html */
.form textarea { width: 100%; min-height: 120px; font: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); resize: vertical; }

/* articles: long-form reading column */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); margin-top: var(--s-8); scroll-margin-top: calc(var(--nav) + 24px); }
.prose h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: var(--s-2); }
.prose p, .prose li { font-size: 18px; line-height: 1.7; }
.prose a:not(.btn) { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; color: var(--muted); }
.prose .note { padding: var(--s-5) var(--s-6); background: var(--surface); border-radius: var(--r-md); }
.prose .note b { display: block; font-weight: 500; margin-bottom: var(--s-1); }
.table-wrap { overflow-x: auto; }
.article-side { display: grid; gap: var(--s-6); align-content: start; position: static; }
.article-side ol { list-style: none; display: grid; gap: var(--s-2); padding: 0; }
.article-side a { color: var(--muted); }
.article-side a:hover { color: var(--ink); }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); color: var(--muted); font-size: var(--t-small); }

/* articles and the credits page: long pages outside the screen grid */
.article-head { padding: calc(var(--nav) + var(--s-9)) 0 var(--s-9); }
.section--article-body { padding: var(--s-9) 0 var(--s-10); }
@media (max-width: 639px) { .article-head { padding: calc(var(--nav) + var(--s-7)) 0 var(--s-7); } .section--article-body { padding: var(--s-7) 0 var(--s-8); } .article-side { display: none; } }

/* the statement moment set large across the wrap */
#como .mo-wh__text { font-size: clamp(30px, 3.8vw, 54px); max-width: 1120px; margin-top: var(--s-6); }

/* 1024x768: the benefit list keeps its names only, so the section stays one screen */
@media (min-width: 1024px) and (max-width: 1279px) { #beneficios .rows > li > p { display: none; } }

/* photographs in a split: one 4:3 frame (the files are 960 wide: never stretched past them) */
.frame--43 { aspect-ratio: 4 / 3; height: auto; }
/* the team list on the column line (no indent) */
.person-text ul { list-style: none; padding-left: 0; }
/* the benefit names are links: they answer the pointer and show the focus ring */
a.rows__name { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color 200ms var(--ease); }
a.rows__name:hover { text-decoration-color: var(--accent); }
a.rows__name:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
/* the secondary button on the navy: a hairline so it reads as a button */
.ground-inverse .btn--secondary { box-shadow: inset 0 0 0 1px var(--line-strong); }
/* tablet (640 to 1023): the team as photo on four columns and words on eight */
@media (min-width: 640px) and (max-width: 1023px) {
  .person-photo { grid-column: 1 / span 4; }
  .person-text { grid-column: 5 / span 8; }
}

.frame--sq { aspect-ratio: 1 / 1; height: auto; }
/* tablet: the splits stay side by side so each section keeps one screen; the questions take two */
@media (min-width: 640px) and (max-width: 1023px) {
  #beneficios .span-5, #rural .span-5 { grid-column: 1 / span 6; }
  #beneficios .frame--43, #rural .frame--43 { grid-column: 7 / span 6; }
  #beneficios .frame--43, #rural .frame--43 { aspect-ratio: 3 / 4; }
  #duvidas .faq-col { grid-column: 1 / span 6; }
  #duvidas .frame--sq { grid-column: 7 / span 6; aspect-ratio: 3 / 4; }
  #duvidas .faq > .faq__item:nth-child(4) { display: none; }
  .closing__cta > .close__media { min-height: 120px; }
  .closing__links .footer__lede { display: none; }
}

/* phone (under 640) */
@media (max-width: 639px) {
  /* each benefit name is a 44px tap target */
  a.rows__name { display: inline-flex; align-items: center; min-height: 44px; }
  #beneficios .rows > li > p { display: none; }
  /* the split photographs take the second screen of their section (.g2m) at 4:5 */
  #beneficios .frame--43, #rural .frame--43 { aspect-ratio: 4 / 5; }
  /* the team: a small portrait beside its words, the list left to the page sobre.html */
  .person-photo { grid-column: auto / span 6; order: 1; }
  .person-text { grid-column: auto / span 6; order: 2; }
  .person-text ul, .person-text > p:not(.oab) { display: none; }
  /* the closing photograph: a strip, as wide as its file allows */
  .closing__cta > .close__media { flex: 0 0 auto; min-height: 0; aspect-ratio: 2 / 1; }
  #duvidas .frame--sq { aspect-ratio: 3 / 5; margin-top: var(--s-6); }
  .rural-guide { margin-top: var(--s-4) !important; }
  #rural .rows > li > p { display: none; }
  .footer .nav__logo img { height: 22px; }
  .closing__links .footer__lede { display: none; }
  .closing__links .footer__col:nth-of-type(3) { display: none; }
}
@media (max-width: 639px) { .rural-guide .link { display: flex; width: 100%; min-height: 44px; align-items: center; } }
@media (min-width: 640px) and (max-width: 819px) { #beneficios .rows > li > p { display: none; } }
#form-wa .field { align-self: start; }
#form-wa .field:has(textarea), #form-wa .btn-row, #form-wa .form__status { grid-column: 1 / -1; }

/* wide screens (1280 up) in a short window (a laptop browser under ~900px tall): the kit fixes each
   section to one screen, so a list taller than the window ran under the next section's ground.
   Same rule the kit uses from 640 to 1279: at least its screens, growing past them, never overlapping. */
@media (min-width: 1280px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}

/* focus ring: the kit draws it in the gold (2.9:1 on the light ground, under the 3:1 WCAG 1.4.11 asks);
   navy on the light grounds, the gold only where it sits on the navy (5.5:1) */
:focus-visible { outline-color: var(--p-ink); }
:is(.ground-inverse, .nav--tone) :focus-visible { outline-color: var(--p-inv-action); }

/* the hero: the firm and its OAB numbers as one quiet line under the buttons (no label above the h1) */
.hero__note { font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.nw { white-space: nowrap; }

/* the form: required fields say so in their label */
.field .req { font-weight: 400; color: var(--muted); }

/* article tables: a caption names each one */
.prose caption { caption-side: top; text-align: left; font-size: var(--t-small); color: var(--muted); padding-bottom: var(--s-3); }

/* the hero grows past one screen when the window is short or the text is zoomed (WCAG 1.4.4),
   the same way the kit lets it grow on a phone; at full height nothing changes */
@media (min-width: 640px) {
  main > :is(.hero, .section--hero) { height: auto; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
  main > :is(.hero, .section--hero) > .wrap { height: auto; }
  .hero__media { min-height: 360px; }
}
/* 1024 to 1279 in a window under 820px tall: the split text column is narrow, the note would wrap to three lines
   and push the hero past the first screen; the phrase stays in the footer and the OAB numbers in the legal row */
@media (min-width: 1024px) and (max-width: 1279px) and (max-height: 820px) { .hero__note { display: none; } }
