/* ==========================================================================
   YSERA — animated slide-deck landing site (served at /)
   Palette and type follow the YSERA brand identity: obsidian surfaces,
   gold #C9A84C line accents, cream type, Cormorant Garamond display serif,
   Montserrat body.
   ========================================================================== */

:root {
  --bg-0: #0A0A0A;
  --bg-1: #0D0D0D;
  --card-hi: #1E1E1E;
  --card-lo: #121212;
  --ink: #F5F0E8;
  --mut: #a29a8a;
  --mut-2: #767066;
  --gold: #C9A84C;
  --gold-2: #E8C97A;
  --line: rgba(201, 168, 76, 0.32);
  --line-soft: rgba(201, 168, 76, 0.12);
  --ease-page: cubic-bezier(0.77, 0, 0.18, 1);
  --ease-pop: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- base ---------------------------------------------------------------- */

.brand-body {
  margin: 0;
  background: var(--bg-1);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.brand-body * { box-sizing: border-box; }

/* --- polish: selection, keyboard focus, scrollbar --- */

.brand-body ::selection { background: rgba(201, 168, 76, 0.4); color: #fff; }
.brand-body a:focus-visible,
.brand-body button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
body.mode-scroll { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #3a3220 transparent; }
body.mode-scroll::-webkit-scrollbar { width: 10px; }
body.mode-scroll::-webkit-scrollbar-track { background: transparent; }
body.mode-scroll::-webkit-scrollbar-thumb { background: #2b2617; border-radius: 5px; }
body.mode-scroll::-webkit-scrollbar-thumb:hover { background: #4a3f22; }
@media (prefers-reduced-motion: reduce) {
  body.mode-scroll { scroll-behavior: auto; }
}

body.mode-deck { overflow: hidden; height: 100vh; }
body.mode-scroll { overflow-y: auto; }

.deck {
  will-change: transform;
  transition: transform 1s var(--ease-page);
}
body.mode-scroll .deck { transition: none; transform: none !important; }

.slide {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(201, 168, 76, 0.06), transparent 60%),
    radial-gradient(900px 700px at 8% 110%, rgba(201, 168, 76, 0.045), transparent 60%),
    var(--bg-1);
}
body.mode-scroll .slide { height: auto; min-height: 100svh; overflow: visible; }

.slide-inner {
  width: min(1180px, calc(100% - 48px));
  padding: 96px 0 48px;
}

/* --- reveal animation ------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease-pop);
}
.slide.is-active .reveal { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.22s; }
.d3 { transition-delay: 0.34s; }
.d4 { transition-delay: 0.46s; }
.d5 { transition-delay: 0.58s; }
.d6 { transition-delay: 0.7s; }
.d7 { transition-delay: 0.82s; }

/* --- header ----------------------------------------------------------------- */

.bs-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(20px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0));
}
/* Past the journey the sections run under the header: give it a floor, or their text collides with its buttons. */
.bs-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.bs-header.is-solid::before { opacity: 1; }

.bs-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}
.ys-mark {
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--gold);
}
.bs-brand { display: flex; flex-direction: column; gap: 2px; }
.bs-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--ink);
}
.bs-wordmark b { color: var(--gold); font-weight: 400; }
.bs-sub {
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 2px;
}

.bs-nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.bs-nav button,
.bs-nav a,
.bs-footer nav button,
.bs-footer nav a {
  appearance: none;
  background: none;
  border: 0;
  padding: 8px 14px;
  font: 500 12px/1 'Montserrat', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mut);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease;
}
.bs-nav button:hover, .bs-nav a:hover,
.bs-footer nav button:hover, .bs-footer nav a:hover { color: var(--gold-2); }

.bs-actions { display: flex; align-items: center; gap: 10px; }
.bs-cta { white-space: nowrap; }

/* --- burger + mobile menu --- */

.bs-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}
.bs-burger span {
  display: block;
  height: 1.5px;
  background: var(--gold-2);
  transition: transform 0.3s var(--ease-pop), opacity 0.3s ease;
}
body.menu-open .bs-burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
body.menu-open .bs-burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.bs-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  align-content: center;
  align-content: safe center;
  justify-items: start;
  gap: 4px;
  padding: 90px clamp(28px, 8vw, 60px) 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(6, 6, 6, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
body.menu-open .bs-mobile-menu { opacity: 1; visibility: visible; }
body.mode-scroll.menu-open { overflow: hidden; }
.bs-mobile-menu button,
.bs-mobile-menu a {
  appearance: none;
  background: none;
  border: 0;
  padding: 9px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.45s var(--ease-pop), opacity 0.4s ease, color 0.25s ease;
}
.bs-mobile-menu button:hover, .bs-mobile-menu a:hover { color: var(--gold-2); }
body.menu-open .bs-mobile-menu button,
body.menu-open .bs-mobile-menu a { transform: none; opacity: 1; }
body.menu-open .bs-mobile-menu > *:nth-child(1) { transition-delay: 0.05s; }
body.menu-open .bs-mobile-menu > *:nth-child(2) { transition-delay: 0.1s; }
body.menu-open .bs-mobile-menu > *:nth-child(3) { transition-delay: 0.15s; }
body.menu-open .bs-mobile-menu > *:nth-child(4) { transition-delay: 0.2s; }
body.menu-open .bs-mobile-menu > *:nth-child(5) { transition-delay: 0.25s; }
body.menu-open .bs-mobile-menu > *:nth-child(6) { transition-delay: 0.3s; }
body.menu-open .bs-mobile-menu > *:nth-child(7) { transition-delay: 0.35s; }
body.menu-open .bs-mobile-menu > *:nth-child(8) { transition-delay: 0.4s; }

/* --- buttons ----------------------------------------------------------------- */

.bs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: 600 13px/1 'Montserrat', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-pop), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.bs-btn:hover { transform: translateY(-2px); }
.bs-btn:active { transform: translateY(0); transition-duration: 0.1s; }

.bs-btn-gold {
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  border-color: transparent;
  color: #17130a;
}
.bs-btn-gold:hover { box-shadow: 0 12px 34px rgba(201, 168, 76, 0.28); }

.bs-btn-ghost { border-color: rgba(201, 168, 76, 0.45); color: var(--gold-2); }
.bs-btn-ghost:hover { background: rgba(201, 168, 76, 0.08); }

.bs-header .bs-btn { padding: 10px 20px; font-size: 11px; }

/* --- shared type ------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(38px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: 0.05em;
}

/* --- slide 1 · hero ------------------------------------------------------------ */

.hero-backdrop { position: absolute; inset: 0; }
.hero-backdrop svg { width: 100%; height: 100%; display: block; }
.hb-diag line { stroke: var(--gold); stroke-width: 0.6; }
.hb-rings circle { fill: none; stroke-width: 0.8; }
.hb-c1 { stroke: rgba(201, 168, 76, 0.28); stroke-dasharray: 1; stroke-dashoffset: 1; animation: hb-draw 3.2s 0.4s var(--ease-pop) forwards; }
.hb-c2 { stroke: rgba(201, 168, 76, 0.16); stroke-dasharray: 1; stroke-dashoffset: 1; animation: hb-draw 3.2s 0.8s var(--ease-pop) forwards; }
@keyframes hb-draw { to { stroke-dashoffset: 0; } }

.hero-inner { position: relative; text-align: center; max-width: 880px; }

.hero-name {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(64px, 11vw, 132px);
  line-height: 1;
  letter-spacing: 0.16em;
  text-indent: 0.16em; /* balance the tracking so the word stays centred */
}
.hn-em .lt {
  font-style: normal;
  font-weight: 400;
}

.hero-tag {
  margin: 20px 0 0;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mut);
}

.hero-lead {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--mut);
  font-size: 15px;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-inner .hero-cta, .ysera-text .hero-cta { justify-content: flex-start; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--mut);
  font: 500 10px/1 'Montserrat', sans-serif;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.cue-chevron {
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 0.4; }
}

/* --- slide 2 · services ---------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(18px, 3vh, 36px);
}
.section-note {
  margin: 0 0 8px;
  color: var(--mut-2);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  height: min(62vh, 620px);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2.2vh, 26px);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: radial-gradient(140% 120% at 70% -10%, var(--card-hi), var(--card-lo) 70%);
  text-decoration: none;
  color: inherit;
  transition: transform 0.45s var(--ease-pop), border-color 0.35s ease, box-shadow 0.35s ease,
    opacity 0.7s ease; /* keep reveal opacity transition */
}
.slide.is-active .service-card { transition: transform 0.45s var(--ease-pop), border-color 0.35s ease, box-shadow 0.35s ease; }
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow: 0 24px 60px rgba(3, 7, 24, 0.6);
}

.sc-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: rgba(201, 168, 76, 0.13);
  fill: none;
  stroke-width: 1;
}
.pat-grid { stroke: rgba(200, 190, 170, 0.1); }
.pat-grid .pat-bold { stroke: rgba(201, 168, 76, 0.2); }
.pat-lattice { stroke: rgba(200, 190, 170, 0.09); }
.pat-rays { stroke: rgba(201, 168, 76, 0.16); }
.sc-pattern { animation: pat-drift 20s linear infinite; }
.service-card:hover .sc-pattern { animation-duration: 8s; }

/* --- per-service animated scenes (duct flow, fan, circuit, gear, floors, rays) --- */

.sc-pattern .scene { stroke: rgba(201, 168, 76, 0.38); }
.scene-flow { animation: scene-dash 2.6s linear infinite; }
@keyframes scene-dash { to { stroke-dashoffset: -64; } }

.scene-spin, .scene-spin-slow {
  transform-box: fill-box;
  transform-origin: center;
  animation: scene-spin 5s linear infinite;
}
.scene-spin-slow { animation-duration: 14s; }
@keyframes scene-spin { to { transform: rotate(360deg); } }

.scene-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: scene-pulse 3.2s ease-in-out infinite;
}
@keyframes scene-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.75; }
}

.scene-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: scene-float 6s ease-in-out infinite;
}
@keyframes scene-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.scene-floor { opacity: 0; animation: scene-floor 7s ease-in-out infinite; }
.sf1 { animation-delay: 0s; }
.sf2 { animation-delay: 0.7s; }
.sf3 { animation-delay: 1.4s; }
.sf4 { animation-delay: 2.1s; }
@keyframes scene-floor {
  0% { opacity: 0; transform: translateY(16px); }
  12%, 74% { opacity: 1; transform: translateY(0); }
  88%, 100% { opacity: 0; transform: translateY(0); }
}

.scene-sway {
  transform-box: fill-box;
  transform-origin: center;
  animation: scene-sway 14s ease-in-out infinite;
}
@keyframes scene-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* CFD contour plot: isolines breathe out of phase, legend cycles like a scale. */
.pat-contours { stroke: rgba(201, 168, 76, 0.18); }
.contour-anim {
  transform-box: fill-box;
  transform-origin: center;
  animation: contour-breathe 9s ease-in-out infinite;
}
.cb2 { animation-delay: -1.8s; }
.cb3 { animation-delay: -3.6s; }
.cb4 { animation-delay: -5.4s; }
.cb5 { animation-delay: -7.2s; }
@keyframes contour-breathe {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.07) translate(0, -5px); }
}
.legend-cell { opacity: 0.25; animation: legend-glow 4.2s linear infinite; }
.lg2 { animation-delay: 0.7s; }
.lg3 { animation-delay: 1.4s; }
.lg4 { animation-delay: 2.1s; }
.lg5 { animation-delay: 2.8s; }
.lg6 { animation-delay: 3.5s; }
@keyframes legend-glow {
  0%, 100% { opacity: 0.25; }
  12% { opacity: 0.95; }
  26% { opacity: 0.25; }
}
@keyframes pat-drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-8px, 5px, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0); }
}

.sc-top, .sc-bottom { position: relative; }
.sc-icon { width: 42px; height: 42px; color: var(--gold); }

.sc-no {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5em;
  color: var(--mut-2);
  margin-bottom: 8px;
}
.sc-title {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.15;
}
.sc-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--mut);
  max-width: 300px;
}

.sc-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 14px;
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  color: #17130a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.sc-go {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.sc-arrow { display: inline-block; transition: transform 0.3s var(--ease-pop); }
.service-card.is-link:hover .sc-arrow { transform: translateX(6px); }

/* --- slide 3 · about + portfolio ----------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.about-text p { margin: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--mut); }
.about-text strong { color: var(--gold-2); font-weight: 600; }

.about-stats {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.about-stats .stat strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--gold);
  line-height: 1;
}
.about-stats .stat span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mut-2);
}

.about-work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.work-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--card-lo);
  aspect-ratio: 16 / 10;
  transition: border-color 0.35s ease, transform 0.45s var(--ease-pop);
}
.work-card:hover { border-color: rgba(201, 168, 76, 0.55); transform: translateY(-4px); }
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
  transition: transform 0.6s var(--ease-pop), filter 0.4s ease;
}
.work-card:hover img { transform: scale(1.06); filter: saturate(1); }
.work-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 12px 9px;
  background: linear-gradient(to top, rgba(6, 6, 6, 0.92), transparent);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.work-card figcaption em { font-style: normal; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* --- slide 3 · free tools & announcements ------------------------------------------- */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tool-card {
  position: relative;
  padding: clamp(20px, 2.6vh, 30px);
  border: 1px solid var(--line-soft);
  background: radial-gradient(140% 120% at 70% -10%, var(--card-hi), var(--card-lo) 70%);
  transition: transform 0.45s var(--ease-pop), border-color 0.35s ease;
}
.tool-card:hover { transform: translateY(-5px); border-color: rgba(201, 168, 76, 0.5); }
.tool-soon {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.tool-title {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 24px;
}
.tool-desc { margin: 0; font-size: 13px; color: var(--mut); line-height: 1.65; }

.tools-announce {
  margin-top: clamp(20px, 4vh, 40px);
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tools-note { margin: 0; max-width: 460px; font-size: 13px; color: var(--mut-2); }
.tools-cta { margin: 0; justify-content: flex-end; }

/* --- tool modal (duct sizer) --- */

.tool-ready { border-color: rgba(201, 168, 76, 0.4); }
.tool-open { margin-top: 16px; padding: 10px 20px; font-size: 11px; }

.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 6, 0.8);
  backdrop-filter: blur(4px);
}
.tool-modal[hidden] { display: none; }
.tool-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(160deg, var(--card-hi), var(--card-lo) 75%);
  border: 1px solid var(--line);
}
.tool-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--mut);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tool-close:hover { color: var(--gold-2); border-color: var(--gold); }
.tool-modal-title { margin: 4px 0 8px; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 30px; }
.tool-modal-sub { margin: 0 0 18px; font-size: 12.5px; line-height: 1.65; color: var(--mut); }

.duct-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-items: end;
  margin-bottom: 18px;
}
.duct-form label {
  position: relative;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mut);
}
.duct-form .unit {
  position: absolute;
  right: 2px;
  bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--mut-2);
  text-transform: none;
}
.duct-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 34px 9px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font: 500 15px/1.4 'Montserrat', sans-serif;
}
.duct-form input:focus { outline: none; border-bottom-color: var(--gold); }
.duct-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font: 500 14px/1.4 'Montserrat', sans-serif;
  cursor: pointer;
}
.duct-form select:focus { outline: none; border-bottom-color: var(--gold); }
.duct-form select option { background: #14100a; color: var(--ink); }

.duct-results {
  margin: 0 0 14px;
  border-top: 1px solid var(--line-soft);
}
.duct-results > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.duct-results dt { font-size: 12px; color: var(--mut); }
.duct-results dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.tool-modal-note { margin: 0; font-size: 10.5px; color: var(--mut-2); }

@media (max-width: 520px) {
  .duct-form { grid-template-columns: 1fr; }
}

/* --- Arabic mark: يسيرة — calligraphic accent, never the main mark ------------------- */

.ar-watermark {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  font-family: 'Amiri', serif;
  font-weight: 400;
  font-size: clamp(220px, 36vw, 520px);
  line-height: 1;
  color: rgba(201, 168, 76, 0.045);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.ar-watermark-corner {
  left: auto;
  right: -4%;
  top: auto;
  bottom: -6%;
  transform: none;
  font-size: clamp(160px, 24vw, 340px);
  color: rgba(201, 168, 76, 0.06);
}
.ar-accent {
  margin: 14px 0 0;
  font-family: 'Amiri', serif;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--gold-2);
  opacity: 0.85;
}

/* --- slide 3 · YSERA ---------------------------------------------------------------- */

.ysera-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.ysera-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 800;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(110deg, var(--ink) 30%, var(--gold-2) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ysera-lead {
  margin: 16px 0 22px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--gold-2);
}

.ysera-points {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.ysera-points li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--mut);
}
.ysera-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
}
.ysera-points strong { color: var(--ink); font-weight: 600; }
.ysera-points code {
  font-family: Consolas, monospace;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.1);
  padding: 1px 6px;
}

/* mock player */
.mock-player {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1a1a1a, #101010);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
}
.mp-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.mp-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(200, 190, 170, 0.3); }
.mp-bar span:first-child { background: rgba(201, 168, 76, 0.75); }
.mp-bar em {
  margin-left: auto;
  font: 600 10px/1 'Montserrat', sans-serif;
  font-style: normal;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.mp-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 50% 45%, rgba(201, 168, 76, 0.12), transparent 70%),
    var(--bg-0);
}
.mp-play {
  width: 0;
  height: 0;
  border-left: 26px solid var(--gold-2);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  margin-left: 6px;
  filter: drop-shadow(0 0 24px rgba(232, 201, 122, 0.45));
}
.mp-watermark {
  position: absolute;
  font: 500 10px/1.4 Consolas, monospace;
  letter-spacing: 0.08em;
  color: rgba(232, 201, 122, 0.5);
  animation: mp-wander 12s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes mp-wander {
  0%, 12% { top: 12%; left: 8%; }
  25%, 37% { top: 70%; left: 55%; }
  50%, 62% { top: 20%; left: 60%; }
  75%, 87% { top: 66%; left: 10%; }
  100% { top: 12%; left: 8%; }
}
.mp-progress { height: 4px; background: rgba(200, 190, 170, 0.14); }
.mp-fill {
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  animation: mp-progress 9s linear infinite;
}
@keyframes mp-progress { from { width: 8%; } to { width: 92%; } }
.mp-caption {
  margin: 14px 2px 0;
  font-size: 12px;
  color: var(--mut-2);
}

/* --- slide 4 · contact ----------------------------------------------------------------- */

.contact-inner { max-width: 1000px; }

.contact-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(14px, 2.4vh, 26px);
}
.slide-contact .contact-title { font-size: clamp(30px, 3.8vw, 46px); }
.contact-aside { max-width: 380px; }
.contact-aside .contact-lead { margin: 0 0 10px; font-size: 13px; }
.contact-mail {
  color: var(--gold-2);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(216, 184, 120, 0.4);
  padding-bottom: 2px;
}
.contact-mail:hover { border-color: var(--gold-2); }

/* --- write-to-us form --- */

.contact-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.2vh, 24px) 28px;
}
.cf-field {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mut);
}
.cf-field b { color: var(--gold); font-weight: 600; }
.cf-field input,
.cf-field select,
.cf-field textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 9px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font: 400 14px/1.45 'Montserrat', sans-serif;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 0.25s ease;
}
.cf-field select { appearance: none; cursor: pointer; }
.cf-field select option { background: var(--navy-900); color: var(--ink); }
.cf-field textarea { resize: vertical; min-height: 66px; }
.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.cf-full { grid-column: 1 / -1; }
.cf-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cf-note { font-size: 11px; color: var(--mut-2); letter-spacing: 0.02em; text-transform: none; }
.cf-hp { position: absolute; left: -6000px; top: 0; height: 1px; width: 1px; opacity: 0; }

.cf-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  font-size: 13px;
  border: 1px solid;
}
.cf-ok { border-color: rgba(156, 191, 140, 0.4); color: #bcd6ac; background: rgba(156, 191, 140, 0.07); }
.cf-err { border-color: rgba(217, 138, 138, 0.4); color: #e9b3b3; background: rgba(217, 138, 138, 0.07); }
.contact-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.08;
}
.contact-title em {
  font-style: italic;
  background: linear-gradient(110deg, var(--gold) 20%, var(--gold-2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-lead { margin: 20px 0 8px; color: var(--mut); max-width: 520px; }
.contact-inner .bs-btn { text-transform: none; letter-spacing: 0.04em; font-size: 14px; }

.bs-footer {
  margin-top: clamp(40px, 9vh, 90px);
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--mut-2);
}
.bs-footer nav { display: flex; gap: 4px; }
.bs-footer nav button, .bs-footer nav a { padding: 6px 10px; font-size: 10px; }

/* --- dots + counter ----------------------------------------------------------------- */

.deck-dots {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: grid;
  gap: 18px;
}
.dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(201, 168, 76, 0.5);
  transform: rotate(45deg);
  background: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease-pop);
}
.dot:hover { transform: rotate(45deg) scale(1.25); }
.dot.is-active { background: var(--gold); border-color: var(--gold); }
.dot-label {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  transform-origin: right center;
  font: 600 10px/1 'Montserrat', sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dot:hover .dot-label { opacity: 1; }

.deck-counter {
  position: fixed;
  left: clamp(16px, 3vw, 44px);
  bottom: 26px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 12px/1 'Montserrat', sans-serif;
  letter-spacing: 0.22em;
  color: var(--mut-2);
}
.deck-counter-current { color: var(--gold); }
.deck-counter-sep { width: 34px; height: 1px; background: var(--line); }

/* --- responsive ----------------------------------------------------------------- */

@media (max-width: 1100px) {
  .services-grid { gap: 14px; }
  .sc-desc { font-size: 12px; }
}

@media (max-width: 860px) {
  .bs-nav { display: none; }
  .bs-burger { display: flex; }
  .slide-inner { padding: 92px 0 56px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-work { grid-template-columns: 1fr 1fr; }

  .services-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .service-card { min-height: 300px; }

  .tools-grid { grid-template-columns: 1fr; }
  .tools-cta { justify-content: flex-start; }
  .ar-watermark { font-size: clamp(160px, 60vw, 300px); }

  .contact-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .contact-form { grid-template-columns: 1fr; }

  .ysera-inner { grid-template-columns: 1fr; }
  .ysera-visual { max-width: 460px; }

  .deck-dots { right: 10px; gap: 14px; }
  .deck-counter { display: none; }
  .scroll-cue { display: none; }

  .hero-cta .bs-btn { width: 100%; }
  .contact-inner .bs-btn { width: auto; }
}

@media (max-width: 520px) {
  .bs-wordmark, .bs-sub { display: none; }
  .bs-actions .bs-btn-ghost { display: none; }
  .hero-lead { font-size: 14px; }
  .about-work { grid-template-columns: 1fr; }
}

/* Native cursor over form fields (the custom cursor breaks text-editing cues). */
.brand-body input,
.brand-body textarea,
.brand-body select { cursor: auto; }
body.cursor-native .cursor-dot,
body.cursor-native .cursor-ring { opacity: 0; }
.cursor-dot { transition: opacity 0.2s ease; }
.cursor-ring { transition: opacity 0.2s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease, margin 0.25s ease; }

/* ==========================================================================
   Interactive layer — 3D depth, continuous animation, custom cursor
   ========================================================================== */

/* --- custom cursor (fine pointers only) --- */

@media (pointer: fine) {
  body.brand-body, .brand-body a, .brand-body button { cursor: none; }
}
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-100px, -100px);
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold-2); }
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(201, 168, 76, 0.6);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, margin 0.25s ease;
}
.cursor-ring.is-hover {
  width: 58px;
  height: 58px;
  margin: -11px 0 0 -11px;
  background: rgba(201, 168, 76, 0.09);
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* --- hero: masked letter-by-letter reveal --- */

.hn-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
.lt {
  display: inline-block;
  transform: translateY(118%) rotate(6deg);
  transition: transform 0.9s var(--ease-pop);
  will-change: transform;
}
.slide.is-active .lt { transform: none; }
.hn-em .lt {
  background: linear-gradient(110deg, var(--gold) 20%, var(--gold-2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-name, .hero-backdrop svg { will-change: transform; }

/* --- slide depth choreography: inactive pages sink back --- */

.slide-inner {
  transition: transform 1.1s var(--ease-page), opacity 0.9s ease;
}
.slide:not(.is-active) .slide-inner {
  transform: translateY(70px) scale(0.97);
  opacity: 0.3;
}

/* --- marquee strip --- */

.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee-slide 40s linear infinite; }
.marquee-track span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 168, 76, 0.38);
}
@keyframes marquee-slide { to { transform: translateX(-50%); } }

/* --- drifting gold orbs --- */

.orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orbs i {
  position: absolute;
  bottom: -14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(232, 201, 122, 0.45);
  animation: orb-rise 16s linear infinite;
}
.orbs i:nth-child(1) { left: 8%; animation-duration: 19s; }
.orbs i:nth-child(2) { left: 21%; width: 3px; height: 3px; animation-duration: 14s; animation-delay: 3s; }
.orbs i:nth-child(3) { left: 34%; animation-duration: 22s; animation-delay: 7s; }
.orbs i:nth-child(4) { left: 47%; width: 4px; height: 4px; animation-duration: 16s; animation-delay: 1.5s; }
.orbs i:nth-child(5) { left: 58%; animation-duration: 20s; animation-delay: 9s; }
.orbs i:nth-child(6) { left: 67%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: 5s; }
.orbs i:nth-child(7) { left: 78%; animation-duration: 18s; animation-delay: 2s; }
.orbs i:nth-child(8) { left: 88%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: 11s; }
.orbs i:nth-child(9) { left: 95%; animation-duration: 21s; animation-delay: 6s; }
@keyframes orb-rise {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.7; }
  92% { opacity: 0.25; }
  100% { transform: translateY(-108vh); opacity: 0; }
}

/* --- 3D tilt + glare on service cards --- */

.services-grid { perspective: 1400px; }
.service-card { transform-style: preserve-3d; }
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 201, 122, 0.13), transparent 62%);
}
.service-card:hover::after { opacity: 1; }

/* --- progress rail --- */

.deck-rail {
  position: fixed;
  left: clamp(17px, 3vw, 45px);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 150px;
  background: var(--line-soft);
  z-index: 40;
}
.deck-rail-fill {
  display: block;
  width: 100%;
  height: 25%;
  background: linear-gradient(to bottom, var(--gold), var(--gold-2));
  transition: height 0.9s var(--ease-page);
}

/* --- ysera slide extras --- */

.mock-player { animation: mp-float 7s ease-in-out infinite; }
@keyframes mp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.ysera-register { margin: 16px 0 0; font-size: 13px; color: var(--mut-2); }
.ysera-register a { color: var(--gold-2); text-decoration: none; }
.ysera-register a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .marquee { bottom: 18px; }
  .marquee-track span { font-size: 15px; }
  .deck-rail { display: none; }
}

/* --- reduced motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .deck { transition: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hb-c1, .hb-c2 { animation: none; stroke-dashoffset: 0; }
  .hb-nodes circle { animation: none; opacity: 0.9; }
  .cue-chevron, .mp-watermark, .mp-fill { animation: none; }
  .sc-pattern, .service-card:hover .sc-pattern { animation: none; }
  .scene-flow, .scene-spin, .scene-spin-slow, .scene-pulse,
  .scene-float, .scene-floor, .scene-sway,
  .contour-anim, .legend-cell { animation: none; }
  .scene-floor { opacity: 1; }
  .legend-cell { opacity: 0.6; }
  .lt { transition: none; transform: none; }
  .slide-inner { transition: none; }
  .slide:not(.is-active) .slide-inner { transform: none; opacity: 1; }
  .marquee-track, .orbs i, .mock-player { animation: none; }
  .cursor-dot, .cursor-ring { display: none; }
  body.brand-body, .brand-body a, .brand-body button { cursor: auto; }
}
