/* Shared hand-painted identity. Load after each page's existing concept styles. */
:root {
  --site-art: url("../img/home-art-paper-20260907.png");
  --site-art-edge: linear-gradient(to bottom, #f4f2ec, rgba(244,242,236,0) min(140px, 18%), rgba(244,242,236,0) max(calc(100% - 140px), 82%), #f4f2ec);
  --site-art-light: linear-gradient(90deg, rgba(244,242,236,.68), rgba(244,242,236,.93) 25%, rgba(244,242,236,.93) 67%, rgba(244,242,236,.5));
  --site-art-dark: linear-gradient(rgba(10,24,46,.94), rgba(10,24,46,.94));
}
body { background-color: #f4f2ec; }
body.home-brand-concept::before,
body.erp-page::before,
body.contact-page::before { display: none !important; content: none !important; }

/* Section backgrounds are painted underneath text, never over the page. */
body:not(:has(.hero-with-video)) main {
  background: #f4f2ec !important;
}
body:not(:has(.hero-with-video)) main > :is(section, .philosophy-article-hero),
body:not(:has(.hero-with-video)) .product-case-section {
  background: var(--site-art-edge), var(--site-art-light), var(--site-art) center / cover no-repeat, #f4f2ec !important;
}
body.erp-page.oracle-specialist .hero {
  background: var(--site-art-edge), var(--site-art-light), var(--site-art) center / cover no-repeat, #f4f2ec !important;
}
body:not(:has(.hero-with-video)) main > section:nth-of-type(even) {
  background-position: center, center, right center !important;
}

/* Replace the old geometric decorations without touching AI border animation. */
body .page-hero-bg,
body .page-hero::before,
body .page-hero::after,
body.erp-page.oracle-specialist .hero::before,
body.erp-page.oracle-specialist .hero::after,
body.contact-page .contact-hero::before,
body .philosophy-article-hero::before,
body .philo-growth-section::before,
body.home-brand-concept .hero::after { display: none !important; content: none !important; }
body :is(.page-hero-card, .dx-hero-panel, .product-dashboard, .service-card-main, .entry-box, .cta, .cta-box, .philo-problem-card)::after {
  background: var(--site-art) center / cover no-repeat !important;
  opacity: .07 !important;
  mask-image: radial-gradient(ellipse, #000 25%, transparent 72%);
  pointer-events: none;
}

/* Dark sections retain their light typography and quiet painted texture. */
body:is(.home-brand-concept, .erp-page, .contact-page) main :is(.section-dark, .product-dark-section, .process-panel-v2, .recruit-movie-section, .philo-movie-section, .philo-growth-card-accent, .article-statement),
body.about-brand-concept #philosophy,
body.recruit-brand-concept #training,
body.dx-brand-concept #process,
body.philosophy-brand-concept #flow.section-dark {
  background: var(--site-art-dark), var(--site-art) center / cover no-repeat, #0a182e !important;
}
body :is(.entry-box, .cta-box, .oracle-specialist .cta) {
  background-color: #0a182e !important;
}
body :is(.entry-box, .cta-box, .oracle-specialist .cta) :is(h2, h3) { color: #fff !important; }
body :is(.entry-box, .cta-box, .oracle-specialist .cta) p { color: #e2e8ed !important; }
body :is(.entry-box, .cta-box, .oracle-specialist .cta) .eyebrow { color: #eed9a4 !important; }

/* Reading surfaces: long articles, forms, FAQ and tables stay clean. */
body :is(.legal-card, .dispatch-document, .philosophy-article, .form-panel, .faq-list, .oracle-specialist .faq, .profile-card, .job-card, .philo-growth-card:not(.philo-growth-card-accent)) {
  background-color: rgba(255,255,255,.98) !important;
}
body .site-footer {
  background: #0a182e !important;
  color: #e2e8ed !important;
}
body .site-footer :is(p, a, small, .footer-brand) { color: #e2e8ed !important; }
body .site-footer a:hover { color: #eed9a4 !important; }
body .dx-hero-panel, body .case-reason-grid { background-color: #0a182e; }
body.about-brand-concept .message-title h2 { color: #0a182e !important; }
body.about-brand-concept .message-title .eyebrow { color: #806223 !important; }
body.home-brand-concept .recruit-copy .button-secondary {
  color: #0a182e !important;
  background: rgba(255,255,255,.94) !important;
  border-color: #536473 !important;
}

/* Legacy public entry pages share the same paper, typography and controls. */
body:not(.home-brand-concept):not(.erp-page):not(.contact-page) {
  color: #243548;
  background: var(--site-art-edge), var(--site-art-light), var(--site-art) center top / cover no-repeat, #f4f2ec;
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
}
body:not(.home-brand-concept):not(.erp-page):not(.contact-page) :is(input[type="submit"], input[type="button"]) {
  color: #fff;
  background: #0a182e;
  border: 1px solid #0a182e;
  border-radius: 6px;
}
@media (max-width: 760px) {
  :root {
    --site-art-light: linear-gradient(90deg, rgba(244,242,236,.88), rgba(244,242,236,.95) 25%, rgba(244,242,236,.95) 75%, rgba(244,242,236,.8));
  }
}
@media print {
  body, body main, body main > section { background: #fff !important; }
}
