/* ═══════════════════════════════════════
   IRN Design — Main Stylesheet
   ═══════════════════════════════════════ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: #1f2937;
  background: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

.accent {
  color: #7c3aed;
}

.floating-profile {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-profile:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.floating-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-divider {
  width: 90%;
  max-width: 800px;
  height: 1px;
  background: rgba(167, 139, 250, 0.15);
  margin: 40px auto;
}

.ask-ian-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px 20px;
  min-height: auto;
}

.figma-section {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.figma-card {
  width: 100%;
  max-width: 800px;
  background: #fff;
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.figma-header {
  padding: 24px 28px 16px;
  position: relative;
}

.figma-header h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  color: #1f2937;
}

.figma-header p {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}

.figma-external-link {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #7c3aed;
  transition: all 0.2s;
}

.figma-external-link:hover {
  background: rgba(167, 139, 250, 0.08);
}

.figma-embed-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f5f0ff;
}

.figma-embed {
  width: 100%;
  height: 100%;
  border: none;
}

.figma-footer {
  padding: 12px 28px;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
  font-size: 12px;
  color: #c4b5fd;
  text-align: center;
}

.carousel-section {
  padding: 60px 20px;
  text-align: center;
}

.carousel-header h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
  margin-bottom: 8px;
}

.carousel-header p {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 40px;
}

.carousel-track-wrapper {
  width: 100%;
  overflow: hidden;
  margin-bottom: 32px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  animation: carouselScroll 40s linear infinite;
  width: max-content;
}

.carousel-slide {
  flex-shrink: 0;
  width: 360px;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.carousel-slide:hover {
  transform: scale(1.03);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes carouselScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.carousel-cta a {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 100px;
  color: #7c3aed;
  font-size: 14px;
  transition: all 0.2s;
}

.carousel-cta a:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.5);
}

.motion-section {
  padding: 60px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.motion-header {
  text-align: center;
  margin-bottom: 32px;
}

.motion-header h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
}

.motion-header p {
  font-size: 15px;
  color: #6b7280;
  margin-top: 4px;
}

.motion-card {
  background: #fff;
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.motion-card-header {
  padding: 24px 28px 16px;
}

.motion-card-header h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  font-weight: 400;
}

.motion-card-header p {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}

.motion-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.motion-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-unmute-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.video-unmute-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.branding-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.branding-intro {
  text-align: center;
  margin-bottom: 24px;
}

.branding-character {
  font-size: 15px;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

.branding-heading {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 400;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.brand-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.brand-card:hover {
  transform: scale(1.03);
}

.brand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-study {
  padding: 80px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.case-header {
  text-align: center;
  margin-bottom: 40px;
}

.case-header h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
}

.case-header p {
  font-size: 15px;
  color: #6b7280;
  margin-top: 4px;
}

.case-browser-mockup {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.case-browser-mockup:hover {
  transform: translateY(-4px);
}

.browser-chrome {
  background: #f5f5f5;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.case-details {
  text-align: center;
  margin-top: 32px;
}

.case-details h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  font-weight: 400;
}

.case-details p {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.case-caption {
  text-align: center;
  font-size: 15px;
  color: #6b7280;
  margin-top: 24px;
}

.case-caption a {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phase3d-hero {
  max-width: 800px;
  margin: 0 auto;
}

.phase3d-hero img {
  width: 100%;
  border-radius: 16px;
}

.contact-section {
  position: relative;
  padding: 120px 20px;
  overflow: hidden;
  text-align: center;
}

#contact-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-content {
  position: relative;
  z-index: 1;
}

.contact-heading {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 400;
  margin-bottom: 24px;
}

.contact-cta {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 100px;
  color: #7c3aed;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.25s;
  background: rgba(255, 255, 255, 0.8);
}

.contact-cta:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-2px);
}

.site-footer {
  padding: 40px 20px 60px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #9ca3af;
}

.footer-links a {
  color: #7c3aed;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-links span {
  color: #d1d5db;
}

.footer-copy {
  font-size: 13px;
  color: #c4b5fd;
}

/* ═══════════════════════════════════════
   Insights + Iteration Scroll Animation
   (injected by scroll-animation.js)
   ═══════════════════════════════════════ */
#iter { position: relative; height: 500vh; width: 100% }
#iter-vp { position: sticky; top: 0; height: 100vh; overflow: hidden }
#iter-title, #iter-sub, #iter-collage, #iter-card, .it, #iter-foot, #iter-mantra, .ml {
  transition: transform 1s cubic-bezier(.16,1,.3,1), opacity 1s cubic-bezier(.16,1,.3,1), filter 1s cubic-bezier(.16,1,.3,1);
}
#iter-mantra {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0; z-index: 6;
  pointer-events: none;
}
.ml {
  font-family: "Instrument Serif", serif;
  font-size: clamp(18px, 5.5vw, 26px);
  line-height: 1.55; white-space: nowrap; color: #1f2937;
  will-change: opacity, transform;
}
.ml-1 { opacity: .06 } .ml-2 { opacity: .10 } .ml-3 { opacity: .16 }
.ml-4 { opacity: .26 } .ml-5 { opacity: .42 }
.ml-hero { opacity: 1; font-weight: 700; font-size: clamp(20px, 6vw, 28px) }
#iter-title {
  font-family: "Instrument Serif", serif;
  font-size: clamp(16px, 4.8vw, 24px); color: #1f2937;
  position: absolute; left: 50%; z-index: 7;
  top: 12%; transform: translateX(-50%); opacity: 0;
  white-space: nowrap; text-align: center;
}
#iter-sub {
  font: clamp(12px, 2.8vw, 15px) Syne, sans-serif; color: #6b7280;
  position: absolute; left: 50%; z-index: 7;
  top: 21%; transform: translateX(-50%); opacity: 0;
  text-align: center; width: 80%; max-width: 320px;
}
#iter-collage {
  position: absolute; left: 50%; max-width: 82%; top: 50%; z-index: 1;
  opacity: 0; transform: translate(-50%, -45%) scale(.5);
}
#iter-thumbs { position: absolute; inset: 0; z-index: 2 }
.it {
  position: absolute; top: 50%; left: 50%; width: clamp(160px, 22vw, 320px);
  opacity: 0; transform: translate(-50%, -50%);
}
#iter-card {
  width: clamp(280px, 80vw, 680px); aspect-ratio: 8/5.5;
  background: #3259FE; border-radius: 1em;
  display: grid; place-items: center; cursor: pointer;
  position: absolute; left: 50%; top: 38%; z-index: 3;
  opacity: 0; transform: translateX(-50%) scale(.3);
}
#iter-logo { width: 72%; opacity: 0; transition: opacity 1s cubic-bezier(.16,1,.3,1) }
#iter-foot {
  font: clamp(12px, 2.8vw, 15px) Syne, sans-serif; color: #6b7280;
  position: absolute; left: 50%; z-index: 7;
  top: calc(38% + clamp(193px, 55vw, 468px) + 2em); transform: translateX(-50%); opacity: 0;
  text-align: center;
}
#iter-foot a { color: #6b7280 }
#iter-foot a span, #iter-link { text-decoration: underline; text-underline-offset: 3px }

/* Beat states */
#iter[data-beat="2"] #iter-mantra,
#iter[data-beat="3"] #iter-mantra,
#iter[data-beat="4"] #iter-mantra {
  opacity: 0; transform: translateY(-50%) scale(.96); pointer-events: none;
}
#iter[data-beat="2"] .ml,
#iter[data-beat="3"] .ml,
#iter[data-beat="4"] .ml { opacity: 0 !important }
#iter[data-beat="2"] #iter-title,
#iter[data-beat="3"] #iter-title,
#iter[data-beat="4"] #iter-title { opacity: 1 }
#iter[data-beat="2"] #iter-sub,
#iter[data-beat="3"] #iter-sub,
#iter[data-beat="4"] #iter-sub { opacity: 1 }
#iter[data-beat="2"] #iter-collage,
#iter[data-beat="3"] #iter-collage,
#iter[data-beat="4"] #iter-collage {
  opacity: 1; transform: translate(-50%, -45%);
}
#iter[data-beat="3"] #iter-card,
#iter[data-beat="4"] #iter-card { opacity: 1; transform: translateX(-50%) }
#iter[data-beat="3"] .it,
#iter[data-beat="4"] .it {
  opacity: 1; filter: blur(3px);
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--tr)) scale(var(--ts));
}
#iter[data-beat="3"] #iter-logo,
#iter[data-beat="4"] #iter-logo { opacity: 1 }
#iter[data-beat="3"] #iter-foot,
#iter[data-beat="4"] #iter-foot { opacity: 1 }
#iter[data-beat="3"] #iter-collage,
#iter[data-beat="4"] #iter-collage { opacity: .15; filter: blur(4px) }

@media (max-width: 768px) {
  .floating-profile {
    width: 56px;
    height: 56px;
    top: 16px;
    left: 16px;
  }

  .carousel-slide {
    width: 280px;
  }

  .brand-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-study {
    padding: 60px 16px;
  }
}


/* === Animated icon in carousel === */
.aicon-wrap2 {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
}

/* === Carousel Video Grid === */
.carousel-video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 2rem auto 0;
}
.carousel-video-cell {
  position: relative;
  padding-bottom: 62.5%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a2e;
}
.carousel-brand-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 2rem auto 0;
}
.carousel-brand-video {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 56.25%;
  background: #1a1a2e;
}

/* === Vimeo embed wrapper === */
.vimeo-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 20px;
}
.vimeo-embed-wrapper iframe {
  border: none;
}

/* === Motion card updates === */
.motion-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  max-width: 860px;
  width: 100%;
  padding-bottom: 47.67%;
}
.motion-card iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === Model Card === */
.model-card {
  width: 480px;
  max-width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.model-embed-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.model-embed-wrapper model-viewer {
  width: 100%;
  height: 100%;
}

/* === Inv Card === */
.inv-card {
  display: flex;
  flex-direction: column;
  max-width: 860px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}
.inv-card-header {
  padding: 1.5rem 2rem;
}
.inv-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
}
.inv-card-header p {
  margin: 0.25rem 0 0;
  opacity: 0.7;
  font-size: 0.9rem;
}
.inv-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  min-height: 0;
}
.inv-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === Branding Video Section === */
.branding-video-section {
  display: flex;
  justify-content: center;
  padding: 4rem 2rem;
  max-width: 980px;
  margin: 0 auto;
}
.branding-video-section .motion-card {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16/10;
}

.carousel-brand-video iframe, .vimeo-embed-wrapper iframe, .inv-video-wrapper iframe, .branding-video-section .motion-card iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.carousel-video-cell iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }