/*
Theme Name: Polymathes
Author: Sixtenth
Description: A custom WordPress theme for Polymathes.
Version: 1.0.0
*/

:root {
    /* Core Colors */
    --alchemy-black: #0F1114;
    --deep-graphite: #1E2228;
    --bg-alt: #12161B;
    /* New alternating background */
    --lunar-silver: #C9CCD3;
    --pale-moon: #F0F2F5;
    /* Lightened from #E8EAED */

    /* Accent Colors */
    --mercury-blue: #5E6B8A;
    --ether-violet: #6C5C8F;
    --border-color: #4A505A;

    /* Spacing */
    --spacing-unit: 8px;
    --section-spacing: 120px;
    /* Increased for better separation */
    --card-padding: 32px;
}

/* Apply standard font to body and other elements that might not inherit */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
input,
textarea,
select,
button,
li {
    font-family: "LINE Seed JP", sans-serif;
}

body {
    background-color: var(--alchemy-black);
    color: var(--pale-moon);
    line-height: 1.7;
    /* Fixed line-height */
    font-size: 16px;
    /* Base size increase */
    margin: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    font-weight: 500;
    /* Medium */
    color: var(--pale-moon);
}

h1 {
    font-size: 40px;
    font-weight: 700;
    /* Bold for Hero */
}

h2 {
    font-size: 32px;
    /* Increased from 28px */
    text-align: center;
    /* Center section headings */
    margin-bottom: 48px;
}

h3 {
    font-size: 22px;
    /* Increased from 20px */
}

p {
    font-size: 16px;
    margin-bottom: 1.5em;
    max-width: 720px;
    /* Improved readability */
}

a {
    color: var(--lunar-silver);
    text-decoration: none;
    transition: opacity 0.2s ease-in-out;
}

a:hover {
    opacity: 0.8;
}

/* Layout Modules */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-spacing) 0;
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    letter-spacing: 0.02em;
    /* Added for refinement */
}

.btn-primary {
    background-color: var(--lunar-silver);
    color: var(--alchemy-black);
    min-height: 54px;
    /* Human ergonomics > 44px */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    /* Stronger padding */
    font-size: 16px;
    font-weight: 700;
}

.btn-primary:hover {
    background-color: #E1E3E8;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(201, 204, 211, 0.2);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--lunar-silver);
    color: var(--lunar-silver);
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
}

.btn-secondary:hover {
    background-color: rgba(201, 204, 211, 0.1);
    border-color: var(--pale-moon);
}

.card {
    background-color: var(--deep-graphite);
    border: 1px solid var(--border-color);
    padding: var(--card-padding);
    border-radius: 4px;
    box-shadow: none;
    transition: all 0.25s ease-in-out;
    position: relative;
    cursor: pointer;
    /* Affordance */
}

.card:hover {
    border-color: var(--lunar-silver);
    background-color: #23272e;
    /* Slightly lighter on hover */
    transform: translateY(-2px);
}

.card.featured {
    grid-column: span 2;
    background: linear-gradient(145deg, var(--deep-graphite) 0%, #171b20 100%);
    border: 1px solid var(--lunar-silver);
    /* Stand out */
}

.card-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    color: var(--border-color);
    transition: color 0.2s;
    font-size: 20px;
}

.card:hover .card-arrow {
    color: var(--lunar-silver);
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 40px 0;
}

/* Header & Footer */
header {
    padding: 32px 0;
    /* Increased from 24px */
    border-bottom: none;
}

header h1 a {
    color: var(--lunar-silver);
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

header h1 a img {
    height: 64px;
    width: auto;
    display: block;
    /* Remove inline spacing */
}

/* ------------------------------------------------------------------
   Header & Navigation
   ------------------------------------------------------------------ */
.site-header {
    position: absolute;
    /* Overlay on hero */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    /* Reduced padding */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding img {
    height: 60px;
    /* Increased logo size */
    width: auto;
}

.site-navigation ul {
    display: flex;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation a {
    color: var(--lunar-silver);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.site-navigation a:hover {
    color: #fff;
}

.site-navigation .nav-btn {
    border: 1px solid var(--lunar-silver);
    padding: 8px 16px;
    border-radius: 2px;
}

.site-navigation .nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------------
   Hero Section (Redesign)
   ------------------------------------------------------------------ */
.hero {
    position: relative;
    height: 70vh;
    /* Full viewport impression */
    display: flex;
    /* Flex to center content vertically */
    align-items: center;
    /* Vertical center */
    padding-top: 80px;
    /* Offset for header */
}

.hero .container {
    width: 100%;
    /* Ensure container takes full width */
    padding-left: 5%;
    /* Offset from left */
    text-align: left;
    /* Explicitly left align text inside container */
}

.hero h1 {
    font-family: 'Times New Roman', serif;
    /* Elegant serif for English */
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 800px;
    /* Prevent too wide on large screens */
    margin-left: 0;
    /* Clear any auto margins */
    margin-right: auto;
}

.hero .jp-sub {
    font-family: 'LINE Seed JP', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--lunar-silver);
    line-height: 1.8;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    color: var(--lunar-silver);
}

.scroll-indicator span {
    font-family: 'Times New Roman', serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--lunar-silver) 0%, transparent 100%);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: #fff;
    animation: scroll-down 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scroll-down {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(200%);
        opacity: 0;
    }
}

/* ------------------------------------------------------------------
   Philosophy Section (Mission, Vision, Utopia)
   ------------------------------------------------------------------ */
.philosophy-section {
    padding: 160px 0;
    position: relative;
}

.philosophy-block {
    margin-bottom: 120px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.philosophy-label {
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    color: var(--mercury-blue);
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: block;
}

.philosophy-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.4;
}

.philosophy-text {
    font-size: 1rem;
    line-height: 2.0;
    color: var(--lunar-silver);
    text-align: left;
    /* Easier reading for long text */
}

/* Center alignment for philosophy visuals if needed */
.text-center {
    text-align: center;
}

/* 6-Point Grid */
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.value-card {
    background: rgba(30, 34, 40, 0.5);
    border: 1px solid var(--border-color);
    padding: 32px;
}

.value-num {
    font-family: 'Times New Roman', serif;
    font-size: 3rem;
    color: var(--mercury-blue);
    opacity: 0.5;
    margin-bottom: 16px;
    line-height: 1;
}

/* Attention Box */
.attention-box {
    border: 1px solid #8F5C5C;
    /* Reddish tone */
    background: rgba(60, 20, 20, 0.2);
    padding: 40px;
    margin: 80px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-branding img {
        height: 32px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .jp-sub {
        font-size: 1rem;
    }

    .value-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-title {
        font-size: 1.5rem;
    }
}

/* Animation Keyframes */
@keyframes bg-breathe {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.hero-bg-animate img {
    animation: bg-breathe 20s infinite ease-in-out;
    transform-origin: center center;
}

/* Card Image Hover */
.card:hover .card-img img {
    transform: scale(1.05);
    /* Zoom effect on hover */
    opacity: 1 !important;
    /* Brighten on hover */
}

/* Utilities */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: var(--lunar-silver);
    font-size: 0.9rem;
    text-align: center;
}

/* Utilities */
.hero {
    padding: 120px 0;
    text-align: center;
}

.hero h1 {
    font-size: 64px;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero p {
    font-size: 18px;
    color: var(--lunar-silver);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero .sub-copy {
    font-size: 20px;
    font-weight: 500;
    color: var(--pale-moon);
    margin-bottom: 24px;
}

.hero .description {
    font-size: 16px;
    color: var(--mercury-blue);
    margin-bottom: 48px;
    line-height: 1.8;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Card Lists */
.card ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.card ul li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 10px;
    /* Increased from 8px */
    font-size: 15px;
    color: var(--pale-moon);
    line-height: 1.8;
    /* Added for better readability */
}

.card ul li::before {
    content: "•";
    color: var(--lunar-silver);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Simple Lists (AI section) */
.simple-list {
    list-style: none;
    padding: 0;
}

.simple-list li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.8;
    /* Added for better readability */
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

@media (max-width: 768px) {

    .grid-2,
    .card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 36px;
        /* Adjusted for mobile */
    }

    .cta-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ------------------------------------------------------------------
   Visual & Motion Enhancement (Alchemy x Design)
   ------------------------------------------------------------------ */

/* Motion Utilities */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Motifs */
/* 1. Moon Arc (Thin, faint circle segment) */
.motif-arc {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid var(--lunar-silver);
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* 2. Blueprint Line (Technical separator) */
.motif-line {
    width: 60px;
    height: 1px;
    background-color: var(--mercury-blue);
    opacity: 0.3;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.motif-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 5px;
    height: 5px;
    background-color: var(--mercury-blue);
    border-radius: 50%;
}

/* 3. Constellation Dots (Grid points) */
.motif-dots {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    opacity: 0.3;
}

.motif-dot {
    width: 2px;
    height: 2px;
    background-color: var(--lunar-silver);
    border-radius: 50%;
}

/* Icon Placeholders (if SVG inline not used) */
.icon-box {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box img,
.icon-box svg {
    width: 100%;
    height: 100%;
    stroke: var(--lunar-silver);
    fill: none;
    stroke-width: 1.5;
}

/* Visual Break Section */
.visual-break {
    padding: 80px 0;
    text-align: center;
    background-image: radial-gradient(circle at center, rgba(94, 107, 138, 0.1) 0%, transparent 70%);
}

.visual-break blockquote {
    font-size: 24px;
    font-weight: 300;
    color: var(--lunar-silver);
    font-family: serif;
    /* Elegant contrast */
    margin: 0;
    letter-spacing: 0.05em;
}

/* Deliverables Gallery (Horizontal Scroll) */
.deliverables-gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 24px 0 48px;
    scroll-snap-type: x mandatory;
}

.deliverable-item {
    min-width: 280px;
    flex: 0 0 auto;
    background: #15191F;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 4px;
    scroll-snap-align: center;
    text-align: center;
    position: relative;
}

.deliverable-item img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 16px;
}

.deliverable-label {
    font-size: 14px;
    color: var(--lunar-silver);
    font-weight: 500;
}

/* Extend Utilities */
.bg-alt {
    background-color: var(--bg-alt);
}

.section-divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    margin: 0;
    opacity: 0.5;
}

/* Deliverable Chips */
.deliverable-chips {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.chip {
    background-color: rgba(201, 204, 211, 0.1);
    border: 1px solid var(--border-color);
    color: var(--lunar-silver);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
}