/* =============================================================
   ADVAL SYNERGY — Design System v1.0
   Compatible WordPress 6.x / PHP 8.3
   ============================================================= */

:root {
  --black:      #070707;
  --black-2:    #0e0e0e;
  --anthracite: #242424;
  --paper:      #fff;
  --off:        #f7f5f1;
  --line:       #e5e1d8;
  --text:       #111;
  --mid:        #57524d;
  --muted:      #837d77;
  --bx:         #7d1635;
  --bx-2:       #9b2046;
  --bx-light:   #bd5572;
  --max:        1180px;
  --px:         clamp(1.35rem, 5.8vw, 7rem);
  --nav:        86px;
  --ease:       cubic-bezier(.4,0,.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem; font-weight: 300; line-height: 1.8;
  color: var(--text); background: var(--paper); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
ul { list-style: none; }

/* ── ACCESSIBILITY ── */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto;
  z-index: 9999; background: #fff; color: #000;
  padding: .7rem 1.2rem; border: 2px solid var(--bx);
}
:focus-visible { outline: 2px solid var(--bx); outline-offset: 3px; }

/* ── ADMIN BAR OFFSET ── */
.admin-bar .site-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-nav { top: 46px; } }

/* ── NAVIGATION ── */
.site-nav {
  height: var(--nav); position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--px);
  background: rgba(255,255,255,.965);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 40px rgba(0,0,0,.04); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 64px; width: auto; transition: opacity .2s; }
.brand:hover img { opacity: .82; }
.nav-menu { display: flex; align-items: center; gap: 2.4rem; }
.nav-menu a {
  font-size: .64rem; font-weight: 500; letter-spacing: .19em;
  text-transform: uppercase; color: var(--muted); padding: .4rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s; white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu .current_page_ancestor > a {
  color: var(--black); border-bottom-color: var(--bx);
}
.nav-toggle {
  display: none; width: 44px; height: 44px; background: transparent; border: 0;
  flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; padding: 0;
}
.nav-toggle span {
  width: 24px; height: 1px; background: var(--black); display: block;
  transition: transform .25s var(--ease), opacity .25s; transform-origin: center;
}
.site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── LAYOUT ── */
#page { min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1; padding-top: var(--nav); }
.shell { max-width: var(--max); margin: 0 auto; }
.section { padding: clamp(5.8rem,10.5vh,9.5rem) var(--px); }
.section.off { background: var(--off); }
.section.dark { background: var(--black-2); color: #fff; }
.grid-2 {
  display: grid;
  grid-template-columns: minmax(260px,.88fr) minmax(340px,1.12fr);
  gap: clamp(3rem,7.5vw,8rem); align-items: start;
}

/* ── TYPOGRAPHY ── */
.eyebrow {
  font-size: .56rem; font-weight: 500; letter-spacing: .29em;
  text-transform: uppercase; color: var(--bx); margin-bottom: 1.25rem; display: block;
}
.dark .eyebrow, .hero .eyebrow, .contact-band .eyebrow, .page-hero .eyebrow { color: var(--bx-light); }
.display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.25rem,4.25vw,3.75rem);
  line-height: 1.08; font-weight: 300; letter-spacing: -.005em; color: inherit;
}
.rule { width: 34px; height: 1px; background: var(--bx); margin: 2rem 0; }
.copy { font-size: .97rem; color: var(--mid); line-height: 2.05; }
.copy p { margin-bottom: 1.15rem; }
.copy p:last-child { margin-bottom: 0; }
.dark .copy { color: rgba(255,255,255,.66); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .8rem; min-height: 49px; padding: .86rem 2.15rem;
  border: 1px solid var(--bx); background: var(--bx); color: #fff;
  text-transform: uppercase; letter-spacing: .155em; font-size: .62rem; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn::after { content: '\203A'; font-size: 1rem; line-height: 0; }
.btn:hover {
  background: #621128; border-color: #621128;
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(125,22,53,.28);
}
.btn.ghost { background: transparent; color: rgba(255,255,255,.78); border-color: rgba(189,85,114,.62); }
.btn.ghost:hover { background: rgba(125,22,53,.15); color: #fff; transform: translateY(-2px); }

/* ── HERO ── */
.hero {
  min-height: calc(100svh - var(--nav));
  display: grid; grid-template-columns: minmax(0,1.07fr) minmax(360px,.93fr);
  background: var(--black); color: #fff; position: relative; overflow: hidden;
}
.hero-copy { display: flex; align-items: center; padding: clamp(4rem,9vh,7rem) var(--px); }
.hero-inner { max-width: 820px; }
.kicker {
  display: inline-flex; align-items: center; gap: .72rem;
  font-size: .58rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.66); white-space: nowrap; margin-bottom: 2rem;
}
.kicker::before { content: ''; width: 30px; height: 1px; background: var(--bx-light); display: inline-block; flex-shrink: 0; }
.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.25rem,6.9vw,7rem); line-height: .98;
  font-weight: 300; letter-spacing: -.015em; max-width: 930px;
}
.hero h1 em { font-style: italic; color: rgba(255,255,255,.42); }
.hero-sub { max-width: 620px; margin-top: 2.2rem; color: rgba(255,255,255,.68); font-size: 1rem; line-height: 2; }
.hero-proof { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.55rem; }
.hero-proof span {
  border: 1px solid rgba(189,85,114,.38); color: rgba(255,255,255,.66);
  font-size: .58rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; padding: .42rem .62rem;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.25rem; }
.hero-visual {
  position: relative; min-height: 100%;
  background: linear-gradient(135deg,#050505,#171717 42%,#080808); overflow: hidden;
}
.hero-visual::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(118deg,transparent 0 22%,rgba(255,255,255,.13) 22.2% 22.8%,transparent 23% 100%),
    linear-gradient(26deg,transparent 0 48%,rgba(255,255,255,.16) 48.3% 49%,transparent 49.2% 100%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.08) 0 1px,transparent 1px 58px);
  opacity: .78;
}
.hero-visual::after {
  content: ''; position: absolute; inset: auto -8% -6% 4%; height: 76%;
  background: linear-gradient(92deg,rgba(255,255,255,.03),rgba(255,255,255,.14),rgba(0,0,0,.45));
  clip-path: polygon(28% 0,100% 0,100% 100%,0 100%);
}

/* ── TRUST STRIP ── */
.trust-strip {
  display: grid; grid-template-columns: repeat(5,1fr);
  gap: 1px; background: var(--line); border-bottom: 1px solid var(--line);
}
.trust-item { background: var(--off); padding: 2.45rem 2rem; transition: background .2s; }
.trust-item:hover { background: #efece6; }
.trust-item::before { content: ''; display: block; width: 26px; height: 1px; background: var(--bx); margin-bottom: 1.25rem; }
.trust-title { font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .55rem; }
.trust-text { font-size: .78rem; color: var(--mid); line-height: 1.75; }

/* ── METHOD CARDS ── */
.method { margin-top: 4.4rem; display: grid; grid-template-columns: repeat(5,1fr); gap: 1px; background: rgba(255,255,255,.08); }
.method-card {
  background: var(--black-2); padding: 3.05rem 2rem;
  border-top: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s;
}
.method-card:hover { background: #171717; border-color: var(--bx-light); }
.num {
  display: block; font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem; color: var(--bx-light); line-height: 1; margin-bottom: 1.65rem;
}
.method-card h3, .expert-card h3, .content-card h3, .principle h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.27rem; font-weight: 400; line-height: 1.25; margin-bottom: .85rem;
}
.method-card p { font-size: .78rem; line-height: 1.9; color: rgba(255,255,255,.57); }

/* ── STATEMENT ── */
.statement { display: grid; grid-template-columns: .82fr 1.18fr; min-height: 400px; }
.statement-img { background: linear-gradient(135deg,#0b0b0b,#242424); position: relative; overflow: hidden; }
.statement-img::before {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg,rgba(255,255,255,.1) 0 1px,transparent 1px 44px),
    linear-gradient(145deg,transparent 0 55%,rgba(247,245,241,.16) 55.3% 56%,transparent 56.2% 100%);
}
.statement-text { background: var(--off); display: flex; align-items: center; padding: clamp(3rem,7vw,7rem); }
.statement-text p { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2rem,3.7vw,3.7rem); line-height: 1.13; font-weight: 300; }
.statement-text em { font-style: italic; color: var(--bx); }

/* ── EXPERT CARDS ── */
.experts { margin-top: 4.4rem; display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); }
.expert-card, .content-card { background: #fff; padding: 3rem 2.25rem; transition: background .2s; }
.expert-card:hover { background: var(--off); }
.expert-card p, .content-card p, .principle p { color: var(--mid); font-size: .82rem; line-height: 1.95; }
.expert-card .num { color: #c8c1b8; }

/* ── PRINCIPLES ── */
.principles { margin-top: 4.3rem; display: grid; grid-template-columns: repeat(4,1fr); gap: clamp(2rem,4vw,4rem); }
.principle::before { content: ''; display: block; width: 22px; height: 1px; background: var(--bx); margin-bottom: 1.35rem; }

/* ── CONTACT BAND ── */
.contact-band {
  background: var(--black); color: #fff;
  padding: clamp(4.4rem,8vh,7rem) var(--px);
  display: grid; grid-template-columns: minmax(280px,.9fr) minmax(320px,1.1fr);
  gap: clamp(3rem,7vw,8rem); align-items: center;
}
.contact-band p { color: rgba(255,255,255,.66); font-size: .96rem; line-height: 2; max-width: 630px; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--black); color: #fff;
  padding: clamp(6.8rem,12vh,10rem) var(--px) clamp(4.4rem,8vh,6.4rem);
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; right: var(--px); top: 22%;
  width: 320px; height: 320px; border: 1px solid rgba(125,22,53,.16);
  transform: rotate(35deg); pointer-events: none;
}
.page-hero .display { max-width: 920px; }
.page-hero p:not(.eyebrow) { max-width: 740px; color: rgba(255,255,255,.66); font-size: 1rem; line-height: 2; margin-top: 1.8rem; }

/* ── CONTENT GRID ── */
.content-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--line); margin-top: 4rem; }

/* ── CONTACT FORM ── */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .56rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); background: var(--off); border-radius: 0;
  padding: .86rem 1rem; outline: none; color: var(--text); font-size: .88rem; font-weight: 300;
  transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--bx); background: #fff; }
.field textarea { min-height: 150px; resize: vertical; }
.fineprint { font-size: .74rem; color: var(--muted); line-height: 1.7; }
.form-notice {
  padding: 1rem 1.2rem; font-size: .82rem; line-height: 1.6;
  border: 1px solid; display: none;
}
.form-notice.success { background: #f0faf4; border-color: #68d391; color: #276749; }
.form-notice.error   { background: #fff5f5; border-color: #fc8181; color: #9b2c2c; }
.form-notice.visible { display: block; }

/* ── TEXT PAGES ── */
.text-page { max-width: 960px; margin: 0 auto; }
.text-page h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.1rem; font-weight: 300; margin: 2.8rem 0 1rem; }
.text-page h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; font-weight: 300; margin: 2rem 0 .75rem; }
.text-page p, .text-page li { font-size: .92rem; color: var(--mid); line-height: 2; }
.text-page ul { padding-left: 1.2rem; list-style: disc; margin: 1rem 0; }
.text-page strong { color: var(--text); font-weight: 500; }
.text-page a { color: var(--bx); border-bottom: 1px solid transparent; transition: border-color .2s; }
.text-page a:hover { border-bottom-color: var(--bx); }

/* ── 404 PAGE ── */
.error-page { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.error-code {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(6rem, 18vw, 14rem); font-weight: 300;
  color: rgba(255,255,255,.06); line-height: 1;
  position: absolute; top: 50%; left: var(--px); transform: translateY(-50%);
  user-select: none; pointer-events: none; letter-spacing: -.04em;
}

/* ── FOOTER ── */
.site-footer { background: #050505; color: #fff; padding: 3.2rem var(--px) 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px,1.2fr) repeat(3,minmax(160px,.65fr));
  gap: 2.6rem; max-width: var(--max); margin: 0 auto;
}
.footer-logo { height: 52px; width: auto; opacity: .92; margin-bottom: 1.15rem; }
.site-footer h4 { font-size: .56rem; font-weight: 500; letter-spacing: .19em; text-transform: uppercase; color: rgba(255,255,255,.74); margin-bottom: .9rem; }
.site-footer p, .site-footer a { font-size: .76rem; color: rgba(255,255,255,.52); line-height: 1.9; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max); margin: 2.4rem auto 0;
  padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom span { font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.32); }

/* ── ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .75s var(--ease), transform .75s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }



/* ── LOGO PNG BASE64 (adval-logo-img) ── */
.adval-logo-img { display: block; height: 64px; width: auto; transition: opacity .2s; }
.footer-brand .adval-logo-img { height: 52px; margin-bottom: .5rem; }
@media (max-width: 900px) {
  .adval-logo-img { height: 58px; }
  .footer-brand .adval-logo-img { height: 44px; }
}
@media (max-width: 520px) {
  .adval-logo-img { height: 52px; }
  .footer-brand .adval-logo-img { height: 38px; }
}

/* ── EXPERTS PAGE (standalone, no preceding grid) ── */
.experts--page { margin-top: 0; }

/* ── FOOTER BRAND LINK ── */
.footer-brand { display: inline-flex; align-items: center; }

/* ── CUSTOM LOGO WP (override to match nav design) ── */
.brand .custom-logo-link { display: flex; align-items: center; text-decoration: none; }
.brand .custom-logo-link:focus-visible { outline: 2px solid var(--bx); outline-offset: 3px; }

/* ── WP OVERRIDES ── */
.wp-block-paragraph { max-width: none; }
figure.wp-block-image { margin: 0; }
.wp-site-blocks { padding: 0 !important; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── 1180px ── */
@media (max-width: 1180px) {
  .method { grid-template-columns: repeat(3,1fr); }
  .experts { grid-template-columns: repeat(2,1fr); }
  .trust-strip { grid-template-columns: repeat(3,1fr); }
}

/* ── 900px ── */
@media (max-width: 900px) {
  :root { --nav: 76px; }
  .brand img { height: 58px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: var(--nav);
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 1rem var(--px) 1.4rem; box-shadow: 0 16px 32px rgba(0,0,0,.06);
  }
  .site-nav.open .nav-menu { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--line); width: 100%; font-size: .7rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-copy { padding: clamp(4.7rem,10vh,6.8rem) var(--px) clamp(4rem,8vh,5.8rem); }
  .hero h1 { font-size: clamp(3rem,13vw,4.9rem); }
  .trust-strip { grid-template-columns: 1fr; }
  .grid-2, .statement, .contact-band, .footer-grid { grid-template-columns: 1fr; }
  .statement-img { min-height: 260px; }
  .method, .experts, .principles, .content-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ── 520px ── */
@media (max-width: 520px) {
  :root { --nav: 70px; }
  .brand img { height: 52px; }
  .kicker { font-size: .54rem; letter-spacing: .11em; gap: .48rem; margin-bottom: 1.65rem; }
  .kicker::before { width: 20px; }
  .hero h1 { font-size: 3rem; line-height: 1.02; }
  .hero-sub { font-size: .95rem; line-height: 1.9; }
  .hero-proof { display: none; }
  .hero-actions { display: block; }
  .hero-actions .btn + .btn { margin-top: .75rem; }
  .btn { width: 100%; padding-left: 1rem; padding-right: 1rem; }
  .section { padding: 4.8rem var(--px); }
  .display { font-size: 2.18rem; }
  .method-card, .expert-card, .content-card { padding: 2.45rem 1.8rem; }
  .contact-band { padding: 4.2rem var(--px); }
  .page-hero::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
