/* ============================================================
   AGENCY-V2 — STYLES.CSS — Impulsa Studio
   Dark creative · Cyan + Magenta · Sora + Instrument Serif
   ============================================================ */

:root {
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --accent-rgb: 6, 182, 212;
  --magenta: #ec4899;
  --magenta-rgb: 236, 72, 153;

  --dark-950: #08090d;
  --dark-900: #0e1117;
  --dark-800: #151921;
  --dark-700: #1c212d;
  --dark-600: #282f3e;
  --dark-500: #3b4459;
  --dark-400: #5a6580;
  --dark-300: #8892a8;
  --dark-200: #b0b8cc;
  --dark-100: #d8dce8;

  --white: #ffffff;
  --canvas: var(--dark-950);
  --canvas-alt: var(--dark-900);
  --ink: var(--dark-100);
  --ink-soft: var(--dark-200);
  --muted: var(--dark-300);
  --border: var(--dark-600);

  --font-main: 'Sora', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.8rem);
  --fs-4xl: clamp(3rem, 2rem + 5vw, 5.5rem);

  --section-py: clamp(60px, 8vw, 120px);
  --container-max: 1200px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.35s;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-preloader: 500;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
input, textarea, select {
  font: inherit; color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px; background: var(--dark-800); width: 100%;
  transition: border-color var(--duration), box-shadow var(--duration);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }
input::placeholder, textarea::placeholder { color: var(--dark-400); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6580' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
::selection { background: rgba(var(--accent-rgb), 0.2); }

/* UTILITIES */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-title { font-family: var(--font-main); font-size: var(--fs-3xl); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em; color: var(--white); margin-bottom: 16px; }
.section-title em { font-family: var(--font-display); font-style: italic; font-weight: 400; background: linear-gradient(135deg, var(--accent), var(--magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-lead { margin: 0 auto; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--accent { background: linear-gradient(135deg, var(--accent), var(--magenta)); color: var(--white); box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.4); }
.btn--ghost { border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--dark-950); display: flex; align-items: center; justify-content: center; transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { text-align: center; }
.preloader__line { width: 60px; height: 2px; background: var(--dark-600); margin: 0 auto 16px; border-radius: 2px; position: relative; overflow: hidden; }
.preloader__line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--magenta)); animation: lineSlide 1s ease-in-out infinite; }
@keyframes lineSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.preloader__text { font-size: var(--fs-sm); font-weight: 700; color: var(--white); letter-spacing: 0.08em; }

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: linear-gradient(90deg, var(--accent), var(--magenta)); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(8, 9, 13, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar__brand { font-size: var(--fs-lg); font-weight: 300; color: var(--white); letter-spacing: -0.02em; }
.navbar__brand strong { font-weight: 800; color: var(--accent); font-size: 1.3em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--white); background: rgba(255,255,255,0.05); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.navbar__burger { display: none; width: 28px; height: 20px; position: relative; }
.navbar__burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; position: absolute; left: 0; right: 0; transition: all var(--duration); }
.navbar__burger span:nth-child(1) { top: 0; }
.navbar__burger span:nth-child(2) { bottom: 0; }
.navbar__burger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* HERO */
.hero { padding: clamp(100px, 15vw, 180px) 0 0; text-align: center; position: relative; }
.hero__tag { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.hero__title { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; color: var(--white); max-width: 900px; margin: 0 auto 24px; }
.hero__title em { font-family: var(--font-display); font-style: italic; font-weight: 400; background: linear-gradient(135deg, var(--accent), var(--magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__lead { font-size: var(--fs-md); color: var(--muted); max-width: 580px; margin: 0 auto 36px; line-height: 1.8; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* HERO MARQUEE */
.hero__marquee { margin-top: 80px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.hero__marquee-track { display: flex; gap: 24px; width: max-content; }
.hero__marquee-track span { font-size: var(--fs-lg); font-weight: 800; color: var(--dark-500); white-space: nowrap; letter-spacing: -0.02em; text-transform: uppercase; }

/* WORK / PORTFOLIO */
.work { padding: var(--section-py) 0; }
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work-card { position: relative; border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; }
.work-card--large { grid-column: span 2; }
.work-card__img { position: relative; overflow: hidden; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-card:not(.work-card--large) .work-card__img { height: 400px; }
.work-card--large .work-card__img { height: 480px; }
.work-card:hover .work-card__img img { transform: scale(1.05); }
.work-card__info { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.work-card__tags { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); margin-bottom: 8px; display: block; letter-spacing: 0.04em; }
.work-card__info h3 { font-size: var(--fs-lg); font-weight: 800; color: var(--white); margin-bottom: 4px; }
.work-card__info p { font-size: var(--fs-sm); color: rgba(255,255,255,0.6); }

/* SERVICES — ROW STYLE */
.services { padding: var(--section-py) 0; }
.services__list { display: grid; gap: 0; }
.service-row { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); transition: all var(--duration); }
.service-row:first-child { border-top: 1px solid var(--border); }
.service-row:hover { padding-left: 16px; background: rgba(255,255,255,0.02); }
.service-row__num { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; color: var(--dark-500); font-style: italic; }
.service-row__content h3 { font-size: var(--fs-lg); font-weight: 800; color: var(--white); letter-spacing: -0.02em; margin-bottom: 4px; }
.service-row__content p { font-size: var(--fs-sm); color: var(--muted); }
.service-row__link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: all var(--duration); }
.service-row:hover .service-row__link { background: var(--accent); color: var(--dark-950); border-color: var(--accent); }

/* ABOUT — SPLIT */
.about { padding: var(--section-py) 0; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about__content p { font-size: var(--fs-md); color: var(--muted); line-height: 1.8; margin-bottom: 32px; }
.about__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.about__stats div { text-align: center; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--duration); }
.about__stats div:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.05); }
.about__stats strong { display: block; font-size: var(--fs-xl); font-weight: 900; color: var(--white); letter-spacing: -0.03em; }
.about__stats span { font-size: var(--fs-xs); color: var(--muted); }
.about__visual img { width: 100%; height: 500px; object-fit: cover; border-radius: var(--radius-2xl); }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); transition: all var(--duration); }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-card--accent { background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(var(--magenta-rgb), 0.1)); border-color: rgba(var(--accent-rgb), 0.2); }
.testi-card blockquote { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.testi-card--accent .testi-card__author { border-top-color: rgba(var(--accent-rgb), 0.15); }
.testi-card__author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.testi-card__author strong { display: block; font-size: var(--fs-sm); font-weight: 800; color: var(--white); }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* CTA */
.cta { padding: var(--section-py) 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta p { font-size: var(--fs-md); color: var(--muted); margin-bottom: 28px; }

/* CONTACT */
.contact { padding: var(--section-py) 0; }
.contact__grid { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; align-items: start; }
.contact__details { display: grid; gap: 16px; margin-top: 28px; }
.contact__detail { display: flex; align-items: center; gap: 12px; font-size: var(--fs-sm); color: var(--muted); }
.contact__detail .material-icons { font-size: 20px; color: var(--accent); }
.contact__detail a { color: var(--accent); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }
.form-group--checkbox { display: flex; align-items: flex-start; gap: 8px; }
.form-group--checkbox input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }
.form-group--checkbox label { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 0; }
.form-group--checkbox a { color: var(--accent); font-weight: 600; }

/* FOOTER */
.footer { padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; }
.footer__logo { font-size: var(--fs-lg); font-weight: 300; color: var(--white); }
.footer__logo strong { font-weight: 800; color: var(--accent); }
.footer__brand p { font-size: var(--fs-sm); color: var(--dark-400); max-width: 320px; margin-top: 8px; line-height: 1.5; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: var(--fs-sm); color: var(--dark-400); transition: color var(--duration); }
.footer__links a:hover { color: var(--accent); }
.footer__social { display: flex; gap: 8px; }
.footer__social a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.04); color: var(--dark-400); transition: all var(--duration); }
.footer__social a:hover { background: var(--accent); color: var(--dark-950); }
.footer__social .material-icons { font-size: 16px; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--dark-500); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--dark-500); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--accent); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--dark-950); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .work__grid { grid-template-columns: 1fr; }
  .work-card--large { grid-column: auto; }
  .about__grid { grid-template-columns: 1fr; }
  .testi-grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--dark-950); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: block; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .service-row { grid-template-columns: 40px 1fr auto; gap: 16px; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .footer__social { justify-content: center; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
