/* ====================================================
   KLA Works — style.css
   Bright pop design（クリーム背景 × ビビッドアクセント）
   ==================================================== */

/* ---------- CSS変数 ---------- */
:root {
    --bg:        #fffdf8;   /* クリーム */
    --bg-2:      #fff4df;   /* あたたかい薄オレンジ */
    --bg-card:   #ffffff;
    --border:    #eadfd2;
    --ink:       #17203a;   /* 濃紺インク（枠線・影用） */
    --accent:    #ee7b50;   /* コーラルオレンジ */
    --accent-2:  #2777d8;   /* ブルー */
    --accent-3:  #2d9b7f;   /* グリーン */
    --accent-4:  #f7c948;   /* イエロー */
    --accent-5:  #e85d9c;   /* ピンク */
    --text:      #17203a;
    --text-2:    #5b6678;
    --text-3:    #98a0ae;
    --radius:    16px;
    --radius-sm: 10px;
    --nav-h:     68px;
    --max-w:     1120px;
    --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --pop-shadow: 4px 4px 0 var(--ink);        /* ポップな“ずらし影” */
    --pop-shadow-sm: 3px 3px 0 var(--ink);
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- コンテナ ---------- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ====================================================
   INTRO（初回ロード画面）
   ==================================================== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.intro.hide {
    transform: translateY(-100%);
}

.intro-name {
    display: flex;
    gap: 0.04em;
    font-size: clamp(2.6rem, 9vw, 6.5rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--ink);
    white-space: nowrap;
}

.intro-name span {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em) rotate(6deg);
    animation: introLetter 0.55s var(--ease) forwards;
}

.intro-name .sp { width: 0.35em; }

@keyframes introLetter {
    to { opacity: 1; transform: none; }
}

.intro-sub {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-2);
    opacity: 0;
    animation: introFade 0.6s ease 0.9s forwards;
}

@keyframes introFade { to { opacity: 1; } }

.intro-bar {
    width: min(260px, 60vw);
    height: 6px;
    border: 2px solid var(--ink);
    border-radius: 100px;
    overflow: hidden;
    background: #fff;
    opacity: 0;
    animation: introFade 0.4s ease 0.7s forwards;
}

.intro-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-4), var(--accent-2));
    animation: introLoad 1.3s 0.8s var(--ease) forwards;
}

@keyframes introLoad { to { width: 100%; } }

/* 動きを減らす設定のユーザーには一瞬で消す */
@media (prefers-reduced-motion: reduce) {
    .intro { display: none; }
}

/* ====================================================
   HEADER / NAV
   ==================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.scrolled {
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border);
}

.nav-container {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ロゴ */
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.logo span {
    color: var(--accent);
}

/* ナビリンク */
.nav-links {
    display: flex;
    gap: 34px;
}
.nav-links a {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: 0.02em;
    transition: color 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0;
    width: 0; height: 3px;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ハンバーガー */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* ====================================================
   BUTTONS（ポップ：太枠＋ずらし影）
   ==================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 100px;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.2s;
    white-space: nowrap;
    letter-spacing: 0.02em;
    box-shadow: var(--pop-shadow);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: #fff;
    color: var(--text);
}

.btn-blue   { background: var(--accent-2); color: #fff; }
.btn-yellow { background: var(--accent-4); color: var(--ink); }

.btn-sm {
    padding: 9px 20px;
    font-size: 0.8125rem;
    box-shadow: var(--pop-shadow-sm);
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--nav-h);
    background:
        radial-gradient(circle at 12% 18%, rgba(247, 201, 72, 0.25) 0, transparent 30%),
        radial-gradient(circle at 88% 72%, rgba(39, 119, 216, 0.14) 0, transparent 32%),
        radial-gradient(circle at 78% 14%, rgba(232, 93, 156, 0.14) 0, transparent 26%),
        var(--bg);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 40px;
    padding-bottom: 80px;
    text-align: left;
}

.hero-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 26px;
    padding: 8px 18px;
    border: 2px solid var(--ink);
    border-radius: 100px;
    background: var(--accent-4);
    box-shadow: var(--pop-shadow-sm);
    transform: rotate(-2deg);
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    color: var(--text);
}

.hero-title .accent {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

/* 名前の下の波線 */
.hero-title .accent::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -0.08em;
    height: 0.14em;
    background:
        radial-gradient(circle at 6px -4px, transparent 8px, var(--accent-4) 8.5px, var(--accent-4) 11px, transparent 11.5px) repeat-x;
    background-size: 20px 100%;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 560px;
}

.hero-btns {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

/* 浮かぶステッカー */
.hero-sticker {
    position: absolute;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    width: 74px;
    height: 74px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 50%;
    box-shadow: var(--pop-shadow-sm);
    animation: floaty 5s ease-in-out infinite;
    user-select: none;
}

.hero-sticker.s1 { top: 22%; right: 12%; background: var(--accent-4); animation-delay: 0s; }
.hero-sticker.s2 { top: 48%; right: 22%; background: #fff;          animation-delay: 1.2s; transform: rotate(8deg); }
.hero-sticker.s3 { top: 68%; right: 9%;  background: #ffe3ef;       animation-delay: 2.1s; transform: rotate(-6deg); }

@keyframes floaty {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -14px; }
}

/* スクロールインジケーター */
.hero-scroll {
    position: absolute;
    bottom: 36px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-3);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 2px;
    height: 40px;
    border-radius: 2px;
    background: linear-gradient(to bottom, var(--ink), transparent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ====================================================
   MARQUEE（流れる帯）
   ==================================================== */
.marquee {
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    background: var(--accent);
    color: #fff;
    overflow: hidden;
    padding: 14px 0;
    transform: rotate(-1deg) scale(1.02);
}

.marquee-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: marquee 22s linear infinite;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}

/* ====================================================
   SECTIONS 共通
   ==================================================== */
.section {
    padding: 120px 0;
}

.section-dark {
    background: var(--bg-2);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 16px;
}

.section-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent-2);
    border: 2px solid var(--ink);
    border-radius: 100px;
    padding: 4px 14px;
    margin-bottom: 14px;
    box-shadow: var(--pop-shadow-sm);
    transform: rotate(-1.5deg);
}

.section-kicker.pink   { background: var(--accent-5); }
.section-kicker.green  { background: var(--accent-3); }
.section-kicker.yellow { background: var(--accent-4); color: var(--ink); }

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section-link {
    font-size: 0.9rem;
    color: var(--accent-2);
    font-weight: 700;
}
.section-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.section-sub {
    color: var(--text-2);
    font-size: 0.9375rem;
    margin-top: -32px;
    margin-bottom: 48px;
}

/* ====================================================
   WORKS GRID
   ==================================================== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.work-card {
    background: var(--bg-card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    cursor: pointer;
    box-shadow: var(--pop-shadow);
}

.work-card:hover {
    transform: translate(-3px, -3px) rotate(-0.5deg);
    box-shadow: 8px 8px 0 var(--ink);
}

.work-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 2px solid var(--ink);
}

.work-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd9a0 0%, #ffb7ce 55%, #a8cdff 100%);
}

.work-card:nth-child(2) .work-thumb-placeholder {
    background: linear-gradient(135deg, #a8e6d4 0%, #fff3a8 60%, #ffc7a0 100%);
}

.work-card:nth-child(3) .work-thumb-placeholder {
    background: linear-gradient(135deg, #c6c9ff 0%, #ffc4e6 55%, #fff0b0 100%);
}

.work-thumb iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.work-tag {
    position: absolute;
    bottom: 12px; left: 12px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ink);
    background: var(--accent-4);
    border: 2px solid var(--ink);
    padding: 4px 12px;
    border-radius: 100px;
}

.work-info {
    padding: 20px;
}

.work-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.work-info p {
    font-size: 0.8125rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ====================================================
   STORE / PLUGINS GRID
   ==================================================== */
.plugins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.plugin-card {
    display: flex;
    gap: 24px;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    box-shadow: var(--pop-shadow);
}

.plugin-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--ink);
}

.plugin-card.soon {
    background: repeating-linear-gradient(
        -45deg,
        #fff,
        #fff 12px,
        #fff8ec 12px,
        #fff8ec 24px
    );
}

.plugin-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    border: 2px solid var(--ink);
}

.plugin-info {
    flex: 1;
}

.plugin-info h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.plugin-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 800;
    color: #fff;
    background: var(--accent-3);
    border: 2px solid var(--ink);
    border-radius: 100px;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: 2px;
}

.plugin-info p {
    font-size: 0.8375rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 18px;
}

.plugin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plugin-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.plugin-price span {
    font-size: 0.8125rem;
    color: var(--text-2);
    font-weight: 600;
}

/* ====================================================
   BLOG TEASER（トップページ用）
   ==================================================== */
.blog-teaser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.blog-teaser-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--pop-shadow);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.blog-teaser-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--ink);
}

.blog-teaser-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.blog-teaser-tag {
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--ink);
    background: var(--accent-4);
    border: 2px solid var(--ink);
    padding: 3px 12px;
    border-radius: 100px;
}

.blog-teaser-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
}

.blog-teaser-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
}

.blog-teaser-card p {
    font-size: 0.8125rem;
    color: var(--text-2);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 18px;
}

.blog-teaser-more {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent-2);
}

/* ====================================================
   ABOUT (HOME)
   ==================================================== */
.about-home-inner {
    display: flex;
    align-items: center;
    gap: 80px;
}

.about-home-text {
    flex: 1;
}

.about-home-text .section-title {
    margin-bottom: 20px;
}

.about-home-text p {
    color: var(--text-2);
    line-height: 1.9;
    margin-bottom: 32px;
}

.about-home-img {
    flex: 0 0 300px;
}

.about-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #ffe9c9 0, transparent 55%),
        linear-gradient(135deg, #ffd9a0 0%, #ffb7ce 55%, #a8cdff 100%);
    border: 2px solid var(--ink);
    box-shadow: var(--pop-shadow);
}

/* ====================================================
   CONTACT
   ==================================================== */
.contact-box {
    text-align: center;
    background: var(--bg-card);
    border: 2px solid var(--ink);
    border-radius: calc(var(--radius) * 1.5);
    box-shadow: 6px 6px 0 var(--ink);
    padding: 72px 32px;
    position: relative;
    overflow: hidden;
}

.contact-box::before,
.contact-box::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.contact-box::before {
    width: 180px; height: 180px;
    background: rgba(247, 201, 72, 0.4);
    top: -60px; left: -50px;
}

.contact-box::after {
    width: 220px; height: 220px;
    background: rgba(39, 119, 216, 0.12);
    bottom: -90px; right: -60px;
}

.contact-box > * { position: relative; z-index: 1; }

.contact-box .section-title { margin-bottom: 14px; }

.contact-box p {
    color: var(--text-2);
    margin-bottom: 32px;
}

.contact-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====================================================
   FOOTER
   ==================================================== */
.site-footer {
    border-top: 2px solid var(--ink);
    padding: 48px 0;
    background: var(--bg-2);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.footer-logo span {
    color: var(--accent);
}

.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-3);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 900px) {
    .hero-sticker { display: none; }

    .works-grid       { grid-template-columns: 1fr 1fr; }
    .plugins-grid     { grid-template-columns: 1fr; }
    .blog-teaser-grid { grid-template-columns: 1fr; }
    .about-home-inner { flex-direction: column-reverse; gap: 48px; text-align: center; }
    .about-home-img   { flex: unset; width: 220px; margin: 0 auto; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        background: rgba(255, 253, 248, 0.98);
        backdrop-filter: blur(16px);
        padding: 24px;
        gap: 8px;
        border-bottom: 2px solid var(--ink);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1rem; padding: 10px 0; }
    .nav-toggle  { display: flex; }

    .works-grid { grid-template-columns: 1fr; }
    .section    { padding: 80px 0; }
    .section-head { flex-direction: column; gap: 12px; }

    .hero-btns .btn { width: 100%; }
    .contact-btns .btn { width: 100%; }
}
