/* ===========================================
   TOYBOX INC. — v2 Illustration Edition
   =========================================== */

:root {
    --c-bg: #F8F5F0;
    --c-bg-alt: #EFECE6;
    --c-text: #1A1A1A;
    --c-text-2: #6B6560;
    --c-text-3: #A8A098;
    --c-accent: #3D7A7A;
    --c-yellow: #E8B82B;
    --c-blue: #2BA4B5;
    --c-purple: #9B7EC8;
    --c-border: #DDD8D0;

    --f-display: 'Nunito', sans-serif;
    --f-body: 'Nunito', 'Zen Maru Gothic', sans-serif;
    --f-jp: 'Zen Maru Gothic', sans-serif;

    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --container-pad: clamp(20px, 5vw, 80px);
}


/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
html.lenis { scroll-behavior: auto; }

body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 16px; line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: multiply;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--c-accent); color: #fff; }

/* Focus visible — a11y */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: 4px;
}
a:focus-visible, button:focus-visible { outline-offset: 4px; }


/* ===========================================
   Loader
   =========================================== */
.loader {
    position: fixed; inset: 0; z-index: 10001;
    background: var(--c-bg);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.loader__mark {
    width: 40px; height: 40px;
    opacity: 0;
    animation: loaderDraw 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}
.loader__mark circle {
    stroke-dashoffset: 97.9;
    animation: loaderStroke 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
@keyframes loaderStroke {
    to { stroke-dashoffset: 0; }
}
@keyframes loaderDraw {
    0% { opacity: 0; transform: scale(0.8); }
    30% { opacity: 1; }
    100% { opacity: 1; transform: scale(1); }
}
.loader__text {
    font-family: var(--f-display); font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    opacity: 0;
    animation: loaderText 0.6s ease 0.9s forwards;
}
@keyframes loaderText {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- Custom Cursor (PC only) --- */
@media (hover: hover) {
    * { cursor: none !important; }
}
.cursor {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity 0.3s;
}
body.is-loaded .cursor { opacity: 1; }
.cursor__dot {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.16,1,0.3,1),
                height 0.25s cubic-bezier(0.16,1,0.3,1);
}
.cursor.is-hover .cursor__dot,
.cursor.is-link .cursor__dot {
    width: 40px; height: 40px; opacity: 0.6;
}
.cursor.is-char .cursor__dot {
    width: 48px; height: 48px; opacity: 0.4;
}
@media (hover: none), (pointer: coarse) {
    .cursor { display: none; }
}



.container {
    max-width: 1100px; margin: 0 auto;
    padding: 0 var(--container-pad);
}


/* ===========================================
   Navigation
   =========================================== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px var(--container-pad);
    transition: transform 0.4s var(--ease-expo), background 0.3s;
}
.nav.is-scrolled {
    background: rgba(248, 245, 240, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--c-border);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__logo {
    font-family: var(--f-display); font-weight: 900;
    font-size: 0.82rem; letter-spacing: 0.12em;
    display: flex; align-items: center; gap: 8px;
    z-index: 101;
}
.nav__mark { width: 28px; height: 28px; flex-shrink: 0; }

/* Primary menu — desktop inline */
.nav__menu { margin-left: auto; margin-right: clamp(20px, 3vw, 40px); }
.nav__menu ul {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
}
.nav__menu a {
    font-family: var(--f-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--c-text);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s var(--ease-expo);
}
.nav__menu a::after {
    content: '';
    position: absolute; left: 0; right: 100%; bottom: -2px;
    height: 1px; background: currentColor;
    transition: right 0.4s var(--ease-expo);
}
@media (hover: hover) {
    .nav__menu a:hover::after { right: 0; }
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 18px);
    z-index: 101;
}
.nav__cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    font-family: var(--f-display);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #F8F5F0;
    background: var(--c-text);
    border: 1.5px solid var(--c-text);
    border-radius: 100px;
    transition: all 0.3s var(--ease-expo);
    white-space: nowrap;
}
@media (hover: hover) {
    .nav__cta:hover {
        background: var(--c-accent);
        border-color: var(--c-accent);
        color: #fff;
        transform: translateY(-1px);
    }
}

/* Hide desktop inline menu on mobile */
@media (max-width: 900px) {
    .nav__menu { display: none; }
}
/* Hide hamburger on desktop */
@media (min-width: 901px) {
    .nav__toggle { display: none; }
}
@media (max-width: 480px) {
    .nav__cta {
        padding: 7px 14px;
        font-size: 0.7rem;
    }
}

.nav__toggle {
    z-index: 101; width: 28px; height: 16px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.nav__toggle span {
    display: block; height: 2px; background: var(--c-text);
    border-radius: 2px; transition: all 0.3s var(--ease-expo);
}
.nav__toggle span:first-child { width: 28px; }
.nav__toggle span:last-child { width: 18px; }
.nav__toggle.is-active span:first-child { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active span:last-child { transform: translateY(-7px) rotate(-45deg); width: 28px; }


/* --- Nav Overlay --- */
.nav-overlay {
    position: fixed; inset: 0; z-index: 99;
    background: var(--c-bg);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.5s var(--ease-expo);
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }
.nav-overlay__list { text-align: center; }
.nav-overlay__list li { overflow: hidden; }
.nav-overlay__list a {
    font-family: var(--f-display); font-weight: 800;
    font-size: clamp(2rem, 7vw, 4.5rem);
    display: block; padding: 0.15em 0;
    transform: translateY(110%);
    transition: transform 0.6s var(--ease-expo), color 0.3s;
}
.nav-overlay.is-open .nav-overlay__list a { transform: translateY(0); }
.nav-overlay__list li:nth-child(1) a { transition-delay: 0.05s; }
.nav-overlay__list li:nth-child(2) a { transition-delay: 0.1s; }
.nav-overlay__list li:nth-child(3) a { transition-delay: 0.15s; }
.nav-overlay__list li:nth-child(4) a { transition-delay: 0.2s; }
.nav-overlay__list li:nth-child(5) a { transition-delay: 0.25s; }
@media (hover: hover) { .nav-overlay__list a:hover { color: var(--c-accent); } }


/* ===========================================
   Hero — Typography-led
   =========================================== */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    padding: 0 var(--container-pad);
    overflow: hidden;
}

.hero__content {
    text-align: center;
    position: relative; z-index: 1;
    margin-top: -4vh;
}

/* Colored letters — the hero */
.hero__letters {
    display: flex; justify-content: center;
    gap: clamp(3px, 0.6vw, 10px);
    margin-bottom: clamp(28px, 4vh, 48px);
    position: relative;
}

/* Eyes peeking from behind letter B — discovery moment */
.hero__peek {
    position: absolute;
    left: 50%;
    bottom: 18%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(6px, 1vw, 10px);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}
.hero__peek-eye {
    width: clamp(4px, 0.5vw, 6px);
    height: clamp(4px, 0.5vw, 6px);
    border-radius: 50%;
    background: #1A1A1A;
}

.hero__letter {
    display: inline-block;
    font-family: var(--f-display); font-weight: 900;
    font-size: clamp(3.6rem, 12vw, 10rem);
    line-height: 1;
    color: var(--c);
    will-change: transform;
    cursor: default;
}
.hero__letter--light {
    text-shadow: 0 2px 8px rgba(0,0,0,0.04);
}


.hero__meta {
    display: flex; align-items: center; justify-content: center;
    gap: clamp(10px, 2vw, 20px);
}
.hero__inc {
    font-family: var(--f-display); font-weight: 700;
    font-size: clamp(0.5rem, 0.7vw, 0.62rem);
    letter-spacing: 0.2em; color: var(--c-text-3); opacity: 0.5;
}
.hero__dash { width: clamp(20px, 3vw, 40px); height: 1.5px; background: var(--c-border); }
.hero__tagline {
    font-family: var(--f-jp); font-weight: 500;
    font-size: clamp(0.88rem, 1.5vw, 1.15rem);
    color: var(--c-text-2); letter-spacing: 0.08em;
}

/* Concrete sub-copy under tagline */
.hero__lead {
    font-family: var(--f-jp); font-weight: 500;
    font-size: clamp(0.78rem, 0.95vw, 0.92rem);
    color: var(--c-text-3);
    line-height: 2;
    letter-spacing: 0.04em;
    margin-top: clamp(18px, 2.5vh, 32px);
}

/* Hero CTAs */
.hero__ctas {
    display: flex;
    gap: clamp(12px, 1.5vw, 18px);
    justify-content: center;
    margin-top: clamp(28px, 4vh, 44px);
    flex-wrap: wrap;
}
.hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 13px 28px;
    font-family: var(--f-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    border-radius: 100px;
    transition: transform 0.3s var(--ease-expo), background 0.3s, color 0.3s, border-color 0.3s;
    white-space: nowrap;
}
.hero__cta--primary {
    color: #F8F5F0;
    background: var(--c-text);
    border: 1.5px solid var(--c-text);
    box-shadow: 0 2px 0 rgba(0,0,0,0.15), 0 6px 16px rgba(0,0,0,0.08);
}
.hero__cta--ghost {
    color: var(--c-text);
    background: transparent;
    border: 1.5px solid var(--c-text);
}
@media (hover: hover) {
    .hero__cta--primary:hover {
        background: var(--c-accent);
        border-color: var(--c-accent);
        transform: translateY(-2px);
        box-shadow: 0 4px 0 rgba(0,0,0,0.15), 0 10px 24px rgba(0,0,0,0.12);
    }
    .hero__cta--ghost:hover {
        background: var(--c-text);
        color: #F8F5F0;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }
}
.hero__cta:active {
    transform: translateY(2px) scale(0.98);
    transition-duration: 0.08s;
}
.hero__cta--primary:active {
    box-shadow: 0 0 0 rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
}


/* Vertical SCROLL cue (bottom-left) */
.hero__scroll {
    position: absolute;
    left: clamp(14px, 2.5vw, 40px);
    bottom: clamp(30px, 8vh, 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    color: var(--c-text-3);
}
.hero__scroll-text {
    font-family: var(--f-display);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
.hero__scroll-line {
    width: 1px;
    height: 56px;
    background: currentColor;
    transform-origin: top;
    animation: scrollLine 2.4s var(--ease-expo) infinite;
}
@keyframes scrollLine {
    0%   { transform: scaleY(0); opacity: 0.6; }
    50%  { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(0) translateY(56px); opacity: 0; }
}

@media (max-width: 768px) {
    .hero__scroll { left: 50%; transform: translateX(-50%); }
}


/* ===========================================
   Section Tag
   =========================================== */
.section-tag {
    font-family: var(--f-display); font-size: 0.7rem;
    font-weight: 800; letter-spacing: 0.2em;
    color: var(--c-accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: clamp(36px, 5vh, 60px);
}
.section-tag::before {
    content: '— ';
    opacity: 0.6;
}


/* ===========================================
   Guide Characters — 各章に佇む極小キャラ
   =========================================== */


/* ===========================================
   About
   =========================================== */
.about {
    padding: clamp(160px, 24vh, 300px) 0 clamp(120px, 18vh, 240px);
    background: linear-gradient(180deg, var(--c-bg) 0%, #F4F1EB 100%);
}

.about__layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: start;
}

.about__heading {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.5;
    color: var(--c-text);
    margin-bottom: clamp(32px, 4vh, 52px);
    letter-spacing: -0.01em;
}
.about__heading-en {
    display: block;
    font-family: var(--f-display);
    font-size: clamp(0.62rem, 0.8vw, 0.72rem);
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--c-accent);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.about__body {
    max-width: 480px;
    margin-bottom: clamp(32px, 4vh, 48px);
}
.about__body p {
    color: var(--c-text-2);
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    line-height: 2.4;
    margin-bottom: 1.8em;
}
.about__body p:last-child { margin-bottom: 0; }

.about__link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--f-display);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--c-text);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--c-text);
    transition: gap 0.4s var(--ease-expo);
}
@media (hover: hover) {
    .about__link:hover { gap: 20px; }
}

.about__right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 3vh, 40px);
    padding-top: clamp(40px, 6vh, 80px);
}
.about__philosophy {
    text-align: center;
}
.about__philosophy-label {
    display: block;
    font-family: var(--f-display);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--c-text-3);
    margin-bottom: 10px;
}
.about__philosophy-text {
    font-family: var(--f-jp);
    font-weight: 700;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: var(--c-accent);
    letter-spacing: 0.08em;
}
.about__facts {
    display: flex;
    gap: clamp(24px, 3vw, 40px);
    margin-top: clamp(32px, 4vh, 48px);
}
.about__fact dt {
    font-family: var(--f-display);
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--c-text-3);
    opacity: 0.4;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.about__fact dd {
    font-family: var(--f-display);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--c-text);
}

/* Characters: shared */
.char { overflow: visible; }

/* Character blink */
.pupil {
    animation: blink 5s ease-in-out infinite;
}
.char--member:nth-child(2) .pupil { animation-delay: 1.2s; }
.char--member:nth-child(3) .pupil { animation-delay: 2.8s; }
.char--member:nth-child(4) .pupil { animation-delay: 0.6s; }
.char--member:nth-child(5) .pupil { animation-delay: 1.8s; }
@keyframes blink {
    0%, 90%, 100% { opacity: 1; }
    94%, 96% { opacity: 0; }
}

@media (max-width: 768px) {
    .about { padding: clamp(100px, 16vh, 180px) 0 clamp(80px, 12vh, 140px); }
    .about__layout { grid-template-columns: 1fr; gap: 48px; }
    .about__heading { font-size: clamp(1.5rem, 6vw, 2.2rem); }
    .about__right {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding-top: 0;
    }
}


/* ===========================================
   Services — Card Layout
   =========================================== */
.services {
    padding: clamp(100px, 16vh, 200px) 0;
    background: var(--c-bg-alt);
    border-radius: 32px;
    margin: 0 12px clamp(24px, 3vh, 44px);
}

.services__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.services__item {
    --service-color: var(--c-border);
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    border-radius: 14px 12px 16px 13px; /* slightly irregular — paper feel */
    padding: clamp(36px, 4vw, 52px) clamp(28px, 3vw, 40px);
    border-top: 2px solid var(--service-color);
    transition: transform 0.4s var(--ease-expo), box-shadow 0.4s;
    min-height: clamp(260px, 28vw, 340px);
    overflow: hidden;
}
.services__item::before {
    /* Paper grain texture */
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    mix-blend-mode: multiply;
}
.services__item > * { position: relative; z-index: 1; }

/* Irregular heights for craft feel */
.services__item:nth-child(2) { transform: translateY(-12px); }
.services__item:nth-child(3) { transform: translateY(6px); }
@media (hover: hover) {
    .services__item:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
    .services__item:nth-child(2):hover { transform: translateY(-16px); }
    .services__item:nth-child(3):hover { transform: translateY(2px); }
}

.services__item:nth-child(1) { --service-color: #E8826C; }
.services__item:nth-child(2) { --service-color: #5BBFCA; }
.services__item:nth-child(3) { --service-color: #E8B82B; }

.services__num {
    font-family: var(--f-display); font-weight: 900;
    font-size: 0.78rem;
    color: var(--c-text-3); line-height: 1;
    letter-spacing: 0.04em;
    margin-bottom: clamp(16px, 2vh, 24px);
}

@media (hover: hover) {
    .services__item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    }
}

.services__body h3 {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    margin-bottom: 0.8em;
    letter-spacing: 0.01em;
}
.services__body h3 .services__meta {
    display: block;
    font-family: var(--f-display);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--c-text-3);
    letter-spacing: 0.04em;
    margin-top: 8px;
}
.services__body p {
    color: var(--c-text-2);
    font-size: clamp(0.82rem, 0.95vw, 0.9rem);
    line-height: 1.8;
    margin-bottom: clamp(16px, 2vh, 24px);
}
.services__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-top: clamp(12px, 1.5vh, 18px);
    border-top: 1px dashed var(--c-border);
    margin-top: auto;
}
.services__tags li {
    font-family: var(--f-jp);
    font-size: 0.7rem;
    color: var(--c-text-3);
    line-height: 1.5;
    padding: 3px 10px;
    background: rgba(0,0,0,0.025);
    border-radius: 100px;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .services { border-radius: 24px; margin: 0 8px 24px; overflow: hidden; }
    .services__list {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 4px;
        margin: 0 calc(-1 * var(--container-pad));
        padding-left: var(--container-pad);
        padding-right: var(--container-pad);
        scrollbar-width: none;
    }
    .services__list::-webkit-scrollbar { display: none; }
    .services__item {
        flex: 0 0 82%;
        scroll-snap-align: center;
        background: var(--c-bg);
        border-radius: 14px;
        padding: 32px 24px;
        border-top: 2px solid var(--service-color);
        border-left: none;
    }
}


/* ===========================================
   Works / Case Studies
   =========================================== */
.works {
    padding: clamp(120px, 20vh, 240px) 0;
    background: linear-gradient(180deg, var(--c-bg-alt) 0%, #F4F1EB 100%);
}
.works__heading {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.4;
    color: var(--c-text);
    margin-bottom: clamp(48px, 7vh, 88px);
    letter-spacing: -0.01em;
}
.works__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(20px, 3vw, 32px);
}
.works__card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.4s var(--ease-expo);
}
.works__card--placeholder { opacity: 0.55; }
.works__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--c-bg);
    border-radius: 13px 11px 14px 12px; /* irregular paper */
    border: 1px dashed var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-3);
    font-family: var(--f-jp);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    transition: background 0.3s, border-color 0.3s, transform 0.4s var(--ease-expo);
    overflow: hidden;
}
.works__thumb::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
}
@media (hover: hover) {
    .works__card:hover { transform: translateY(-4px); }
    .works__card:hover .works__thumb { background: #F2EFE9; border-color: var(--c-text-3); }
}
.works__meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.works__num {
    font-family: var(--f-display); font-weight: 900;
    font-size: 0.6rem; color: var(--c-text-3);
    letter-spacing: 0.18em;
}
.works__category {
    font-family: var(--f-display); font-weight: 700;
    font-size: 0.6rem; color: var(--c-accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.works__title {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--c-text);
}
.works__excerpt {
    font-family: var(--f-jp);
    font-size: 0.82rem;
    color: var(--c-text-2);
    line-height: 1.8;
}


/* ===========================================
   Approach — Flow / Timeline
   =========================================== */
.approach {
    padding: clamp(100px, 16vh, 200px) 0;
    background: linear-gradient(180deg, #F5F3F0 0%, #F0EDE6 100%);
}


.approach__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.approach__step {
    position: relative;
    padding: clamp(20px, 2.5vh, 32px) clamp(16px, 2vw, 28px) clamp(24px, 3vw, 36px);
    border-top: 2px solid var(--c-accent);
}

.approach__num {
    font-family: var(--f-display); font-weight: 900;
    font-size: 0.78rem;
    color: var(--c-accent);
    line-height: 1; display: block;
    letter-spacing: 0.04em;
    margin-bottom: clamp(14px, 1.8vh, 22px);
}

.approach__step h3 {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    margin-bottom: 0.5em;
}
.approach__step h3 .approach__meta {
    display: block;
    font-family: var(--f-display);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--c-text-3);
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.approach__step p {
    color: var(--c-text-2);
    font-size: clamp(0.78rem, 0.9vw, 0.88rem);
    line-height: 1.9;
}

@media (max-width: 768px) {
    .approach__steps {
        grid-template-columns: 1fr;
        padding-left: 28px;
        position: relative;
    }
    .approach__steps::before {
        content: '';
        position: absolute;
        left: 4px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--c-border);
        opacity: 0.2;
    }
    .approach__steps::after {
        content: '';
        position: absolute;
        left: 4px;
        top: 0;
        height: var(--timeline-progress, 0%);
        width: 2px;
        background: var(--c-accent);
        opacity: 0.6;
    }
    .approach__step {
        border-top: none;
        padding: 0 0 clamp(40px, 6vh, 64px);
    }
    .approach__step:last-child { padding-bottom: 0; }
    .approach__step::before {
        content: '';
        position: absolute;
        left: -24px;
        top: 5px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--c-accent);
    }
    .approach__num {
        font-size: 0.85rem;
        font-weight: 900;
        margin-bottom: clamp(10px, 1.5vh, 16px);
    }
    .approach__step h3 .approach__meta {
        font-size: 0.55rem;
        opacity: 0.5;
    }
}


/* ===========================================
   Vision — サイトの記憶点
   =========================================== */
.vision {
    position: relative;
    padding: clamp(300px, 48vh, 560px) 0 clamp(260px, 40vh, 480px);
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, #F0EDE6 0%, #F8F5F0 40%, #F8F5F0 60%, #F6F4F0 100%);
}

.vision__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.vision__circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
}
.vision__circle--1 {
    width: clamp(500px, 60vw, 900px);
    height: clamp(500px, 60vw, 900px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid var(--c-accent);
    /* Organic shape — not a perfect circle */
    border-radius: 48% 52% 51% 49% / 50% 49% 51% 50%;
    animation: visionPulse 8s ease-in-out infinite alternate, visionMorph 16s ease-in-out infinite alternate;
}
@keyframes visionMorph {
    0%   { border-radius: 48% 52% 51% 49% / 50% 49% 51% 50%; }
    50%  { border-radius: 52% 48% 49% 51% / 49% 51% 50% 50%; }
    100% { border-radius: 50% 50% 52% 48% / 51% 49% 50% 50%; }
}
.vision__circle--2 {
    width: clamp(300px, 38vw, 600px);
    height: clamp(300px, 38vw, 600px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(61,122,122,0.08), transparent 70%);
}
@keyframes visionPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.06; }
    100% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.03; }
}

.vision .section-tag {
    text-align: center;
    display: block;
}
.vision .section-tag::before {
    content: none;
}

.vision__heading {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.5;
    color: var(--c-text);
    margin-bottom: clamp(28px, 4vh, 48px);
    letter-spacing: var(--vision-ls, -0.02em);
    opacity: var(--vision-opacity, 1);
    will-change: letter-spacing, opacity;
}
.vision__heading-line {
    display: block;
}

.vision__sub {
    font-family: var(--f-jp); font-weight: 500;
    font-size: clamp(0.82rem, 1.1vw, 0.95rem);
    line-height: 2.2;
    color: var(--c-text-2);
    margin-bottom: clamp(72px, 10vh, 120px);
    letter-spacing: 0.04em;
    opacity: var(--vision-sub-opacity, 0.8);
}

.vision__members {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(8px, 1.5vw, 20px);
    position: relative;
}

/* Footprint dots — 歩いてきた痕跡 */
.vision__footprints {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-70%);
    display: flex;
    gap: 6px;
    opacity: 0;
}
.vision__footprint {
    width: 5px; height: 5px;
    border-radius: 50%;
    opacity: 0.5;
}
.vision__footprint:nth-child(1) { opacity: 0.15; width: 3px; height: 3px; }
.vision__footprint:nth-child(2) { opacity: 0.25; width: 4px; height: 4px; }
.vision__footprint:nth-child(3) { opacity: 0.35; }
.vision__footprint:nth-child(4) { opacity: 0.45; }
/* Unified system: viewBox width=100, height varies (108-160).
   Sizing by height — width auto follows aspect ratio.
   All heads/eyes/strokes identical scale → consistent visual weight. */
.char--member { width: auto; position: relative; }
/* Formation: m4(white) → m2(blue) → m1(coral/center) → m3(yellow) → m5(purple) */
.char--m4 { height: clamp(52px, 6.8vw, 72px); transform: rotate(-1deg); z-index: 1; }
.char--m2 { height: clamp(64px, 8.5vw, 92px); transform: rotate(1.5deg); z-index: 3; }
.char--m1 { height: clamp(58px, 7.6vw, 82px); transform: rotate(-2deg); z-index: 5; }
.char--m3 { height: clamp(52px, 6.8vw, 72px); transform: rotate(2deg); z-index: 2; }
.char--m5 { height: clamp(72px, 9.5vw, 104px); transform: rotate(-1.5deg); z-index: 2; }



@media (max-width: 580px) {
    .company__list { grid-template-columns: 1fr; }
}


/* ===========================================
   Contact
   =========================================== */
.contact {
    padding: clamp(140px, 20vh, 280px) 0;
    background: var(--c-accent);
    color: #fff;
    border-radius: 32px;
    margin: 0 12px;
    margin-bottom: 40px;
}

.contact__layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: center;
}

.contact__heading {
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.25; margin-bottom: 0.8em;
}

.contact__sub {
    font-size: clamp(0.8rem, 1vw, 0.92rem);
    opacity: 0.8; line-height: 1.7;
    margin-bottom: clamp(24px, 3vh, 40px);
}

/* Contact form — floating label + craft details */
.contact__form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field {
    position: relative;
    display: block;
}
.field input,
.field textarea {
    width: 100%;
    padding: 22px 18px 10px;
    background: rgba(255,255,255,0.10);
    border: 1.5px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    color: #fff;
    font-family: var(--f-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.35s var(--ease-expo),
                background 0.35s var(--ease-expo),
                box-shadow 0.35s var(--ease-expo);
    appearance: none;
    -webkit-appearance: none;
}
.field textarea {
    padding-top: 26px;
    resize: vertical;
    min-height: 110px;
    line-height: 1.7;
}
.field__label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.55);
    font-family: var(--f-jp);
    font-size: 0.92rem;
    pointer-events: none;
    transition: all 0.3s var(--ease-expo);
    transform-origin: left center;
}
.field--textarea .field__label {
    top: 22px;
    transform: none;
}

/* Float label when focused or filled */
.field input:focus + .field__label,
.field input:not(:placeholder-shown) + .field__label,
.field textarea:focus + .field__label,
.field textarea:not(:placeholder-shown) + .field__label {
    top: 8px;
    transform: translateY(0) scale(0.78);
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.05em;
}

/* Focused state — warm accent */
.field input:focus,
.field textarea:focus {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.16);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

/* Submit button — soft sink on press */
.form__submit {
    align-self: flex-start;
    padding: 18px 36px 18px 44px;
    background: #fff; color: var(--c-accent);
    font-family: var(--f-jp); font-weight: 700;
    font-size: 1rem;
    border: none; border-radius: 100px;
    cursor: pointer;
    letter-spacing: 0.06em;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.3s var(--ease-expo),
                box-shadow 0.3s var(--ease-expo),
                gap 0.3s var(--ease-expo);
    box-shadow: 0 2px 0 rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
}
.form__submit-arrow {
    transition: transform 0.3s var(--ease-expo);
}
@media (hover: hover) {
    .form__submit:hover {
        transform: translateY(-2px);
        gap: 20px;
        box-shadow: 0 4px 0 rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.12);
    }
    .form__submit:hover .form__submit-arrow { transform: translateX(3px); }
}
.form__submit:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.08);
    transition-duration: 0.08s;
}

.contact__alt {
    font-size: 0.7rem; opacity: 0.35; margin-top: 24px;
}
.contact__alt a { text-decoration: underline; }


.contact__dogs {
    display: flex; align-items: flex-end; gap: clamp(8px, 2vw, 20px);
    justify-content: center;
}
.contact__dogs { opacity: 0.7; }
.contact__dog { width: clamp(80px, 12vw, 120px); }

/* Tail wag animation */
.dog-tail {
    transform-origin: 20px 36px;
    animation: tailWag 0.4s ease-in-out infinite alternate;
}
@keyframes tailWag {
    0% { transform: rotate(-15deg); }
    100% { transform: rotate(15deg); }
}

@media (max-width: 768px) {
    .contact__layout { grid-template-columns: 1fr; text-align: center; }
    .contact { border-radius: 24px; margin: 0 8px 24px; }
    .contact__email { justify-content: center; }
            .contact__alt { font-size: 0.72rem; opacity: 0.45; margin-top: 16px; }
}


/* ===========================================
   Footer
   =========================================== */
.footer { padding: clamp(48px, 7vh, 80px) 0 clamp(24px, 3vh, 40px); }
.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: clamp(28px, 4vh, 44px);
    border-bottom: 1px solid var(--c-border);
    margin-bottom: clamp(20px, 3vh, 32px);
    gap: clamp(24px, 4vw, 48px);
    flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__logo {
    font-family: var(--f-display); font-weight: 800;
    font-size: 0.88rem;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: 0.04em;
}
.footer__mark { width: 22px; height: 22px; opacity: 0.5; }
.footer__tagline {
    font-family: var(--f-jp); font-weight: 500;
    font-size: 0.7rem; color: var(--c-text-3);
    letter-spacing: 0.06em;
}
.footer__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 32px;
    max-width: 480px;
}
.footer__info-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 4px 0;
}
.footer__info-row dt {
    font-family: var(--f-display); font-size: 0.5rem;
    font-weight: 700; letter-spacing: 0.18em;
    color: var(--c-text-3); opacity: 0.5;
    text-transform: uppercase;
    min-width: 50px;
}
.footer__info-row dd {
    font-family: var(--f-jp); font-size: 0.78rem;
    color: var(--c-text-2);
}
.footer__info-row dd a { color: inherit; transition: color 0.3s; }
.footer__info-row dd a:hover { color: var(--c-accent); }

.footer__bottom {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.footer__link {
    font-size: 0.68rem; color: var(--c-text-3);
    transition: color 0.3s;
}
.footer__link:hover { color: var(--c-text-2); }
.footer__copy { font-size: 0.68rem; color: var(--c-text-3); }


/* ===========================================
   Member Speech Bubble
   =========================================== */
.member-bubble {
    position: absolute;
    top: -40px;
    transform: translateX(-50%);
    font-family: var(--f-jp); font-weight: 700;
    font-size: 0.78rem;
    color: var(--c-text);
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}
.member-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}


/* ===========================================
   Easter Egg Toast
   =========================================== */
.easter-toast {
    position: fixed;
    bottom: clamp(24px, 4vh, 48px);
    left: 50%; transform: translateX(-50%);
    font-family: var(--f-jp); font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    letter-spacing: 0.08em;
    color: var(--c-text);
    background: var(--c-bg);
    border: 2px solid var(--c-accent);
    padding: 14px 32px;
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    z-index: 10000;
    white-space: nowrap;
    pointer-events: none;
}


/* ===========================================
   SP 再編集版 — 縮小ではなく再設計
   =========================================== */
@media (max-width: 768px) {
    .nav { padding: 14px 16px; }
    .nav__mark { width: 24px; height: 24px; }

    /* Hero — 画面いっぱいにレターが呼吸 */
    .hero__content { margin-top: -2vh; }
    .hero__letter { font-size: clamp(2.8rem, 14vw, 5rem); }
    .hero__letters { gap: clamp(2px, 1vw, 6px); margin-bottom: 24px; }
    .hero__meta { flex-direction: column; gap: 10px; align-items: center; }
    .hero__dash { display: none; }
    .hero__tagline {
        font-size: clamp(0.88rem, 3.2vw, 1.1rem);
        letter-spacing: 0.1em;
    }
    .hero__inc { font-size: 0.42rem; letter-spacing: 0.25em; }

    /* About — 1カラム、見出しの存在感 */
    .about { padding: clamp(100px, 16vh, 180px) 0 clamp(80px, 12vh, 140px); }
    .about__layout { grid-template-columns: 1fr; gap: 40px; }
    .about__heading { font-size: clamp(1.6rem, 6.5vw, 2.4rem); }
    .about__right { padding-top: 0; }

    /* Services — カードのタッチ感 */
    .services { border-radius: 24px; margin: 0 8px 24px; }
    .services__item {
        padding: 28px 22px;
        border-radius: 14px;
        min-height: auto;
    }
    .services__body h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); margin-bottom: 0.6em; }

    /* Approach — 密度を出す */
    .approach__step h3 { font-size: clamp(1rem, 3.5vw, 1.2rem); }
    .approach__num { font-size: 0.8rem; margin-bottom: clamp(8px, 1.2vh, 14px); }

    /* Vision — 圧倒的余白＋大文字 */
    .vision { padding: clamp(160px, 26vh, 300px) 0 clamp(140px, 22vh, 260px); }
    .vision__heading { font-size: clamp(1.8rem, 8vw, 2.8rem); }
    .vision__sub { font-size: clamp(0.78rem, 2.8vw, 0.88rem); margin-bottom: clamp(48px, 7vh, 80px); }
    .char--m4 { height: 48px; }
    .char--m2 { height: 62px; }
    .char--m1 { height: 56px; }
    .char--m3 { height: 48px; }
    .char--m5 { height: 70px; }

    /* Contact — 最後の体験 */
    .contact { border-radius: 24px; margin: 0 8px 24px; padding: clamp(80px, 14vh, 160px) 0; }
    .contact__layout { grid-template-columns: 1fr; text-align: center; }
    .contact__heading { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .contact__dog { width: clamp(64px, 18vw, 90px); }
    .contact__dogs { margin-top: 32px; }
    .form__row { grid-template-columns: 1fr; }
    .contact__form { gap: 14px; }
    .contact__form input,
    .contact__form textarea { border-radius: 14px; padding: 16px 20px; font-size: 1rem; }
    .form__submit { align-self: stretch; padding: 18px; font-size: 1rem; }
    .contact__alt { text-align: center; }
    
    /* Footer */
    .footer__top { flex-direction: column; gap: 24px; }
    .footer__info { grid-template-columns: 1fr; max-width: none; }
    .footer__bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 360px) {
    :root { --container-pad: 14px; }
    .hero__letter { font-size: clamp(2.2rem, 15vw, 3.2rem); }
}
