/*
Theme Name: U-NETRANS Recruit
Theme URI: https://u-netrans.co.jp/
Author: U-NETRANS
Author URI: https://u-netrans.co.jp/
Description: 株式会社ユーネットランス 採用サイト用カスタムテーマ
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unetrans-recruit
Tags: custom-menu, custom-logo, featured-images, full-width-template

株式会社ユーネットランス採用サイト専用テーマ
Tailwind CSS + GSAPを使用したモダンなデザイン
*/

/* ==========================================================================
   Base Styles (Tailwind CSSで上書きされる前のフォールバック)
   ========================================================================== */

:root {
    --brand-orange: #FF6B00;
    --brand-yellow: #FFD100;
    --brand-blue: #4FACFE;
    --brand-dark: #2D3748;
    --brand-light: #F8F9FA;
}

body {
    background-color: var(--brand-light);
    overflow-x: hidden;
    font-feature-settings: "palt";
}

/* Glass Panel Effects */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Staff profile image loading placeholder */
.staff-img-wrap {
    position: relative;
    background: #f3f4f6;
    border-radius: 0.5rem;
    overflow: hidden;
}
.staff-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}
.staff-img-wrap.is-loaded::after {
    display: none;
}
.staff-img-wrap img {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.staff-img-wrap.is-loaded img {
    opacity: 1;
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Timeline vertical line — stops at center of last circle (w-20 = 5rem, center = 2.5rem) */
.timeline-line {
    position: relative;
}
.timeline-line::before {
    content: '';
    position: absolute;
    left: calc(2.5rem - 1.5px); /* center of w-20 circle minus half line width */
    top: 2.5rem; /* start from center of first circle */
    bottom: 2.5rem; /* end at center of last circle */
    width: 3px;
    background: linear-gradient(to bottom, #94a3b8, #cbd5e1);
    border-radius: 2px;
}

/* Split Section Effects */
.split-section {
    transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile: diagonal split (portrait-friendly) */
.split-left {
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 58%);
}
.split-right {
    clip-path: polygon(0 58%, 100% 45%, 100% 100%, 0 100%);
}

/* Mobile: foreground image spans full width of section but is vertically shorter,
 * sized to cover the entire clip-path trapezoid (top for FUTURE, bottom for LIFE).
 * object-position controls which horizontal slice of the wide composition shows. */
.split-img-future {
    inset: auto !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 75% !important;
    object-fit: cover !important;
    object-position: left top !important;
    z-index: 5;
}
.split-img-life {
    inset: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 75% !important;
    object-fit: cover !important;
    object-position: right bottom !important;
    z-index: 5;
}

/* Tablet width (wider aspect ratio): fill full section height to eliminate any
 * gap between the foreground image bottom and the diagonal clip edge. */
@media (min-width: 640px) and (max-width: 1023px) {
    .split-img-future,
    .split-img-life {
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Desktop: diagonal split (landscape) */
@media (min-width: 1024px) {
    .split-left {
        clip-path: polygon(0 0, 65% 0, 35% 100%, 0 100%);
    }
    .split-right {
        clip-path: polygon(65% 0, 100% 0, 100% 100%, 35% 100%);
    }

    .split-left:hover {
        clip-path: polygon(0 0, 75% 0, 45% 100%, 0 100%);
        z-index: 20;
    }
    .split-right:hover {
        clip-path: polygon(55% 0, 100% 0, 100% 100%, 25% 100%);
        z-index: 20;
    }

    .split-img-future,
    .split-img-life {
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        z-index: auto;
    }
}

/* Text Effects */
.text-outline {
    -webkit-text-stroke: 2px currentColor;
    -webkit-text-fill-color: transparent;
}

.text-shadow-sm {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Glow Animation */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 107, 0, 0.6); }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Marquee Container */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Header glass effect on scroll */
.header-glass {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
}

/* Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4a5568;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
}

@media (min-width: 640px) {
    .loader {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .loader {
        font-size: 2rem;
    }
}

/* Blob Animation Background */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: blob-float 10s infinite ease-in-out alternate;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -20px) scale(1.1); }
}

/* Confetti Animation (for FUTURE page) */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall linear infinite;
    z-index: 1;
}

/* Spec Table Header Colors */
.spec-table-header-blue { background-color: #2563EB; color: #fff; }
.spec-table-header-orange { background-color: #F97316; color: #fff; }
.spec-table-header-gray { background-color: #374151; color: #fff; }
.spec-table-header-purple { background-color: #9333EA; color: #fff; }

/* Details/Summary Accordion */
details summary {
    cursor: pointer;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary .accordion-icon {
    transform: rotate(180deg);
}

.accordion-icon {
    transition: transform 0.2s ease;
}

/* Mobile Fixed Bottom CTA */
.mobile-cta-bar {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Floating action bar の下にコンテンツが隠れないよう body 末尾を確保
   (front-page の `.fixed.bottom-4` ペアボタンが約 60px 占有 + safe-area) */
body.home main {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

@media (min-width: 640px) {
    body.home main {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));
    }
}

/* Responsive adjustments for timeline on mobile */
@media (max-width: 639px) {
    .timeline-item::before {
        left: 0;
        width: 2px;
    }
    .glass-card:hover {
        transform: translateY(-2px);
    }
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}

/* FUTURE Page: Fresh Gradient */
.fresh-gradient-bg {
    background: linear-gradient(120deg, #00C6FF, #007AFF, #FF8800, #FFD100);
    background-size: 400% 400%;
    animation: gradient-xy 20s ease infinite;
}

@keyframes gradient-xy {
    0%, 100% { background-position: left center; }
    50% { background-position: right center; }
}

.text-gradient-fresh {
    background: linear-gradient(to right, #007AFF, #00C6FF, #FF8800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel-accent {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px rgba(0, 122, 255, 0.1);
}

.grid-overlay {
    background-image:
        linear-gradient(rgba(0, 122, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 122, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.text-stroke-light {
    -webkit-text-stroke: 1px rgba(0,0,0,0.1);
    color: transparent;
}

/* FUTURE Confetti (page-level) */
@keyframes confetti-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* FUTURE Timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #007AFF, #00C6FF);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Future Hero: Scattered Photos + Floating Objects
   ========================================================================== */

/* Large floating decorative objects */
@keyframes future-drift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(30px, -20px) rotate(3deg); }
    50%  { transform: translate(-10px, -40px) rotate(-2deg); }
    75%  { transform: translate(-25px, -10px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.future-float {
    animation: future-drift linear infinite;
}

/* Photo — hidden until GSAP entrance */
.future-photo {
    opacity: 0;
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}

.future-photo.is-entered {
    opacity: 1;
}

/* Hover lift */
.future-photo:hover {
    transform: scale(1.04) translateY(-4px) !important;
    z-index: 15;
}

/* Mouse-follow parallax layer depth */
.future-photo[data-depth="1"] { --parallax-strength: 0.015; }
.future-photo[data-depth="2"] { --parallax-strength: 0.025; }
.future-photo[data-depth="3"] { --parallax-strength: 0.035; }

/* Scroll parallax for shapes */
.future-float {
    will-change: transform;
}

/* ==========================================================================
   Footer link tap target (mobile)
   text-sm 14px の単純リンクは行高 20px しかなく Apple HIG 44px に届かないため、
   モバイルではセル padding を追加して 36〜40px に拡張する
   ========================================================================== */
@media (max-width: 767px) {
    footer ul li {
        padding-block: 6px;
    }

    footer ul li a {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
    }
}

/* ==========================================================================
   Reduced Motion (アクセシビリティ)
   ユーザーが prefers-reduced-motion: reduce を設定している場合、
   装飾アニメ（blob, marquee, confetti, future-drift）を無効化し、
   GSAP scrollytelling で初期 opacity:0 のままになる要素を救済
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    /* GSAP gsap.from / gsap.set で opacity:0 のまま放置される可能性のある要素を救済 */
    .future-photo,
    .future-photo:not(.is-entered),
    [data-animate],
    .glass-card,
    .timeline-item,
    .staff-img-wrap img {
        opacity: 1 !important;
        transform: none !important;
    }

    /* 装飾アニメは止める */
    .blob,
    .animate-pulse-glow,
    .animate-float,
    .animate-marquee,
    .future-float,
    .confetti,
    .fresh-gradient-bg {
        animation: none !important;
    }

    /* マーキー要素は静止表示 */
    .marquee-container .marquee-item:not(:first-child) {
        display: none !important;
    }
}
