/* 
    Dots. Homepage Styles - Redesign Version (Light / Editorial Agency Vibe)
*/

:root {
    --color-primary: #ea4d23;
    --color-text-light: #1a1a1a;
    --color-text-dark: #ffffff;
    --color-background: #ffffff;

    /* Typography */
    --font-family-sans: 'Tazugane Gothic StdN Heavy', 'TazuganeGothicStdN-Heavy', sans-serif;
    --font-family-serif: 'Tazugane Gothic StdN Heavy', 'TazuganeGothicStdN-Heavy', sans-serif;
    --font-family-brand: 'nazarethroman', serif;

    /* Font Sizes - Scaled up for bolder editorial feel */
    --fs-xs: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem);
    --fs-sm: clamp(0.9rem, 1.2vw + 0.5rem, 1.1rem);
    --fs-md: clamp(1.2rem, 1.5vw + 0.5rem, 1.5rem);
    --fs-lg: clamp(1.5rem, 2.5vw + 0.5rem, 2.2rem);
    --fs-xl: clamp(2.5rem, 4vw + 0.5rem, 3.5rem);
    --fs-xxl: clamp(3.5rem, 6vw + 1rem, 6rem);

    /* Layout */
    --container-width: 1600px;
    --section-padding: clamp(6rem, 12vw, 12rem) 4rem;
}

/* Mobile Overrides */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.0rem;
    }
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 1;
}

html {
    scroll-behavior: smooth;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-background);
}

body {
    font-family: var(--font-family-sans);
    color: var(--color-text-light);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
.serif {
    font-family: var(--font-family-serif);
    font-weight: 700;
}

.font-brand {
    font-family: var(--font-family-brand);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.lowercase-word {
    text-transform: lowercase;
    display: inline-block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: clamp(20px, 5vw, 60px);
    padding-right: clamp(20px, 5vw, 60px);
}

@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.section {
    padding: var(--section-padding);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* 各セクションの間隔を狭めるための上書き */
.works,
.hero,
.services,
.process,
.portfolio,
.contact {
    min-height: auto;
    padding-top: clamp(2rem, 4.5vw, 4.5rem);
    padding-bottom: clamp(2rem, 4.5vw, 4.5rem);
}

/* Animations Core */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1),
        transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Global Canvas --- */
.global-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* --- Fixed Elements --- */
.top-logo {
    position: absolute;
    top: 1rem;
    left: max(50px, calc(50% - 700px + 50px));
    z-index: 100;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .top-logo {
        left: 20px;
        top: 2.5rem;
    }
}

.top-logo img {
    height: 50px;
    /* Removed white filter, keep original black image */
}

.top-logo:hover {
    transform: scale(1.05);
}

.floating-contact {
    position: fixed;
    top: calc(1.5rem + 50px + 2rem);
    right: 1.5rem;
    z-index: 100;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 0.1em;
    box-shadow: 0 10px 30px rgba(234, 77, 35, 0.2);
}

@media (max-width: 768px) {
    .floating-contact {
        top: auto;
        bottom: 2.5rem;
        right: 1rem;
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }
}

.floating-contact__text {
    display: block;
}

.floating-contact:hover {
    transform: translateY(-5px) scale(1.02);
    background-color: #f06040;
    color: #ffffff;
}

.floating-menu {
    position: fixed;
    top: 2.5rem;
    right: 1.5rem;
    z-index: 100;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .floating-menu {
        top: 1.5rem;
        right: 1rem;
    }
    .floating-menu img {
        width: 40px;
    }
}

.floating-menu img {
    width: 50px;
    height: auto;
}

.floating-menu:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .floating-menu {
        top: 1.5rem;
        right: 1rem;
    }
    .floating-menu img,
    .floating-contact img {
        width: 40px;
    }
}

.floating-menu img {
    width: 50px;
    height: auto;
}

.floating-menu:hover {
    transform: scale(1.1);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-overlay__box {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 3rem;
}

.menu-overlay__close {
    position: absolute;
    top: -3rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 4rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-overlay__close:hover {
    transform: rotate(90deg);
}

.menu-overlay__nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.menu-overlay__link {
    font-family: var(--font-family-serif);
    font-size: var(--fs-md);
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
    align-self: center;
}

.menu-overlay__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.menu-overlay__link:hover::after {
    width: 100%;
}

/* --- Shared Section Headers --- */
.section-headline {
    font-size: var(--fs-md);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .section-headline {
        margin-bottom: 2.5rem;
        font-size: 0.9rem;
    }
    .section-headline::before {
        width: 30px;
        margin-right: 10px;
    }
}

.section-headline::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 2px;
    background-color: var(--color-primary);
    margin-right: 20px;
}

/* --- Section 1: About --- */
.about {
    display: flex;
    align-items: center;
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.about__title-block {
    text-align: left;
}

.about__logo {
    font-family: var(--font-family-brand);
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 0.8;
    color: var(--color-text-light);
    font-weight: 400;
}

@media (max-width: 768px) {
    .about__logo {
        font-size: 5rem;
    }
}

.about__logo-sub {
    font-size: var(--fs-md);
    letter-spacing: 0.2em;
    margin-top: 1rem;
    color: var(--color-primary);
    text-transform: none;
}

.about__logo-caption {
    font-size: var(--fs-sm);
    letter-spacing: 0.15em;
    margin-top: 2rem;
    opacity: 0.6;
}

.about__bg-circles {
    position: absolute;
    right: -25vw;
    top: 50%;
    transform: translateY(-50%);
    width: 80vw;
    height: 80vw;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .about__bg-circles {
        width: 120vw;
        height: 120vw;
        right: -30vw;
        top: 60%;
    }
}

.about__circle {
    position: absolute;
    border-radius: 50%;
}

.about__circle--large {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: radial-gradient(circle, rgba(234, 77, 35, 1) 0%, rgba(234, 77, 35, 0.9) 30%, rgba(234, 77, 35, 0.4) 65%, rgba(234, 77, 35, 0) 100%);
    /* Adding filter blur for softer edge */
    filter: blur(40px);
}

@media (max-width: 900px) {
    .about__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about__title-block {
        text-align: center;
    }

    .about__bg-circles {
        width: 100vw;
        height: 100vw;
        right: -10vw;
        opacity: 0.6;
    }
}

/* --- Section 2: Works (About GEEK PICTURES) --- */
.works {
    background-color: var(--color-background);
}

.works__content {
    display: flex;
    flex-direction: column;
}

.works__header {
    max-width: 800px;
    margin-bottom: 2rem;
}

.works__headline {
    font-size: var(--fs-xl);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.works__desc {
    font-size: var(--fs-sm);
    line-height: 2.2;
    color: rgba(26, 26, 26, 0.8);
}

/* Marquee Layout */
.works__marquees {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow: hidden;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .works__marquees {
        gap: 1.5rem;
        padding: 0;
    }
}

.works__marquee {
    display: flex;
    width: 100%;
}

.works__marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.works__marquee--left .works__marquee-track {
    animation-direction: normal;
}

.works__marquee--right .works__marquee-track {
    /* To scroll right, we actually need a different keyframe, or reverse the normal one */
    animation-direction: reverse;
}

.works__marquee-track:hover {
    animation-play-state: paused;
}

.works__marquee-content {
    flex-shrink: 0;
    display: flex;
    animation: marquee-left 20s linear infinite;
    gap: 2rem;
    padding-right: 2rem;
    
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

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

.works__item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(26, 26, 26, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: rgba(234, 77, 35, 0.03);
    aspect-ratio: 16/9;
    flex: 0 0 360px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.works__item:hover {
    transform: scale(1.25);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.works__img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(234, 77, 35, 0.08);
    /* Dark orange tint */
    transition: transform 0.5s ease, background-color 0.5s ease;
    z-index: 1;
}

.works__item:hover .works__img-placeholder {
    transform: scale(1.05);
}

.works__caption {
    position: relative;
    z-index: 2;
    padding: 1rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-primary);
    background-color: #ffffff;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.works__item:hover .works__caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .works__marquees {
        gap: 1rem;
    }

    .works__marquee-content {
        gap: 1rem;
        padding-right: 1rem;
    }

    .works__item {
        flex: 0 0 280px;
    }
}

@media (max-width: 600px) {
    .works__item {
        flex: 0 0 330px;
    }
}

/* --- Section 3: Hero (Who we are) --- */
.hero {
    position: relative;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* Giant background text for depth */
.hero__bg-text {
    position: absolute;
    top: -50px;
    right: -75px;
    font-family: var(--font-family-brand);
    font-size: 30vw;
    color: rgba(26, 26, 26, 0.03);
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.hero__headline {
    font-family: var(--font-family-brand);
    font-size: var(--fs-xxl);
    line-height: 1.1;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
    font-weight: normal;
}

@media (max-width: 768px) {
    .hero__headline {
        font-size: 2.22rem;
        margin-bottom: 2.5rem;
    }
    .hero__bg-text {
        font-size: 40vw;
        top: 10%;
        right: -10%;
    }
}

.hero__headline span.highlight {
    color: var(--color-primary);
    display: block;
}

.hero__text-block {
    max-width: 700px;
    font-size: var(--fs-sm);
    line-height: 2.2;
    position: relative;
    z-index: 1;
    border-left: 2px solid var(--color-primary);
    padding-left: 2rem;
}

.hero__text-block p {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero__text-block {
        padding-left: 1.5rem;
        font-size: 0.95rem;
        line-height: 1.8;
    }
    .hero__text-block p {
        margin-bottom: 1.5rem;
    }
}

/* --- Section 4: Services (What we create) --- */
.services__text-block {
    font-size: var(--fs-sm);
    line-height: 2.2;
    position: relative;
    z-index: 1;
}

.services__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid var(--color-primary);
    padding-left: 2rem;
}

.services__list li {
    font-size: var(--fs-md);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    cursor: default;
}

.services__bullet {
    font-size: 0.4em;
    margin-right: 2rem;
    color: var(--color-primary);
    opacity: 1;
}

@media (max-width: 768px) {
    .services__list {
        padding-left: 1.5rem;
    }
    .services__list li {
        font-size: 1.25rem;
        padding: 1.2rem 0;
    }
    .services__bullet {
        margin-right: 1.2rem;
    }
}

/* --- Section 5: Process (How we connect) --- */
.process__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.process__text-block {
    font-size: var(--fs-sm);
    line-height: 2.2;
}

.process__diagram {
    position: relative;
    width: 500px;
    height: 500px;
    flex: 0 0 500px;
    margin: 0 auto;
}

.process__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-family-brand);
    font-size: var(--fs-xl);
    font-weight: normal;
    color: var(--color-text-light);
    z-index: 2;
}

.process__lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    z-index: 0;
}

.process__node {
    position: absolute;
    width: 140px;
    height: 140px;
    background-color: var(--color-primary);
    border: none;
    color: var(--color-text-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
    transform: translate(-50%, -50%);
}

.process__node:hover {
    transform: translate(-50%, -50%);
}

.process__node-text {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Recalculate positions slightly to fit the new design if needed, but keeping the same logic */
.process__node--1 {
    left: 68%;
    top: 18.8%;
}

.process__node--2 {
    left: 86%;
    top: 50%;
}

.process__node--3 {
    left: 68%;
    top: 81.2%;
}

.process__node--4 {
    left: 32%;
    top: 81.2%;
}

.process__node--5 {
    left: 14%;
    top: 50%;
}

.process__node--6 {
    left: 32%;
    top: 18.8%;
}

@media (max-width: 768px) {
    .process__content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .process__diagram {
        width: 100%;
        max-width: 350px;
        height: 350px;
        flex: 0 0 350px;
        margin: 0 auto;
        /* Using transform scale for a quick and effective mobile fit if needed, 
           or just recalibrating the fixed sizes */
    }

    .process__lines {
        width: 100%;
        height: 100%;
    }

    .process__node {
        width: 90px;
        height: 90px;
    }

    .process__node-text {
        font-size: 0.6rem;
    }

    .process__center {
        font-size: 1.5rem;
    }
}

/* --- Section 6 & 7: Portfolio & AI Creative --- */
.portfolio__featured {
    margin-bottom: 6rem;
    position: relative;
}

.portfolio__featured-images {
    display: inline; /* default */
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    margin-bottom: 0rem;
}

.portfolio__img-placeholder {
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
    position: relative;
}

.portfolio__img-placeholder:hover {
    transform: scale(1.02);
    filter: brightness(0.9);
    /* Darken slightly on hover for light bg */
}

.portfolio__item-title {
    font-size: var(--fs-sm);
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.portfolio__media-type {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 700;
    position: absolute;
    bottom: 100%;
    margin: 0;
    margin-bottom: 0.5rem;
    z-index: 10;
}

.portfolio__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio__tag {
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: rgba(26, 26, 26, 0.6);
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background-color: transparent;
    transition: none;
    pointer-events: none;
}

.portfolio__tag:hover,
.portfolio__tag.is-active-tag {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-dark);
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2rem;
}

@media (max-width: 768px) {
    .portfolio__featured {
        margin-bottom: 4rem;
    }
    .portfolio__featured-images {
        max-width: 100%;
        height: auto;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .portfolio__grid {
        grid-template-columns: 1fr;
        gap: 3rem 0;
    }
    .portfolio__item-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 1.5rem;
    }
}

/* Redundant with 768px rule above but keeping for specific device cases if needed */
@media (max-width: 600px) {
    .portfolio__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Section 8: Contact --- */
.contact {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.contact__text {
    font-size: var(--fs-lg);
    line-height: 1.8;
    margin-bottom: 5rem;
    color: rgba(26, 26, 26, 0.8);
}

.contact__btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-family-brand);
    font-size: clamp(2.5rem, 5vw, 5rem);
    color: var(--color-primary);
    position: relative;
}

@media (max-width: 768px) {
    .contact__text {
        font-size: 1.25rem;
        margin-bottom: 3rem;
    }
    .contact__btn {
        font-size: 2.2rem;
        margin-left: 0;
    }
}

.contact__btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 4px;
    bottom: -10px;
    left: 0;
    background-color: var(--color-text-light);
    transition: width 0.4s ease;
}

.contact__btn:hover::after {
    width: 100%;
}

.contact__btn-arrow {
    margin-left: 2rem;
    width: 0.8em;
    height: 0.8em;
    transition: transform 0.4s ease;
}

.contact__btn:hover .contact__btn-arrow {
    transform: translateX(20px);
}

/* --- Footer --- */
.footer {
    padding: 4rem 0;
    text-align: center;
}

.footer__text {
    font-size: 0.8rem;
    color: rgba(26, 26, 26, 0.4);
    letter-spacing: 0.1em;
}

@font-face {
    font-family: 'nazarethroman';
    src: url('../fonts/nazarethroman.otf') format('opentype');
}