/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --clr-black: #000000;
    --clr-white: #ffffff;
    --clr-gray: #7a7a7a;
    --clr-lightgray: #e0e0e0;
    --clr-accent: #FF2D78; /* Kept very subtle */

    --font-en: 'Inter', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-jp-serif: 'Noto Serif JP', serif;

    --transition-snappy: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-linear: 0.3s ease;
}

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

html, body {
    width: 100%;
    font-family: var(--font-en);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    background: var(--clr-black);
}

body.theme-dark {
    background-color: var(--clr-black);
    color: var(--clr-white);
}

body.theme-light {
    background-color: var(--clr-white);
    color: var(--clr-black);
}

/* Sections Base */
.section {
    padding: 10vh 0;
    position: relative;
}

.theme-dark {
    background-color: var(--clr-black);
    color: var(--clr-white);
}

.theme-light {
    background-color: var(--clr-white);
    color: var(--clr-black);
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
}

.container-large {
    max-width: 1600px;
}

/* Typography Classes */
.mincho {
    font-family: var(--font-jp-serif);
}

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

/* Noise Texture */
.noise {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 30px 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    color: var(--clr-white);
}

.header .logo {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: -0.05em;
}

.menu-btn {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.menu-btn .line {
    width: 100%;
    height: 2px;
    background-color: var(--clr-white);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    z-index: 1; /* create stacking context */
}

.hero-bg {
    position: absolute;
    top: -10%; left: 0;
    width: 100%; height: 120%; /* Extra height for parallax */
    z-index: -1;
    overflow: hidden; /* Guarantee nothing escapes the hero background layer */
}



.hero-video-bg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1.4); /* Scaled to 1.4x */
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}

.video-mask-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000000; /* Pitch black */
    mix-blend-mode: multiply; /* Black cancels view, White punches through */
    z-index: -1;
    overflow: hidden; /* Prevent massive wrapped text from bleeding down into the rest of the site */
}

.hero-left-logo {
    position: absolute;
    top: 50%; left: 0;
    transform: translateY(-50%) scaleY(1.4); /* Vertically stretch text by 1.4x */
    width: 100vw;
    text-align: left;
    padding-left: 4vw; /* Perfectly aligns with .hero-content text */
    font-size: 20.5vw; /* Increased so 'CUTTING' natively reaches the right edge */
    font-weight: 900;
    color: #ffffff; /* Must be 100% pure white to pass video at full brightness */
    text-transform: uppercase;
    font-family: var(--font-en);
    letter-spacing: -0.05em;
    line-height: 0.76; /* Tightened visually to counteract the vertical stretch gap */
    margin: 0;
    margin-top: 5vh; /* Pushed down to completely secure the header from the massive typography */
}

.hero-content {
    padding: 0 4vw 8vh 4vw;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.hero-en {
    font-size: 10vw;
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.03em;
    margin: 0;
}

.hero-jp-wrap {
    padding-bottom: 2vh;
}

.hero-jp {
    font-size: 2vw;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-align: right;
}

.scroll-indicator {
    position: absolute;
    bottom: 0; right: 4vw;
    display: flex;
    align-items: center;
    transform: rotate(90deg);
    transform-origin: right bottom;
    padding-bottom: 20px;
}

.scroll-indicator span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-right: 15px;
}

.scroll-indicator .line {
    width: 50px; height: 1px;
    background: var(--clr-white);
}

/* ==========================================================================
   Typography & Reveal Utilities
   ========================================================================== */
.section-num {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    font-family: var(--font-en);
}

.section-title {
    font-size: 6vw;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 40px;
}

/* Text Mask Reveal */
.reveal-text {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    transform: translateY(20%);
    opacity: 0;
    transition: clip-path var(--transition-snappy), transform var(--transition-snappy), opacity var(--transition-snappy);
}
.reveal-text.is-visible {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transform: translateY(0);
    opacity: 1;
}

/* Fade In Item */
.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-snappy), transform var(--transition-snappy);
}
.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--clr-black);
    border-top: 1px solid var(--clr-black);
    padding: 10px 0;
    margin-bottom: 8vh;
}

.marquee-inner {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

@keyframes marquee {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
}

.lead-text {
    font-size: 2.5rem;
    line-height: 1.4;
    margin-bottom: 40px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-item {
    border-top: 1px solid var(--clr-lightgray);
    padding-top: 20px;
}

.feature-item h4 {
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.feature-item p {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--clr-gray);
    line-height: 1.8;
}

/* ==========================================================================
   Services Section (Hover Images effect)
   ========================================================================== */
.services {
    padding-bottom: 15vh;
}

.service-list {
    margin-top: 5vh;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.service-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    cursor: crosshair;
}

.sr-left {
    display: flex;
    flex-direction: column;
}

.sr-cat {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--clr-gray);
    margin-bottom: 10px;
}

.sr-title {
    font-family: var(--font-jp-serif);
    font-size: 2.5rem;
}

.sr-right p {
    font-family: var(--font-jp);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--clr-gray);
    max-width: 400px;
}

/* Hover reveal image logic */
.hover-img {
    position: absolute;
    top: 50%; left: 60%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 400px;
    height: 250px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: -1;
}

.hover-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 1s ease;
}

.service-row:hover .hover-img {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 10;
}

.service-row:hover .hover-img img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ==========================================================================
   Works Section
   ========================================================================== */
.works-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    margin-bottom: 5vh;
}

.work-item {
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: var(--clr-lightgray);
    overflow: hidden;
    margin-bottom: 20px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.border-placeholder {
    border: 1px solid var(--clr-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.placeholder-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 900;
    color: var(--clr-gray);
    letter-spacing: 0.1em;
    text-align: center;
}

.work-info h4 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.work-info p {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--clr-gray);
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: flex-end;
    margin-bottom: 8vh;
}

.pricing-lead {
    font-size: 1.5rem;
    line-height: 1.5;
    padding-bottom: 10px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--clr-black);
}

.price-col {
    padding: 40px 30px;
    border-right: 1px solid var(--clr-black);
    display: flex;
    flex-direction: column;
}

.price-col:last-child {
    border-right: none;
}

.price-col.featured {
    background-color: var(--clr-black);
    color: var(--clr-white);
    position: relative;
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.featured-label {
    position: absolute;
    top: -15px; left: 30px;
    background: var(--clr-accent);
    color: var(--clr-white);
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 900;
}

.plan-name span {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    font-weight: 400;
}

.plan-price {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin: 10px 0;
    letter-spacing: -0.05em;
}

.plan-price span {
    font-size: 1.5rem;
}

.plan-divider {
    height: 1px;
    background: currentColor;
    opacity: 0.2;
    margin: 20px 0;
}

.plan-desc {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    margin-bottom: 30px;
    flex-grow: 1;
    min-height: 50px;
}

.plan-details {
    list-style: none;
    font-family: var(--font-jp);
    font-size: 0.85rem;
}

.plan-details li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}
.featured .plan-details li { border-bottom-color: rgba(255,255,255,0.1); }

.btn-sharp {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 0;
    width: 100%;
    text-align: center;
    background: var(--clr-white);
    color: var(--clr-black);
    font-weight: 900;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
}

.btn-sharp:hover {
    background: var(--clr-accent);
    color: var(--clr-white);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 15vh 0 5vh 0;
    overflow: hidden;
}

.footer-cta {
    text-align: center;
    margin-bottom: 15vh;
}

.massive-text {
    font-size: 12vw;
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.05em;
    margin-bottom: 40px;
}

.cta-link {
    font-size: 2rem;
    font-style: italic;
    border-bottom: 2px solid var(--clr-white);
    padding-bottom: 5px;
    transition: color 0.3s;
}

.cta-link:hover {
    color: var(--clr-accent);
    border-color: var(--clr-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.footer-bottom .logo {
    font-weight: 900;
    font-size: 1.5rem;
}

.copyright {
    font-size: 0.8rem;
    color: var(--clr-gray);
}

/* ==========================================================================
   Preloader Animation
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    background: var(--clr-white); /* Initial contrast screen */
}

.preloader-cols {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; z-index: 10001;
}

.p-col {
    flex: 1;
    background: var(--clr-black);
    transform-origin: top left;
    transform: scaleY(0);
    animation: flowDown 0.6s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

.p-col:nth-child(1) { animation-delay: 0.0s; }
.p-col:nth-child(2) { animation-delay: 0.1s; }
.p-col:nth-child(3) { animation-delay: 0.2s; }
.p-col:nth-child(4) { animation-delay: 0.3s; }
.p-col:nth-child(5) { animation-delay: 0.4s; }

@keyframes flowDown {
    0% { transform: scaleY(0) scaleX(1); }
    100% { transform: scaleY(1) scaleX(1); } /* End fully black */
}

/* Slide out sequence */
.preloader.slide-out {
    background: transparent; /* Remove white instantly, exposing site underneath */
}

.preloader.slide-out .p-col {
    /* Swap animation to slide sideways */
    animation: flowLeft 0.5s cubic-bezier(0.3, 1, 0.3, 1) forwards;
}

/* Wait briefly before starting slide out, giving staggered slide */
.preloader.slide-out .p-col:nth-child(1) { animation-delay: 0.0s; }
.preloader.slide-out .p-col:nth-child(2) { animation-delay: 0.1s; }
.preloader.slide-out .p-col:nth-child(3) { animation-delay: 0.2s; }
.preloader.slide-out .p-col:nth-child(4) { animation-delay: 0.3s; }
.preloader.slide-out .p-col:nth-child(5) { animation-delay: 0.4s; }

@keyframes flowLeft {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(1) scaleX(0); } /* Shrinks width to 0 towards left edge of panel */
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .price-col { border-right: none; border-bottom: 1px solid var(--clr-black); }
    .price-col.featured { transform: none; }
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .service-row { grid-template-columns: 1fr; gap: 20px; }
    .pricing-header { grid-template-columns: 1fr; gap: 20px; }
    .hero-content { flex-direction: column; align-items: flex-start; gap: 20px; }
    .hero-en { font-size: 15vw; }
    .hero-jp { font-size: 4vw; text-align: left; }
    .massive-text { font-size: 15vw; }
    
    .hover-img { display: none; } /* Disable cursor hover image on mobile */
    .works-grid { grid-template-columns: 1fr; gap: 40px; }
}
