/*
Theme Name: Yagi Aluminum
Author: Antigravity
Version: 1.0
Description: Simple & Cool WordPress Theme for Yagi Aluminum
*/

/* ============================================
   Root Variables
============================================ */

:root {
    --content-max-width: 1200px;
    --container-padding: 2rem;

    --section-padding-pc: 120px;
    --section-padding-sp: 80px;

    --header-height: 80px;

    /* Palette - Simple & Cool (Monochrome + Silver/Blue Accent) */
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-black: #111111;
    --color-white: #ffffff;
    --color-bg-body: #ffffff;
    --color-bg-light: #f9f9f9;
    --color-accent: #0056b3;
    /* Deep Blue for trust */
    --color-border: #e0e0e0;

    /* Fonts */
    --font-en: 'Montserrat', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;

    /* Easings */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ============================================
   Base
============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    width: 100%;
    font-family: var(--font-jp);
    line-height: 1.8;
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.05em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s var(--ease-out);
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* ============================================
   Typography
============================================ */

.en-title {
    font-family: var(--font-en);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-black);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 4rem;
    display: block;
}

/* ============================================
   Layout Utilities
============================================ */

.section {
    padding-block: var(--section-padding-pc);
}

.container {
    width: 100%;
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.scroll-offset {
    scroll-margin-top: var(--header-height);
}

/* ============================================
   Header
============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
}

.header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header__inner {
    width: 100%;
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo img {
    height: 40px;
    width: auto;
}

.header__nav-list {
    display: flex;
    gap: 3rem;
}

.header__nav-list a {
    font-family: var(--font-en);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-black);
    position: relative;
}

.header__nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-black);
    transition: width 0.3s var(--ease-out);
}

.header__nav-list a:hover::after {
    width: 100%;
}

.header__hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-black);
    transition: all 0.3s ease;
}

/* ============================================
   Hero
============================================ */

.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    /* Darken slightly for text readability */
}

.hero__content {
    text-align: center;
    color: var(--color-white);
    padding-inline: 2rem;
    z-index: 1;
}

.hero__title-en {
    font-family: var(--font-en);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__title-jp {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* ============================================
   About Us (Company)
============================================ */

.about {
    background-color: var(--color-white);
}

.about__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__text h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.6;
}

.about__text p {
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.btn-simple {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--color-black);
    color: var(--color-black);
    font-family: var(--font-en);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
}

.btn-simple:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    opacity: 1;
}

.about__image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ============================================
   Strength
============================================ */

.strength {
    background-color: var(--color-bg-light);
}

.strength__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.strength__item {
    background: var(--color-white);
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s var(--ease-out);
}

.strength__item:hover {
    transform: translateY(-10px);
}

.strength__icon {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    font-family: var(--font-en);
    font-weight: 700;
}

.strength__title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.strength__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================
   Services
============================================ */

.services {
    background-color: var(--color-white);
}

.service__list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.service__item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.service__item:nth-child(even) {
    direction: rtl;
    /* Flip layout */
}

.service__item:nth-child(even) .service__content {
    direction: ltr;
    /* Reset text direction */
}

.service__image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.service__content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.service__content p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* ============================================
   Works
============================================ */

.works {
    background-color: var(--color-bg-light);
}

.works__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.works__item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
}

.works__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.works__item:hover img {
    transform: scale(1.1);
}

.works__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-family: var(--font-en);
    font-weight: 500;
}

.works__item:hover .works__overlay {
    opacity: 1;
}

/* ============================================
   Contact
============================================ */

.contact {
    background-color: var(--color-bg-light);
    text-align: center;
}

.contact__inner {
    max-width: 800px;
    margin: 0 auto;
}

.contact__text {
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn-contact {
    display: inline-block;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 1.2rem 4rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: background-color 0.3s ease;
}

.btn-contact:hover {
    background-color: var(--color-accent);
    opacity: 1;
}

/* ============================================
   Footer
============================================ */

.footer {
    background-color: var(--color-black);
    color: #888;
    padding: 4rem 0;
    font-size: 0.9rem;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer__info h2 {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer__copyright {
    font-family: var(--font-en);
    font-size: 0.8rem;
}

/* ============================================
   Blog / News
============================================ */

/* Latest News (Home) */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: opacity 0.3s var(--ease-out);
}

.news-item:hover {
    opacity: 0.7;
}

.news-date {
    font-family: var(--font-en);
    font-size: 0.9rem;
    color: var(--color-text-light);
    min-width: 100px;
}

.news-category {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    background-color: var(--color-bg-light);
    border-radius: 20px;
    color: var(--color-text-light);
    white-space: nowrap;
}

.news-title {
    font-weight: 500;
    flex: 1;
}

/* Blog Archive (blog.html) */
.blog-header {
    background-color: var(--color-bg-light);
    padding: 8rem 0 4rem;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s var(--ease-out);
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card__image {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 4px;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.blog-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 4rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    transition: all 0.3s ease;
}

.page-number.current,
.page-number:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* Single Post (single.html) */
.post-header {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    font-family: var(--font-en);
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 2;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 4rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent);
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 3rem 0 1.5rem;
    border-left: 4px solid var(--color-black);
    padding-left: 1rem;
}

.post-content p {
    margin-bottom: 2rem;
}

.post-content img {
    margin: 3rem 0;
    border-radius: 4px;
}

.post-navigation {
    max-width: 800px;
    margin: 6rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
}

/* ============================================
   Utilities & Animations
============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-delay-1 {
    transition-delay: 0.1s;
}

.fade-delay-2 {
    transition-delay: 0.2s;
}

.fade-delay-3 {
    transition-delay: 0.3s;
}

/* ============================================
   Media Queries
============================================ */

@media (max-width: 1024px) {
    :root {
        --section-padding-pc: 80px;
    }

    .about__inner,
    .service__item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service__item:nth-child(even) {
        direction: ltr;
    }

    .service__image img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .section {
        padding-block: var(--section-padding-sp);
    }

    .header__nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-white);
        transform: translateX(100%);
        transition: transform 0.3s var(--ease-out);
        padding: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
    }

    .header__nav.is-open {
        transform: translateX(0);
    }

    .header__nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .header__nav-list a {
        font-size: 1.5rem;
    }

    .header__hamburger {
        display: flex;
    }
}

/* ============================================
   Page Layout (Sidebar)
============================================ */

.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: start;
}

.main-content {
    width: 100%;
}

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.sidebar__widget {
    background-color: var(--color-bg-light);
    padding: 2rem;
    border-radius: 4px;
}

.sidebar__title {
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-black);
}

.sidebar__list li {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.sidebar__list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar__list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.sidebar__list a:hover {
    color: var(--color-accent);
}

/* Media Queries for Sidebar */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar {
        position: static;
        max-width: 600px;
        margin: 0 auto;
    }
}