/* Ligatura Films — global styles */
* { box-sizing: border-box; }
body { margin: 0; background: #0d0c10; color: #F2F0EE; font-family: 'Archivo', sans-serif; }
a { color: #A78BFA; text-decoration: none; }
a:hover { color: #C4B0FF; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.serif { font-family: 'Instrument Serif', serif; }
.accent-i { font-style: italic; color: #A78BFA; }
.page { max-width: 1440px; margin: 0 auto; background: #0d0c10; }

/* Nav */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 20px 56px; border-bottom: 1px solid #2a2733; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.24em; color: #B8B5BF; }
.nav-toggle, .nav-panel { display: none; }
.nav .navgroup { display: flex; gap: 28px; }
.nav .navgroup.right { justify-self: end; }
.nav .navlogo { justify-self: center; }
.nav .navlogo img { height: 64px; width: auto; display: block; }
.nav .current { color: #B8B5BF; }

/* Footer */
.footer { display: flex; align-items: center; justify-content: space-between; padding: 28px 56px; border-top: 1px solid #2a2733; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.1em; color: #C4B0FF; }
.footer a { color: #C4B0FF; }
.footer .social { display: flex; align-items: center; gap: 18px; }
.footer .social a { display: flex; align-items: center; justify-content: center; color: #C4B0FF; transition: color 0.2s ease; }
.footer .social a:hover { color: #fff; }
.footer .social svg { width: 22px; height: 22px; }

/* CTA */
.cta { padding: 112px 56px; text-align: center; border-top: 1px solid #2a2733; }
.cta.no-line { border-top: none; }
.cta-label { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.2em; color: #8a8794; margin-bottom: 24px; }
.cta-title { font-family: 'Instrument Serif', serif; font-size: 64px; line-height: 1.05; color: #F2F0EE; }
.cta-mail { margin-top: 32px; font-size: 17px; }
.cta-mail a { color: #FFFFFF; }

/* Image slots (exported from editor, crop-aware) */
.slot { position: absolute; inset: 0; overflow: hidden; background: #131118; }
.slot img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; object-fit: cover; max-width: none; display: block; }
.slot[data-fit="contain"] img { object-fit: contain; }
div[style*="gap:87px"] .slot, .logo-strip .slot { background: transparent; } /* logo strip: no placeholder box behind transparent logos */

.proc-arrow, .proc-count { display: none; }

/* Services carousel */
.svc-stage { position: relative; overflow: hidden; }
.svc-track { display: flex; align-items: stretch; transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1); }
.svc-track > div { flex: 0 0 100%; min-width: 0; padding: 0 !important; border-top: 0 !important; }
.svc-track > div > div:last-child { flex: 1 1 auto; }
.svc-arrow { position: absolute; top: 336px; transform: translateY(-50%); z-index: 5; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(13,12,16,0.72); border: 1px solid #2a2733; color: #C4B0FF; font-family: 'IBM Plex Mono', monospace; font-size: 15px; cursor: pointer; transition: background 0.25s ease, color 0.25s ease; }
.svc-arrow:hover { background: #A78BFA; color: #0d0c10; }
.svc-arrow.prev { left: 0; }
.svc-arrow.next { right: 0; }
.svc-creative-fix { object-position: 50% 42% !important; }
.svc-count { position: absolute; right: 0; bottom: 96px; font-size: 11px; letter-spacing: 0.24em; color: #8a8794; }
.svc-index a { cursor: pointer; }

/* Buttons */
.btn-outline { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.24em; color: #A78BFA; border: 1px solid #A78BFA; transition: all 0.2s; display: inline-block; white-space: nowrap; }
.btn-outline:hover { background: #A78BFA; color: #0d0c10; }

/* Home: intro + hero */
@keyframes introFade { 0% { opacity: 1 } 74% { opacity: 1 } 100% { opacity: 0; visibility: hidden } }
@keyframes introTrack { 0% { letter-spacing: -0.06em; opacity: 0 } 12% { opacity: 1 } 100% { letter-spacing: 0.015em; opacity: 1 } }
@keyframes cueBob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(8px) } }
.intro { position: fixed; inset: 0; z-index: 9999; background: #0d0c10; overflow: hidden; pointer-events: none; animation: introFade 3.8s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.intro text { font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 158px; animation: introTrack 3.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; }
.work-tile { transition: filter 0.35s ease; }
.is-clickable { cursor: pointer; }
.work-tile:hover { filter: brightness(1.14); }
.svc-row { display: flex; align-items: baseline; gap: 48px; padding: 32px 0; border-top: 1px solid #2a2733; transition: background 0.25s ease; }
.svc-row:hover { background: rgba(167, 139, 250, 0.05); }
.svc-row .svc-see { opacity: 0; transition: opacity 0.25s ease; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.24em; white-space: nowrap; }
.svc-row:hover .svc-see { opacity: 1; }
.svc-nav { display: none; }
.ethos .svc-row:hover { background: none; }

/* Work index */
.tile .tov { opacity: 0; transition: opacity 0.35s ease; }
.tile:hover .tov { opacity: 1; }
.filter-btn { background: transparent; color: #B8B5BF; border: 1px solid #2a2733; padding: 10px 22px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.18em; cursor: pointer; }
.filter-btn.active { background: #A78BFA; color: #0d0c10; }

/* BTS carousel */
.carousel { position: relative; }
.car-win { overflow: hidden; width: 100%; }
.car-track { display: flex; transition: transform 0.5s ease; }
.car-slide { flex: none; width: 100%; aspect-ratio: 16/9; position: relative; background: #0d0c10; }
.carousel.bts .car-slide { aspect-ratio: auto; height: 100%; }
.carousel.bts .car-win { height: 56vh; }
.carousel.bts .car-track { height: 100%; align-items: stretch; }
@media (min-width: 769px) {
  /* Arrows flank the frame, clear of the photo */
  .carousel.bts { padding: 0 68px; }
  .carousel.bts .car-nav { position: absolute; inset: 0; margin: 0; pointer-events: none; }
  .carousel.bts .car-nav .car-btn { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: auto; }
  .carousel.bts .car-nav .car-btn.prev { left: 0; }
  .carousel.bts .car-nav .car-btn.next { right: 0; }
  .carousel.bts + .car-meta { padding: 16px 68px 0; }
}
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(13, 12, 16, 0.75); color: #A78BFA; border: 1px solid #A78BFA; width: 44px; height: 44px; cursor: pointer; font-size: 18px; transition: all 0.2s; }
.car-btn:hover { background: #A78BFA; color: #0d0c10; }
.car-btn.prev { left: 16px; }
.car-btn.next { right: 16px; }
.car-nav { display: flex; gap: 10px; margin-right: auto; }
.car-nav .car-btn { position: static; transform: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid #2a2733; color: #C4B0FF; font-size: 14px; }
.car-nav .car-btn:hover { background: #A78BFA; color: #0d0c10; border-color: #A78BFA; }
.stills-nav { display: none; }
.car-meta { display: flex; justify-content: flex-start; gap: 10px; align-items: center; font-size: 11px; letter-spacing: 0.24em; color: #8a8794; padding: 16px 4px 0; }

/* Selections / festivals */
.laurels { max-width: 820px; margin: 0 auto; padding: 112px 56px 0; }
.laurels-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.3em; color: #A78BFA; text-align: center; margin-bottom: 48px; }
.laurel-row { display: flex; justify-content: space-between; align-items: baseline; gap: 32px; padding: 20px 0; border-top: 1px solid #26232e; font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
.laurel-row:last-child { border-bottom: 1px solid #26232e; }
.laurel-row .f { letter-spacing: 0.04em; }
.laurel-row .s { color: #8a8794; letter-spacing: 0.18em; font-size: 12px; text-align: right; white-space: nowrap; }

/* Credits */
.credits { max-width: 820px; margin: 0 auto; padding: 112px 56px 140px; }
.credits-label { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.3em; color: #A78BFA; text-align: center; margin-bottom: 48px; }
.credit-row { display: flex; justify-content: space-between; gap: 32px; padding: 20px 0; border-top: 1px solid #26232e; font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
.credit-row:last-child { border-bottom: 1px solid #26232e; }
.credit-row .k { color: #8a8794; letter-spacing: 0.18em; }
.credit-row .v { text-align: right; }


/* ============ MOBILE (<=768px) ============ */
@media (max-width: 768px) {
  /* Nav — sticky bar with a dropdown menu */
  .nav { position: sticky; top: 0; z-index: 60; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 24px; font-size: 12px; letter-spacing: 0.2em; background: rgba(13, 12, 16, 0.95); backdrop-filter: blur(12px); }
  .nav .navgroup { display: none !important; }
  .nav .navlogo { justify-self: auto; display: flex; align-items: center; order: 2; }
  .nav .navlogo img { height: 38px; }
  .nav-toggle { order: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #C4B0FF; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.2em; padding: 15px 16px 15px 0; cursor: pointer; }
  .nav-toggle i { display: block; width: 8px; height: 8px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 0.22s ease; }
  .nav.nav-open .nav-toggle i { transform: translateY(1px) rotate(225deg); }
  .nav-panel { display: grid; position: absolute; left: 0; right: 0; top: 100%; background: #12111a; border-bottom: 1px solid #2a2733; max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
  .nav.nav-open .nav-panel { max-height: 340px; }
  .nav-panel a { display: flex; align-items: center; justify-content: flex-start; height: 52px; padding: 0 24px !important; border-top: 1px solid #211f29; color: #C6C3CE; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.2em; }
  .nav-panel a.current { color: #A78BFA; }

  /* Footer */
  .footer { flex-direction: column; align-items: center; gap: 20px; padding: 28px 24px 34px; text-align: center; line-height: 1.4; }

  /* CTA + credits */
  .cta { padding: 64px 24px; }
  .cta-title { font-size: 36px; }
  .credits { padding: 64px 24px 80px; }
  .laurels { padding: 64px 24px 0; }
  .laurel-row { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; padding: 18px 0; }
  .laurel-row .s { text-align: left; white-space: normal; }
  .credit-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; padding: 18px 0; }
  .credit-row .k { line-height: 1.4; }
  .credit-row .v { text-align: left !important; line-height: 1.5; }

  /* Faults tile: hold the subject in frame on the portrait crop */
  .slot img[src*="1a-faults"] { object-position: 68% 42%; }

  /* Fixed-width intro paragraphs wrap to the viewport */
  [style*="width:480px"], [style*="width:520px"] { width: auto !important; max-width: 100% !important; }

  /* Section paddings (override inline styles) */
  [style*="padding:120px 120px"], [style*="padding:96px 120px"] { padding: 56px 24px !important; }
  [style*="padding:0 120px"] { padding: 0 24px !important; }
  [style*="padding:96px 56px 56px"] { padding: 56px 24px 32px !important; }
  [style*="padding:96px 56px 48px"], [style*="padding:96px 56px 8px"], [style*="padding:96px 56px"] { padding: 56px 24px 24px !important; }
  [style*="padding:120px 56px"], [style*="padding:140px 56px"] { padding: 72px 24px !important; }
  [style*="padding:0 56px"] { padding: 0 24px !important; }
  [style*="padding:32px 56px 0"] { padding: 32px 24px 0 !important; }
  [style*="padding:24px 56px 32px"] { padding: 20px 24px 28px !important; }
  [style*="padding:0 56px 56px"] { padding: 0 24px 32px !important; }
  [style*="padding:0 56px 140px"] { padding: 0 24px 80px !important; }
  [style*="padding:48px 56px 0"] { padding: 40px 24px 0 !important; }
  [style*="padding:112px 56px"] { padding: 64px 24px !important; }
  [style*="padding:112px 56px 72px"] { padding: 64px 24px 40px !important; }
  [style*="padding:112px 56px 40px"] { padding: 64px 24px 28px !important; }
  [style*="padding:112px 56px 96px"] { padding: 64px 24px 56px !important; }
  [style*="padding:120px 56px 96px"] { padding: 64px 24px 56px !important; }
  [style*="padding:72px 56px 112px"] { padding: 48px 24px 64px !important; }
  [style*="padding:48px 56px 72px"] { padding: 32px 24px 40px !important; }
  [style*="padding:28px 56px"] { padding: 24px !important; }
  [style*="padding:0 56px 112px"] { padding: 0 24px 64px !important; }
  [style*="padding:0 56px 24px"] { padding: 0 24px 20px !important; }
  [style*="padding:96px 120px 0"] { padding: 56px 24px 0 !important; }
  [style*="padding:0 120px 20px"] { padding: 0 24px 20px !important; }
  [style*="padding:120px 120px 140px"] { padding: 64px 24px 80px !important; }
  [style*="padding:56px\""] { padding: 32px 24px !important; }

  /* Typography (override inline sizes) */
  [style*="font-size:120px"] { font-size: 44px !important; }
  [style*="font-size:96px"] { font-size: 40px !important; }
  [style*="font-size:88px"] { font-size: 38px !important; }
  [style*="font-size:80px"] { font-size: 36px !important; }
  [style*="font-size:72px"] { font-size: 34px !important; }
  [style*="font-size:67px"], [style*="font-size:64px"] { font-size: 32px !important; }
  [style*="font-size:56px"] { font-size: 28px !important; line-height: 1.22 !important; }
  [style*="font-size:48px"] { font-size: 26px !important; }
  [style*="font-size:44px"] { font-size: 24px !important; }
  [style*="font-size:40px"] { font-size: 24px !important; }
  [style*="font-size:32px"] { font-size: 22px !important; }
  [style*="font-size:28px"] { font-size: 22px !important; }
  [style*="font-size:19px"] { font-size: 16px !important; }
  [style*="font-size:17px"] { font-size: 15px !important; }

  /* Grids -> single column */
  [style*="grid-template-columns"] > * { min-width: 0; }
  div[style*="display:flex"][style*="gap:48px"] { flex-wrap: wrap !important; gap: 24px 32px !important; }
  [style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .tile [style*="grid-template-columns:1fr 1fr 1fr"] > div:nth-child(1),
  .tile [style*="grid-template-columns:1fr 1fr 1fr"] > div:nth-child(3) { display: none; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; gap: 16px !important; }
  /* Stills grid: full page width, left edge in line with the text */
  [style*="padding:40px 120px 0"] { padding: 24px 24px 0 !important; }
  [style*="grid-template-columns:1.4fr 1fr"] { grid-template-columns: 1fr !important; gap: 48px !important; }
  [style*="grid-template-columns:repeat(2"] { grid-template-columns: 1fr !important; gap: 40px !important; }
  [style*="grid-template-columns:repeat(5"], [style*="grid-template-columns:repeat(6"] { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  [style*="grid-template-columns:340px"] { grid-template-columns: 1fr !important; gap: 32px !important; }
  [style*="grid-template-columns:40px minmax(0,520px)"] { grid-template-columns: 40px minmax(0,1fr) !important; gap: 16px 20px !important; }
  [style*="grid-template-columns:40px minmax(0,520px)"] > p { grid-column: 2 !important; }
  .svc-index { position: static !important; padding: 40px 0 0 !important; }
  .svc-stage { padding: 32px 0 64px !important; }
  .svc-stage [style*="height:480px"] { height: 300px !important; }
  .svc-track > div { gap: 20px !important; }
  .svc-arrow { top: 182px; width: 44px; height: 44px; font-size: 14px; }
  .svc-count { bottom: 24px; }

  /* The process — carousel */
  .proc-stage { position: relative; overflow: hidden; padding-bottom: 78px; }
  .proc-track { display: flex !important; grid-template-columns: none !important; gap: 0 !important; transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1); }
  .proc-track > div[style*="position:absolute"] { display: none !important; }
  .proc-track > div { flex: 0 0 100%; min-width: 0; }
  .proc-arrow { display: flex; position: absolute; bottom: 0; z-index: 5; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid #2a2733; color: #C4B0FF; font-family: 'IBM Plex Mono', monospace; font-size: 14px; cursor: pointer; }
  .proc-arrow.prev { left: 0; }
  .proc-arrow.next { left: 58px; }
  .proc-count { display: block; position: absolute; right: 0; bottom: 14px; font-size: 11px; letter-spacing: 0.24em; color: #8a8794; }

  /* Wide flex rows and fixed-width children collapse */
  div[style*="display:flex"][style*="gap:72px"], div[style*="display:flex"][style*="gap:80px"] { flex-wrap: wrap !important; gap: 16px 24px !important; }
  [style*="width:520px"], [style*="width:560px"], [style*="width:620px"], [style*="width:640px"], [style*="width:760px"], [style*="width:423px"], [style*="width:460px"], [style*="width:420px"] { width: 100% !important; max-width: 100% !important; }

  /* Home hero */
  [style*="height:900px"] { height: 78vh !important; min-height: 520px; }
  h1[style*="top:293px"] { left: 24px !important; right: 24px; top: 120px !important; width: auto !important; }
  p[style*="top:559px"] { left: 24px !important; top: auto !important; bottom: 110px !important; width: calc(100% - 48px) !important; max-width: none !important; }

  /* Trusted by — label above a 3x2 logo grid */
  div[style*="gap:87px"] { flex-wrap: wrap !important; gap: 28px 36px !important; }
  .trusted { flex-direction: column !important; align-items: flex-start !important; gap: 20px !important; }
  .logo-strip { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 24px 12px !important; width: 100%; justify-items: center; align-items: center; }

  /* Work tiles */
  .work-tile[style*="height:560px"], .work-tile[style*="height: 560px"] { height: 560px !important; }
  .work-tile[style*="height:440px"], .work-tile[style*="height: 440px"] { height: 330px !important; width: 100% !important; }
  div[style*="display:flex"][style*="gap:8px"][style*="margin-top:8px"] { flex-direction: column !important; }
  .work-tile div[style*="left:56px"] { left: 24px !important; bottom: 24px !important; right: 24px; }
  .work-tile div[style*="left:40px"] { left: 24px !important; bottom: 24px !important; right: 24px; }

  /* Services rows — number inline with the title, copy beneath */
  .svc-row { flex-wrap: wrap !important; align-items: baseline !important; gap: 8px 14px !important; padding: 22px 0 !important; min-height: 0 !important; }
  .svc-row .mono[style*="width:40px"] { width: auto !important; }
  .svc-row .serif[style*="width:420px"] { width: auto !important; flex: 0 1 auto; }
  .svc-row div[style*="flex:1"] { flex: 1 0 100% !important; max-width: 100% !important; }
  .svc-row .svc-see { opacity: 1; }

  /* Home services — horizontal snap carousel */
  .svc-list { flex-direction: row !important; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; margin: 0 -24px; padding: 0; scrollbar-width: none; }
  .svc-list::-webkit-scrollbar { display: none; }
  .svc-list .svc-row { display: flex !important; flex: 0 0 100% !important; scroll-snap-align: start; flex-direction: column !important; flex-wrap: nowrap !important; align-items: flex-start !important; justify-content: flex-start; gap: 16px !important; padding: 28px 24px 32px !important; min-height: 236px !important; border: 0 !important; border-top: 1px solid #2a2733 !important; border-bottom: 1px solid #2a2733 !important; }
  .svc-list .svc-row div[style*="flex:1"] { flex: 0 0 auto !important; }
  .ethos.svc-list .svc-row { min-height: 300px !important; justify-content: flex-start !important; }
  .ethos.svc-list .svc-row > div, .ethos.svc-list .svc-row > p { padding-top: 0 !important; max-width: 100% !important; }
  .svc-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -24px; padding: 14px 24px 0; }
  .svc-nav button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid #2a2733; color: #C4B0FF; font-family: 'IBM Plex Mono', monospace; font-size: 14px; cursor: pointer; }
  .svc-nav span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.24em; color: #8a8794; }

  /* Section header rows (heading + "view all" link) stack, left-aligned */
  div[style*="justify-content:space-between"][style*="gap:40px"] { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }

  /* Work index: filters wrap, hover overlays always visible */
  div[style*="gap:12px"][style*="display:flex"] { flex-wrap: wrap !important; }
  .filter-btn { padding: 12px 18px; font-size: 11px; }
  .tile .tov { opacity: 1; }

  /* Video poster: full bleed, like the stills and BTS */
  .video-poster { margin: 0 -24px; width: auto !important; }

  /* Video poster: smaller, more transparent play button so the still reads */
  .play-btn { width: 44px !important; height: 44px !important; opacity: 0.75; }
  .play-btn > div { border-top-width: 7px !important; border-bottom-width: 7px !important; border-left-width: 11px !important; margin-left: 3px !important; }

  /* Carousel */
  .car-btn { width: 40px; height: 44px; }

  /* Work page stills — full-bleed swipe carousel, arrows below the frame */
  .stills { display: flex !important; grid-template-columns: none !important; gap: 0 !important; padding: 32px 0 0 !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .stills::-webkit-scrollbar { display: none; }
  .stills > div { flex: 0 0 100% !important; scroll-snap-align: start; }
  .stills-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px 0; }
  .stills-nav .sn-btns { display: flex; gap: 10px; }
  .stills-nav button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid #2a2733; color: #C4B0FF; font-family: 'IBM Plex Mono', monospace; font-size: 14px; cursor: pointer; }
  .stills-nav span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.24em; color: #8a8794; }

  /* BTS — image full screen width, arrows outside it */
  [style*="padding:0 56px 20px"] { padding: 0 24px 20px !important; }
  /* CSS-only: photo full width, arrows wrap onto the row BELOW it */
  .carousel.bts { margin: 0 -24px; display: flex; flex-flow: row wrap; align-items: center; gap: 10px; padding: 0 !important; }
  .carousel.bts .car-win { flex: 0 0 100%; order: 1; height: auto; aspect-ratio: 3/2; }
  .carousel.bts .car-nav { order: 2; display: flex; gap: 10px; margin: 14px 0 0 24px; }
  .carousel.bts > .car-btn { order: 2; position: static !important; transform: none !important; margin-top: 14px; }
  .carousel.bts > .car-btn.prev { margin-left: 24px; }
  .carousel.bts .car-btn { background: transparent !important; border-color: #2a2733 !important; color: #C4B0FF !important; }
  /* tighten the dead band above the photo */
  .carousel.bts ~ .mono, [style*="letter-spacing:0.3em"] { margin-bottom: 24px !important; }
  .carousel.bts + .car-meta { padding: 14px 0 0 !important; }

  /* Inline text links get a real tap target */
  .footer .social { gap: 14px; }
  .footer .social a { width: 50px; height: 50px; padding: 0; }
  .footer .social svg { width: 48px; height: 48px; }
  .footer a, .cta a, :not(.nav-panel) > a[href="work.html"], :not(.nav-panel) > a[href="blog.html"], a[href^="mailto:"] { display: inline-block; padding: 6px 0; }

  
/* Buttons */
  .btn-outline { padding: 14px 24px !important; }

  /* No intro animation on mobile */
  .intro { display: none; }
}


/* Ethos rows: stack the paragraph under the title before the columns get squeezed */
@media (min-width: 769px) and (max-width: 1199px) {
  [style*="grid-template-columns:40px minmax(0,520px)"] { grid-template-columns: 40px minmax(0,1fr) !important; gap: 20px 40px !important; }
  [style*="grid-template-columns:40px minmax(0,520px)"] > p { grid-column: 2 !important; }
}

/* Blog */
.post-card { display: flex; gap: 56px; align-items: center; padding: 48px 0; border-bottom: 1px solid #2a2733; color: inherit; transition: background 0.25s ease; }
.post-card:first-child { border-top: 1px solid #2a2733; }
.post-card:hover { background: rgba(167, 139, 250, 0.05); color: inherit; }
.post-thumb { position: relative; width: 420px; height: 260px; flex-shrink: 0; overflow: hidden; background: #17151d; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb span { font-size: 11px; letter-spacing: 0.22em; color: #48454f; }
.post-text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.post-meta { display: flex; gap: 24px; font-size: 11px; letter-spacing: 0.22em; color: #8a8794; }
.post-title { font-size: 44px; line-height: 1.15; text-wrap: balance; }
.post-dek { margin: 0; font-size: 17px; line-height: 1.7; color: #C6C3CE; max-width: 620px; text-wrap: pretty; }
.blog-prose { max-width: 820px; display: flex; flex-direction: column; gap: 28px; }
.blog-prose p { margin: 0; font-size: 17px; line-height: 1.8; color: #C6C3CE; text-wrap: pretty; }
.blog-prose p.lede { font-size: 21px; line-height: 1.7; color: #E9E9E9; }
.blog-prose blockquote { margin: 8px 0; border-left: 2px solid #A78BFA; padding: 8px 0 8px 32px; font-size: 32px; line-height: 1.4; color: #F2F0EE; text-wrap: pretty; }
.blog-pair { display: flex; gap: 8px; }
.blog-pair > .blog-frame { width: 50%; }
.blog-frame { position: relative; width: 100%; overflow: hidden; background: #17151d; display: flex; align-items: center; justify-content: center; }
.blog-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; align-items: start; padding: 0 56px 96px; }
.blog-split .blog-prose { max-width: none; }
/* Below the sidebar breakpoint the rail becomes a small inset, aligned right of the prose. */
.blog-rail { display: flex; flex-direction: column; gap: 56px; width: 100%; max-width: 300px; margin: -32px 0 0; justify-self: end; }
.blog-rail figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.blog-rail figcaption { font-size: 11px; letter-spacing: 0.2em; color: #5c5966; line-height: 1.7; }
.blog-rail .blog-frame { min-height: 200px; }
@media (min-width: 1280px) {
  .blog-split { grid-template-columns: minmax(0, 820px) minmax(300px, 380px); gap: 80px; }
  .blog-rail { max-width: 380px; margin: 0; gap: 112px; padding-top: 88px; position: sticky; top: 40px; }
  /* Lower rail mirrors the top rail: figure starts level with the prose. */
  .blog-rail.rail-low { padding-top: 88px; }
}
.blog-frame.empty span { font-size: 11px; letter-spacing: 0.22em; color: #48454f; text-align: center; padding: 16px; }
/* Aspect-ratio frames — add ONE ratio class to a .blog-frame instead of a fixed height.
   Reframe inside the crop with the img's own object-position (e.g. 50% 20% to favour the top).
   Ratio and position are independent: changing one never affects the other. */
.blog-frame[class*="ratio-"] { height: auto !important; }
.blog-frame[class*="ratio-"] img { object-fit: cover; }
.blog-frame.ratio-916 { aspect-ratio: 9 / 16; }
.blog-frame.ratio-23 { aspect-ratio: 2 / 3; }
.blog-frame.ratio-34 { aspect-ratio: 3 / 4; }
.blog-frame.ratio-45 { aspect-ratio: 4 / 5; }
.blog-frame.ratio-11 { aspect-ratio: 1 / 1; }
.blog-frame.ratio-43 { aspect-ratio: 4 / 3; }
.blog-frame.ratio-32 { aspect-ratio: 3 / 2; }
.blog-frame.ratio-169 { aspect-ratio: 16 / 9; }
.blog-frame.ratio-21 { aspect-ratio: 2 / 1; }
.blog-frame.ratio-221 { aspect-ratio: 2.2 / 1; }
.blog-frame.ratio-235 { aspect-ratio: 2.35 / 1; }
.blog-frame.ratio-2391 { aspect-ratio: 2.39 / 1; }
.blog-frame.ratio-241 { aspect-ratio: 2.4 / 1; }
.blog-frame.ratio-6524 { aspect-ratio: 65 / 24; }

@media (max-width: 768px) {
  /* Post pages: every block on the same 24px gutter as the rest of the site */
  [style*="padding:35px 56px 112px"] { padding: 32px 24px 64px !important; }
  [style*="padding:0 56px 96px"] { padding: 0 24px 64px !important; }
  [style*="padding:56px; border-top"] { padding: 40px 24px !important; }
  .post-card { flex-direction: column; gap: 24px; align-items: stretch; padding: 32px 0; }
  .post-thumb { width: 100%; height: 200px; }
  .post-title { font-size: 26px; }
  .blog-prose blockquote { font-size: 22px; padding-left: 20px; }
  .blog-pair { flex-direction: column; }
  .blog-pair > .blog-frame { width: 100%; }
  .blog-frame { height: 220px !important; }
  .blog-split { grid-template-columns: 1fr; gap: 48px; padding: 0 24px 64px; }
  .blog-rail, .blog-rail.rail-low { position: static; padding-top: 0; max-width: none; margin: 0; justify-self: stretch; gap: 48px; }
  .blog-frame[class*="ratio-"] { height: auto !important; }
}
