/* Public home presentation. Scoped to index; shared application themes remain authoritative. */
body:has(.portal-home-content) {
  background: var(--surface-soft);
  background-image: none;
}
.portal {
  background: var(--surface-soft);
  --home-ink: var(--text);
  --home-muted: var(--muted);
  --home-blue: #1262d3;
  --home-line: color-mix(in srgb, var(--text) 12%, var(--surface));
}
.portal .portal-header {
  padding: 20px max(24px, calc((100vw - 1240px) / 2));
  gap: 20px;
  background: var(--surface);
  box-shadow: none;
  border-bottom: 1px solid var(--home-line);
}
.portal .portal-header .brand-logo { flex: 1 1 300px; gap: 12px; font-size: 1.05rem; line-height: 1.35; }
.portal .portal-header .brand-logo > img { width: 44px; height: 44px; border-radius: 10px !important; }
.portal .brand-title-wrap { max-width: 350px; }
.portal .brand-logo .brand-subtitle { font-size: .72rem; line-height: 1.5; margin-top: 4px; color: var(--muted); }
.portal .nav-actions { gap: 10px; align-items: center; }
.portal .nav-actions > a.btn.dark {
  min-height: 44px; padding: 11px 17px; border-radius: 9px;
  box-shadow: none; background: var(--surface); color: var(--text); border-color: var(--home-line); font-size: .85rem;
}
html[data-theme] .portal .nav-actions > a[href*="registrar"].btn.dark { background: var(--home-blue); color: #fff; border-color: var(--home-blue); box-shadow: none; }
.portal .nav-actions .icon { width: 17px; height: 17px; }
.portal .pcs-language-picker { border: 0; background: transparent; }
.portal .pcs-language-status { font-size: .64rem; }
.portal .header-dropdown-toggle { min-height: 44px; border-color: var(--home-line); box-shadow: none; background: var(--surface); color: var(--text); }
.portal .portal-main.container { width: min(100% - 64px, 1240px); margin-inline: auto !important; padding: 0; overflow: visible; }
.portal-home-content { padding-top: 32px; }
.home-intro {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px;
  padding: 46px 0 58px; position: relative;
}
.home-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--home-blue); font-size: .73rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.home-eyebrow::before { content: ''; width: 24px; height: 2px; background: #e99724; }
.home-intro h1 { margin: 0; max-width: 650px; color: var(--home-ink); font: 800 clamp(2.55rem, 4.1vw, 3.8rem)/1.09 'Inter', sans-serif; letter-spacing: -.055em; text-wrap: balance; }
.home-intro h1 em { font-style: normal; color: var(--home-blue); }
.home-intro-description { margin: 24px 0 28px; max-width: 490px; color: var(--home-muted); font-size: 1.05rem; line-height: 1.8; }
.home-intro-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-intro-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 49px; padding: 12px 19px; box-sizing: border-box; border-radius: 9px; text-decoration: none; font-size: .9rem; font-weight: 700; }
.home-primary { color: #fff; background: var(--home-blue); border: 1px solid var(--home-blue); box-shadow: 0 6px 16px #1262d31a; }
.home-secondary { color: var(--text); background: var(--surface); border: 1px solid var(--home-line); }
.home-intro-actions img { width: 19px; height: 19px; }
html[data-theme^="light"] .home-primary img,
html[data-theme^="light"] .portal .nav-actions > a[href*="registrar"] img { filter: brightness(0) invert(1); }
.home-primary:hover { background: #0b50b4; color: #fff; }
.home-secondary:hover { border-color: var(--home-blue); color: var(--home-blue); }
.home-intro-note { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 22px 0 0; color: var(--muted); font-size: .77rem; }
.home-intro-note span[aria-hidden] { color: #21956b; }
.home-intro-visual { position: relative; margin: 0; padding: 18px 18px 64px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid var(--home-line); border-radius: 24px; }
.home-visual-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 17px; font-size: .7rem; color: var(--muted); }
.home-visual-brand { color: var(--text); font-weight: 800; letter-spacing: .13em; }
.home-visual-dots { letter-spacing: .25em; color: color-mix(in srgb, var(--text) 25%, transparent); }
.home-intro-photo { width: 100%; aspect-ratio: 1.42; object-fit: cover; display: block; border-radius: 13px; }
.home-visual-caption { position: absolute; right: 32px; bottom: 23px; left: 32px; display: flex; align-items: center; gap: 14px; padding: 17px 20px; background: var(--surface); border: 1px solid var(--home-line); border-radius: 12px; box-shadow: 0 10px 30px #152e4a0d; }
.home-visual-caption img { width: 39px; height: 39px; padding: 6px; box-sizing: border-box; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-radius: 10px; }
.home-visual-caption strong { display: block; font-size: .91rem; color: var(--text); }
.home-visual-caption span { display: block; margin-top: 5px; font-size: .74rem; color: var(--muted); }
.home-capabilities { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--home-line); border-bottom: 1px solid var(--home-line); padding: 22px 0; margin-bottom: 60px; gap: 20px; }
.home-capabilities > div { display: flex; align-items: center; gap: 12px; font-size: .8rem; font-weight: 600; color: var(--text); }
.home-capabilities img { width: 27px; height: 27px; object-fit: contain; }
.home-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.home-section-heading .home-eyebrow { margin-bottom: 12px; }
.home-section-heading h2 { color: var(--text); font-size: clamp(1.65rem, 2.8vw, 2.2rem); line-height: 1.2; letter-spacing: -.035em; margin: 0; }
.home-section-heading > p { max-width: 330px; margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.7; }
.portal .portal-cards-status { margin: 0 0 14px; font-size: .76rem; }
.portal .portal-cards-status:empty { display: none; }
.portal #portalCardsGrid { max-width: none; padding: 0; gap: 22px; margin-bottom: 56px; grid-template-columns: repeat(3, minmax(0, 1fr)); scroll-margin-top: 24px; }
.portal .portal-home-grid .home-offer-card {
  padding: 22px; border: 1px solid var(--home-line); border-radius: 14px; background: var(--surface); color: var(--text);
  box-shadow: 0 4px 12px #152e4a05; animation: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.portal .portal-home-grid .home-offer-card::before,
.portal .portal-home-grid .home-offer-card::after { display: none; }
.portal .portal-home-grid .home-offer-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 12px 28px #152e4a0c; }
.portal .home-offer-head { min-height: 52px; margin-bottom: 16px; gap: 11px; }
.portal .home-offer-head h3 { color: var(--text); font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: -.02em; }
.portal .home-offer-figure { height: 180px; border-radius: 9px; overflow: hidden; background: var(--surface-soft); margin-bottom: 18px; }
.portal .home-offer-figure .card-figure-img { object-fit: contain; }
.portal .home-offer-card p { color: var(--muted); font-weight: 400 !important; font-size: .88rem; line-height: 1.7; text-align: left; }
.portal .home-offer-card .home-offer-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 11px 14px; border: 1px solid var(--home-line); border-radius: 8px; background: var(--surface-soft); color: var(--text); box-shadow: none; font-size: .8rem; }
.portal .home-offer-card:hover .home-offer-btn { background: var(--home-blue); border-color: var(--home-blue); color: #fff; }
.portal .portal-systems-carousel { max-width: none; padding: 0; margin-bottom: 60px; }
.portal .portal-carousel-title { font-family: 'Inter', sans-serif; font-size: 1.45rem; letter-spacing: -.03em; }
.portal .portal-cards-carousel { grid-auto-columns: 270px; gap: 18px; padding: 10px 1px 20px; align-items: stretch; }
.portal .portal-cards-carousel .portal-carousel-card:not(.home-offer-card-banner) { aspect-ratio: auto; padding: 18px !important; height: auto; }
.portal .portal-cards-carousel .portal-carousel-card .home-offer-figure { height: 145px; margin-bottom: 14px; }
.portal .portal-cards-carousel .portal-carousel-card p { display: block; max-height: none; overflow: visible; font-size: .82rem; line-height: 1.6; -webkit-line-clamp: unset; }
.portal .portal-cards-carousel .portal-carousel-card .card-actions { margin-top: auto !important; }
.portal .portal-carousel-arrow { border-color: var(--home-line); box-shadow: none; }
.portal .portal-modules-section { padding: 0; max-width: none; margin: 0 0 70px; }
.portal .portal-modules-summary { padding: 32px; border-radius: 18px; box-shadow: none; border-color: var(--home-line); background: var(--surface); }
.portal .portal-modules-summary h2 { font-family: 'Inter', sans-serif; font-size: clamp(1.45rem, 2.5vw, 2rem); color: var(--text); line-height: 1.3; letter-spacing: -.035em; margin-bottom: 28px; max-width: 760px; }
.portal .portal-modules-list { display: block; columns: 3; column-gap: 28px; }
.portal .portal-modules-list > li { break-inside: avoid; margin-bottom: 24px; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--home-line); border-radius: 0; background: transparent; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; min-height: 0; }
.portal .portal-module-icon { width: 32px; height: 32px; padding: 5px; border: 0; border-radius: 7px; }
.portal .portal-modules-list strong { font-family: 'Inter', sans-serif; font-weight: 700; font-size: .88rem; color: var(--text); }
.portal .portal-module-feature-list { display: block; font-size: .8rem; line-height: 1.7; }
.portal .portal-module-feature-list li { color: var(--muted); padding-left: 12px; margin-bottom: 4px; }
.portal .portal-module-feature-list li::before { width: 3px; height: 3px; box-shadow: none; background: var(--muted); }
.portal .portal-footer { border-top: 1px solid var(--home-line); padding: 28px 24px 100px; background: var(--surface); color: var(--muted); font-size: .75rem; }
.portal a:focus-visible, .portal button:focus-visible, .portal select:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
html[data-theme^="dark"] .portal { --home-blue: #76b3ff; }
html[data-theme^="dark"] .home-primary,
html[data-theme^="dark"] .portal .nav-actions > a[href*="registrar"].btn.dark,
html[data-theme^="dark"] .portal .home-offer-card:hover .home-offer-btn { color: #0c213e; }
html[data-theme^="dark"] .home-primary:hover { background: #a0caff; }
@media (max-width: 1100px) {
  .portal .portal-header { padding: 18px 32px; }
  .portal .portal-header .brand-logo { flex-basis: 100%; }
  .portal .brand-title-wrap { max-width: none; }
  .portal .nav-actions { width: 100%; justify-content: flex-start; }
  .home-intro { gap: 30px; }
  .home-capabilities { gap: 16px; }
  .home-capabilities > div { font-size: .73rem; }
}
@media (max-width: 800px) {
  .home-intro { grid-template-columns: 1fr; padding-top: 20px; gap: 34px; }
  .home-intro h1 { max-width: 600px; }
  .home-intro-description { max-width: 600px; }
  .home-intro-visual { max-width: 580px; width: 100%; box-sizing: border-box; }
  .home-intro-photo { aspect-ratio: 1.8; }
  .home-capabilities { grid-template-columns: repeat(2, 1fr); margin-bottom: 42px; }
  .home-section-heading { display: block; }
  .home-section-heading > p { margin-top: 16px; max-width: none; }
  .portal #portalCardsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal .portal-modules-list { columns: 2; }
}
@media (max-width: 540px) {
  .portal .portal-header { padding: 18px 20px; gap: 18px; }
  .portal .portal-header .brand-logo { font-size: .92rem; }
  .portal .portal-header .brand-logo > img { width: 36px; height: 36px; }
  .portal .brand-logo .brand-subtitle { font-size: .65rem; }
  .portal .nav-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
  .portal .pcs-language-control { grid-row: 2; grid-column: 1; width: 100%; }
  .portal .pcs-language-picker { width: 100%; box-sizing: border-box; padding: 6px; justify-content: flex-start; gap: 8px; }
  .portal .pcs-language-picker > span { display: none; }
  .portal .header-dropdown { grid-row: 2; grid-column: 2; }
  .portal .header-dropdown-toggle { width: 100%; }
  .portal .nav-actions > a.btn.dark { min-width: 0; padding: 11px 8px; font-size: .8rem; }
  .portal .portal-main.container { width: calc(100% - 40px); }
  .portal-home-content { padding-top: 20px; }
  .home-intro { padding: 16px 0 36px; }
  .home-eyebrow { font-size: .65rem; margin-bottom: 18px; }
  .home-intro h1 { font-size: clamp(2.25rem, 10vw, 3.2rem); }
  .home-intro-description { font-size: .95rem; line-height: 1.75; margin-top: 20px; }
  .home-intro-actions { display: grid; grid-template-columns: 1fr; }
  .home-intro-visual { padding: 12px 12px 56px; border-radius: 16px; }
  .home-visual-caption { left: 21px; right: 21px; bottom: 16px; padding: 13px; gap: 10px; }
  .home-visual-caption strong { font-size: .78rem; }
  .home-visual-caption span { font-size: .66rem; }
  .home-capabilities { column-gap: 12px; row-gap: 22px; }
  .home-capabilities > div { font-size: .72rem; gap: 8px; }
  .home-capabilities img { width: 23px; height: 23px; }
  .portal #portalCardsGrid { grid-template-columns: 1fr; gap: 18px; margin-bottom: 40px; }
  .portal .home-offer-figure { height: 190px; }
  .portal .portal-systems-carousel { margin-bottom: 40px; }
  .portal .portal-modules-summary { padding: 24px 18px; }
  .portal .portal-modules-list { columns: 1; }
  .portal .portal-footer { line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) {
  .portal .home-offer-card { transition: none; }
  .portal .home-offer-card:hover { transform: none; }
  .portal .portal-cards-carousel { scroll-behavior: auto; }
}
