/* ========================================
   BINI Studio — Homepage Styles
   ======================================== */

/* --- Preloader --- */
.preloader { position: fixed; inset: 0; z-index: 10000; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-direction: column; transition: transform .8s cubic-bezier(.33,1,.68,1); }
.preloader.done { transform: translateY(-100%); }
.preloader.hidden { display: none; }
.pre-counter { font-family: var(--font-h); font-size: clamp(3rem,8vw,6rem); font-weight: 800; color: var(--text); letter-spacing: -.04em; }
.pre-bar { width: 200px; height: 2px; background: #222; margin-top: 1.5rem; border-radius: 2px; overflow: hidden; }
.pre-bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .1s; }

/* --- Hero --- */
.hero { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; position: relative; padding: 0 3rem; }
.hero-content { width: 100%; max-width: 1400px; margin: 0 auto; position: relative; z-index: 2; }
.hero-tag { font-family: var(--font-h); font-size: clamp(.65rem,1vw,.8rem); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 2rem; overflow: hidden; }
.hero-tag span { display: inline-block; transform: translateY(100%); opacity: 0; transition: all .8s cubic-bezier(.16,1,.3,1); }
.hero-title { font-family: var(--font-h); font-size: clamp(2.8rem,7.5vw,7rem); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: inline-block; transform: translateY(105%); transition: transform 1s cubic-bezier(.16,1,.3,1); will-change: transform; }
.hero-title .accent { color: var(--accent); font-style: italic; }
.hero-sub { font-size: clamp(.85rem,1.2vw,1.05rem); color: var(--muted); max-width: 550px; line-height: 1.7; margin-top: 2.5rem; font-weight: 300; overflow: hidden; }
.hero-sub span { display: inline-block; transform: translateY(100%); opacity: 0; transition: all .8s cubic-bezier(.16,1,.3,1); }
.hero-scroll { position: absolute; bottom: 3rem; right: 3rem; display: flex; align-items: center; gap: 1rem; opacity: 0; transition: opacity .6s; z-index: 1; }
nav { opacity: 0; transition: opacity .6s; }

/* Hero reveal states */
.hero-visible .hero-tag span { transform: translateY(0); opacity: 1; }
.hero-visible .hero-title .line span { transform: translateY(0); }
.hero-visible .hero-title .line:nth-child(2) span { transition-delay: .12s; }
.hero-visible .hero-title .line:nth-child(3) span { transition-delay: .24s; }
.hero-visible .hero-sub span { transform: translateY(0); opacity: 1; transition-delay: .5s; }
body.loaded nav { opacity: 1; transition-delay: .6s; }
body.loaded .hero-scroll { opacity: 1; transition-delay: .8s; }

.hero-scroll-line { width: 1px; height: 60px; background: #333; position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 30%; background: var(--accent); animation: scrollDown 2s infinite; }
.hero-scroll-text { font-family: var(--font-h); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; }
@keyframes scrollDown { 0% { top: -30%; } 100% { top: 130%; } }

/* --- Marquee --- */
.marquee { padding: 4rem 0; border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; overflow: hidden; position: relative; }
.marquee-track { display: flex; animation: marqueeScroll 25s linear infinite; width: max-content; }
.marquee-item { font-family: var(--font-h); font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; white-space: nowrap; padding: 0 2rem; color: var(--text); opacity: .15; transition: opacity .3s; }
.marquee-sep { color: var(--accent); padding: 0 1rem; opacity: .4; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee:hover .marquee-item { opacity: .4; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Sections --- */
section { padding: clamp(5rem,12vh,10rem) 3rem; }
.section-tag { font-family: var(--font-h); font-size: .7rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; opacity: 0; transform: translateY(20px); }
.section-title { font-family: var(--font-h); font-size: clamp(2rem,4.5vw,4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 3rem; opacity: 0; transform: translateY(30px); }

/* --- Services --- */
.services-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 2px; margin-top: 3rem; }
a.service-card { display: block; }
.service-card { background: var(--bg2); padding: clamp(2rem,4vw,3.5rem); position: relative; overflow: hidden; transition: all .5s cubic-bezier(.16,1,.3,1); }
.service-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg,rgba(201,243,29,.08),transparent); opacity: 0; transition: opacity .5s; }
.service-card:hover::before { opacity: 1; }
.service-card:hover { background: #161616; }
.service-card.full { grid-column: 1/-1; }
.service-num { font-family: var(--font-h); font-size: clamp(3rem,5vw,4.5rem); font-weight: 800; color: #1a1a1a; transition: color .5s; line-height: 1; margin-bottom: 1.5rem; }
.service-card:hover .service-num { color: rgba(201,243,29,.15); }
.service-name { font-family: var(--font-h); font-size: clamp(1.2rem,2vw,1.6rem); font-weight: 700; margin-bottom: 1rem; transition: color .3s; }
.service-card:hover .service-name { color: var(--accent); }
.service-desc { font-size: .9rem; color: var(--muted); line-height: 1.7; font-weight: 300; max-width: 400px; }
.service-card.full .service-desc { max-width: 600px; }
.service-arrow { position: absolute; bottom: 2rem; right: 2rem; width: 40px; height: 40px; border: 1px solid #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .4s; font-size: 1.2rem; }
.service-card:hover .service-arrow { border-color: var(--accent); background: var(--accent); color: var(--bg); }

/* --- Works / Portfolio --- */
.works-list { display: flex; flex-direction: column; gap: 0; }
.work-item { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: 4rem 0; border-bottom: 1px solid #1a1a1a; position: relative; }
.work-item:first-child { border-top: 1px solid #1a1a1a; }
.work-img { display: block; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; position: relative; text-decoration: none; color: inherit; }
.work-img-inner { width: 100%; height: 100%; transition: transform .8s cubic-bezier(.16,1,.3,1); position: relative; min-height: 200px; }
.work-item:hover .work-img-inner { transform: scale(1.05); }
.work-img-bg { width: 100%; height: 100%; position: absolute; inset: 0; }
.work-preview-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.work-info { padding: 2rem 0; }
.work-cat { font-family: var(--font-h); font-size: .65rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.work-name { font-family: var(--font-h); font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; margin-bottom: 1rem; transition: color .3s; }
.work-item:hover .work-name { color: var(--accent); }
.work-desc { font-size: .9rem; color: var(--muted); line-height: 1.7; font-weight: 300; margin-bottom: 2rem; }
.work-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.work-tag { font-size: .7rem; padding: .4rem .8rem; border: 1px solid #2a2a2a; border-radius: 100px; color: var(--muted); font-weight: 400; }

/* --- Numbers --- */
.numbers { background: var(--bg2); border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; }
.numbers-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 3rem; text-align: center; }
.number-item { padding: 2rem 0; }
.number-val { font-family: var(--font-h); font-size: clamp(2.5rem,5vw,4rem); font-weight: 800; line-height: 1; margin-bottom: .5rem; letter-spacing: -.03em; }
.number-val .accent { color: var(--accent); }
.flag-blue { color: #0055A4; }
.flag-white { color: var(--text); }
.flag-red { color: #EF4135; }
.number-label { font-size: .75rem; color: var(--muted); letter-spacing: .15em; text-transform: uppercase; font-weight: 400; }

/* --- Process --- */
.process-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; margin-top: 3rem; }
.process-item { background: var(--bg2); padding: 2.5rem; position: relative; overflow: hidden; }
.process-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width .6s cubic-bezier(.16,1,.3,1); }
.process-item:hover::after { width: 100%; }
.process-num { font-family: var(--font-h); font-size: .7rem; font-weight: 700; color: var(--accent); letter-spacing: .2em; margin-bottom: 1.5rem; }
.process-name { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; margin-bottom: .8rem; }
.process-desc { font-size: .85rem; color: var(--muted); line-height: 1.7; font-weight: 300; }

/* --- CTA --- */
.cta { text-align: center; padding: clamp(6rem,15vh,12rem) 3rem; }
.cta-title { font-family: var(--font-h); font-size: clamp(2.5rem,6vw,5.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.04em; margin-bottom: 2rem; }
.cta-title .accent { color: var(--accent); }
.cta-sub { font-size: 1rem; color: var(--muted); max-width: 500px; margin: 0 auto 3rem; line-height: 1.7; font-weight: 300; }
.cta-btn { display: inline-flex; align-items: center; gap: 1rem; font-family: var(--font-h); font-size: .85rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; background: var(--accent); color: var(--bg); padding: 1.2rem 3rem; border-radius: 100px; transition: all .4s cubic-bezier(.16,1,.3,1); position: relative; overflow: hidden; }
.cta-btn:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(201,243,29,.25); }
.cta-btn svg { width: 20px; height: 20px; transition: transform .3s; }
.cta-btn:hover svg { transform: translateX(5px); }

/* --- Footer (full) --- */
footer { padding: 4rem 3rem 2rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand { font-family: var(--font-h); font-size: 1.5rem; font-weight: 800; letter-spacing: .15em; margin-bottom: 1rem; }
.footer-tagline { font-size: .85rem; color: var(--muted); line-height: 1.7; max-width: 300px; font-weight: 300; }
.footer-col-title { font-family: var(--font-h); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1.5rem; color: var(--text); }
.footer-col a { display: block; font-size: .85rem; color: var(--muted); padding: .3rem 0; transition: color .3s; font-weight: 300; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid #1a1a1a; }

/* --- Responsive (homepage) --- */
@media (max-width: 1024px) {
  .hero { padding: 0 2rem; }
  section { padding: clamp(4rem,8vh,6rem) 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card.full { grid-column: auto; }
  .work-item { grid-template-columns: 1fr; gap: 1.5rem; }
  .numbers-grid { grid-template-columns: repeat(2,1fr); gap: 2rem; }
  .process-list { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .hero { padding: 0 1.2rem; }
  .hero-title { font-size: clamp(1.6rem, 7.5vw, 2.8rem); }
  .hero-scroll { right: 1.2rem; }
  section { padding: clamp(3rem,6vh,5rem) 1.2rem; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta { padding: clamp(4rem,10vh,8rem) 1.2rem; }
}

@media (hover: none) {
  .service-card, .cta-btn { cursor: pointer; }
}
