/* ================================================================
   TAKAKI Portfolio — v3
   New: Philosophy · Parallax Quote · Blog List · Gallery Filter
================================================================ */

/* ── TOKENS ──────────────────────────────────────────────────── */
:root {
    --white   : #FFFFFF;
    --black   : #0A0A0A;
    --gray-50 : #F6F6F6;
    --gray-100: #EBEBEB;
    --gray-200: #DEDEDE;
    --gray-400: #ABABAB;
    --gray-500: #888888;
    --gray-700: #3D3D3D;

    --font-display : 'Syne', system-ui, -apple-system, sans-serif;
    --font-body    : 'DM Sans', system-ui, -apple-system, sans-serif;

    --cinema-pt : 41.84%; /* 2.39:1 */

    --nav-h  : 64px;
    --max-w  : 1240px;
    --gutter : clamp(20px, 5vw, 80px);

    --ease-out : cubic-bezier(0.16, 1, 0.3, 1);
    --ease-io  : cubic-bezier(0.65, 0, 0.35, 1);
    --t-fast   : 200ms;
    --t-base   : 340ms;
    --t-slow   : 700ms;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul, dl { list-style: none; }
button { cursor: pointer; }

/* ── UTILITIES ───────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.cinema-frame {
    position: relative;
    width: 100%;
    padding-top: var(--cinema-pt);
    overflow: hidden;
}
.cinema-frame img { position: absolute; inset: 0; }

.section-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 16px;
}

/* ── SCROLL FADE-IN ──────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--t-slow) var(--ease-out),
                transform var(--t-slow) var(--ease-out);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .fade-in { opacity: 1; transform: none; transition: none; }
    *:not(.gallery-strip__track):not(.tape__track) { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ================================================================
   LOADER — camera shutter
================================================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: visibility 0s 0.9s;
}
.loader.out { visibility: hidden; }

/* White flash at the moment the shutter fires */
.loader.out::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 3;
    pointer-events: none;
    animation: shutter-flash 0.2s ease-out forwards;
}

/* Two horizontal blades */
.loader__blade {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--black);
    z-index: 2;
    transition: transform 0.72s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader__blade--top    { top: 0; }
.loader__blade--bottom { bottom: 0; }

.loader.out .loader__blade--top    { transform: translateY(-102%); }
.loader.out .loader__blade--bottom { transform: translateY(102%); }

/* Logo between the blades */
.loader__logo {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(14px, 2.8vw, 26px);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--white);
    transition: opacity 0.18s;
}
.loader.out .loader__logo { opacity: 0; }

@keyframes shutter-flash {
    0%   { opacity: 0.55; }
    100% { opacity: 0; }
}

/* ================================================================
   NAVIGATION
================================================================ */
.nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background var(--t-base) var(--ease-out),
                border-color var(--t-base) var(--ease-out);
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(255,255,255,0.95);
    border-color: var(--gray-100);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.nav__logo {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.9);
    transition: color var(--t-base) var(--ease-out);
}
.nav.scrolled .nav__logo { color: var(--black); }

.nav__links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav__links a {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    transition: color var(--t-fast);
    display: flex;
    align-items: center;
}
.nav.scrolled .nav__links a { color: var(--gray-500); }
.nav__links a:hover { color: var(--white); }
.nav.scrolled .nav__links a:hover { color: var(--black); }
.nav__links a:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; border-radius: 2px; }

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 7px;
    background: none;
    border: none;
    padding: 8px;
    margin-right: -8px;
}
.nav__hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: rgba(255,255,255,0.85);
    transition: background var(--t-base), transform var(--t-base) var(--ease-out), opacity var(--t-base);
    transform-origin: center;
}
.nav.scrolled .nav__hamburger span { background: var(--black); }
.nav__hamburger.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__hamburger.open span:last-child  { transform: translateY(-4px) rotate(-45deg); }

.nav__mobile {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99;
}
.nav__mobile.open { display: flex; }
.nav__mobile ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
}
.nav__mobile a {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--black);
    transition: opacity var(--t-fast);
}
.nav__mobile a:hover { opacity: 0.5; }

/* ================================================================
   HERO
================================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--black);
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.hero__grain {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.3) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.6) 100%);
}

.hero__content {
    position: relative;
    z-index: 3;
    padding: 0 var(--gutter) clamp(56px, 9vh, 88px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero__eyebrow {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 20px;
    opacity: 0;
    animation: fade-up 0.8s var(--ease-out) 0.3s forwards;
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(18px, 7vw, 90px);
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--white);
    line-height: 1;
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
}

.hero__letter-outer {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    line-height: 1.05;
}
.hero__letter-inner {
    display: inline-block;
    transform: translateY(100%);
    animation: letter-up 0.9s var(--ease-out) forwards;
}

.hero__role-clip { overflow: hidden; }
.hero__role {
    font-family: var(--font-display);
    font-size: clamp(11px, 1.4vw, 16px);
    font-weight: 400;
    font-style: normal;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    transform: translateY(100%);
    animation: letter-up 0.9s var(--ease-out) 1.0s forwards;
}
.hero__role em { font-style: normal; font-weight: 600; color: rgba(255,255,255,0.85); }

.hero__scroll-hint {
    position: absolute;
    right: var(--gutter);
    bottom: clamp(28px, 5vh, 52px);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fade-in-only 1s var(--ease-out) 1.4s forwards;
}
.scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4));
    animation: line-pulse 2.6s var(--ease-io) infinite 2s;
}
.scroll-word {
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    writing-mode: vertical-rl;
}

@keyframes letter-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade-up     { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in-only { from { opacity: 0; } to { opacity: 1; } }
@keyframes line-pulse  { 0%, 100% { opacity: 0.4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(0.5); } }

/* ================================================================
   SCROLLING TAPE
================================================================ */
.tape {
    overflow: hidden;
    padding: 14px 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    user-select: none;
}
.tape--dark  { background: var(--black); border-color: rgba(255,255,255,0.06); }
.tape--light { background: var(--gray-50); border-color: var(--gray-100); }

.tape__track {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    white-space: nowrap;
    animation: tape-left 22s linear infinite;
}
.tape--rev .tape__track { animation-name: tape-right; }

.tape--dark  .tape__track { color: rgba(255,255,255,0.55); }
.tape--light .tape__track { color: var(--gray-500); }

.tape__track span {
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.tape__track b { font-weight: 400; opacity: 0.4; font-size: 8px; }

@keyframes tape-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes tape-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ================================================================
   ABOUT — asymmetric
================================================================ */
.about {
    position: relative;
    padding-bottom: clamp(88px, 12vw, 160px);
    background: var(--white);
    overflow: visible;
}

.about__visual { position: relative; width: 100%; overflow: hidden; }

.about__img-wrap {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
}
.about__portrait-col {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    position: relative;
}
.about__portrait-col img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
    transition: transform var(--t-slow) var(--ease-out);
}
.about__portrait-col:hover img { transform: scale(1.04); }

.about__pullquote {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(24px, 4vw, 56px) var(--gutter);
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    font-family: var(--font-display);
    font-size: clamp(20px, 3.8vw, 48px);
    font-weight: 600;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.about__pullquote em { font-style: normal; font-weight: 400; opacity: 0.65; }

.circle-badge {
    position: absolute;
    top: clamp(180px, 35vw, 560px);
    right: var(--gutter);
    transform: translateY(-50%);
    z-index: 10;
    color: var(--gray-500);
    animation: spin-slow 20s linear infinite;
}
.circle-badge__text { fill: currentColor; }
.circle-badge__dot  { fill: currentColor; }

@keyframes spin-slow { to { transform: rotate(360deg); } }

.about__body {
    padding-top: clamp(48px, 8vw, 96px);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.about__portrait {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}
.about__portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--t-slow) var(--ease-out);
}
.about__portrait:hover img { transform: scale(1.03); }

.about__name {
    font-family: var(--font-display);
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.about__heading {
    font-family: var(--font-display);
    font-size: clamp(22px, 3.5vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    color: var(--black);
}
.about__bio {
    font-size: 15px;
    line-height: 1.9;
    color: var(--gray-700);
    margin-bottom: 18px;
}
.about__details {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-100);
}
.about__detail { display: flex; flex-direction: column; gap: 5px; }
.about__detail dt { font-size: 9px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray-400); }
.about__detail dd { font-size: 14px; color: var(--black); }

/* ================================================================
   PORTFOLIO — auto-scroll gallery + filter
================================================================ */
.portfolio {
    padding: clamp(80px, 12vw, 140px) 0 clamp(64px, 10vw, 100px);
    background: var(--white);
}

.portfolio__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.portfolio__heading {
    font-family: var(--font-display);
    font-size: clamp(22px, 3.5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--black);
}

/* ── Filter tabs ──────────────────────────────────────────────── */
.portfolio__filter-row {
    margin-bottom: 32px;
}

.portfolio__filters {
    display: flex;
    gap: 4px;
    align-items: center;
}

.portfolio__filter-btn {
    background: none;
    border: 1px solid var(--gray-200);
    padding: 9px 22px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray-500);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    border-radius: 0;
}
.portfolio__filter-btn:hover  { border-color: var(--black); color: var(--black); }
.portfolio__filter-btn.active { background: var(--black); border-color: var(--black); color: var(--white); }
.portfolio__filter-btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

/* ── Gallery strips ───────────────────────────────────────────── */
.gallery-strip {
    overflow: hidden;
    width: 100%;
    cursor: grab;
    background: #060606;
}
.gallery-strip:active { cursor: grabbing; }
.gallery-strip + .gallery-strip { margin-top: 4px; }

.gallery-strip__track {
    display: flex;
    gap: 3px;
    width: max-content;
    animation: gallery-scroll 60s linear infinite;
}

.gallery-strip--rev .gallery-strip__track {
    animation-name: gallery-scroll-rev;
    animation-duration: 64s;
}
.gallery-strip--slow .gallery-strip__track {
    animation-duration: 72s;
}
.gallery-strip:hover .gallery-strip__track { animation-play-state: paused; }

@keyframes gallery-scroll     { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes gallery-scroll-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.gallery-item {
    flex: 0 0 clamp(360px, 42vw, 680px);
    overflow: hidden;
}

.gallery-item__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}
.gallery-item__frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}
.gallery-item:hover .gallery-item__frame img { transform: scale(1.04); }

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 22px;
    transition: background var(--t-base) var(--ease-out);
}
.gallery-item:hover .gallery-item__overlay { background: rgba(0,0,0,0.54); }

.gallery-item__type {
    position: absolute;
    top: 20px;
    left: 22px;
    display: block;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}
.gallery-item__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--white);
    line-height: 1.3;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.gallery-item:hover .gallery-item__title { opacity: 1; transform: translateY(0); }

.gallery-item__play {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
}

/* ── Filter grid (shown when filter != all) ───────────────────── */
.portfolio__filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 2px;
}
.portfolio__filter-grid[hidden] { display: none; }
.portfolio__filter-grid .gallery-item {
    flex: none;
    width: 100%;
}

.portfolio__viewall {
    text-align: center;
    margin-top: clamp(32px, 6vw, 56px);
}
.portfolio__viewall .philosophy__btn { margin-top: 0; }

/* ── Gallery item — clickable ─────────────────────────────────── */
.gallery-item { cursor: pointer; }
.gallery-item:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; }

/* ================================================================
   WORK LIGHTBOX
================================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.lightbox.open {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--t-base) var(--ease-out), visibility 0s;
}
.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.92);
}
.lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
}
.lightbox.open .lightbox__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.lightbox__close:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
.lightbox__close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.lightbox__media {
    position: relative;
    width: 100%;
    background: #000;
    max-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.lightbox__img,
.lightbox__video {
    display: none;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
}
.lightbox__media.is-photo .lightbox__img { display: block; }
.lightbox__media.is-video .lightbox__video { display: block; }
.lightbox__info {
    padding: 18px 2px 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.lightbox__type {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gray-400);
    flex: none;
}
.lightbox__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--white);
    line-height: 1.3;
}

/* ================================================================
   PHILOSOPHY / 想い
================================================================ */
.philosophy {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.philosophy__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    max-width: var(--max-w);
    margin: 0 auto;
}

/* Left column */
.philosophy__left {
    border-right: 1px solid var(--gray-200);
    padding: clamp(64px, 10vw, 140px) clamp(28px, 4vw, 64px) clamp(64px, 10vw, 120px);
}

.philosophy__video-box {
    width: 74%;
    margin-left: 8%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    margin-bottom: clamp(36px, 5vw, 56px);
}
.philosophy__video-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.philosophy__left-text { /* inherits from left column padding */ }

/* Right column */
.philosophy__right {
    padding: clamp(36px, 5vw, 72px) clamp(28px, 4vw, 64px) clamp(36px, 5vw, 56px);
    display: flex;
    flex-direction: column;
}

.philosophy__r-img-top {
    width: 82%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    align-self: flex-end;
    margin-bottom: clamp(36px, 6vw, 64px);
}

.philosophy__r-text {
    margin-bottom: clamp(28px, 5vw, 48px);
}

.philosophy__r-img-mid {
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    margin-bottom: 10px;
}

.philosophy__r-img-bottom {
    width: 34%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    align-self: flex-end;
}

.philosophy__r-img-top  img,
.philosophy__r-img-mid  img,
.philosophy__r-img-bottom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--t-slow) var(--ease-out);
}
.philosophy__r-img-top:hover  img,
.philosophy__r-img-mid:hover  img,
.philosophy__r-img-bottom:hover img { transform: scale(1.03); }

/* Shared text */
.philosophy__jp {
    display: block;
    font-size: clamp(13px, 1.35vw, 15px);
    line-height: 2.1;
    color: var(--black);
}

.philosophy__en {
    display: block;
    font-size: 12px;
    line-height: 2;
    color: var(--gray-500);
    margin-top: 20px;
}

/* Philosophy CTA button */
.philosophy__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding: 11px 18px 11px 24px;
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    font-size: 13px;
    color: var(--black);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.philosophy__btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.philosophy__btn:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }

.philosophy__btn-circle {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast);
}
.philosophy__btn:hover .philosophy__btn-circle { background: rgba(255,255,255,0.18); }

/* ================================================================
   QUOTE / ESTIMATE CTA — parallax video background
================================================================ */
.quote {
    position: relative;
    overflow: hidden;
    padding: clamp(100px, 16vw, 200px) var(--gutter);
    text-align: center;
    background: var(--black);
}

/* Parallax video wrapper — taller than section to allow movement */
.quote__parallax {
    position: absolute;
    inset: -25% 0;
    z-index: 0;
    will-change: transform;
}

.quote__parallax-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.quote__parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.quote__content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

.quote__label { color: rgba(255,255,255,0.3); }

.quote__heading {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 28px;
}
.quote__heading em { font-style: normal; font-weight: 400; opacity: 0.45; }

.quote__sub {
    font-size: 15px;
    line-height: 1.85;
    color: rgba(255,255,255,0.4);
    margin-bottom: 52px;
}

.quote__btn {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 18px 40px;
    border: 1px solid rgba(255,255,255,0.35);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: background var(--t-base) var(--ease-out),
                border-color var(--t-base) var(--ease-out),
                color var(--t-base) var(--ease-out);
}
.quote__btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.quote__btn:focus-visible { outline: 2px solid var(--white); outline-offset: 6px; }

.quote__btn-arrow { display: flex; align-items: center; transition: transform var(--t-fast); }
.quote__btn:hover .quote__btn-arrow { transform: translateX(5px); }

/* ================================================================
   BLOG — horizontal list layout
================================================================ */
section.blog {
    padding-top: clamp(64px, 10vw, 100px);
    padding-bottom: clamp(64px, 10vw, 100px);
    background: var(--white);
}

/* + Blog [rule] header */
.blog__bar {
    display: flex;
    align-items: center;
    padding: 0 var(--gutter) 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0;
}

.blog__bar::after {
    content: '';
    flex: 1;
    height: 1px;
    /* line handled by border-bottom on .blog__bar */
    display: none;
}

.blog__bar-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog__plus {
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    color: var(--black);
}

.blog__h2 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--black);
}

/* ── Each blog row ──────────────────────────────────────────── */
.blog__row {
    border-bottom: 1px solid var(--gray-200);
}

.blog__row-inner {
    display: grid;
    grid-template-columns: 140px clamp(220px, 30vw, 370px) 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "meta  thumb  title"
        "meta  thumb  tags"
        "meta  thumb  author";
    column-gap: clamp(20px, 3vw, 48px);
    padding: 28px var(--gutter);
    min-height: 210px;
}

.blog__row-meta {
    grid-area: meta;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 4px;
}

.blog__row-date {
    font-size: 11px;
    color: var(--gray-500);
    letter-spacing: 0.06em;
}

.blog__row-num {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--black);
    line-height: 1;
}

.blog__row-thumb {
    grid-area: thumb;
    display: block;
    position: relative;
    overflow: hidden;
    align-self: stretch;
}
.blog__row-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--t-slow) var(--ease-out);
}
.blog__row:hover .blog__row-thumb img { transform: scale(1.04); }

.blog__row-thumb-label {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    pointer-events: none;
}

.blog__row-body {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.blog__row-title {
    grid-area: title;
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 400;
    line-height: 1.7;
    color: var(--black);
    align-self: start;
    transition: opacity var(--t-fast);
}
.blog__row-title a { color: inherit; text-decoration: none; }
.blog__row:hover .blog__row-title { opacity: 0.6; }

.blog__row-tags {
    grid-area: tags;
    font-size: 11px;
    color: var(--gray-400);
    line-height: 2;
    flex: 1;
    align-self: center;
    margin-top: 12px;
}

.blog__row-author {
    grid-area: author;
    font-size: 11px;
    color: var(--gray-500);
    align-self: end;
}

/* ── View more ──────────────────────────────────────────────── */
.blog__footer {
    display: flex;
    justify-content: center;
    padding: 48px var(--gutter) 0;
}

.blog__viewmore {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px 11px 24px;
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    font-size: 13px;
    color: var(--black);
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.blog__viewmore:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.blog__viewmore:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }

.blog__viewmore-icon {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast);
    flex-shrink: 0;
}
.blog__viewmore:hover .blog__viewmore-icon { background: rgba(255,255,255,0.18); }

/* ================================================================
   FOOTER
================================================================ */
.footer {
    position: relative;
    overflow: hidden;
    background: var(--black);
    padding: clamp(80px, 12vw, 128px) 0 48px;
}
.footer__parallax {
    position: absolute;
    inset: -25% 0;
    z-index: 0;
    will-change: transform;
}
.footer__parallax-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.footer__parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}
.footer__z {
    position: relative;
    z-index: 1;
}
.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(64px, 10vw, 96px);
    gap: 40px;
}
.footer__label { color: rgba(255,255,255,0.3); }
.footer__heading {
    font-family: var(--font-display);
    font-size: clamp(24px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 32px;
}
.footer__heading em { font-style: normal; font-weight: 400; opacity: 0.45; }
.footer__email {
    font-size: clamp(15px, 1.8vw, 20px);
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.25);
    padding-bottom: 2px;
    display: inline-block;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.footer__email:hover { color: var(--white); border-color: var(--white); }

.footer__btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}
.footer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.footer__btn--primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.footer__btn--primary:hover {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.6);
}
.footer__btn--ghost {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.22);
}
.footer__btn--ghost:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.7);
}

.footer__side { flex-shrink: 0; }
.footer__ig {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    transition: color var(--t-fast);
}
.footer__ig:hover { color: var(--white); }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.06em;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
    .blog__row-inner {
        grid-template-columns: 100px clamp(180px, 28vw, 300px) 1fr;
    }
    .blog__row-num { font-size: 40px; }
}

@media (max-width: 900px) {
    .footer__inner  { flex-direction: column; align-items: flex-start; }
    .about__body    { grid-template-columns: 1fr; }
    .about__portrait { aspect-ratio: 4 / 3; }
    .circle-badge   { right: 16px; }
    .portfolio__header { flex-direction: column; align-items: flex-start; }

    /* Philosophy mobile */
    .philosophy__grid { grid-template-columns: 1fr; }
    .philosophy__left { border-right: none; border-bottom: 1px solid var(--gray-200); }
    .philosophy__video-box { width: 88%; margin-left: 0; }
    .philosophy__r-img-top { width: 85%; }
    /* About portrait grid: 3 columns on mobile, hide items 4-5 */
    .about__img-wrap { grid-template-columns: repeat(3, 1fr); }
    .about__portrait-col:nth-child(4),
    .about__portrait-col:nth-child(5) { display: none; }

    /* Blog mobile */
    .blog__row-inner {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "meta  thumb"
            "title title"
            "tags  tags"
            "author author";
        grid-template-rows: auto auto auto auto;
        min-height: 0;
    }
    .blog__row-thumb { aspect-ratio: 16 / 9; align-self: start; grid-area: thumb; }
    .blog__row-title  { grid-area: title;  margin-top: 16px; }
    .blog__row-tags   { grid-area: tags; }
    .blog__row-author { grid-area: author; }
    .portfolio__filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav__links    { display: none; }
    .nav__hamburger { display: flex; }
    .blog__row-inner { grid-template-columns: 64px 1fr; column-gap: 16px; }
    .blog__row-num { font-size: 32px; }
}

@media (max-width: 600px) {
    /* Nav sits over the white gap above the hero video now, so keep it dark
       even before the page has scrolled (the .scrolled state already covers
       everywhere else). Front page only. */
    body.home .nav:not(.scrolled) .nav__logo { color: var(--black); }
    body.home .nav:not(.scrolled) .nav__hamburger span { background: var(--black); }

    /* Hero — video pinned to top at 16:9, white space below with dark text */
    .hero {
        height: 100vh;
        min-height: 0;
        background: var(--white);
        padding-bottom: clamp(40px, 10vw, 64px);
    }
    .hero__bg {
        position: relative;
        inset: auto;
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 16 / 9;
        margin-top: var(--nav-h);
    }
    .hero__content {
        position: relative;
        z-index: 1;
        flex: 1 1 auto;
        justify-content: center;
        padding: clamp(24px, 7vw, 36px) var(--gutter) 0;
    }
    .hero__eyebrow { color: var(--gray-500); }
    .hero__role { color: var(--gray-700); }
    .hero__role em { color: var(--black); }
    .hero__scroll-hint { color: var(--black); }
    .scroll-line { background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3)); }
    .scroll-word { color: rgba(0,0,0,0.35); }

    /* Hero — 2-line wrap so YUGA / TAKAKI each fill the line */
    .hero__name {
        font-size: clamp(26px, 10vw, 48px);
        letter-spacing: 0.06em;
        white-space: normal;
        word-break: keep-all;
        color: var(--black);
    }
    /* Force the line break exactly at the space between YUGA and TAKAKI */
    .hero__name .hero__letter-outer:nth-child(5) {
        display: block;
        width: 100%;
        height: 0;
    }

    /* Blog — reliable flex-column stack */
    .blog__row-inner {
        display: flex;
        flex-direction: column;
        padding: 20px var(--gutter);
        min-height: 0;
        gap: 0;
    }
    .blog__row-meta {
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 14px;
        margin-bottom: 14px;
        padding-bottom: 0;
    }
    .blog__row-num { font-size: 28px; }
    .blog__row-thumb {
        width: 100%;
        aspect-ratio: 16 / 9;
        align-self: auto;
        margin-bottom: 14px;
    }
    .blog__row-body { padding: 0; }
    .blog__row-title { margin-top: 0; }
}

/* ================================================================
   SINGLE ENTRY — single.php / single-work.php / page.php / 404.php
================================================================ */
.single-entry {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 160px var(--gutter) 120px;
}
.single-entry__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 14px 0 24px;
    color: var(--black);
}
.single-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 40px;
}
.single-entry__media {
    width: 100%;
    margin-bottom: 48px;
    background: var(--black);
}
.single-entry__media img,
.single-entry__media video {
    width: 100%;
    display: block;
}
.single-entry__content {
    max-width: 760px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--gray-700);
}
.single-entry__content p { margin-bottom: 1.4em; }
.single-entry__content a { color: var(--black); }

/* ================================================================
   CONTACT FORM 7 — 見積もり／お問い合わせフォーム
================================================================ */
.wpcf7-form { max-width: 560px; margin-top: 8px; }
.wpcf7-form p { margin-bottom: 26px; }
.wpcf7-form label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray-500);
}
.wpcf7-form .wpcf7-required { color: var(--black); margin-left: 2px; }
.wpcf7-form-control-wrap { display: block; margin-top: 10px; }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 2px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--black);
    background: transparent;
    transition: border-color var(--t-fast) var(--ease-out);
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--black);
}
.wpcf7-form textarea { min-height: 130px; resize: vertical; }
.wpcf7-form select { appearance: auto; cursor: pointer; }

.wpcf7-form .wpcf7-list-item {
    margin: 8px 16px 0 0;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--black);
}
.wpcf7-form .wpcf7-list-item-label { margin-left: 6px; }

.wpcf7-form input[type="submit"] {
    margin-top: 8px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 999px;
    padding: 15px 36px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--t-fast) var(--ease-out);
}
.wpcf7-form input[type="submit"]:hover { opacity: 0.78; }
.wpcf7-form input[type="submit"]:disabled { opacity: 0.4; cursor: not-allowed; }

.wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #c0392b;
}
.wpcf7-response-output {
    margin-top: 28px;
    padding: 14px 18px;
    border: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-700);
}
.wpcf7-form.sent .wpcf7-response-output { border-color: #2e7d32; color: #2e7d32; }
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.aborted .wpcf7-response-output { border-color: #c0392b; color: #c0392b; }
.wpcf7-spinner { margin: 0 0 0 12px; }

/* ── Archive listing spacing ─────────────────────────────────── */
.blog--archive,
.portfolio--archive { padding-top: var(--nav-h); }
.blog--archive .blog__bar,
.portfolio--archive .portfolio__header { margin-top: 40px; }

/* ── WP pagination ────────────────────────────────────────────── */
.blog__footer .page-numbers,
.blog__footer .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.blog__footer .page-numbers a,
.blog__footer .page-numbers span {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    text-decoration: none;
}
.blog__footer .page-numbers.current { color: var(--black); font-weight: 600; }
.blog__footer .page-numbers a:hover { color: var(--black); }
