/* MIR Events: the client's logo (white), pen-signed hero, gallery, reels */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Logo in header and footer: white on dark, original blue once the header turns light */
.logo .logo-svg { display: block; width: auto; height: 74px; transition: height .5s var(--ease); }
.logo-svg .lb { opacity: 0; transition: opacity .4s ease; }
.logo-svg .lw { transition: opacity .4s ease; }
.site-header.scrolled .logo-svg { height: 54px; }
.site-header.scrolled .logo-svg .lw { opacity: 0; }
.site-header.scrolled .logo-svg .lb { opacity: 1; }
.site-footer .logo .logo-svg { height: 110px; }

/* Headings are split into words by script; keep them hidden until then so they never flash */
.js [data-split]:not(.split) { visibility: hidden; }

/* Hero: a gold pen signs the logo (driven frame by frame in nav.js) */
.hero-logo { width: min(760px, 90vw); height: auto; overflow: visible; filter: drop-shadow(0 0 26px rgba(243,227,190,.22)); }
html:not(.js) .hero-logo .ink-group { mask: none; }
.hero-logo .events-part { opacity: 0; transform: translateY(14px); transform-box: fill-box; transition: opacity 1s ease, transform 1s var(--ease); }
.hero-logo.done .events-part { opacity: 1; transform: none; }
.hero-logo .pen-lift { opacity: 0; transition: opacity .4s ease, transform 1s var(--ease); }
.hero-logo.go .pen-lift { opacity: 1; }
.hero-logo.done .pen-lift { opacity: 0; transform: translate(140px, -160px); transition: opacity .7s ease .1s, transform 1s var(--ease); }
.hero-logo .pen-lift > g { transform: scale(2.3) rotate(32deg); }
.hero-logo + .kicker { margin-top: 18px; }

@media (max-width: 860px) {
  .logo .logo-svg { height: 58px; }
  .site-header.scrolled .logo-svg { height: 44px; }
  .site-footer .logo .logo-svg { height: 90px; }
}

/* Founder portrait */
.founder-grid.with-photo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.founder-grid.with-photo h2 { font-size: clamp(36px, 4vw, 60px); }
.founder-grid.with-photo .sig-svg { margin: 14px 0 26px; }
.founder-photo { margin: 0; position: relative; isolation: isolate; max-width: 520px; }
.founder-photo .reveal-img { aspect-ratio: 3 / 4; overflow: hidden; background: rgba(255,255,255,.06); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-photo::after { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1px solid rgba(217,192,148,.6); z-index: -1; }

/* Gallery */
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 60px; }
.g-item { margin: 0; }
.g-item:nth-child(3n+2) { margin-top: 60px; margin-bottom: -60px; }
.g-ph { overflow: hidden; aspect-ratio: 3 / 4; background: var(--sand); }
.g-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.g-item:hover .g-ph img { transform: scale(1.06); }
.g-more { text-align: center; margin-top: 56px; }

/* Reels */
.reels { background: var(--night); color: var(--white); overflow: hidden; }
.reels .wrap { position: relative; z-index: 1; }
.reels .kicker { color: var(--gold-soft); }
.reels .section-head p { color: rgba(255,255,255,.72); }
.reels .watermark { position: absolute; right: -4vw; top: -6vw; font-family: var(--script); font-size: clamp(260px, 36vw, 560px); line-height: 1; color: rgba(255,255,255,.04); pointer-events: none; user-select: none; }
.reel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); max-width: 1120px; margin: 0 auto; align-items: center; }
.reel { margin: 0; position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111a3e; box-shadow: 0 40px 90px rgba(0,0,0,.5); }
.reel::before { content: ""; position: absolute; inset: 0; border-radius: 18px; border: 1px solid rgba(217,192,148,.4); z-index: 2; pointer-events: none; }
.reel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(7,15,46,.6)); pointer-events: none; }
.reel video { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel-sound { position: absolute; z-index: 3; right: 14px; bottom: 14px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(7,15,46,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .4s ease, border-color .4s ease; }
.reel-sound:hover { background: var(--gold); border-color: var(--gold); }
.reel-sound svg { width: 22px; height: 22px; }
.reel-sound .on { display: none; }
.reel-sound[aria-pressed="true"] .on { display: flex; }
.reel-sound[aria-pressed="true"] .off { display: none; }
.reel-sound span { display: flex; }

@media (max-width: 1024px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 0; }
  .g-item:nth-child(3n+2) { margin-top: 0; margin-bottom: 0; }
}
@media (max-width: 860px) {
  .reel-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 20px; -webkit-overflow-scrolling: touch; }
  .reel { scroll-snap-align: center; }
  .founder-photo { max-width: 420px; }
}
@media (max-width: 600px) {
  .g-grid { gap: 10px; }
}

/* By the numbers */
.numbers { position: relative; overflow: hidden; color: var(--white); padding: clamp(80px, 10vw, 140px) 0; margin-top: clamp(70px, 9vw, 130px);
  background: radial-gradient(120% 140% at 50% 0%, #2347A8 0%, #14307E 45%, #0B1A52 100%); }
.numbers .watermark { position: absolute; left: -3vw; bottom: -12vw; font-family: var(--script); font-size: clamp(240px, 34vw, 520px); line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; user-select: none; }
.numbers .kicker { color: var(--gold-soft); text-align: center; margin-bottom: clamp(40px, 5vw, 70px); }
.num-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.num { position: relative; text-align: center; padding: 8px clamp(12px, 2vw, 32px); }
.num + .num::before { content: ""; position: absolute; left: 0; top: 8%; bottom: 8%; width: 1px; background: linear-gradient(transparent, rgba(217,192,148,.6), transparent); }
.num b { display: flex; align-items: center; justify-content: center; height: clamp(70px, 7.4vw, 120px); font-family: var(--serif); font-weight: 400; font-size: clamp(60px, 6.6vw, 108px); line-height: 1; white-space: nowrap;
  background: linear-gradient(100deg, #B08A4A 0%, #F6E7C4 30%, #D9C094 50%, #F6E7C4 70%, #B08A4A 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldsweep 7s ease-in-out infinite; }
.num b i { font-style: normal; font-size: .5em; align-self: flex-start; margin: .18em 0 0 4px; }
.num b.word { font-family: var(--script); font-size: clamp(44px, 4.4vw, 76px); padding: 0 .3em; margin: 0 -.3em; overflow: visible; }
.num .lbl { display: block; margin-top: 18px; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--white); }
.num p { margin: 10px auto 0; max-width: 22ch; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.62); }
@keyframes goldsweep { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .num b { animation: none; } }

/* ---------- Mobile ---------- */
.swipe-hint { display: none; }
.m-cta { display: none; }
.menu-toggle .bars { position: relative; display: block; width: 26px; height: 16px; }
.menu-toggle .bars i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease), opacity .3s ease, top .5s var(--ease); }
.menu-toggle .bars i:nth-child(1) { top: 0; }
.menu-toggle .bars i:nth-child(2) { top: 7px; }
.menu-toggle .bars i:nth-child(3) { top: 14px; }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars i:nth-child(3) { top: 7px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  /* Full-screen menu */
  body.menu-open { overflow: hidden; }
  .menu-open .site-header, .menu-open .site-header.scrolled { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu-open .site-header .logo-svg .lw { opacity: 1; }
  .menu-open .site-header .logo-svg .lb { opacity: 0; }
  .menu-toggle { position: relative; z-index: 102; }
  .menu-open .menu-toggle, .menu-open .site-header.scrolled .menu-toggle { color: var(--white); }
  .site-header .logo { position: relative; z-index: 102; }
  .nav-links, .nav-links.open {
    display: flex; position: fixed; inset: 0; z-index: 101; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 110px 28px 48px; border: 0; box-shadow: none; animation: none;
    background: radial-gradient(120% 80% at 50% 0%, #22409A 0%, #0F2160 50%, #070F2E 100%);
    opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transition: opacity .5s ease; }
  .nav-links li { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .8s var(--ease); }
  .nav-links.open li { opacity: 1; transform: none; }
  .nav-links.open li:nth-child(1) { transition-delay: .08s; }
  .nav-links.open li:nth-child(2) { transition-delay: .16s; }
  .nav-links.open li:nth-child(3) { transition-delay: .24s; }
  .nav-links.open li:nth-child(4) { transition-delay: .34s; }
  .nav-links a, .on-dark .nav-links a, .site-header.scrolled .nav-links a {
    font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--white); border: 0; padding: 6px 0; text-align: center;
  }
  .nav-links a[aria-current="page"] { color: var(--gold-soft); font-style: italic; }
  .nav-links .btn, .on-dark .nav-links .btn, .site-header.scrolled .nav-links .btn {
    font-family: var(--sans); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin-top: 28px; width: auto; padding: 0 34px;
    background: transparent; border: 1px solid var(--gold-soft); color: var(--gold-soft);
  }
  .nav-links::after { content: "Mir"; position: absolute; bottom: -40px; right: -20px; font-family: var(--script); font-size: 260px; line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; }

  /* Hero */
  .hero-inner { padding-top: 96px; padding-bottom: 96px; }
  .hero-logo { width: 94vw; margin-left: -2vw; }
  .hero-actions { display: flex; flex-direction: column; width: 100%; max-width: 360px; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Founder */
  .founder-grid.with-photo { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .founder-photo { max-width: none; margin-right: 18px; }
  .founder-photo::after { inset: 18px -18px -18px 18px; }

  /* Gallery: editorial rhythm */
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g-item:nth-child(1), .g-item:nth-child(6) { grid-column: 1 / -1; }
  .g-item:nth-child(1) .g-ph, .g-item:nth-child(6) .g-ph { aspect-ratio: 4 / 3; }

  .swipe-hint { display: block; margin: -14px 0 16px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
  .swipe-hint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
  .reels .swipe-hint { color: var(--gold-soft); }
  @keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

  /* Sticky booking button */
  .m-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px; position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
    min-height: 54px; border-radius: 999px; background: linear-gradient(135deg, #2347A8, #10256B); color: var(--white); text-decoration: none;
    font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; box-shadow: 0 18px 40px rgba(7,15,46,.45), inset 0 0 0 1px rgba(217,192,148,.55);
    transform: translateY(140%); opacity: 0; transition: transform .6s var(--ease), opacity .4s ease;
  }
  .m-cta.show { transform: none; opacity: 1; }
  .menu-open .m-cta { opacity: 0; pointer-events: none; }
}

@media (max-width: 600px) {
  /* Occasions become a swipeable carousel */
  .types .type-grid {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -20px; padding: 0 20px 8px; scroll-padding: 0 20px;
  }
  .types .type-grid::-webkit-scrollbar, .reel-grid::-webkit-scrollbar { display: none; }
  .reel-grid { scrollbar-width: none; }
  .types .type-card { scroll-snap-align: start; aspect-ratio: 3 / 4.2; margin: 0; }
  .nav-links a, .on-dark .nav-links a, .site-header.scrolled .nav-links a { font-size: 40px; }
  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .num { padding: 26px 8px 30px; }
  .num + .num::before { display: none; }
  .num:nth-child(2n)::before { content: ""; display: block; position: absolute; left: 0; top: 14%; bottom: 14%; width: 1px; background: linear-gradient(transparent, rgba(217,192,148,.6), transparent); }
  .num:nth-child(-n+2)::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,192,148,.6), transparent); }
  .num b { height: 62px; font-size: 54px; }
  .num b.word { font-size: 34px; }
  .num .lbl { margin-top: 12px; font-size: 10px; letter-spacing: .2em; line-height: 1.7; }
  .num p { font-size: 12.5px; margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-hint span { animation: none; }
  .m-cta { transition: none; }
}