/* =====================================================================
   creditcorporation.org — style.css
   Institutional entity-index / registry aesthetic. Small-radius corners,
   restrained black / white / grey, mark #3 (black & circuit) as the sole
   accent. Self-hosted Open Sans. Self-contained — no cross-domain @import.
   ===================================================================== */

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url('/assets/fonts/open-sans-latin.woff2') format('woff2');
	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;
}

:root {
	/* Mark #3 — black & circuit */
	--ink:        #101214;
	--ink-soft:   #3a3f45;
	--ink-mist:   #eceded;
	--ink-wash:   #f6f6f7;

	/* Neutrals */
	--white:      #ffffff;
	--gray-50:    #fafafa;
	--gray-100:   #f4f4f5;
	--gray-200:   #e6e7e8;
	--gray-300:   #d3d5d7;
	--gray-400:   #a9adb1;
	--gray-500:   #797d82;
	--gray-600:   #55585c;
	--gray-700:   #38393c;
	--gray-800:   #202224;

	/* Status accents (used sparingly, e.g. registered/pending badges) */
	--status-ok:   #1c6b3f;
	--status-warn: #8a5a10;

	--shadow-sm: 0 1px 2px rgba(16,18,20,.06);
	--shadow-md: 0 4px 14px rgba(16,18,20,.08);

	--font-body: "Open Sans", "Segoe UI", -apple-system, Arial, sans-serif;
	--container: 1120px;
	--gutter: 20px;
	--radius: 4px;
	--radius-lg: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--white);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gray-400); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.1rem; color: var(--gray-700); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 780px; }
section { padding: 48px 0; }
.section-gray { background: var(--ink-wash); }
.accent-line { width: 48px; height: 3px; background: var(--ink); margin: 10px 0 18px; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; }

/* ----- Buttons ----- */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 20px; border-radius: var(--radius);
	font-weight: 600; font-size: .95rem; text-decoration: none;
	border: 1px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ink-soft); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--gray-400); }
.btn--outline:hover { border-color: var(--ink); }
.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { border-color: var(--white); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--lg { padding: 12px 26px; }
.btn--sm { padding: 6px 14px; font-size: .85rem; }

/* ----- Utility bar ----- */
.utility-bar { background: var(--ink); color: var(--gray-300); font-size: .82rem; }
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.crumbs a { color: var(--gray-300); text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs span { color: var(--white); }
.utility-bar__links { display: flex; align-items: center; gap: 12px; }
.utility-bar__links a { color: var(--gray-300); text-decoration: none; }
.utility-bar__links a:hover { color: var(--white); }
.utility-bar__sep { width: 1px; height: 14px; background: var(--gray-600); }
.utility-search { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 4px 8px; }
.utility-search__icon { width: 14px; height: 14px; color: var(--gray-400); flex: none; }
.utility-search input { background: transparent; border: 0; color: var(--white); font-size: .82rem; width: 130px; outline: none; }
.utility-search input::placeholder { color: var(--gray-400); }

/* ----- Header ----- */
.site-header { border-bottom: 1px solid var(--gray-200); background: var(--white); position: sticky; top: 0; z-index: 40; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand__logo { height: 30px; width: auto; }
.brand__sub { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-600); border-left: 1px solid var(--gray-300); padding-left: 8px; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--gray-700); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-link:hover, .nav-link.is-current { color: var(--ink); border-bottom-color: var(--ink); }
.nav-menu { display: none; }

@media (max-width: 980px) {
	.header-nav { display: none; }
	.nav-menu { display: block; margin-left: auto; }
	.nav-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; }
	.nav-menu summary::-webkit-details-marker { display: none; }
	.nav-menu svg { width: 20px; height: 20px; }
	.nav-menu[open] .nav-menu__open { display: none; }
	.nav-menu:not([open]) .nav-menu__close { display: none; }
	.nav-menu__panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--gray-200); box-shadow: var(--shadow-md); padding: 12px var(--gutter) 20px; display: flex; flex-direction: column; gap: 4px; }
	.nav-menu__link { padding: 10px 4px; text-decoration: none; color: var(--gray-700); font-weight: 600; border-bottom: 1px solid var(--gray-100); }
	.nav-menu__link.is-current { color: var(--ink); }
	.nav-menu__cta { margin-top: 10px; justify-content: center; }
	.utility-bar__inner { flex-direction: column; align-items: flex-start; }
}

/* ----- Hero ----- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero__inner { position: relative; padding: 72px 0 60px; max-width: 760px; }
.hero__bg { position: absolute; inset: 0; background: radial-gradient(600px 260px at 85% 0%, rgba(255,255,255,.06), transparent 70%); }
.hero__eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; color: var(--gray-400); margin-bottom: 14px; }
.hero h1 { font-size: 2.4rem; color: var(--white); }
.hero .lead { color: var(--gray-300); }
.hero--page .hero__inner { padding: 52px 0 44px; }
.hero__cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ----- Cards / grids ----- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
	border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
	padding: 22px; background: var(--white);
}
.card--current { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card__meta { font-size: .82rem; color: var(--gray-500); margin-bottom: 8px; }

/* ----- Tables (the registry's core furniture) ----- */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); }
table.reg-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 620px; }
table.reg-table caption { text-align: left; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--gray-200); }
table.reg-table th, table.reg-table td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--gray-100); }
table.reg-table thead th { background: var(--ink-wash); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); }
table.reg-table tbody tr:last-child td { border-bottom: 0; }
table.reg-table tbody tr:hover { background: var(--gray-50); }
table.reg-table td.is-host { font-weight: 700; white-space: nowrap; }
table.reg-table td.is-mark { white-space: nowrap; color: var(--gray-600); }

/* ----- Badges ----- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--gray-300); }
.badge--ok { color: var(--status-ok); border-color: var(--status-ok); background: #eef6f0; }
.badge--warn { color: var(--status-warn); border-color: var(--status-warn); background: #faf3e6; }

/* ----- Mark swatches (which-credicorp) ----- */
.mark-swatch { width: 40px; height: 40px; border-radius: var(--radius); flex: none; }
.mark-swatch--navy  { background: linear-gradient(135deg, #14356b, #2a5aa8); }
.mark-swatch--teal  { background: linear-gradient(135deg, #073f42, #2a8588); }
.mark-swatch--black { background: linear-gradient(135deg, #101214, #3a3f45); }
.mark-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--gray-100); }
.mark-row:last-child { border-bottom: 0; }
.mark-row h3 { margin-bottom: 4px; }
.mark-row__where { font-size: .82rem; color: var(--gray-500); margin: 0 0 6px; }

/* ----- Signpost / CTA panel ----- */
.panel { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: var(--ink-wash); padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.panel h2 { margin-bottom: 6px; }
.panel p { margin: 0; color: var(--gray-700); max-width: 520px; }
.panel--dark { background: var(--ink); color: var(--white); }
.panel--dark p { color: var(--gray-300); }

/* ----- Definition rows (about / corporate structure) ----- */
.deflist { border-top: 1px solid var(--gray-200); }
.deflist__row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.deflist__row dt { font-weight: 700; color: var(--gray-600); font-size: .88rem; }
.deflist__row dd { margin: 0; }
@media (max-width: 620px) { .deflist__row { grid-template-columns: 1fr; gap: 2px; } }

/* ----- Structure chart ----- */
.chart { display: flex; flex-direction: column; align-items: center; gap: 0; }
.chart__node { border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 16px 22px; text-align: center; background: var(--white); box-shadow: var(--shadow-sm); }
.chart__node--root { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chart__connector { width: 1px; height: 26px; background: var(--gray-400); }
.chart__branches { display: flex; gap: 40px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.chart__branch { display: flex; flex-direction: column; align-items: center; }
.chart__branch .chart__connector { height: 20px; }

/* ----- FAQ ----- */
details.faq-item { border-bottom: 1px solid var(--gray-200); padding: 16px 0; }
details.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; font-weight: 400; color: var(--gray-500); }
details.faq-item[open] summary::after { content: '–'; }
details.faq-item p { margin-top: 12px; color: var(--gray-700); }

/* ----- Contact ----- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card h3 { margin-bottom: 4px; }
.contact-card p { color: var(--gray-600); font-size: .92rem; margin-bottom: 10px; }

/* ----- Search page ----- */
.search-box { display: flex; gap: 10px; margin-bottom: 28px; }
.search-box input { flex: 1; padding: 12px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 1rem; font-family: var(--font-body); }
.search-results { display: flex; flex-direction: column; gap: 4px; }
.search-result { display: block; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius); text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.search-result:hover { border-color: var(--ink); }
.search-result__section { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); }
.search-result__title { font-weight: 700; margin: 2px 0 4px; }
.search-result__desc { font-size: .88rem; color: var(--gray-600); }
.search-empty { color: var(--gray-500); padding: 20px 0; }

/* ----- Footer ----- */
.site-footer { background: var(--ink); color: var(--gray-300); padding: 48px 0 20px; margin-top: 40px; }
.site-footer h4 { color: var(--white); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--white); }
.site-footer__brand { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--gray-700); }
.site-footer__logo img { height: 26px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); }
.site-footer__brand-lede { font-size: .9rem; color: var(--gray-400); max-width: 360px; }
.site-footer address { font-style: normal; font-size: .88rem; color: var(--gray-400); margin-bottom: 8px; }
.site-footer__reg { font-size: .82rem; }
.site-footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 28px 0; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.legal-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--gray-500); padding-top: 16px; border-top: 1px solid var(--gray-700); }
@media (max-width: 820px) {
	.site-footer__brand, .site-footer__nav { grid-template-columns: 1fr; }
}

/* ----- MicroModal base (verification-snapshot modal on /directory/) ----- */
.modal { display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: fixed; inset: 0; background: rgba(16,18,20,.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal__container { background: var(--white); border-radius: var(--radius-lg); max-width: 480px; width: 100%; padding: 24px; box-shadow: var(--shadow-md); }
.modal__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.modal__title { font-size: 1.15rem; margin: 0; }
.modal__close { background: none; border: 0; font-size: 0; width: 28px; height: 28px; cursor: pointer; position: relative; }
.modal__close::before, .modal__close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: var(--gray-600); transform-origin: center; }
.modal__close::before { transform: translate(-50%,-50%) rotate(45deg); }
.modal__close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.modal__content .deflist__row { grid-template-columns: 150px 1fr; }

@keyframes mmfadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes mmfadeOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes mmslideIn { from { transform: translateY(8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes mmslideOut { from { transform: translateY(0); opacity: 1 } to { transform: translateY(8px); opacity: 0 } }
.micromodal-slide[aria-hidden="false"] .modal__overlay { animation: mmfadeIn .18s cubic-bezier(0,0,.2,1); }
.micromodal-slide[aria-hidden="false"] .modal__container { animation: mmslideIn .18s cubic-bezier(0,0,.2,1); }
.micromodal-slide[aria-hidden="true"] .modal__overlay { animation: mmfadeOut .18s cubic-bezier(0,0,.2,1); }
.micromodal-slide[aria-hidden="true"] .modal__container { animation: mmslideOut .18s cubic-bezier(0,0,.2,1); }
.micromodal-slide .modal__container, .micromodal-slide .modal__overlay { will-change: transform; }

/* ----- Tippy overrides to match the institutional palette ----- */
.tippy-box[data-theme~='light-border'] { color: var(--ink); }
[data-tippy-content] { border-bottom: 1px dotted var(--gray-400); cursor: help; }
