/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #80999c;
    --color-secondary: #b4c6c8;
    --color-accent: #c5e0e7;
    --color-background: #f2f5f5;
    --color-white: #fff;
    --color-text: #454545;
    --color-text-light: #faf7f4;

    /* Spacing (1rem = 10px) */
    --spacing-xs: clamp(0.8rem, 1.2rem, 1.2rem);
    --spacing-sm: clamp(1rem, 1.4rem, 1.6rem);
    --spacing-md: clamp(1.6rem, 2rem, 2.4rem);
    --spacing-lg: clamp(2.4rem, 3.2rem, 3.6rem);
    --spacing-xl: clamp(3.2rem, 4rem, 4.8rem);
    --spacing-2xl: clamp(5.6rem, 7.2rem, 8rem);
    --spacing-2xll: clamp(9.6rem, 12rem, 14.4rem);
    --spacing-3xl: clamp(12.4rem, 16rem, 18rem);
    --spacing-4xl: clamp(14.4rem, 17.6rem, 20rem);

    /* Font Sizes (1rem = 10px) */
    --font-xs: clamp(1.2rem, 1.2rem + 0.125vw, 1.4rem);
    --font-sm: clamp(1.4rem, 1.4rem + 0.125vw, 1.6rem);
    --font-md: clamp(1.6rem, 1.6rem + 0.25vw, 2rem);
    --font-lg: clamp(2rem, 2rem + 0.25vw, 2.6rem);
    --font-xl: clamp(2.4rem, 2.4rem + 0.25vw, 3.2rem);
    --font-2xl: clamp(3.6rem, 3.6rem + 0.5vw, 5.6rem);
    --font-3xl: clamp(4rem, 4rem + 0.75vw, 6.4rem);
    --font-4xl: clamp(5rem, 5rem + 1vw, 8rem);

    /* Border Radius (1rem = 10px) */
    --radius-sm: clamp(0.7rem, 0.8rem, 1rem);
    --radius-md: clamp(1rem, 1.2rem, 1.4rem);

    /* Container */
    --container-mobile: min(100%, 1200px);
    --container-content: min(90%, 900px);

    /* Z-index */
    --z-overlay: 1;
    --z-fixed: 10;
}

/* Basic Reset */
html {
    font-size: 62.5%; /* 1rem = 10px */
}

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

body {
    font-family: "Zen Kaku Gothic New", sans-serif;
    color: var(--color-text);

    background-image: url("../img/texture_accent.webp");
    background-repeat: repeat;
    background-size: auto;
    background-attachment: local;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
}

ul,
ol {
    list-style: none;
}

/* Layout */
main {
    position: relative;
    width: 100%;
    max-width: var(--container-mobile);
    margin: 0 auto;
    overflow: hidden;
    background-color: var(--color-white);

    /* padding-bottom: 203px; */
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Hero (First View) */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* height: 792px; */
    height: 85vh;
    background: url("../img/first-view_bg-70dec6.webp") no-repeat center center;
    background-size: cover;
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-color: rgb(0 0 0 / 30%);
}

.hero__title {
    position: absolute;
    top: 15%;
    left: 10%;
    z-index: var(--z-overlay);
    display: flex;

    /* gap: var(--spacing-md); */
    align-items: center;
    width: 55%;
    min-width: 240px;
    max-width: 360px;
}

.hero__title h1 {
    font-family: "Amatic SC", cursive;
    font-size: var(--font-4xl);
    line-height: 1;
    color: var(--color-white);
    text-shadow: 0 0 2px rgb(255 255 255 / 20%);
}

.hero__title img {
    /* width: var(--font-4xl); */
    /* height: 94px; */
    width: 100%;
}

/* Section Base Styles */
.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-2xll) 0;
    scroll-margin-top: -110px;
}

.section--bg-primary {
    color: var(--color-white);
    background-color: var(--color-primary);
}

.section--bg-secondary {
    background-color: var(--color-secondary);
}

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

.section__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
    align-items: center;
    width: var(--container-content);
}

.section__inner--inset {
    padding: 40px var(--spacing-lg);
    color: var(--color-text);
    background-color: var(--color-background);
    border-radius: var(--radius-md);
}

.section__header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
}

.section__header > img {
    width: 25px;
}

.section__title {
    font-family: "Amatic SC", cursive;
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--color-text-light);
}

.section__title-image {
    width: 100%;
    max-width: 500px;
    margin-bottom: var(--spacing-xl);
}

.section__title--large {
    margin-bottom: 15px;
    font-family: ADS-namikaze, sans-serif;
    font-size: var(--font-2xl);
    line-height: 1.8;
    color: var(--color-white);
}

.section__title--dark {
    color: var(--color-text);
}

.section__subtitle {
    font-family: ADS-namikaze, sans-serif;
    font-size: var(--font-xl);
    color: var(--color-primary);
}

.section__subtitle--light {
    color: var(--color-white);
}

.with-lines {
    position: relative;
    display: inline-block;
}

.with-lines::before,
.with-lines::after {
    position: absolute;
    top: 50%;
    width: 25px;
    height: 1px;
    content: "";
}

.with-lines::before {
    left: -50px;
}

.with-lines::after {
    right: -50px;
}

.with-lines--white::before,
.with-lines--white::after {
    background-color: var(--color-white);
}

.with-lines--primary::before,
.with-lines--primary::after {
    background-color: var(--color-primary);
}

.section__decoration {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.section__decoration img {
    width: 45%;
    max-width: 280px;
    filter: brightness(1000%);
}

.section__decoration--top > img:nth-child(1) {
    transform: scale(-1, 1);
}

.section__decoration--bottom > img:nth-child(2) {
    transform: scale(-1, 1);
}

/* Recommend Section */
.recommend-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    align-items: center;
    padding: 0 var(--spacing-md);
}

.recommend-content__text {
    width: var(--container-content);
    padding: 0 var(--spacing-md);
}

.recommend-content__text p {
    font-size: var(--font-md);
    line-height: 1.45;
}

.recommend-content__text p:not(:last-child) {
    margin-bottom: var(--spacing-md);
}

.recommend-content__image {
    width: var(--container-content);
    height: 400px;
    object-fit: cover;
    object-position: 50% 60%;
    border-radius: var(--radius-sm);
}

/* Use Case Section */
.use-case-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
    /* align-items: center; */
}

.use-case-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    width: var(--container-content);
    text-align: center;
}

.use-case-item img {
    /* height: 225px; */
    max-height: 300px;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: var(--radius-sm);
}

.use-case-item__title {
    font-family: ADS-namikaze, sans-serif;
    font-size: var(--font-lg);
    line-height: 1;
}

.use-case-item p {
    font-size: var(--font-md);
    line-height: 1.45;
    text-align: left;
}

/* Service Section */
.service-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
}

.service-item {
    width: clamp(15.75rem, 100%, 48rem);
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md) var(--spacing-md);
    margin: 0 auto;
    text-align: center;
    background-color: var(--color-secondary);
    border-radius: var(--radius-md);
}

.service-item h6 {
    margin-bottom: 13px;
    font-size: var(--font-lg);
    font-weight: 500;
    color: var(--color-white);
}

.service-item p {
    font-size: var(--font-sm);
    line-height: 1.45;
    color: var(--color-text);
    text-align: left;
}

.service-item p:last-child {
    /* font-size: var(--font-xs); */
}

.equipment-list-container {
    width: 100%;
    text-align: center;
}

.equipment-list-container__title {
    margin-bottom: 34px;
    font-size: var(--font-lg);
    font-weight: 500;
    color: var(--color-text);
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.equipment-list li {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    justify-content: flex-start;
    height: 125px;
}

.equipment-list img {
    width: auto;
    height: 60px;
    object-fit: contain;
}

.equipment-list span {
    font-size: var(--font-md);
    font-weight: 500;
    text-align: center;
}

/* Price Section */
.price-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.price-card {
    /* width: var(--container-content); */
    width: 100%;
    padding: var(--spacing-lg);
    background-color: var(--color-background);
    border-radius: var(--radius-sm);
}

.price-card h5 {
    margin-bottom: 31px;
    font-size: var(--font-xl);
    font-weight: 500;
    color: var(--color-primary);
}

.price-card p {
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-md);
    line-height: 1.45;
}

.price-card h6 {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-lg);
    font-weight: 400;
    color: var(--color-primary);
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.room-info a {
    display: block;
}

.room-info:not(:last-child) {
    margin-bottom: var(--spacing-lg);
}

.room-info h6 {
    font-size: var(--font-md);
    font-weight: 500;
    color: var(--color-primary);
}

.room-info p {
    font-size: var(--font-sm);
    font-weight: 500;
}

.room-info img {
    height: 190px;
    object-fit: cover;
    width: 100%;
}

.room-info__image-wrapper {
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.room-info__image-wrapper img {
    transition: transform 0.3s ease;
}

.room-info a:hover .room-info__image-wrapper img {
    transform: scale(1.05);
}

.room-info h6 {
    margin-bottom: 0;
}
.room-info p {
    margin-bottom: var(--spacing-sm);
}

.coffee-image {
    /* position: absolute; */
    right: 0;
    bottom: -50px;
    width: 100px;
    height: 91px;
}

/* Usage Flow Section */
.usage-flow-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: var(--container-content);
    padding: 0 var(--spacing-md);
}

.usage-flow-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin: 0 auto;
    margin-bottom: var(--spacing-md);
    max-width: 520px;
}

.usage-flow-item__title {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    padding-left: var(--spacing-sm);
}

.usage-flow-item__title img {
    height: 60px;
    filter: brightness(0) saturate(100%) invert(95%) sepia(9%) saturate(465%) hue-rotate(138deg) brightness(94%) contrast(88%);
}

.usage-flow-item__title h5 {
    font-size: var(--font-xl);
    color: var(--color-white);
}

.usage-flow-item__content {
    /* text-align: center; */
}

.usage-flow-item__content img {
    aspect-ratio: 5/4;
    padding: var(--spacing-md);
    margin: 0 auto var(--spacing-lg);
    object-fit: contain;
    background-color: var(--color-background);
    border-radius: var(--radius-md);
}

.usage-flow-item__content p {
    font-size: var(--font-md);
    line-height: 1.45;

    /* color: var(--color-text); */
}

.staff-note {
    width: calc(var(--container-content) - var(--spacing-md) * 2);
    padding: var(--spacing-xl) var(--spacing-lg);
    font-size: var(--font-md);
    line-height: 1.45;
    color: var(--color-text);
    background-color: var(--color-background);
    border-radius: var(--radius-sm);
}

/* Access Section */

.access-map {
    width: 100%;
    max-width: 600px;
}

.access-map img {
    width: 100%;
    padding: 0 var(--spacing-sm);
    object-fit: cover;
}

.access-map iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    padding: 0 var(--spacing-sm);
}

.access-address {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    font-size: var(--font-md);
    font-style: normal;
    line-height: 1.45;
}

/* Footer */
.footer {
    max-width: var(--container-mobile);
    height: 310px;
    padding: var(--spacing-xl) 0;
    padding-bottom: 200px;
    margin: 0 auto;
    font-size: var(--font-md);
    font-weight: 500;
    color: var(--color-white);
    text-align: center;
    background-color: var(--color-primary);
}

/* Fixed Buttons */
.fixed-buttons {
    position: fixed;
    bottom: 0;
    z-index: var(--z-fixed);
    display: flex;
    width: 100%;
    max-width: var(--container-mobile);
}

.fixed-buttons__button {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
    justify-content: center;
    width: 50%;
    height: clamp(100px, 17vh, 17vh); /* Adjusted height */
    font-family: ADS-namikaze, sans-serif;
    font-size: var(--font-lg);
    color: var(--color-text);
}

.fixed-buttons__button--book {
    font-size: var(--font-md);
    background-color: #b4c6c8;
}

.fixed-buttons__button--line {
    font-size: var(--font-md);
    background-color: var(--color-accent);
}

.fixed-buttons__button--access {
    font-size: var(--font-md);
    background-color: var(--color-background);
}

.fixed-buttons__button img {
    width: 37px;
    height: 31px;
}

.fixed-buttons__button--access img {
    width: 35px;
    height: 36px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 15px;
    bottom: clamp(100px, 18.5vh, 18.5vh); /* Above .fixed-buttons (203px + margin) */
    z-index: 11; /* Above .fixed-buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    cursor: pointer; /* Semi-transparent primary color */
    background-color: rgb(197 224 231 / 70%);
    border: none;
    border-radius: 13%;
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
    opacity: 0;
    backdrop-filter: blur(4px);
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-accent);
    box-shadow: 0 6px 16px rgb(0 0 0 / 20%);

    /* transform: translateY(-5px) scale(1.1); */
}

.back-to-top img {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(100%);
}

/* 検討用：背景テクスチャ切り替えボタン（削除予定） */
.texture-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: none; /* デフォルトは非表示 */
    gap: 4px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

/* 1200px以上でのみ表示 */
@media (min-width: 1200px) {
    .texture-switcher {
        display: flex;
    }
}

.texture-switcher__btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--color-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.texture-switcher__btn:hover {
    background-color: var(--color-accent);
    transform: scale(1.05);
}

.texture-switcher__btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 検討用機能を無効にする場合は次行のコメントアウトを外す */
/* .texture-switcher { display: none !important; } */

/* Responsive Design */
@media (width >= 768px) {
    .recommend-content,
    .use-case-container {
        flex-flow: row wrap;
        gap: var(--spacing-lg);
        justify-content: center;
    }

    .use-case-item {
        width: calc(50% - var(--spacing-md));
        min-width: clamp(17.5rem, 40%, 25rem);
    }

    .equipment-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-width: 100%;
    }

    .price-content {
        flex-direction: row;
        gap: var(--spacing-lg);
        justify-content: center;
    }

    .price-card {
        width: calc(50% - var(--spacing-md));
    }
}

@media (width <= 374px) {
    .hero__title {
        flex-direction: column;
        text-align: center;
    }

    .service-item {
        width: calc(100% - var(--spacing-sm));
    }
}

@media (width >= 1024px) {
    .service-item {
        padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-md) var(--spacing-lg);
    }

    .usage-flow-list {
        flex-flow: row wrap;
        gap: var(--spacing-lg);
        justify-content: space-between;
        width: 100%;
    }

    .usage-flow-item {
        width: calc(33.333% - var(--spacing-lg));
        min-width: 260px;
    }

    .equipment-list {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Back to Top Button - Tablet */

    .back-to-top {
        /* ビューポートが1200px以上の場合、main要素の右端から24px内側に配置 */
        right: max(24px, calc((100vw - 1200px) / 2 + 24px));
    }

    .back-to-top {
        /* right: 24px; */
        bottom: clamp(100px, 20vh, 20vh);
        width: 56px;
        height: 56px;
    }

    .back-to-top img {
        width: 28px;
        height: 28px;
    }
}
