/*
Theme Name: YAONC
Theme URI: https://www.yaonc.co.jp/
Author: 合同会社YAONC
Author URI: https://www.yaonc.co.jp/
Description: 合同会社YAONC のコーポレートサイト用カスタムテーマ。Figma Make でデザインしたシングルページLPを WordPress 化したもの。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yaonc
Tags: business, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
    --color-bg: #ffffff;
    --color-bg-soft: #f9fafb;       /* gray-50 */
    --color-bg-dark: #111827;       /* gray-900 */
    --color-bg-dark-soft: #1f2937;  /* gray-800 */

    --color-text: #111827;          /* gray-900 */
    --color-text-soft: #374151;     /* gray-700 */
    --color-text-mute: #4b5563;     /* gray-600 */
    --color-text-faint: #6b7280;    /* gray-500 */
    --color-text-faded: #9ca3af;    /* gray-400 */
    --color-text-onDark: #d1d5db;   /* gray-300 */
    --color-text-onDark-mute: #6b7280;

    --color-primary: #2563eb;       /* blue-600 */
    --color-primary-strong: #1d4ed8;/* blue-700 */
    --color-primary-deep: #1e40af;  /* blue-800 */
    --color-primary-soft: #dbeafe;  /* blue-100 */
    --color-primary-tint: #eff6ff;  /* blue-50 */
    --color-primary-on: #bfdbfe;    /* blue-200 / used as border-hover */
    --color-primary-onDark: #dbeafe;

    --color-border: #e5e7eb;        /* gray-200 */
    --color-border-soft: #f3f4f6;   /* gray-100 */
    --color-border-strong: #d1d5db;

    --color-purple-tint: #faf5ff;   /* purple-50 */
    --color-white: #ffffff;

    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --container-max: 1152px;
    --container-pad: 1rem;

    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
        "Hiragino Sans", "Yu Gothic", "Meiryo", "Helvetica Neue", Arial,
        "Noto Sans JP", sans-serif;

    --header-h: 72px;
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--color-primary); }

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

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.3;
    color: var(--color-text);
}

p { margin: 0 0 1em; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background: var(--color-white);
    color: var(--color-primary);
    clip: auto !important;
    clip-path: none;
    display: inline-block;
    font-weight: 700;
    height: auto;
    width: auto;
    left: 1rem;
    top: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    z-index: 100000;
    text-decoration: none;
}

/* =========================================================
   Layout helpers
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.container--narrow { max-width: 896px; }
.container--wide   { max-width: 1280px; }

.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section--soft { background: var(--color-bg-soft); }
.section--news { padding-top: 3rem; padding-bottom: 3rem; background: var(--color-bg-soft); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.site-branding__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.site-branding__title a { color: inherit; }

.site-branding__title a:hover { color: var(--color-text); }

.main-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--color-text-soft);
    font-size: 0.95rem;
    transition: color var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: var(--color-text);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    margin: 0;
}

.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text);
}

.mobile-toggle svg { width: 24px; height: 24px; }
.mobile-toggle .icon-close { display: none; }
.mobile-toggle.is-open .icon-open  { display: none; }
.mobile-toggle.is-open .icon-close { display: block; }

.mobile-nav {
    display: none;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 1rem;
}

.mobile-nav.is-open { display: block; }

.mobile-nav ul { display: flex; flex-direction: column; gap: 1rem; }

.mobile-nav a {
    display: block;
    color: var(--color-text-soft);
}

@media (min-width: 768px) {
    .main-nav { display: flex; }
    .mobile-toggle, .mobile-nav { display: none !important; }
}

/* offset body for fixed header */
body { padding-top: var(--header-h); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-slow);
    border: 2px solid transparent;
    line-height: 1;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.btn--primary:hover {
    background: var(--color-primary-strong);
    color: var(--color-white);
    box-shadow: var(--shadow-xl);
}

.btn--outline {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
}

.btn--invert {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    font-size: 1.125rem;
    font-weight: 700;
}

.btn--invert:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    box-shadow: var(--shadow-xl);
}

.btn .icon-arrow {
    width: 20px; height: 20px;
    transition: transform var(--transition);
}

.btn:hover .icon-arrow { transform: translateX(2px); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 5rem;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--color-primary-tint) 0%,
        var(--color-white) 50%,
        var(--color-purple-tint) 100%);
    opacity: 0.7;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    text-align: center;
    max-width: 896px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.hero__lead {
    font-size: 1.25rem;
    color: var(--color-text-mute);
    margin: 0 0 2rem;
    line-height: 1.75;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero__actions { flex-direction: row; }
}

.hero__image {
    position: relative;
    max-width: 1024px;
    margin: 4rem auto 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.hero__image img { width: 100%; height: auto; object-fit: cover; }

/* =========================================================
   News bar
   ========================================================= */
.news-bar {
    max-width: 896px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.news-bar__label {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.news-bar__list { flex: 1; min-width: 0; }

.news-bar__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.news-bar__item + .news-bar__item { margin-top: 0.5rem; }

.news-bar__date {
    color: var(--color-text-faint);
    font-size: 0.875rem;
    white-space: nowrap;
}

.news-bar__chevron {
    color: var(--color-text-faded);
    width: 16px; height: 16px;
    flex-shrink: 0;
}

.news-bar__link {
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-bar__link:hover { color: var(--color-primary); }

/* =========================================================
   Solutions
   ========================================================= */
.solutions__heading {
    text-align: center;
    margin-bottom: 4rem;
}

.solutions__title {
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.solutions__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1152px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .solutions__grid { grid-template-columns: repeat(3, 1fr); }
}

.solution-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: all var(--transition-slow);
}

.solution-card:hover {
    border-color: var(--color-primary-on);
    box-shadow: var(--shadow-2xl);
    transform: translateY(-2px);
}

.solution-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: background var(--transition-slow), color var(--transition-slow);
}

.solution-card:hover .solution-card__icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.solution-card__icon svg { width: 32px; height: 32px; }

.solution-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.solution-card__body {
    color: var(--color-text-mute);
    line-height: 1.75;
    margin: 0;
}

/* =========================================================
   CTA
   ========================================================= */
.cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
    color: var(--color-white);
    text-align: center;
}

.cta__icon {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    display: inline-flex;
}

.cta__icon svg { width: 48px; height: 48px; }

.cta__title {
    color: var(--color-white);
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 1.5rem;
}

.cta__lead {
    font-size: 1.25rem;
    color: var(--color-primary-onDark);
    margin: 0 0 2rem;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    background: var(--color-bg-dark);
    color: var(--color-text-onDark);
    padding: 3rem 0;
}

.site-footer a:hover { color: var(--color-white); }

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1152px;
    margin: 0 auto 2rem;
}

@media (min-width: 768px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

.site-footer__title {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.site-footer__desc {
    color: var(--color-text-faded);
    line-height: 1.75;
    margin: 0;
}

.site-footer__heading {
    color: var(--color-white);
    font-weight: 700;
    margin: 0 0 1rem;
}

.site-footer__menu li + li { margin-top: 0.5rem; }
.site-footer__menu a { color: var(--color-text-onDark); }

.site-footer__bottom {
    border-top: 1px solid var(--color-bg-dark-soft);
    padding-top: 2rem;
    text-align: center;
}

.site-footer__copy { color: var(--color-text-onDark-mute); margin: 0; }

/* =========================================================
   Scroll-to-top
   ========================================================= */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-slow);
    z-index: 40;
}

.scroll-top.is-visible { display: inline-flex; }
.scroll-top:hover { background: var(--color-primary-strong); color: var(--color-white); box-shadow: var(--shadow-xl); }
.scroll-top svg { width: 24px; height: 24px; }

/* =========================================================
   Sub pages (page.php / single.php / archive.php etc.)
   ========================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary-tint) 0%, var(--color-white) 100%);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--color-border);
}

.page-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.content-area {
    padding: 4rem 0;
}

.content-area--with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .content-area--with-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.entry {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.entry__title { font-size: 1.875rem; font-weight: 700; margin: 0 0 0.75rem; }
.entry__title a:hover { color: var(--color-primary); }

.entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-faint);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.entry__thumb { margin: -2.5rem -2.5rem 2rem; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.entry__thumb img { width: 100%; height: auto; }

.entry__content > * + * { margin-top: 1em; }
.entry__content h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2em; }
.entry__content h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.75em; }
.entry__content a  { color: var(--color-primary); text-decoration: underline; }
.entry__content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.25rem;
    color: var(--color-text-mute);
    font-style: italic;
}
.entry__content img { border-radius: var(--radius-md); }
.entry__content pre {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
}
.entry__content code {
    background: var(--color-bg-soft);
    padding: 0.125em 0.375em;
    border-radius: 4px;
    font-size: 0.95em;
}

.entry-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-faint);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text-soft);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.post-nav a {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: var(--color-text-soft);
}

.post-nav a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.post-nav .post-nav__label { font-size: 0.75rem; color: var(--color-text-faint); display: block; margin-bottom: 0.25rem; }

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.widget__title,
.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.widget ul li + li { margin-top: 0.5rem; }
.widget a { color: var(--color-text-soft); }
.widget a:hover { color: var(--color-primary); }

/* Comments */
.comments-area {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    margin-top: 2rem;
}

.comments-area .comments-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 1.5rem; }
.comment-list { list-style: none; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--color-border); }

/* 404 / no-results */
.no-results {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    text-align: center;
}

.error-404 {
    text-align: center;
    padding: 5rem 0;
}

.error-404 .error-404__code {
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
    margin: 0;
}

/* Search form */
.search-form { display: flex; gap: 0.5rem; }

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    font: inherit;
}

.search-form input[type="search"]:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.search-form button {
    padding: 0.75rem 1.25rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.search-form button:hover { background: var(--color-primary-strong); }

/* WP alignment / image classes */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { width: 100%; }

/* =========================================================
   Reveal animation (replaces motion/react)
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
