/* ============================================================
   NOBOX FILMS — STYLESHEET
   ============================================================ */


/* ============================================================
   VARIABLES & RESET
   ============================================================ */

:root {
    --bg:              #F4F1EC;
    --text:            #1E1E1E;
    --text-secondary:  #7A746D;
    --accent:          #B7A58A;
    --font-display:    'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body:       'Inter', sans-serif;
    --nav-h:           72px;
    --ease:            cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition:      0.45s var(--ease);
    --max-w:           1440px;
    --pad-x:           64px;
}

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

html {
    scroll-behavior: smooth;
}

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

img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }


/* ============================================================
   NAVIGATION
   ============================================================ */

#nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad-x);
    height: var(--nav-h);
    transition:
        background-color var(--transition),
        border-color var(--transition),
        backdrop-filter var(--transition);
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background-color: rgba(244, 241, 236, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(183, 165, 138, 0.18);
}

/* Logo — two images stacked, toggled via opacity */
.nav-logo {
    display: block;
    height: 36px;
    position: relative;
}

.nav-logo img {
    height: 100%;
    width: auto;
    transition: opacity var(--transition);
}

.nav-logo .logo-black {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.nav-logo .logo-white {
    opacity: 1;
}

#nav.scrolled .logo-white { opacity: 0; }
#nav.scrolled .logo-black  { opacity: 1; }

/* Links */
.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    transition: color var(--transition);
}

.nav-links a:hover           { color: #fff; }
#nav.scrolled .nav-links a   { color: var(--text-secondary); }
#nav.scrolled .nav-links a:hover { color: var(--text); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 1px;
    background: white;
    transition: background var(--transition), transform 0.3s var(--ease), opacity 0.3s;
}

#nav.scrolled .nav-hamburger span { background: var(--text); }

.nav-hamburger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    z-index: 199;
    flex-direction: column;
    gap: 0;
    background-color: rgba(244, 241, 236, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(183, 165, 138, 0.2);
    padding: 8px 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    padding: 18px var(--pad-x);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    border-bottom: 1px solid rgba(183, 165, 138, 0.12);
    transition: padding-left var(--transition), color var(--transition);
}

.mobile-link:hover { padding-left: calc(var(--pad-x) + 8px); color: var(--accent); }


/* ============================================================
   HERO
   ============================================================ */

#hero {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 580px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Cinematic placeholder — replace with video later */
.hero-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 25% 55%, rgba(55, 42, 28, 0.9) 0%, transparent 65%),
        radial-gradient(ellipse 60% 50% at 75% 25%, rgba(35, 28, 18, 0.7) 0%, transparent 55%),
        radial-gradient(ellipse 100% 80% at 50% 80%, rgba(20, 15, 8, 0.85) 0%, transparent 70%),
        linear-gradient(160deg, #1c1710 0%, #0e0b06 35%, #1a1409 60%, #0b0905 100%);
}

/* Film grain overlay */
.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: grainShift 0.12s steps(1) infinite;
    pointer-events: none;
}

@keyframes grainShift {
    0%   { background-position: 0 0; }
    10%  { background-position: -50px -25px; }
    20%  { background-position: 25px -75px; }
    30%  { background-position: -75px 50px; }
    40%  { background-position: -25px 25px; }
    50%  { background-position: 50px -50px; }
    60%  { background-position: 75px 25px; }
    70%  { background-position: -25px 75px; }
    80%  { background-position: 50px 75px; }
    90%  { background-position: -75px -25px; }
    100% { background-position: 0 0; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.08) 0%,
        rgba(0,0,0,0.15) 40%,
        rgba(0,0,0,0.55) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 72px);
    font-weight: 700;
    letter-spacing: 0.25em;
    line-height: 1;
    color: #fff;
    text-indent: 0.25em;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(10px, 1.3vw, 13px);
    font-weight: 300;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-scroll::after {
    content: '';
    display: block;
    width: 1px;
    height: 52px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
    animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%   { opacity: 0.3; transform: scaleY(1); }
    50%  { opacity: 0.7; transform: scaleY(0.6); }
    100% { opacity: 0.3; transform: scaleY(1); }
}


/* ============================================================
   WORK SECTION
   ============================================================ */

#work {
    padding: 120px var(--pad-x);
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 56px;
}

.section-label {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(183, 165, 138, 0.28);
}

/* Grid — 12 column */
.work-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

/* Editorial span assignments */
.work-item:nth-child(1)  { grid-column: span 8; }  /* Technics — hero piece */
.work-item:nth-child(2)  { grid-column: span 4; }  /* KLCC */
.work-item:nth-child(3)  { grid-column: span 4; }  /* Straits View */
.work-item:nth-child(4)  { grid-column: span 8; }  /* Schneider */
.work-item:nth-child(5)  { grid-column: span 6; }  /* Embracing Malaysia */
.work-item:nth-child(6)  { grid-column: span 6; }  /* Be The Light */
.work-item:nth-child(7)  { grid-column: span 4; }  /* Panasonic Steamer */
.work-item:nth-child(8)  { grid-column: span 4; }  /* Moments 1 */
.work-item:nth-child(9)  { grid-column: span 4; }  /* Moments 2 */
.work-item:nth-child(10) { grid-column: span 4; }  /* Moments 3 */
.work-item:nth-child(11) { grid-column: span 4; }  /* Vanzo */
.work-item:nth-child(12) { grid-column: span 4; }  /* Sekolah Angkat */
.work-item:nth-child(13) { grid-column: span 6; }  /* MCKIP */
.work-item:nth-child(14) { grid-column: span 3; }  /* IH Hob Heat — portrait */
.work-item:nth-child(15) { grid-column: span 3; }  /* IH Hob Mess — portrait */
.work-item:nth-child(16) { grid-column: span 3; }  /* Travel Stress-Free — portrait */
.work-item:nth-child(17) { grid-column: span 3; }  /* KL TravelPass — portrait */

.work-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    display: block;
}

/* Aspect ratio containers */
.work-item.landscape .thumb-wrap { aspect-ratio: 16 / 9; }
.work-item.portrait  .thumb-wrap { aspect-ratio: 9 / 16; }

.thumb-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.thumb-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
    filter: brightness(0.92);
}

.work-item:hover .thumb-wrap img {
    transform: scale(1.04);
    filter: brightness(0.75);
}

/* Info overlay */
.work-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 20px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.28) 30%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--transition);
}

.work-item:hover .work-info { opacity: 1; }

.work-info-title {
    font-family: var(--font-display);
    font-size: clamp(15px, 1.4vw, 21px);
    font-weight: 400;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 5px;
}

.work-info-client {
    font-family: var(--font-body);
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}


/* ============================================================
   CLIENTS
   ============================================================ */

#clients {
    padding: 120px var(--pad-x);
    border-top:    1px solid rgba(183, 165, 138, 0.22);
    border-bottom: 1px solid rgba(183, 165, 138, 0.22);
}

.clients-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.clients-headline {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 46px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 80px;
    max-width: 580px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 52px 48px;
    align-items: center;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo img {
    max-height: 64px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    filter: none;
    opacity: 0.9;
    transition: opacity var(--transition), transform var(--transition);
}

.client-logo img:hover {
    opacity: 1;
    transform: scale(1.06);
}


/* ============================================================
   ABOUT
   ============================================================ */

#about {
    padding: 120px var(--pad-x);
}

.about-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}

.about-headline {
    font-family: var(--font-display);
    font-size: clamp(40px, 5.5vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 32px;
}

.about-copy {
    font-size: 14.5px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--text-secondary);
    max-width: 500px;
}

/* Services list */
.services-label {
    display: block;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.services-list { display: flex; flex-direction: column; }

.service-item {
    display: flex;
    align-items: baseline;
    gap: 22px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(183, 165, 138, 0.22);
    transition: padding-left var(--transition);
    cursor: default;
}

.service-item:first-child {
    border-top: 1px solid rgba(183, 165, 138, 0.22);
}

.service-item:hover { padding-left: 10px; }

.service-number {
    font-size: 10px;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 0.06em;
    min-width: 22px;
}

.service-name {
    font-family: var(--font-display);
    font-size: clamp(26px, 2.6vw, 40px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.1;
}


/* ============================================================
   CONTACT
   ============================================================ */

#contact {
    padding: 120px var(--pad-x) 100px;
    border-top: 1px solid rgba(183, 165, 138, 0.22);
}

.contact-inner {
    max-width: 760px;
    margin: 0 auto;
}

.contact-headline {
    font-family: var(--font-display);
    font-size: clamp(42px, 6.5vw, 88px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.contact-sub {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    margin-bottom: 64px;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    gap: 0 40px;
}

.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-2 { grid-template-columns: 1fr 1fr; }

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 44px;
}

.form-group label {
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(183, 165, 138, 0.4);
    padding: 6px 0 10px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    color: var(--text);
    outline: none;
    resize: none;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.form-submit {
    align-self: flex-start;
    margin-top: 4px;
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 15px 52px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), letter-spacing var(--transition);
}

.form-submit:hover {
    background: var(--accent);
    letter-spacing: 0.28em;
}

/* Success message */
.form-success {
    display: none;
    margin-top: 24px;
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
}

.form-success.visible { display: block; }

/* Contact details */
.contact-details {
    display: flex;
    align-items: flex-start;
    gap: 56px;
    margin-top: 72px;
    padding-top: 40px;
    border-top: 1px solid rgba(183, 165, 138, 0.22);
    flex-wrap: wrap;
}

.contact-details-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-detail-label {
    font-size: 9.5px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.contact-detail-value {
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.01em;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-detail-value:hover { color: var(--accent); }

/* WhatsApp icon next to phone */
.wa-icon {
    width: 20px;
    height: 20px;
    fill: #25D366;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.contact-whatsapp:hover .wa-icon { transform: scale(1.15); }

/* Social icons in contact section */
.contact-details-socials {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    align-self: center;
}

.contact-details-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(183, 165, 138, 0.35);
    border-radius: 50%;
    transition: border-color var(--transition), background var(--transition);
}

.contact-details-socials a:hover {
    border-color: var(--text);
    background: var(--text);
}

.contact-details-socials svg {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
    transition: fill var(--transition);
}

.contact-details-socials a:hover svg { fill: var(--bg); }


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    padding: 48px var(--pad-x) 40px;
    border-top: 1px solid rgba(183, 165, 138, 0.18);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

/* Left column: logo + company details */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    height: 20px;
    width: auto;
    opacity: 0.5;
    transition: opacity var(--transition);
    display: block;
}

.footer-logo:hover { opacity: 0.8; }

.footer-company {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-company p {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0.65;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Right column: social icons + copyright */
.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

/* Social icons in footer */
.footer-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    transition: opacity var(--transition);
}

.footer-social:hover { opacity: 0.5; }

.footer-social svg {
    width: 15px;
    height: 15px;
    fill: var(--text-secondary);
}

.footer-copy {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 0.02em;
}


/* ============================================================
   RESPONSIVE — TABLET  (≤ 1100px)
   ============================================================ */

@media (max-width: 1100px) {
    :root { --pad-x: 40px; }

    .work-item:nth-child(1)  { grid-column: span 12; }
    .work-item:nth-child(2)  { grid-column: span 6; }
    .work-item:nth-child(3)  { grid-column: span 6; }
    .work-item:nth-child(4)  { grid-column: span 12; }
    .work-item:nth-child(5)  { grid-column: span 6; }
    .work-item:nth-child(6)  { grid-column: span 6; }
    .work-item:nth-child(7)  { grid-column: span 4; }
    .work-item:nth-child(8)  { grid-column: span 4; }
    .work-item:nth-child(9)  { grid-column: span 4; }
    .work-item:nth-child(10) { grid-column: span 4; }
    .work-item:nth-child(11) { grid-column: span 4; }
    .work-item:nth-child(12) { grid-column: span 4; }
    .work-item:nth-child(13) { grid-column: span 6; }
    .work-item:nth-child(14) { grid-column: span 3; }
    .work-item:nth-child(15) { grid-column: span 3; }
    .work-item:nth-child(16) { grid-column: span 3; }
    .work-item:nth-child(17) { grid-column: span 3; }

    .about-inner { gap: 60px; }
}


/* ============================================================
   RESPONSIVE — MOBILE  (≤ 768px)
   ============================================================ */

@media (max-width: 768px) {
    :root { --pad-x: 24px; }

    /* Show hamburger, hide desktop links */
    .nav-links     { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-menu   { display: flex; }

    /* Sections */
    #work, #clients, #about, #contact { padding: 80px var(--pad-x); }
    footer { padding: 28px var(--pad-x); }

    /* Work grid → 2 col */
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .work-item.landscape { grid-column: span 2 !important; }
    .work-item.portrait  { grid-column: span 1 !important; }

    /* Work info always visible on mobile (no hover) */
    .work-info { opacity: 1; }

    /* About */
    .about-inner { grid-template-columns: 1fr; gap: 56px; }

    /* Contact form */
    .form-row-3,
    .form-row-2 { grid-template-columns: 1fr; gap: 0; }
    .form-submit { padding: 15px 40px; }

    /* Contact details */
    .contact-details { flex-direction: column; gap: 32px; }
    .contact-details-socials { margin-left: 0; }
    .contact-detail-value { font-size: 16px; }

    /* Clients */
    .clients-grid { grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }

    /* Footer */
    .footer-inner  { flex-direction: column; gap: 28px; }
    .footer-right  { align-items: flex-start; }
    .footer-company p { font-size: 10.5px; }
}


/* ============================================================
   RESPONSIVE — SMALL MOBILE  (≤ 480px)
   ============================================================ */

@media (max-width: 480px) {
    .hero-title { letter-spacing: 0.2em; }

    .work-grid { grid-template-columns: 1fr; gap: 8px; }
    .work-item.landscape,
    .work-item.portrait { grid-column: span 1 !important; }

    .clients-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
