@charset "utf-8";

/* タップ時の青いハイライトを消去 */
a, button, .rewind-card, .quiz-timeline-item {
    -webkit-tap-highlight-color: transparent;
}

/* キーボード操作時のフォーカス可視化 */
a:focus-visible,
button:focus-visible,
.rewind-card:focus-visible,
.quiz-timeline-item:focus-visible {
    outline: 3px solid #0a62ff;
    outline-offset: 3px;
}

/* ポインタ操作時はフォーカスリングを表示しない */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.rewind-card:focus:not(:focus-visible),
.quiz-timeline-item:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   サイト全体共通のレイアウト・パララックス
   ========================================================================== */

html {
    /* 勢いよくスクロールした際に、セクションの先頭でピタッと止まりやすくする */
    scroll-snap-type: y proximity;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    html,
    body {
        scroll-snap-stop: normal;
    }
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

/* UA出し分け用: hidden 属性を常に優先 */
[hidden] {
    display: none !important;
}

/* --- ヘッダー --- */
.site-header {
    padding: 0 15px;
    box-sizing: border-box;
    position: absolute;
    top: 15px;
    left: 0px;
    z-index: 100; 
}

.header-inner {
    margin: 0 auto;
    text-align: left;
}

.header-logo {
    margin: 0;
    width: 100px;
    height: 100px;
    background: url('https://s.yimg.jp/images/ksk/tool/y/images/logo_30th.png') no-repeat left center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
}

.header-logo a {
    display: block;
    height: 100%;
}

@media (max-width: 768px) {
    .header-logo {
        width: 85px;
        height: 85px;
    }

    .site-header {
        padding: 0 10px;
    }
}
@media (max-width: 480px) {
    .header-logo {
        width: 65px;
        height: 65px;
    }
}

/* --- コンテンツセクション共通 --- */
section {
    padding: 300px 0;
    box-sizing: border-box;
}

.container {
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   挨拶セクション
   ========================================================================== */
.greeting-wrap {
    padding: 450px 0 100px;
}
#section-greeting {
    padding-top: 50px;
}

.greeting-desc p {
    margin: 30px 15px;
    font-size: 18px;
    line-height: 1.8;
}
@media (max-width: 768px) {
    .greeting-desc p {
        font-size: 16px;
    }
}
@media (max-width: 480px) {
    .greeting-wrap {
        padding: 450px 0 80px;
    }
    .greeting-desc p {
        text-align: left;
    }
    .greeting-br {
        display: none;
    }
}

/* ==========================================================================
   CSRセクション
   ========================================================================== */
#section-csr {
    padding: 0;
    overflow: hidden;
}
.csr-title {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    margin: 0 15px 10px;
}
.csr-title__main {
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 38px;
    font-weight: 900;
    line-height: 1.4;
}
.csr-title__sub {
    font-size: 18px;
}
.csr {
    position: relative;
    --csr-right-opacity: 0;
    --csr-left-opacity: 0.7;
}
.csr__bg {
    position: absolute;
    bottom: 0;
    opacity: 0;
    width: 485px;
    height: 320px;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.csr__bg--left {
    left: -90px;
    background-image: url("https://s.yimg.jp/images/yjtop-common/promo/y30th/images/csr/bg_L.png");
    opacity: var(--csr-left-opacity);
}
.csr__bg--right {
    right: -120px;
    background-image: url("https://s.yimg.jp/images/yjtop-common/promo/y30th/images/csr/bg_R.png");
    opacity: var(--csr-right-opacity);
}
.csr__scroll {
    position: relative;
    z-index: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.csr__scroll.is-draggable {
    cursor: grab;
}
.csr__scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}
.csr__scroll::-webkit-scrollbar {
    display: none;
}
.csr__list {
    display: flex;
    gap: 25px;
    align-items: center;
    list-style: none;
    height: 590px;
    padding: 0 20px;
    margin: 0;
    min-width: max-content;
}
.csr__column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 auto;
}
.csr__item {
    width: 380px;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    background: #fff;
    overflow: hidden;
}
.csr__item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
@media (min-width: 950px) {
    .csr {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }
}
@media (max-width: 768px) {
    .csr-title__main {
        font-size: 26px;
    }
    .csr-title__sub {
        font-size: 16px;
    }
    .csr__list {
        height: 530px;
    }
    .csr__item {
        width: 340px;
    }
}
@media (max-width: 480px) {
    .csr-title {
        margin-bottom: 10px;
        gap: 15px;
    }
    .csr__bg--left,
    .csr__bg--right {
        width: 409px;
        height: 270px;
    }
    .csr__list {
        height: 390px;
    }
    .csr__item {
        width: 250px;
    }
}

/* ==========================================================================
   クイズセクション
   ========================================================================== */
.section-quiz {
    position: relative;
    background: #0b2d4d url('https://s.yimg.jp/images/yjtop-common/promo/y30th/images/quiz/bg.png') center / cover no-repeat;
    color: #fff;
    padding-top: 270px;
    overflow: hidden;
}

#section-quiz {
    padding-top: 0;
}

.section-quiz .quiz-section-inner {
    position: relative;
    text-align: center;
}

body.is-quiz-overlay-active.is-menu-open .site-header {
    z-index: 1304;
}

.quiz-title-image {
    display: block;
    width: min(380px, 85vw);
    margin: 0 auto 30px;
    height: auto;
}

.quiz-section-lead {
    font-size: 18px;
    margin: 10px 15px 40px;
    color: #ffffff;
}

@media (max-width: 767px) {
    .quiz-timeline-line {
        display: none;
    }
}

@media (max-width: 640px) {
    #section-quiz {
        padding-bottom: 200px;
    }
    .section-quiz {
        padding: 170px 15px 0;
    }
    .quiz-section-lead {
        font-size: 16px;
    }
}

/* ==========================================================================
   Yahoo! JAPANアプリ セクション（カルーセル）
   ========================================================================== */
.section-app {
    color: #000;
    margin: 270px 0 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}
.app-wrap {
    background: url('https://s.yimg.jp/images/yjtop-common/promo/y30th/images/yjapp/bg.png') center bottom / 50% repeat-x;
}
.app-inner {
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.app-heading {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.app-heading,
.app-subtitle,
.app-carousel {
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    will-change: transform;
}

.app-title-image {
    height: 145px;
    width: auto;
    display: block;
}

.app-subtitle {
    margin: 0 15px 40px;
    font-size: 18px;
    line-height: 1.4;
}

.app-carousel {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 auto 20px;
}

.carousel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
}

.carousel-viewport {
    position: relative;
    width: min(950px, 100vw);
    overflow: hidden;
    padding: 16px 0;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.app-carousel.has-controls .carousel-viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 80%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.carousel-track {
    display: flex;
    align-items: stretch;
    gap: 28px;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carousel-track.is-dragging {
    transition: none;
    cursor: grabbing;
}

.carousel-card {
    flex: 0 0 clamp(220px, 30vw, 360px);
    height: clamp(240px, 34vw, 360px);
    transform: scale(var(--carousel-scale, 1));
    transform-origin: center;
    transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    opacity: 0.3;
    will-change: transform, opacity;
    border-radius: 21px;
    border: 6px solid #fff;
    -webkit-tap-highlight-color: transparent;
}

.carousel-card-inner {
    width: 100%;
    height: 100%;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7a7a;
    font-weight: 700;
}

.carousel-card-inner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 15px;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.carousel-card.is-active {
    --carousel-scale: 1.04;
    opacity: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.carousel-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 60px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 3;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.25;
    cursor: default;
    box-shadow: none;
    transform: translateY(-50%);
}

.carousel-btn.prev {
    left: 6px;
}

.carousel-btn.next {
    right: 6px;
}

.carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: #d9d9d9;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.carousel-dot.is-active {
    background: #111;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.12);
}

.app-description {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8px;
}

.app-desc-icon {
    width: 100px;
    flex: 0 0 auto;
}

.app-desc-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.app-desc-text {
    text-align: left;
    max-width: 490px;
    padding: 0 15px;
}

.app-desc-title {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 8px;
}

.app-desc-body {
    font-size: 15px;
    line-height: 1.4;
}

.app-note {
    font-size: 11px;
    color: #666;
    text-align: right;
    padding: 15px 10px 10px;
}

.app-download {
    background: #f03;
    padding: 0 10px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.app-download--btn {
    padding: 0;
    background: none;
    gap: 5px;
}

.app-download-arrow {
    width: 30px;
    height: 15px;
    margin-top: -1px;
    background: #f2f2f2;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.app-download-box {
    background: #fff;
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.app-qr-image {
    width: 100px;
    height: 100px;
    display: block;
}

.app-qr-text {
    display: flex;
    flex-direction: column;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    color: #111;
}

.app-qr-text span:first-child {
    color: #ff0033;
}

.app-download-btn {
    display: inline-block;
    margin-bottom: 5px;
    padding: 20px 30px;
    background: #ff0033;
    border-radius: 100px;
    color: #fff;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}
.app-download-btn:visited {
    color: #fff;
}
.app-download-note {
    color: #666;
    font-size: 11px;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .carousel-track {
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .section-app {
        margin-top: 200px;
        padding: 0;
    }
    .app-wrap {
        background-size: auto;
    }
    .app-heading {
        flex-direction: column;
        gap: 10px;
    }
    .app-title-image {
        height: 110px;
    }
    .app-subtitle {
        font-size: 16px;
    }
    .app-carousel {
        margin-bottom: 16px;
    }
    .carousel-viewport {
        width: min(100%, 100vw);
    }
    .carousel-card {
        flex-basis: 240px;
        height: 250px;
    }
    .carousel-btn {
        display: none;
    }
    .app-desc-icon {
        width: 80px;
    }
    .app-desc-title {
        font-size: 20px;
    }
    .app-desc-body {
        font-size: 14px;
    }
    .app-description {
        flex-direction: column;
        gap: 5px;
        padding-top: 0;
    }
    .app-desc-text {
        text-align: center;
    }
    .app-download-box {
        width: min(360px, 80vw);
        justify-content: center;
    }
    .app-qr-text {
        font-size: 18px;
        line-height: 1.5;
    }
}

/* ==========================================================================
   30周年プロジェクト セクション
   ========================================================================== */
.section-projects {
    background-color: #fff;
    color: #111;
    margin: 200px 0 50px;
    padding: 0;
}

.projects-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.projects-title-image {
    width: min(320px, 70vw);
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

.projects-title-image,
.projects-grid {
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    will-change: transform;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 50px 30px;
}

.project-card {
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.14);
    text-align: left;
}

.project-card a {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.project-card-image {
    width: min(44vw, 440px);
    flex: 0 0 min(44vw, 440px);
    aspect-ratio: 11 / 5;
    overflow: hidden;
    background: #f2f2f2;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.project-card-title {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.project-card-desc {
    font-size: 15px;
    line-height: 1.333;
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-card {
        transform: none !important;
        opacity: 1 !important;
        transition: none;
    }
    .csr__column {
        transform: none !important;
    }
    .app-heading,
    .app-subtitle,
    .app-carousel,
    .projects-title-image,
    .projects-grid {
        transform: none !important;
        will-change: auto;
    }
}

@media (max-width: 900px) {
    .section-projects {
        padding-top: 120px;
    }
}

@media (max-width: 640px) {
    .section-projects {
        padding: 0 15px;
    }
    .projects-grid {
        margin: 30px 0 0;
    }
    .project-card a {
        display: block;
        padding: 12px;
    }
    .project-card-image {
        width: 100%;
        flex-basis: auto;
        margin-bottom: 12px;
    }
    .project-card-text {
        gap: 10px;
    }
    .project-card-title {
        font-size: 18px;
        line-height: 1.4;
    }
    .project-card-desc {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* ==========================================================================
   登場アニメーション (Intersection Observer用)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   sns / 免責事項
   ========================================================================== */
.sns {
    display: inline-flex;
    margin: 30px 0;
    gap: 25px;
}

.section-disclaimer {
    background: #ffffff;
    padding: 20px 15px;
}

.disclaimer-list {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #666;
    text-align: left;
}

.disclaimer-list li {
    position: relative;
    margin-bottom: 4px;
}

.site-footer {
    border-top: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 12px;
    padding: 20px 0;
    text-align: center;
}

/* ==========================================================================
   フッター
   ========================================================================== */

.site-footer .footer-links {
    margin-bottom: 6px;
}

.site-footer li {
    display: inline-block;
    margin: 0 2px;
}

.site-footer .footer-links a {
    color: inherit;
    text-decoration: none;
}

.site-footer span {
    color: #ccc;
}

/* ==========================================================================
   メニュー共通
   ========================================================================== */

.menu-toggle-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

.menu-hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-icon-bar {
    width: 14px;
    height: 1.6px;
    background-color: currentColor;
    border-radius: 1px;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.menu-btn-label {
    color: currentColor;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ボタンが開いている時のアイコンアニメーション */
.menu-toggle-btn.is-open .menu-icon-bar:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
}
.menu-toggle-btn.is-open .menu-icon-bar:nth-child(2) {
    opacity: 0;
    visibility: hidden;
    transform: scaleX(0);
}
.menu-toggle-btn.is-open .menu-icon-bar:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
}

/* メニューパネル */
.hero-menu-panel {
    position: absolute;
    bottom: 44px;
    right: 0;
    width: 235px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0,0,0,0.18);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    border: 1px solid rgba(0,0,0,0.08);
}

.hero-menu-panel {
    position: fixed;
    top: 84px;
    right: 10px;
    bottom: auto;
    transform: translateY(-8px) scale(0.95);
    transform-origin: top right;
}

body.is-quiz-overlay-active .hero-menu-panel {
    z-index: 1303;
}

.hero-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.menu-links {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .hero-menu-panel {
        top: 76px;
    }
}

.menu-link-item {
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-link-item:hover {
    color: #ff0033;
}

.menu-link-item[data-scroll-to="top"] {
    border-bottom: 1px solid #eee;
    margin-bottom: 6px;
    padding-bottom: 14px;
    color: #ff0033;
}

@media (max-width: 540px) {
    .hero-menu-panel {
        top: 72px;
        right: 10px;
        width: min(235px, calc(100vw - 20px));
    }
}

/* ==========================================================================
   landscape
   ========================================================================== */
@media (orientation: landscape) and (max-height: 500px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}
