/**
 * Nanotkar Studio — Luxe layer (v4.1)
 * Instagram-first presentation on top of the v4 "Pastel Couture" look:
 * Instagram showcase + marquee, gradient highlight rings, card chips,
 * header / floating Instagram buttons, the media lightbox, and a few
 * richer-luxury touches (type scale, spacing, button sheen).
 * Loaded last, after nanotkar-pages.css. Uses the tokens from nanotkar-ui.css.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

:root {
  --ns-section-y: clamp(5.5rem, 10vw, 9.5rem);
  --ns-gilt-light: #D9BF8E;
  --ns-ring: conic-gradient(from 0deg, #B89B6A, #F0D9C4, #B05560, #E8C9B8, #B89B6A);
}

/* ─────────────────────────────────────────────
 * RICHER TYPE + BUTTON SHEEN
 * ───────────────────────────────────────────── */
.ns-eyebrow { letter-spacing: 0.4em; }
.ns-h2 { font-size: clamp(2.8rem, 2rem + 2.6vw, 4.4rem); }

.ns-b--primary { position: relative; overflow: hidden; }
.ns-b--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-20deg);
  transition: left 0.9s var(--ns-ease);
  pointer-events: none;
}
.ns-b--primary:hover::after { left: 130%; }

/* ─────────────────────────────────────────────
 * INSTAGRAM MARK ON EVERY MEDIA CARD
 * ───────────────────────────────────────────── */
.ns-port-card, .ns-film-card__media, .ns-story-tile__img, .ns-wed-card__media { position: relative; }
.ns-ig-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(184, 155, 106, 0.85), rgba(176, 85, 96, 0.85));
  color: #fff;
  font-size: 0.8rem;
  opacity: 0.92;
  transition: transform 0.5s var(--ns-ease), opacity 0.4s;
}
.ns-port-card .ns-ig-chip { top: 16px; left: 16px; bottom: auto; }
.ns-port-card:hover .ns-ig-chip,
.ns-film-card:hover .ns-ig-chip,
.ns-story-tile:hover .ns-ig-chip,
.ns-wed-card:hover .ns-ig-chip { transform: scale(1.12); opacity: 1; }

/* thin inner frame that draws in on hover */
.ns-port-card::before {
  content: '';
  position: absolute;
  inset: 18px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s var(--ns-ease), transform 0.9s var(--ns-ease);
  pointer-events: none;
}
.ns-port-card:hover::before { opacity: 1; transform: none; }

.ns-media-trigger { cursor: pointer; }
.ns-media-trigger:focus-visible { outline-offset: -4px; }

.ns-hero-still { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ─────────────────────────────────────────────
 * HEADER + FLOATING INSTAGRAM BUTTONS
 * ───────────────────────────────────────────── */
.ns-icon-btn--ig { background: var(--ns-paper); color: var(--ns-gilt-ink); border-color: var(--ns-gilt); }
.ns-icon-btn--ig:hover { background: linear-gradient(135deg, var(--ns-gilt), var(--ns-accent)); border-color: transparent; color: #fff; }

.ns-ig-float {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ns-gilt) 0%, var(--ns-accent) 100%);
  color: #fff;
  font-size: 1.45rem;
  text-decoration: none;
  box-shadow: 0 12px 28px -12px rgba(80, 55, 40, 0.55);
  transition: transform 0.5s var(--ns-ease);
}
.ns-ig-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--ns-gilt);
  animation: ns-igPulse 3s ease-out infinite;
  pointer-events: none;
}
.ns-ig-float:hover { transform: translateY(-3px) scale(1.06); color: #fff; }
.ns-ig-float__tip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--ns-gilt-soft);
  background: var(--ns-paper);
  color: var(--ns-ink);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-6px, -50%);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.5s var(--ns-ease);
}
.ns-ig-float:hover .ns-ig-float__tip { opacity: 1; transform: translate(0, -50%); }
@keyframes ns-igPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ─────────────────────────────────────────────
 * STORY-HIGHLIGHT RINGS — gilt-to-rose gradient ring that turns slowly
 * ───────────────────────────────────────────── */
.ns-ig-highlight-item__ring {
  position: relative;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
}
.ns-ig-highlight-item__ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ns-ring);
  animation: ns-ringSpin 14s linear infinite;
}
.ns-ig-highlight-item__ring img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border: 3px solid var(--ns-paper);
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.7s var(--ns-ease);
}
.ns-ig-highlight-item:hover .ns-ig-highlight-item__ring { transform: translateY(-4px); }
.ns-ig-highlight-item:hover .ns-ig-highlight-item__ring img { transform: scale(1.06); }
.ns-ig-highlight-item:focus-visible { outline-offset: 6px; }
@keyframes ns-ringSpin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────
 * HOME — INSTAGRAM SHOWCASE
 * ───────────────────────────────────────────── */
.ns-ig-showcase {
  position: relative;
  overflow: hidden;
  padding: var(--ns-section-y) 0 calc(var(--ns-section-y) * 0.8);
  border-top: 1px solid var(--ns-gilt-soft);
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(243, 221, 213, 0.8) 0%, rgba(243, 221, 213, 0) 70%),
    linear-gradient(180deg, var(--ns-paper) 0%, var(--ns-champagne-wash) 100%);
  text-align: center;
}
.ns-ig-showcase__head { padding: 0 2rem; }
.ns-ig-showcase__handle { margin: 0 0 1.4rem; }
.ns-ig-showcase__handle a {
  display: inline-block;
  font-family: var(--ns-font-heading);
  font-size: clamp(1.7rem, 0.4rem + 6.2vw, 5.6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ns-ink);
  text-decoration: none;
  background: linear-gradient(100deg, var(--ns-ink) 0%, var(--ns-accent) 55%, var(--ns-gilt-ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: letter-spacing 0.8s var(--ns-ease);
}
.ns-ig-showcase__handle a:hover { letter-spacing: 0; }
.ns-ig-showcase__lede {
  max-width: 46ch;
  margin: 0 auto 2.4rem;
  font-family: var(--ns-font-subheading);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--ns-ink-soft);
}
.ns-ig-showcase__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 3.5rem;
  margin-bottom: 3.2rem;
}
.ns-ig-showcase__stats > div { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.ns-ig-showcase__stats strong {
  font-family: var(--ns-font-heading);
  font-size: clamp(2.2rem, 1.8rem + 1.4vw, 3.2rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ns-ink);
}
.ns-ig-showcase__stats span {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ns-gilt-ink);
}
.ns-ig-showcase .ns-ig-highlights-strip {
  justify-content: center;
  max-width: var(--ns-shell);
  margin: 0 auto 3.6rem;
  padding: 0.5rem 2rem 0.75rem;
}
.ns-ig-showcase__cta { padding: 3rem 2rem 0; }

/* two rows of posts drifting in opposite directions; pauses on hover */
.ns-ig-marquee {
  display: grid;
  gap: 12px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.ns-ig-marquee__row { overflow: hidden; }
.ns-ig-marquee__track {
  display: flex;
  width: max-content;
  animation: ns-marq 90s linear infinite;
}
.ns-ig-marquee__row--rev .ns-ig-marquee__track { animation-direction: reverse; animation-duration: 110s; }
.ns-ig-marquee:hover .ns-ig-marquee__track { animation-play-state: paused; }
.ns-ig-marq {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 15vw, 230px);
  aspect-ratio: 4 / 5;
  margin-right: 12px;
  overflow: hidden;
  background: var(--ns-cream);
  border: 1px solid var(--ns-gilt-soft);
}
.ns-ig-marq img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ns-ease); }
.ns-ig-marq:hover img { transform: scale(1.08); }
.ns-ig-marq__ico {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(43, 36, 34, 0.55);
  color: #fff;
  font-size: 0.7rem;
}
@keyframes ns-marq { to { transform: translateX(-50%); } }

/* ─────────────────────────────────────────────
 * LIGHTBOX — ivory text on charcoal, gilt hairlines
 * ───────────────────────────────────────────── */
.ns-lightbox__backdrop { background: rgba(23, 19, 19, 0.94); }
.ns-lightbox__wrapper {
  width: 92%;
  max-width: 440px;
  background: #171313;
  border: 1px solid rgba(184, 155, 106, 0.5);
  border-radius: 2px;
  transition: max-width 0.5s var(--ns-ease);
}
.ns-lightbox__wrapper.is-photo { max-width: 980px; }
.ns-lightbox__header { padding: 0.75rem 1.25rem; background: #1F1A1A; border-bottom: 1px solid rgba(184, 155, 106, 0.25); }
.ns-lightbox__badge {
  padding: 4px 10px;
  border-radius: 2px;
  background: var(--ns-accent);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}
/* older lightbox rules pin these two with position:absolute; here they sit in the header row */
.ns-lightbox__counter { position: static; transform: none; font-size: 0.8125rem; color: #A09696; }
.ns-lightbox__close { position: static; width: 40px; height: 40px; font-size: 1.75rem; }
.ns-lightbox__close:hover { color: var(--ns-gilt-light); opacity: 1; }
.ns-lightbox__stage {
  min-height: 0;
  max-height: 76vh;
  padding: 0;
  overflow: hidden;
  background: #000;
}
.ns-lightbox__wrapper.is-reel .ns-lightbox__stage { min-height: 500px; }
.ns-lightbox__viewport { width: 100%; height: 100%; }
.ns-lightbox__video {
  display: none;
  width: 100%;
  height: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
  outline: none;
}
.ns-lightbox__iframe-wrap { display: none; position: relative; width: 100%; height: 620px; max-height: 74vh; }
.ns-lightbox__iframe { width: 100%; height: 100%; border: 0; }
.ns-lightbox__image { display: none; max-width: 100%; max-height: 75vh; border-radius: 0; box-shadow: none; object-fit: contain; }
.ns-lightbox__nav { width: 38px; height: 38px; background: rgba(0, 0, 0, 0.5); }
.ns-lightbox__nav--prev { left: 10px; }
.ns-lightbox__nav--next { right: 10px; }
.ns-lightbox__nav:hover { background: var(--ns-accent); }
.ns-lightbox__footer { display: block; padding: 1rem 1.25rem; background: #1F1A1A; border-top: 1px solid rgba(184, 155, 106, 0.25); }
.ns-lightbox__caption { margin-bottom: 0.9rem; }
.ns-lightbox__title { margin: 0 0 0.25rem; font-family: var(--ns-font-heading); font-size: 1.55rem; font-weight: 400; line-height: 1.15; color: #fff; }
.ns-lightbox__subtitle { margin: 0; font-size: 0.8125rem; color: var(--ns-gilt-light); }
.ns-lightbox__actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ns-lightbox__cta,
.ns-lightbox__ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: 2px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: background 0.3s, border-color 0.3s;
}
.ns-lightbox__cta { flex: 1; background: var(--ns-accent); }
.ns-lightbox__cta:hover { background: var(--ns-accent-dark); }
.ns-lightbox__ig-link { border: 1px solid rgba(217, 191, 142, 0.5); background: rgba(255, 255, 255, 0.06); }
.ns-lightbox__ig-link:hover { border-color: var(--ns-gilt-light); background: rgba(255, 255, 255, 0.12); }

/* ─────────────────────────────────────────────
 * RESPONSIVE
 * ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .ns-ig-showcase__head { padding: 0 1rem; }
  .ns-ig-showcase .ns-ig-highlights-strip { justify-content: flex-start; padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 640px) {
  .ns-ig-float { left: 16px; bottom: 16px; width: 46px; height: 46px; }
  .ns-ig-float__tip { display: none; }
  .ns-ig-highlight-item__ring { width: 72px; height: 72px; }
  .ns-ig-showcase__stats { gap: 1rem 2rem; }
  .ns-ig-marq { width: 140px; }
  .ns-lightbox__actions { flex-direction: column; align-items: stretch; }
}
@media (hover: none) {
  .ns-port-card::before { display: none; }
}

/* ─────────────────────────────────────────────
 * REDUCED MOTION — everything above that moves on its own stops
 * ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ns-ig-marquee__track { animation: none; }
  .ns-ig-marquee__row { overflow-x: auto; scrollbar-width: none; }
  .ns-ig-highlight-item__ring::before { animation: none; }
  .ns-ig-float::before { display: none; }
  .ns-b--primary::after { display: none; }
  .ns-port-card::before { transition: none; }
}
