/*
 Theme Name:   JFRDR Kadence Child
 Theme URI:    https://jfrdr.xsrv.jp
 Description:  Kadence child theme for JFRDR (Japanese Foundation for Rare Disease Research)
 Author:       JFRDR
 Author URI:   https://jfrdr.xsrv.jp
 Template:     kadence
 Version:      1.2.0
 Text Domain:  jfrdr-kadence-child
*/

/* ===== JFRDR Brand Variables ===== */
:root {
    --jfrdr-bg: #78DCDC;
    --jfrdr-bg-dark: #6CCFCF;
    --jfrdr-ink: #3C6D6D;
    --jfrdr-white: #fff;
    --jfrdr-trust-gray: #C3C3C3;
    --jfrdr-cool-gray-8: #898989;
    --jfrdr-cool-gray-10: #646464;
    --jfrdr-light-bg: #F7F7F7;
    --jfrdr-pink: #FFB4BE;
    --jfrdr-yellow: #FFC800;
    --jfrdr-lavender: #B4AAE6;
    --jfrdr-teal: #78DCDC;
    --jfrdr-font-base: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    --jfrdr-font-en: "Roboto", system-ui, sans-serif;
    --jfrdr-font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

/* Mobile-only line break */
br.sp { display: none; }

/* ===== Global Reset / Base ===== */
body {
    font-family: var(--jfrdr-font-jp);
    color: var(--jfrdr-ink);
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove Kadence default page title hero */
.entry-hero {
    display: none !important;
}

/* Remove Kadence default content area margins and padding */
.content-area {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.entry-content-wrap {
    padding: 0 !important;
}

.content-style-boxed .entry-content-wrap,
.content-style-unboxed .entry-content-wrap {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Remove single entry box shadow */
.entry.single-entry {
    box-shadow: none !important;
}

/* Make content area full width */
#inner-wrap .content-container,
#inner-wrap .site-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.entry-content.single-content {
    margin: 0;
    padding: 0;
}

/* Override Kadence content width constraints for pages */
.site .content-container.site-container {
    max-width: 100% !important;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--jfrdr-font-jp);
    color: var(--jfrdr-ink);
}

h1 { font-size: 32px; font-weight: 800; line-height: 1.4; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.5; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.5; }

a {
    color: var(--jfrdr-ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--jfrdr-bg);
}

/* ================================================================
   HEADER: Teal topbar with logos
   ================================================================ */
.site-header .site-main-header-wrap {
    background: var(--jfrdr-bg) !important;
}

.site-header .site-main-header-inner-wrap {
    border-bottom: 1px solid rgba(255,255,255,0.4);
    min-height: 60px;
    padding: 0 20px;
}

/* Hide default site title text - we use logo image */
.site-branding .site-title-wrap {
    display: none;
}

.site-branding .custom-logo {
    max-height: 36px;
    width: auto;
}

/* #11 — Header right: Japanese logo + lang switch */
.jfrdr-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    height: 100%;
}

.jfrdr-header-logo-ja-img {
    width: min(195px, 40vw);
    height: auto;
}

/* Language switcher — inside nav bar, right-aligned */
.site-header-bottom-section-center {
    position: relative;
}

.jfrdr-lang-switch {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.jfrdr-lang-switch ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 3px;
}

.jfrdr-lang-switch li {
    list-style: none;
}

.jfrdr-lang-switch li a {
    display: block;
    padding: 4px 8px;
    font-family: var(--jfrdr-font-en);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--jfrdr-cool-gray-10);
    border: 1px solid rgba(100,100,100,0.2);
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.jfrdr-lang-switch li.current-lang a {
    color: var(--jfrdr-ink);
    background: var(--jfrdr-bg);
    border-color: var(--jfrdr-bg);
}

.jfrdr-lang-switch li a:hover {
    color: var(--jfrdr-ink);
    border-color: var(--jfrdr-bg);
}

/* Mobile language switcher (content area top-right on mobile) */
.jfrdr-mobile-lang-fixed {
    display: none;
}

@media (max-width: 768px) {
    .jfrdr-page-hero,
    .jfrdr-hero {
        position: relative;
    }

    .jfrdr-mobile-lang-fixed {
        display: block;
        position: absolute;
        bottom: 40px;
        right: 12px;
        z-index: 10;
    }

    .jfrdr-hero .jfrdr-mobile-lang-fixed {
        bottom: 50px;
    }

    .jfrdr-mobile-lang-fixed ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 4px;
    }

    .jfrdr-mobile-lang-fixed li {
        list-style: none;
    }

    .jfrdr-mobile-lang-fixed li a {
        display: block;
        padding: 5px 12px;
        font-family: var(--jfrdr-font-en);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--jfrdr-ink);
        background: #fff;
        border: 1.5px solid rgba(60,109,109,0.25);
        border-radius: 3px;
        text-decoration: none;
    }

    .jfrdr-mobile-lang-fixed li.current-lang a {
        color: #fff;
        background: var(--jfrdr-teal);
        border-color: var(--jfrdr-teal);
    }
}

/* Push the logo and ja-logo to edges */
.site-main-header-inner-wrap.site-header-row-has-sides {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navigation bar below header */
.site-header .site-bottom-header-wrap {
    background: var(--jfrdr-white) !important;
    border-bottom: 1px solid #e0e0e0;
}

/* Nav bar layout — spread items across full width */
.site-bottom-header-inner-wrap .site-header-row {
    justify-content: center !important;
}

.header-navigation .header-menu-container > ul {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* #1 — Nav link style with underline animation */
.header-navigation .header-menu-container > ul > li > a {
    color: var(--jfrdr-cool-gray-10) !important;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 16px 24px;
    transition: color 0.2s ease;
    position: relative;
}

.header-navigation .header-menu-container > ul > li > a::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: var(--jfrdr-bg);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.header-navigation .header-menu-container > ul > li > a:hover::after {
    transform: scaleX(1);
}

.header-navigation .header-menu-container > ul > li > a:hover {
    color: var(--jfrdr-ink) !important;
}

/* Current page — bold + permanent underline */
.header-navigation .header-menu-container > ul > li.current-menu-item > a,
.header-navigation .header-menu-container > ul > li.current_page_item > a {
    color: var(--jfrdr-ink) !important;
    font-weight: 700;
}

.header-navigation .header-menu-container > ul > li.current-menu-item > a::after,
.header-navigation .header-menu-container > ul > li.current_page_item > a::after {
    transform: scaleX(1);
}

/* ================================================================
   FOOTER — Rich corporate footer
   ================================================================ */
.jfrdr-footer-main {
    background: var(--jfrdr-bg);
    padding: 48px 20px 40px;
    border-top: 1px solid rgba(60,109,109,0.2);
    border-bottom: 1px solid rgba(60,109,109,0.2);
    position: relative;
    overflow: hidden;
}

/* Teal oval decoration in footer */
.jfrdr-footer-main::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -3%;
    width: 350px;
    height: 280px;
    transform: translateY(-50%);
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.jfrdr-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.jfrdr-footer-brand {
    flex-shrink: 0;
}

.jfrdr-footer-logo-en {
    width: 149px;
    height: 35px;
    display: block;
    margin-bottom: 12px;
}

.jfrdr-footer-logo-ja {
    width: 195px;
    height: 18px;
    display: block;
}

.jfrdr-footer-nav-label {
    color: var(--jfrdr-ink);
    font-family: var(--jfrdr-font-en);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(60,109,109,0.2);
}

.jfrdr-footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jfrdr-footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jfrdr-footer-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jfrdr-footer-nav a {
    color: var(--jfrdr-white);
    font-size: 13px;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease;
    opacity: 0.7;
    text-decoration: none;
}

.jfrdr-footer-nav a:hover {
    opacity: 1;
    color: var(--jfrdr-white);
}

.jfrdr-footer-contact {
    font-size: 13px;
    color: var(--jfrdr-white);
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jfrdr-footer-contact p {
    margin: 0 0 10px;
}

.jfrdr-footer-privacy {
    color: var(--jfrdr-white);
    font-size: 13px;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.jfrdr-footer-privacy:hover {
    opacity: 1;
    color: var(--jfrdr-white);
}

/* Kadence bottom bar — copyright strip */
.site-footer .site-bottom-footer-wrap {
    background: var(--jfrdr-bg) !important;
    border-top: none;
    padding: 14px 0 !important;
}

.site-footer .site-bottom-footer-inner-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.site-footer .footer-html {
    color: var(--jfrdr-ink) !important;
    font-size: 11px;
    text-align: center;
}

/* ================================================================
   #2 — HERO ANIMATIONS (fadeInUp stagger)
   ================================================================ */
@keyframes waveFloat1 {
    0% { transform: translateX(0); }
    25% { transform: translateX(-120px); }
    50% { transform: translateX(-180px); }
    75% { transform: translateX(-60px); }
    100% { transform: translateX(0); }
}

@keyframes waveFloat2 {
    0% { transform: translateX(0); }
    30% { transform: translateX(140px); }
    60% { transform: translateX(60px); }
    100% { transform: translateX(0); }
}

@keyframes waveFloat3 {
    0% { transform: translateX(0); }
    40% { transform: translateX(-100px); }
    70% { transform: translateX(50px); }
    100% { transform: translateX(0); }
}

@keyframes waveFloat4 {
    0% { transform: translateX(0); }
    35% { transform: translateX(110px); }
    65% { transform: translateX(-60px); }
    100% { transform: translateX(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   HOME PAGE - HERO
   ================================================================ */
.jfrdr-hero {
    background: var(--jfrdr-bg);
    padding: 80px 20px 160px;
    text-align: center;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Rising Teal Green Oval — brand symbol as background */
.jfrdr-hero::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -5%;
    width: 500px;
    height: 400px;
    transform: translateY(-50%);
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.18;
    pointer-events: none;
}

.jfrdr-hero::after {
    content: "";
    position: absolute;
    top: 15%;
    left: -8%;
    width: 350px;
    height: 280px;
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
    filter: blur(2px);
}

.jfrdr-hero .hero-logo {
    max-width: min(593px, 68vw);
    margin: 0 auto 48px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out both;
}

.jfrdr-hero .hero-logo img {
    width: 100%;
    height: auto;
}

.jfrdr-hero h1 {
    color: var(--jfrdr-ink) !important;
    font-family: var(--jfrdr-font-en);
    font-size: clamp(20px, 3vw, 27px);
    font-weight: 500;
    letter-spacing: 0.12em;
    margin: 0;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.jfrdr-hero .hero-subtitle {
    color: var(--jfrdr-ink);
    font-family: var(--jfrdr-font-en);
    font-size: clamp(14px, 2vw, 17px);
    letter-spacing: 0.12em;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.jfrdr-hero .hero-jp {
    display: inline-block;
    position: relative;
    margin-top: 8px;
    font-size: clamp(16px, 2.5vw, 23px);
    color: var(--jfrdr-ink);
    z-index: 1;
    letter-spacing: 0.15em;
    animation: fadeInUp 0.8s ease-out 0.45s both;
}

.jfrdr-hero .hero-jp::before,
.jfrdr-hero .hero-jp::after {
    content: "";
    position: absolute;
    top: 55%;
    width: 130px;
    height: 1px;
    transform: translateY(-50%);
}

.jfrdr-hero .hero-jp::before {
    right: 100%;
    margin-right: 24px;
    background: linear-gradient(to left, rgba(60,109,109,0.7) 0%, rgba(60,109,109,0) 100%);
}

.jfrdr-hero .hero-jp::after {
    left: 100%;
    margin-left: 24px;
    background: linear-gradient(to right, rgba(60,109,109,0.7) 0%, rgba(60,109,109,0) 100%);
}

/* #2 — Hero wave SVG (teal → next section) — multi-layer */
.jfrdr-hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    z-index: 3;
    line-height: 0;
    overflow: hidden;
}

.jfrdr-hero-wave svg {
    display: block;
    width: 140%;
    margin-left: -20%;
    height: 120px;
    margin-bottom: -2px;
}

.jfrdr-hero-wave svg path:nth-child(1) { animation: waveFloat1 6s ease-in-out infinite; }
.jfrdr-hero-wave svg path:nth-child(2) { animation: waveFloat2 4.5s ease-in-out infinite; }
.jfrdr-hero-wave svg path:nth-child(3) { animation: waveFloat3 5s ease-in-out infinite; }
.jfrdr-hero-wave svg path:nth-child(4) { animation: waveFloat4 7s ease-in-out infinite; }

/* ================================================================
   HOME PAGE - FEATURE CARDS (3 columns) — #3
   ================================================================ */
.jfrdr-features {
    background: var(--jfrdr-light-bg);
    padding: 90px 20px 70px;
    position: relative;
    overflow: hidden;
}

/* Sphere watermark on features section */
.jfrdr-features::before {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -5%;
    width: 400px;
    height: 320px;
    background: url('/wp-content/uploads/2026/03/sphere_white.svg') center / contain no-repeat;
    opacity: 0.5;
    pointer-events: none;
}

.jfrdr-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1080px;
    margin: 0 auto;
    counter-reset: feature-counter;
}

.jfrdr-feature-card {
    background: #fff;
    border-radius: 6px;
    padding: 32px 28px;
    border-left: 4px solid var(--jfrdr-bg);
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-image 0.3s ease;
    position: relative;
    overflow: hidden;
    counter-increment: feature-counter;
    display: flex;
    flex-direction: column;
}

/* #3 — Card number watermark */
.jfrdr-feature-card::before {
    content: "0" counter(feature-counter);
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: var(--jfrdr-font-en);
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    opacity: 0.15;
}

/* Each card gets its own secondary color — 多様性と個のオリジナリティ */
.jfrdr-feature-card:nth-child(1) { border-left-color: var(--jfrdr-lavender); }
.jfrdr-feature-card:nth-child(2) { border-left-color: var(--jfrdr-pink); }
.jfrdr-feature-card:nth-child(3) { border-left-color: var(--jfrdr-yellow); }

.jfrdr-feature-card:nth-child(1)::before { color: var(--jfrdr-lavender); }
.jfrdr-feature-card:nth-child(2)::before { color: var(--jfrdr-pink); }
.jfrdr-feature-card:nth-child(3)::before { color: var(--jfrdr-yellow); }

.jfrdr-feature-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.jfrdr-feature-card h3 {
    color: var(--jfrdr-ink);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 0;
    border: none;
}

.jfrdr-feature-card p {
    color: var(--jfrdr-cool-gray-10);
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 10px;
    flex-grow: 1;
}

.jfrdr-feature-card p:last-child {
    flex-grow: 0;
    margin-top: auto;
    margin-bottom: 0;
}

/* #3 — Arrow slide animation */
.jfrdr-feature-card a {
    color: var(--jfrdr-ink);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-block;
}

.jfrdr-feature-card .jfrdr-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.jfrdr-feature-card a:hover .jfrdr-arrow {
    transform: translateX(3px);
}

.jfrdr-feature-card a:hover {
    color: #5cc0c0;
}

/* ================================================================
   HOME PAGE - LEAD SECTION — #9 spacing
   ================================================================ */
.jfrdr-lead {
    background: #fff;
    padding: 90px 20px 80px;
}

.jfrdr-lead-inner {
    max-width: 780px;
    margin: 0 auto;
}

.jfrdr-lead h2 {
    color: var(--jfrdr-ink);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--jfrdr-bg);
}

.jfrdr-lead p {
    color: var(--jfrdr-cool-gray-10);
    font-size: 15px;
    line-height: 2;
    margin-bottom: 18px;
}

/* ================================================================
   INNER PAGES - TEAL HERO BANNER — #4
   ================================================================ */
.jfrdr-page-hero {
    background: var(--jfrdr-bg);
    padding: 60px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Sphere decorative background on inner page heroes */
.jfrdr-page-hero::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -3%;
    width: 300px;
    height: 240px;
    transform: translateY(-55%);
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.15;
    pointer-events: none;
}

.jfrdr-page-hero::after {
    display: none;
}

.jfrdr-page-hero h1 {
    color: var(--jfrdr-ink) !important;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.05em;
    animation: fadeInUp 0.7s ease-out both;
}

/* #4 — Decoration line under H1 (gradient fade) */
.jfrdr-page-hero .jfrdr-hero-line {
    width: 80px;
    height: 1px;
    margin: 20px auto 0;
    background: linear-gradient(to right, rgba(60,109,109,0) 0%, rgba(60,109,109,0.6) 30%, rgba(60,109,109,0.6) 70%, rgba(60,109,109,0) 100%);
}

/* #4 — Page hero wave — multi-layer */
.jfrdr-page-hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    z-index: 2;
    line-height: 0;
    overflow: hidden;
}

.jfrdr-page-hero-wave svg {
    display: block;
    width: 140%;
    margin-left: -20%;
    height: 80px;
    margin-bottom: -2px;
}

.jfrdr-page-hero-wave svg path:nth-child(1) { animation: waveFloat1 6s ease-in-out infinite; }
.jfrdr-page-hero-wave svg path:nth-child(2) { animation: waveFloat2 4.5s ease-in-out infinite; }
.jfrdr-page-hero-wave svg path:nth-child(3) { animation: waveFloat3 5s ease-in-out infinite; }
.jfrdr-page-hero-wave svg path:nth-child(4) { animation: waveFloat4 7s ease-in-out infinite; }

/* Inner page body background (behind the card) */
body.page:not(.home) .site {
    background: var(--jfrdr-light-bg);
}


/* Teal oval decoration behind content card */
body.page:not(.home) .content-wrap {
    position: relative;
}

body.page:not(.home) .content-wrap::before {
    content: "";
    position: absolute;
    top: 10%;
    right: -8%;
    width: 400px;
    height: 320px;
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

body.page:not(.home) .content-wrap::after {
    content: "";
    position: absolute;
    bottom: 5%;
    left: -6%;
    width: 300px;
    height: 240px;
    background: url('/wp-content/uploads/2026/03/sphere_teal.svg') center / contain no-repeat;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

/* ================================================================
   INNER PAGES - WHITE CONTENT CARD — #5
   ================================================================ */
.jfrdr-content {
    background: #fff;
    max-width: 900px;
    margin: -30px auto 60px;
    padding: 56px 48px;
    border-radius: 6px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* White oval on content card (same as .jfrdr-features::before) */
.jfrdr-content::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -5%;
    width: 400px;
    height: 320px;
    background: url('/wp-content/uploads/2026/03/sphere_white.svg') center / contain no-repeat;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.jfrdr-content::after {
    content: "";
    position: absolute;
    bottom: -60px;
    right: -5%;
    width: 400px;
    height: 320px;
    background: url('/wp-content/uploads/2026/03/sphere_white.svg') center / contain no-repeat;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* #5 — H2 underline animation */
.jfrdr-content h2 {
    color: var(--jfrdr-ink);
    font-weight: 700;
    font-size: 22px;
    padding-bottom: 10px;
    margin-top: 48px;
    margin-bottom: 20px;
    position: relative;
    border-bottom: none;
}

.jfrdr-content h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--jfrdr-bg);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.jfrdr-content h2.is-visible::after {
    transform: scaleX(1);
}

.jfrdr-content h2:first-child {
    margin-top: 0;
}

/* #5 — H3 with teal accent dot */
.jfrdr-content h3 {
    color: var(--jfrdr-ink);
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    padding-left: 16px;
    position: relative;
}

.jfrdr-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--jfrdr-bg);
}

.jfrdr-content p {
    color: var(--jfrdr-cool-gray-10);
    font-size: 15px;
    line-height: 2;
    margin-bottom: 16px;
}

/* #5 — Teal square bullets */
.jfrdr-content ul {
    color: var(--jfrdr-cool-gray-10);
    font-size: 15px;
    line-height: 2;
    padding-left: 20px;
    margin-bottom: 20px;
    list-style: none;
}

.jfrdr-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 6px;
}

.jfrdr-content li::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0.85em;
    width: 6px;
    height: 6px;
    background: var(--jfrdr-bg);
    border-radius: 1px;
}

.jfrdr-content strong {
    color: var(--jfrdr-ink);
}

/* #10 — Quote box with pink accent */
.jfrdr-quote {
    background: var(--jfrdr-light-bg);
    border-left: 4px solid var(--jfrdr-pink);
    padding: 20px 24px;
    font-size: 16px !important;
    font-weight: 600;
    color: var(--jfrdr-ink) !important;
    border-radius: 0 4px 4px 0;
    margin: 24px 0;
}

/* ================================================================
   ABOUT PAGE - MEMBER CARDS — #6
   ================================================================ */
.jfrdr-member {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.jfrdr-member:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.jfrdr-member-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    align-items: start;
}

/* #6 — Photo hover overlay */
.jfrdr-member-photo {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.jfrdr-member-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--jfrdr-bg);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    pointer-events: none;
}

.jfrdr-member-photo:hover::after {
    opacity: 0.1;
}

.jfrdr-member-photo img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: block;
}

.jfrdr-member-text h3 {
    color: var(--jfrdr-ink);
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 2px;
    border: none;
    padding: 0;
    padding-left: 0;
}

.jfrdr-member-text h3::before {
    display: none;
}

/* #6 — Gradient line under name */
.jfrdr-member-text h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    margin-top: 6px;
    background: linear-gradient(to right, rgba(60,109,109,0.6) 0%, rgba(60,109,109,0) 100%);
}

.jfrdr-member-role {
    color: var(--jfrdr-bg) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 12px !important;
    margin-top: 8px !important;
    letter-spacing: 0.03em;
}

.jfrdr-member-text p {
    font-size: 14px;
    line-height: 1.9;
}

/* ================================================================
   #8 — SCROLL ANIMATION (IntersectionObserver)
   ================================================================ */
.jfrdr-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.jfrdr-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for feature cards */
.jfrdr-feature-card.jfrdr-animate:nth-child(1) { transition-delay: 0s; }
.jfrdr-feature-card.jfrdr-animate:nth-child(2) { transition-delay: 0.1s; }
.jfrdr-feature-card.jfrdr-animate:nth-child(3) { transition-delay: 0.2s; }

/* ================================================================
   prefers-reduced-motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .jfrdr-hero .hero-logo,
    .jfrdr-hero h1,
    .jfrdr-hero .hero-subtitle,
    .jfrdr-hero .hero-jp,
    .jfrdr-page-hero h1 {
        animation: none !important;
    }

    .jfrdr-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .jfrdr-content h2::after {
        transform: scaleX(1) !important;
        transition: none !important;
    }

    .header-navigation .header-menu-container > ul > li > a::after {
        transition: none !important;
    }

    .jfrdr-feature-card .jfrdr-arrow {
        transition: none !important;
    }

    .jfrdr-hero-wave svg path,
    .jfrdr-page-hero-wave svg path {
        animation: none !important;
    }
}

/* ================================================================
   ENGLISH LANGUAGE OVERRIDES
   ================================================================ */
html[lang="en-US"] .jfrdr-lead h2 {
    text-align: left;
    font-size: clamp(20px, 2.5vw, 24px);
}

html[lang="en-US"] .jfrdr-lead p {
    font-size: clamp(14px, 1.8vw, 15px);
}

/* ================================================================
   MOBILE DRAWER — Teal theme (matching site identity)
   ================================================================ */
#mobile-drawer {
    background: var(--jfrdr-bg) !important;
}

#mobile-drawer .drawer-inner,
#mobile-drawer .drawer-content {
    background: var(--jfrdr-bg) !important;
}

#mobile-drawer .drawer-header {
    background: var(--jfrdr-bg);
    border-bottom: none;
    padding: 20px 24px;
}

#mobile-drawer .drawer-header .drawer-toggle {
    color: var(--jfrdr-white) !important;
}

#mobile-drawer .mobile-navigation ul {
    padding: 24px 16px;
}

#mobile-drawer .mobile-navigation ul li {
    font-size: 17px;
}

#mobile-drawer .mobile-navigation ul li > a,
#mobile-drawer .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap {
    color: var(--jfrdr-white) !important;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding-top: 18px;
    padding-bottom: 18px;
}

#mobile-drawer .mobile-navigation ul li.current-menu-item > a,
#mobile-drawer .mobile-navigation ul li.current-menu-item > .drawer-nav-drop-wrap {
    color: var(--jfrdr-white) !important;
    font-weight: 700;
}

#mobile-drawer .mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap,
#mobile-drawer .mobile-navigation ul li:not(.menu-item-has-children) a {
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}

#mobile-drawer .mobile-navigation:not(.drawer-navigation-parent-toggle-true) ul li.menu-item-has-children .drawer-nav-drop-wrap button {
    border-left: 1px solid rgba(255,255,255,0.15) !important;
    color: var(--jfrdr-white) !important;
}

/* Mobile header — hamburger position and logo */
#mobile-header .site-main-header-inner-wrap {
    padding: 0 12px;
}

#mobile-header .mobile-toggle-open-container .menu-toggle-open {
    color: var(--jfrdr-ink) !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .jfrdr-features-grid {
        gap: 20px;
    }

    .jfrdr-feature-card {
        padding: 24px 22px;
    }
}

@media (max-width: 768px) {
    .jfrdr-hero {
        padding: 56px 20px 120px;
        min-height: auto;
    }

    .jfrdr-hero .hero-logo {
        margin-bottom: 32px;
    }

    .jfrdr-hero .hero-jp::before,
    .jfrdr-hero .hero-jp::after {
        width: 50px;
        margin-right: 14px;
        margin-left: 14px;
    }

    .jfrdr-hero-wave svg {
        height: 80px;
    }

    .jfrdr-features {
        padding: 50px 16px;
    }

    .jfrdr-features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .jfrdr-lead {
        padding: 50px 16px;
    }

    .jfrdr-lead h2 {
        font-size: 20px;
    }

    br.sp { display: inline; }

    .jfrdr-page-hero {
        padding: 40px 16px 80px;
    }

    .jfrdr-page-hero-wave svg {
        height: 50px;
    }

    .jfrdr-content {
        margin: -20px 12px 40px;
        padding: 32px 24px;
    }

    .jfrdr-content h2 {
        font-size: 20px;
    }

    .jfrdr-content h3 {
        padding-left: 14px;
    }

    .jfrdr-member-grid {
        grid-template-columns: 120px 1fr;
        gap: 20px;
    }

    /* Mobile footer */
    .jfrdr-footer-inner {
        flex-direction: column;
        gap: 28px;
    }

    .jfrdr-footer-nav {
        gap: 16px 24px;
    }

    /* Mobile header adjustments */
    .site-header .header-navigation .header-menu-container > ul > li > a {
        font-size: 13px;
        padding: 12px 14px;
    }

    .header-navigation .header-menu-container > ul {
        gap: 2px;
    }

    /* Header right smaller on tablet */
    .jfrdr-header-logo-ja-img {
        width: min(150px, 30vw);
    }

    .jfrdr-header-right {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .jfrdr-hero {
        min-height: auto;
        padding: 48px 16px 110px;
    }

    .jfrdr-hero .hero-jp::before,
    .jfrdr-hero .hero-jp::after {
        display: none;
    }

    .jfrdr-member-grid {
        grid-template-columns: 1fr;
    }

    .jfrdr-member-photo {
        max-width: 160px;
        margin: 0 auto;
    }

    .jfrdr-member-text {
        text-align: left;
    }

    .jfrdr-member-text h3 {
        margin-top: 16px;
    }

    .jfrdr-content {
        margin: -16px 8px 32px;
        padding: 24px 18px;
    }

    /* Hide ja logo on small mobile, keep lang switch */
    .jfrdr-header-logo-ja-img {
        display: none;
    }
}
