/* ============================================================
   MARGAM — bold & modern studio site
   Palette: deep near-black + saffron → magenta → violet gradient
   ============================================================ */

:root {
  --bg: #08080c;
  --bg-1: #0e0e16;
  --bg-2: #14141f;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  --text: #f4f4f8;
  --muted: #9fa0b3;
  --muted-2: #6c6d82;

  --a1: #ff9d42; /* saffron  */
  --a2: #ff4d8d; /* magenta  */
  --a3: #8a6cff; /* violet   */
  --grad: linear-gradient(120deg, var(--a1), var(--a2) 52%, var(--a3));
  --grad-soft: linear-gradient(120deg, rgba(255, 157, 66, 0.18), rgba(255, 77, 141, 0.18) 52%, rgba(138, 108, 255, 0.18));

  --container: 1160px;
  --radius: 20px;
  --radius-lg: 28px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.02rem;
  overflow-x: hidden;
  /* subtle film grain for premium texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  display: block;
}

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

::selection {
  background: var(--a2);
  color: #fff;
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(72px, 11vw, 140px);
  position: relative;
}

.section--alt {
  background: var(--bg-1);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.section__lead,
.section__head .section__lead {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 18px;
}
/* hero eyebrow carries the brand name — make it legible, not faint */
.hero .eyebrow {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.hero .eyebrow .grad-text {
  font-weight: 700;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--a3);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */
.btn {
  --pad-y: 0.85em;
  --pad-x: 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn--sm {
  font-size: 0.9rem;
  --pad-y: 0.6em;
  --pad-x: 1.15em;
}
.btn--lg {
  font-size: 1.05rem;
  --pad-y: 0.95em;
  --pad-x: 1.8em;
}
.btn--block {
  width: 100%;
}

.btn--solid {
  background: var(--grad);
  color: #15010a;
  font-weight: 600;
  background-size: 140% 140%;
  background-position: 0% 50%;
}
.btn--solid:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 12px 34px -10px rgba(255, 77, 141, 0.55);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.wordmark__mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 18px -2px var(--a2);
}
.wordmark--lg {
  font-size: 1.7rem;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__links {
  display: flex;
  gap: 30px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 450;
}
.nav__links a {
  color: var(--muted);
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--grad);
  transition: width 0.25s var(--ease);
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
}
.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* mobile menu */
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 24px 24px;
  background: rgba(8, 8, 12, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu a:not(.btn) {
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 12px 4px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn {
  margin-top: 14px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(140px, 22vh, 220px);
  padding-bottom: clamp(80px, 12vw, 150px);
  overflow: hidden;
}
.hero__aurora {
  position: absolute;
  inset: -20% -10% 0 -10%;
  z-index: 0;
  filter: blur(70px);
  pointer-events: none;
  will-change: transform;
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.blob--1 {
  width: 46vw;
  height: 46vw;
  max-width: 560px;
  max-height: 560px;
  top: -8%;
  left: 4%;
  background: radial-gradient(circle, var(--a1), transparent 62%);
  animation: drift1 16s ease-in-out infinite;
}
.blob--2 {
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  top: 2%;
  right: 2%;
  background: radial-gradient(circle, var(--a2), transparent 62%);
  animation: drift2 19s ease-in-out infinite;
}
.blob--3 {
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  top: 26%;
  left: 32%;
  background: radial-gradient(circle, var(--a3), transparent 62%);
  animation: drift3 22s ease-in-out infinite;
}
@keyframes drift1 {
  50% { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes drift2 {
  50% { transform: translate(-50px, 40px) scale(1.08); }
}
@keyframes drift3 {
  50% { transform: translate(30px, -40px) scale(1.12); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9.5vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero__sub {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 36px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}
.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--muted);
}
.dot,
.hero__meta .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #46d98b;
  box-shadow: 0 0 0 0 rgba(70, 217, 139, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(70, 217, 139, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(70, 217, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70, 217, 139, 0); }
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
  padding-block: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: scroll 34s linear infinite;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.marquee__track .sep {
  color: var(--a2);
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ---------- cards (services) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  background: var(--bg-2);
}
.card:hover::before {
  opacity: 1;
}
.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.card__icon svg {
  width: 26px;
  height: 26px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.card__body {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}
.card__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.card__list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--text);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
}

/* ---------- process / steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}
.step__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 14px;
}
.step__title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step__body {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- work (simple list) ---------- */
.work {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.work-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: clamp(26px, 4vw, 40px) 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}
.work-item:hover {
  padding-left: 18px;
}
.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 16px;
}
.work__name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  transition: color 0.2s var(--ease);
}
.work-item:hover .work__name {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.work__desc {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 62ch;
}
.work__link {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.work-item:hover .work__link {
  color: var(--text);
  transform: translateX(4px);
}

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.about__lead {
  font-size: 1.18rem;
  margin: 24px 0 18px;
  color: var(--text);
}
.about__body {
  color: var(--muted);
}
.about__stats {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 18px;
}
.about__stats li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.015);
}
.stat__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- contact ---------- */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact__lead {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42ch;
}
.link {
  color: var(--text);
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.2s var(--ease);
}
.link:hover {
  border-bottom-color: var(--a2);
}

.contact__form {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--a3);
  box-shadow: 0 0 0 3px rgba(138, 108, 255, 0.18);
}
.form__status {
  margin-top: 14px;
  font-size: 0.92rem;
  min-height: 1.2em;
  text-align: center;
}
.form__status.ok { color: #46d98b; }
.form__status.err { color: #ff6b8a; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding-top: clamp(50px, 7vw, 80px);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer__tag {
  color: var(--muted);
  margin-top: 16px;
  font-size: 0.98rem;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-display);
}
.footer__nav a {
  color: var(--muted);
  width: fit-content;
  transition: color 0.2s var(--ease);
}
.footer__nav a:hover { color: var(--text); }
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.footer__social {
  display: flex;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.footer__social a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer__social a:hover { color: var(--text); }
.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted-2);
  font-family: var(--font-display);
}

/* ============================================================
   reveal animations
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 960px) {
  .cards,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .about,
  .contact__inner {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .nav__links {
    display: none;
  }
  .nav__actions .btn--sm {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
  .work-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .cards,
  .steps,
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 130px;
  }
  .footer__base {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ============================================================
   reduced motion — respect the user's preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
