/* ==========================================================================
   Dragonsoft Research — site styles
   Brand teal sampled from the Dragonsoft mark (#008080 → #00C0C0).
   Sections: tokens · base · layout · header · buttons · hero · intro ·
   services · process · works · about · contact · footer · service pages ·
   lightbox · reveal · reduced motion
   ========================================================================== */

/* Fonts: see css/fonts.css (embedded so they also work from disk). */

/* ---------- Tokens ---------- */
:root {
  --bg: #05080a;
  --bg-2: #0a1013;
  --bg-3: #0e171a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hi: rgba(255, 255, 255, 0.06);
  --line: rgba(150, 220, 220, 0.14);
  --line-hi: rgba(150, 230, 228, 0.32);
  --text: #e9f2f2;
  --muted: #a3b6b8;
  --teal: #19c6c2;
  --teal-deep: #008080;
  --teal-ink: #021614;
  --glow: rgba(25, 198, 194, 0.35);

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1240px;
  --header-h: 72px;
  --section-y: clamp(4.5rem, 10vw, 8rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-width: 320px;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(25, 198, 194, .35); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--teal); color: var(--teal-ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 760px; }
.section-head--split {
  max-width: none; grid-template-columns: 1fr; align-items: end;
}
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.1fr 1fr; gap: 3rem; } }
.section-title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.section-lead { color: var(--muted); font-size: clamp(1rem, .95rem + .25vw, 1.12rem); margin: 0; max-width: 60ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0;
  font: 500 .78rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(5, 8, 10, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(5, 8, 10, 0.92); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.brand img { width: 120px; height: 38px; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-list a:hover { color: var(--text); background: var(--surface-hi); }
.nav-list a[aria-current="true"], .nav-list a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 8px 8px 2px 2px; }
.nav-cta { margin-left: .5rem; }
.nav-list a.btn { color: var(--_fg); padding: 0 1.1rem; box-shadow: none; border-radius: 999px; }
.nav-list a.btn--primary:hover { background: var(--_bg); color: var(--_fg); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  /* Without JavaScript the menu stays visible as a wrapped row, so nothing is unreachable. */
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: rgba(5, 8, 10, 0.97); border-bottom: 1px solid var(--line);
    padding: .75rem var(--gutter) 1.25rem;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .js .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .js .nav-list { flex-direction: column; align-items: stretch; }
  .js .nav-list a { font-size: 1.05rem; padding: 0 .75rem; }
  .js .nav-cta { margin: .5rem 0 0; }
  .js .nav-cta .btn { width: 100%; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-header { height: auto; position: static; }
  html:not(.js) .site-header .container { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent; --_fg: var(--text); --_bd: var(--line-hi);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px;
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  font: 700 .97rem/1 var(--font-body); text-decoration: none; letter-spacing: .01em; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn--primary { --_bg: var(--teal); --_fg: var(--teal-ink); --_bd: var(--teal); }
.btn--primary:hover { box-shadow: 0 8px 30px -8px var(--glow); transform: translateY(-1px); }
.btn--ghost:hover { --_bd: var(--teal); background: rgba(25, 198, 194, .08); }
.btn--sm { min-height: 44px; padding: 0 1.1rem; font-size: .9rem; }

.text-link {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
  color: var(--teal); font-weight: 700; text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link svg { width: 16px; height: 16px; }

/* ---------- Hero (Immersive Grid) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(680px, calc(100svh - var(--header-h)), 1000px);
  display: flex; flex-direction: column;
  /* Poster state: complete before (and without) the canvas scene. */
  background:
    radial-gradient(40% 30% at 50% 26%, rgba(0, 128, 128, .25), transparent 70%),
    var(--bg);
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero__canvas.is-ready { opacity: 1; }
/* Darkens the floor behind the centred copy so text stays readable over the grid. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 42% at 50% 66%, rgba(5, 8, 10, .88), rgba(5, 8, 10, .55) 55%, transparent 80%);
}
/* The top of the hero is left open so the room's back wall and the mark show above the copy. */
.hero__inner {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding-top: clamp(10rem, 27vh, 17rem); padding-bottom: 1.25rem; text-align: center;
}
.hero__content { max-width: 900px; display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow { margin-bottom: 1.25rem; }
.hero .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
.hero__inner > .hero__hint { align-self: flex-start; }
.hero__title {
  margin: 0 0 1.25rem;
  font: 700 clamp(2.15rem, 1.2rem + 3.6vw, 3.9rem)/1.04 var(--font-display);
  letter-spacing: -0.035em; text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--teal); }
.hero__lead { margin: 0 0 2rem; max-width: 58ch; color: var(--muted); font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero .hero__lead { margin-inline: auto; }
.hero .hero__actions { justify-content: center; }

.hero__hint {
  margin: 2rem 0 0; font: 500 .75rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: .6rem; min-height: 44px;
}
.hero__hint::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 var(--glow); animation: pulse 2.4s infinite;
}
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-desktop { display: none; } .hint-touch { display: inline; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.motion-toggle {
  position: absolute; z-index: 3; right: max(var(--gutter), 88px); bottom: 1.25rem;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .9rem;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(5, 8, 10, .6); color: var(--muted);
  font: 500 .75rem/1 var(--font-mono); cursor: pointer;
}
.motion-toggle:hover { color: var(--text); border-color: var(--line-hi); }
.motion-toggle[hidden] { display: none; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: block; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }

@media (max-width: 767px) {
  .hero { min-height: auto; }
  .hero__inner { padding-top: clamp(9rem, 44vw, 12rem); }
  .hero__title { font-size: clamp(2rem, 1.4rem + 3.4vw, 2.6rem); }
}
@media (max-width: 479px) {
  .hero .eyebrow { letter-spacing: .08em; }
  .hero .eyebrow::before, .hero .eyebrow::after { display: none; }
}
@media (max-width: 419px) { .hero__hint { visibility: hidden; } }

/* ---------- Intro ---------- */
.intro__grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .intro__grid { grid-template-columns: 1.35fr 1fr; gap: 4rem; align-items: start; } }
.intro__statement {
  font: 600 clamp(1.45rem, 1.05rem + 1.7vw, 2.35rem)/1.3 var(--font-display); letter-spacing: -0.02em; margin: 1.25rem 0 0;
  text-wrap: pretty;
}
.intro__statement strong { color: var(--teal); font-weight: 600; }
.intro__body { color: var(--muted); }
.intro__body p { margin-bottom: 1.5rem; }

.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.badges li {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .45rem .9rem;
  border-radius: 999px; background: #eef5f5; color: #1b2a2c; font-weight: 700; font-size: .85rem;
}
.badges img { width: auto; height: 18px; }
.badges .badge--msc img { height: 22px; }
.badges-label { font: 500 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }

.card__num { font: 500 .75rem/1 var(--font-mono); color: var(--teal); letter-spacing: .1em; }

/* ---------- Process (with the Optical Field surface behind it) ---------- */
.process {
  isolation: isolate; overflow: hidden;
  padding-bottom: clamp(9rem, 20vw, 16rem);
  /* Poster state for the field */
  background:
    radial-gradient(60% 40% at 70% 90%, rgba(0, 128, 128, .26), transparent 70%),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg) 35%, #04161a 75%, #03282a 100%);
}
.process__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.process__canvas.is-ready { opacity: 1; }
.process__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 25% 18%, rgba(5, 8, 10, .85), transparent 75%),
    linear-gradient(to bottom, rgba(5, 8, 10, .7), transparent 35%);
}
.process__inner { position: relative; }
/* Step cards sit over the moving field, so they get a solid-enough backing. */
.process .step { background: rgba(5, 8, 10, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.process__hint { margin-top: 2.5rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-hi), transparent); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-hi); color: var(--teal); font: 500 .8rem/1 var(--font-mono); margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 1100px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: calc(1.5rem + 22px); left: calc(1.5rem + 52px); right: -1rem; height: 1px;
    background: linear-gradient(90deg, var(--line-hi), transparent);
  }
}

/* ---------- Works ---------- */
.work-feature {
  display: grid; gap: 0; overflow: hidden; margin-bottom: 1.25rem;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
@media (min-width: 900px) { .work-feature { grid-template-columns: 1.25fr 1fr; } }
.work-feature__media { margin: 0; background: #000; aspect-ratio: 16 / 10; overflow: hidden; }
.work-feature__media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.work-feature__body { padding: clamp(1.5rem, 4vw, 2.75rem); display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.work-feature__body h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.work-feature__body p { margin: 0; color: var(--muted); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font: 500 .74rem/1 var(--font-mono); padding: .5rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; height: 100%; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: border-color .3s, transform .35s var(--ease); }
.gallery figure:hover, .gallery figure:focus-within { border-color: var(--line-hi); transform: translateY(-3px); }
.gallery__link { position: relative; display: block; aspect-ratio: 419 / 286; overflow: hidden; background: var(--bg-3); cursor: zoom-in; }
.gallery__link img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__link:hover img { transform: scale(1.04); }
.gallery__link::after {
  content: ""; position: absolute; right: .75rem; top: .75rem; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(5, 8, 10, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9f2f2' stroke-width='2'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 16px no-repeat;
  opacity: 0; transition: opacity .25s;
}
.gallery__link:hover::after, .gallery__link:focus-visible::after { opacity: 1; }
.gallery figcaption { padding: 1rem 1.15rem 1.2rem; display: grid; gap: .2rem; }
.gallery figcaption strong { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.gallery figcaption span { color: var(--muted); font-size: .9rem; }
.works-more { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; color: var(--muted); }
.works-more p { margin: 0; }

/* ---------- About (with Signal Sculpture) ---------- */
.about { overflow-x: clip; } /* clip (not hidden) keeps the sculpture sticky */
.about__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .about__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.about__text .section-title { margin: 1rem 0 1.25rem; }
.about-block .about__lead { margin-bottom: 0; }
.about__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--text); }
.values { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .75rem; }
.values li { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.values svg { width: 22px; height: 22px; color: var(--teal); grid-row: span 2; margin-top: .15rem; }
.values strong { font-family: var(--font-display); font-weight: 600; }
.values span { color: var(--muted); font-size: .95rem; }

.sculpture {
  position: relative; isolation: isolate; margin: 0 auto; width: 100%; max-width: 560px; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 128, 128, .22), transparent 75%);
}
.sculpture__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
.sculpture__canvas.is-ready { opacity: 1; }
.sculpture__poster { position: absolute; left: 50%; top: 50%; width: 38%; transform: translate(-50%, -52%); opacity: .9; transition: opacity .8s; }
.sculpture__canvas.is-ready + .sculpture__poster { opacity: 0; }
/* The sculpture's toggle sits bottom-left so it never meets the floating WhatsApp button. */
.sculpture .motion-toggle { right: auto; left: 0; bottom: 0; }

/* ---------- Contact (full screen) ---------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(55% 60% at 88% 20%, rgba(0, 128, 128, .22), transparent 70%),
    radial-gradient(40% 50% at 5% 100%, rgba(25, 198, 194, .08), transparent 70%),
    var(--bg-2);
}
/* Oversized brand mark as a quiet backdrop */
.contact::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -4vw; top: 50%; transform: translateY(-50%);
  width: clamp(260px, 42vw, 640px); aspect-ratio: 222 / 244;
  background: url("../assets/images/brand/dragonsoft-mark.svg") center / contain no-repeat;
  opacity: .08;
}
.contact__inner { display: grid; gap: clamp(2.5rem, 6vh, 4.5rem); }
.contact__head { max-width: 820px; }
.contact__title {
  margin: 1.25rem 0 1.25rem;
  font: 700 clamp(2.8rem, 1.4rem + 6.4vw, 7rem)/0.98 var(--font-display); letter-spacing: -0.045em;
}
.contact-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .contact-list { grid-template-columns: repeat(2, 1fr); }
  /* A last card left alone on its row spans the full width */
  .contact-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.contact-list li { display: flex; }
.contact-item {
  flex: 1; display: grid; grid-template-columns: 52px 1fr; gap: .15rem 1rem; align-items: center; align-content: center;
  padding: 1.25rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(5, 8, 10, .55);
  text-decoration: none; transition: border-color .25s, background .25s, transform .3s var(--ease);
}
a.contact-item:hover { border-color: var(--line-hi); background: var(--surface-hi); transform: translateY(-3px); }
.contact-item__icon { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(25, 198, 194, .1); color: var(--teal); }
.contact-item__icon svg { width: 24px; height: 24px; }
.contact-item__label { font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-item__value { font-weight: 700; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); overflow-wrap: break-word; min-width: 0; }
.contact__social { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.contact__social .badges-label { margin: 0; }

.social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.social-list a {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s, background .2s;
}
.social-list a:hover { color: var(--teal); border-color: var(--teal); background: rgba(25, 198, 194, .08); }
.social-list svg { width: 18px; height: 18px; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed; z-index: 45;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .55), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 34px -8px rgba(37, 211, 102, .7); }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 50%; }
/* Label slides out on hover/focus for pointer users */
.wa-float__label {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; padding: .5rem .8rem; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line-hi); color: var(--text);
  font: 700 .85rem/1 var(--font-body);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
@media (hover: hover) {
  .wa-float:hover .wa-float__label, .wa-float:focus-visible .wa-float__label { opacity: 1; transform: translate(0, -50%); }
}
@media print { .wa-float { display: none; } }

/* ---------- About: who we are / what we do ---------- */
.about .intro__grid { margin-bottom: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.about__grid { align-items: start; }
.about__text { display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.about-block__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 1rem 0 1.5rem; letter-spacing: -0.025em; }
.about__visual { position: relative; }
@media (min-width: 960px) { .about__visual { position: sticky; top: calc(var(--header-h) + 2rem); } }
/* Phones: show the sculpture between "Who we are" and "What we do" so the pillar link is visible */
@media (max-width: 959px) {
  .about__text { display: contents; }
  .about__grid > .about__text > .about-block:first-child { order: 1; }
  .about__visual { order: 2; }
  .about__grid > .about__text > .about-block:last-child { order: 3; }
  .about__grid { display: flex; flex-direction: column; align-items: stretch; gap: clamp(2.5rem, 6vw, 3.5rem); }
  .sculpture { max-width: 420px; }
}
.about__caption { margin: 1rem auto 0; max-width: 34ch; text-align: center; color: var(--muted); font: 500 .75rem/1.5 var(--font-mono); letter-spacing: .06em; }

.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 600px) { .pillars { grid-template-columns: 1fr 1fr; } }
.pillars li {
  position: relative; display: grid; gap: .35rem; padding: 1.2rem 1.25rem 1.3rem; cursor: default;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .35s, background .35s, transform .35s var(--ease), box-shadow .35s;
}
.pillars li strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.pillars li > span:last-child { color: var(--muted); font-size: .94rem; }
.pillars__num { font: 500 .72rem/1 var(--font-mono); color: var(--teal); letter-spacing: .1em; }
.pillars li.is-active { border-color: var(--teal); background: rgba(25, 198, 194, .08); box-shadow: 0 0 0 1px rgba(25, 198, 194, .25), 0 12px 30px -16px var(--glow); }
.pillars li.is-active .pillars__num::after { content: " ●"; }

/* ---------- Services explorer ---------- */
.explorer { border-radius: var(--radius); border: 1px solid var(--line); background: rgba(5, 8, 10, .45); overflow: clip; } /* clip keeps the stage sticky */
.explorer__tabs {
  display: flex; flex-wrap: wrap; gap: .4rem; padding: .6rem; border-bottom: 1px solid var(--line);
}
.explorer__tab {
  flex: none; display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: 0 1.1rem;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font: 700 .95rem/1 var(--font-body); cursor: pointer; transition: color .2s, background .2s, border-color .2s;
}
.explorer__tab span { font: 500 .72rem/1 var(--font-mono); color: var(--teal); opacity: .8; }
.explorer__tab:hover { color: var(--text); background: var(--surface-hi); }
.explorer__tab[aria-selected="true"] { color: var(--teal-ink); background: var(--teal); }
.explorer__tab[aria-selected="true"] span { color: var(--teal-ink); }
.explorer__body { display: grid; }
@media (min-width: 900px) { .explorer__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.explorer__stage {
  position: relative; isolation: isolate; height: clamp(260px, 72vw, 380px);
  background: radial-gradient(closest-side, rgba(0, 128, 128, .18), transparent 80%);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .explorer__body { align-items: start; }
  .explorer__stage { aspect-ratio: auto; min-height: 0; height: min(560px, calc(100vh - var(--header-h) - 2rem)); position: sticky; top: calc(var(--header-h) + 1rem); border-bottom: 0; }
  .explorer__panels { border-left: 1px solid var(--line); min-height: min(560px, calc(100vh - var(--header-h) - 2rem)); }
}
.explorer__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s var(--ease); }
.explorer__canvas.is-ready { opacity: 1; }
.explorer__stage .motion-toggle { top: 1rem; right: 1rem; bottom: auto; left: auto; }
.explorer__panel { padding: clamp(1.5rem, 4vw, 2.75rem); display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.explorer__panel[hidden] { display: none; }
.explorer__panel:focus-visible { outline-offset: -4px; }
.explorer__panel h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); letter-spacing: -0.025em; }
.explorer__panel p { margin: 0; color: var(--muted); }
.explorer__panel .explorer__lead { color: var(--text); font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); }
.explorer__related { font-size: .92rem; }
.explorer__related a { color: var(--teal); text-underline-offset: 3px; }
/* Without JavaScript: no tabs, every panel shown */
html:not(.js) .explorer__tabs { display: none; }
html:not(.js) .explorer__panel + .explorer__panel { border-top: 1px solid var(--line); }

/* ---------- Works: filters, case studies, photos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filter {
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line-hi);
  background: transparent; color: var(--muted); font: 700 .9rem/1 var(--font-body); cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.filter:hover { color: var(--text); border-color: var(--teal); }
.filter[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
html:not(.js) .filters { display: none; }
.work-feature[hidden], .work-card[hidden], .works-grid[hidden], .works-subhead[hidden] { display: none; }

.works-subhead { margin: 2.5rem 0 1rem; font: 500 .78rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.works-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .works-grid { grid-template-columns: repeat(3, 1fr); } }
.works-empty { color: var(--muted); padding: 2rem 0; }

.work-card--case article {
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .3s, transform .35s var(--ease), background .3s;
}
.work-card--case article:hover, .work-card--case article:focus-within { border-color: var(--line-hi); transform: translateY(-3px); background: var(--surface-hi); }
.work-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.work-card--case article:hover .work-card__media img { transform: scale(1.04); }
.work-card__play {
  position: absolute; left: 1rem; bottom: 1rem; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(5, 8, 10, .75); color: #fff; border: 1px solid rgba(255, 255, 255, .25);
}
.work-card__play svg { width: 18px; height: 18px; margin-left: 2px; }
.work-card__body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.work-card__client { margin: 0; font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.work-card__body h3 { font-size: 1.15rem; line-height: 1.25; }
.work-card__body > p:not(.work-card__client) { margin: 0; color: var(--muted); font-size: .94rem; }
.work-card__tags { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.work-card__tags li { font: 500 .7rem/1 var(--font-mono); padding: .4rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.work-card__open {
  margin-top: auto; padding: .6rem 0 0; align-self: flex-start; min-height: 44px;
  background: none; border: 0; color: var(--teal); font: 700 .92rem/1 var(--font-body); cursor: pointer;
}
.work-card__open::after { content: ""; position: absolute; inset: 0; } /* whole card opens the case */
.work-card__open { text-decoration: none; }
.work-card__open:focus-visible { outline: none; }
.work-card--case article:has(.work-card__open:focus-visible) { outline: 2px solid var(--teal); outline-offset: 3px; }
.js .case__more { display: none; }
html:not(.js) .work-card__open { display: none; }
html:not(.js) .case__more { display: grid; gap: .75rem; margin-top: .75rem; }
.work-card__tags-inline { font: 500 .7rem/1.4 var(--font-mono); color: var(--teal); letter-spacing: .06em; margin-top: .2rem; }

/* Case-study dialog */
.case-dialog {
  width: min(880px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0;
  border: 1px solid var(--line-hi); border-radius: var(--radius); background: var(--bg-2); color: var(--text);
}
.case-dialog::backdrop { background: rgba(2, 4, 5, .88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.case-dialog__inner { position: relative; padding: clamp(1.25rem, 4vw, 2.25rem); display: grid; gap: .9rem; }
.case-dialog h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); padding-right: 3rem; }
.case-dialog__close { position: absolute; top: 1rem; right: 1rem; }
.case-dialog__content { display: grid; gap: 1rem; margin-top: .5rem; }
.case-dialog__content p { margin: 0; color: var(--muted); }
.video-facade, .video-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; border: 0; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s; }
.video-facade:hover img { opacity: 1; }
.video-facade__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .6rem; min-height: 52px; padding: 0 1.3rem 0 1rem;
  border-radius: 999px; background: var(--teal); color: var(--teal-ink); font: 700 1rem/1 var(--font-body);
  box-shadow: 0 10px 30px -8px var(--glow);
}
.video-facade__btn svg { width: 22px; height: 22px; }

/* ---------- Testimonials ---------- */
.testimonials { isolation: isolate; overflow: hidden; background: radial-gradient(60% 60% at 50% 0%, rgba(0, 128, 128, .14), transparent 70%), var(--bg); }
.testimonials__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1.2s var(--ease); }
.testimonials__canvas.is-ready { opacity: 1; }
.quotes { display: grid; gap: 1rem; }
@media (min-width: 900px) { .quotes { grid-template-columns: 1fr 1fr; } .quote--feature { grid-column: 1 / -1; } }
.quote {
  margin: 0; padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1.25rem;
  border-radius: var(--radius); border: 1px solid var(--line); background: rgba(5, 8, 10, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); line-height: 1.6; }
.quote--feature blockquote p { font: 600 clamp(1.2rem, 1rem + .9vw, 1.7rem)/1.4 var(--font-display); letter-spacing: -0.015em; }
.js .quote__more { display: none; }
.js .quote.is-expanded .quote__more { display: inline; }
html:not(.js) .quote__toggle { display: none; }
.quote__toggle { align-self: flex-start; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 700; }
.quote figcaption { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; color: var(--muted); font-size: .9rem; }
.quote cite { font-style: normal; font-weight: 700; color: var(--text); font-size: 1rem; }
.quote__mark {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(25, 198, 194, .12); color: var(--teal); font: 700 .78rem/1 var(--font-mono);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: clamp(3rem, 6vw, 4.5rem) 0 calc(2rem + 72px); color: var(--muted); font-size: .95rem; }
.footer__grid { display: grid; gap: 2rem; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1.3fr; } }
.footer__brand img { width: 120px; height: 38px; margin-bottom: 1rem; }
.footer__brand p { max-width: 36ch; }
.footer__title { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin: 0 0 1rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.footer__links a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.footer__links a:hover { color: var(--teal); }
.footer__contact { font-style: normal; display: grid; gap: .1rem; }
.footer__contact a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; }
.footer__contact a:hover { color: var(--teal); }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: .85rem; }
.footer__bottom p { margin: 0; }

/* ---------- Service pages ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(45% 70% at 85% 30%, rgba(0, 128, 128, .25), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: ""; position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); top: 50%;
  width: clamp(120px, 22vw, 260px); aspect-ratio: 222 / 244; transform: translateY(-50%);
  background: url("../assets/images/brand/dragonsoft-mark.svg") center / contain no-repeat; opacity: .16;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
@media (max-width: 899px) { .page-hero::after { display: none; } }
.breadcrumb ol { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font: 500 .78rem/1.4 var(--font-mono); color: var(--muted); }
.breadcrumb li { display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.breadcrumb a { text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.breadcrumb a:hover { color: var(--teal); }
.page-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); line-height: 1.05; letter-spacing: -0.035em; max-width: 16ch; margin: 1rem 0 1.25rem; text-wrap: balance; }
.page-hero__lead { color: var(--muted); max-width: 60ch; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); margin-bottom: 2rem; }

.service-detail { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .service-detail { grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: start; } }
.prose { font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); }
.prose p { margin-bottom: 1.25rem; }
.prose h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); margin: 0 0 1rem; }
.aside-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 1.25rem; }
.aside-card h2 { font-size: 1.1rem; }
.aside-card .tags li { color: var(--text); }

.cta-band { margin-top: var(--section-y); padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius); border: 1px solid var(--line-hi); background: radial-gradient(70% 120% at 100% 0%, rgba(0, 128, 128, .3), transparent 70%), var(--bg-3); display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); }
.cta-band p { color: var(--muted); margin: .5rem 0 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.other-services { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 700px) { .other-services { grid-template-columns: repeat(3, 1fr); } }
.other-services a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 1rem 1.2rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 700;
  transition: border-color .25s, background .25s;
}
.other-services a:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.other-services svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

/* Redirect stubs for legacy URLs */
.redirect { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.redirect img { margin: 0 auto 1.5rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(960px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--line-hi);
  border-radius: var(--radius); background: var(--bg-2); color: var(--text); overflow: hidden;
}
.lightbox::backdrop { background: rgba(2, 4, 5, .88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox__figure { margin: 0; display: grid; }
.lightbox__img { width: 100%; max-height: calc(100vh - 10rem); object-fit: contain; background: #000; }
.lightbox__caption { padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: center; }
.lightbox__caption strong { font-family: var(--font-display); font-weight: 600; }
.lightbox__caption span { color: var(--muted); }
.lightbox__count { font: 500 .78rem/1 var(--font-mono); color: var(--muted); }
.lightbox__controls { position: absolute; inset: .75rem .75rem auto auto; display: flex; gap: .5rem; }
.lightbox__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-hi); background: rgba(5, 8, 10, .75); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.lightbox__btn:hover { border-color: var(--teal); color: var(--teal); }
.lightbox__btn svg { width: 20px; height: 20px; }

/* ---------- Scroll reveal (only once main.js confirms it can run) ---------- */
.reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}
