/* ==========================================================================
   C Six Solutions — Global styles (complements Tailwind utilities)
   Sobha-inspired: elegant serif headings, light sans body, gold on black.
   Colours are RGB triplets so Tailwind can apply opacity (see tw-config.js).
   ========================================================================== */

/* ---- Theme tokens ------------------------------------------------------ */
:root,
.force-dark,
[data-theme="light"] #siteHeader:not(.is-scrolled):not(.menu-open) {
  --c-bg: 0 0 0;
  --c-bg-2: 8 8 8;
  --c-card: 12 12 12;
  --c-bg-3: 17 17 17;
  --c-bg-4: 24 24 24;
  --c-bg-5: 34 34 34;
  --c-bg-6: 51 51 51;
  --c-fg: 255 255 255;
  --c-fg-2: 245 242 236;
  --c-fg-3: 230 225 216;
  --c-gold-100: 246 238 219;
  --c-gold-200: 235 221 184;
  --c-gold-300: 220 196 142;
  --c-gold-400: 201 169 97;
  color: rgb(var(--c-fg));
}
:root { color-scheme: dark; }

[data-theme="light"] {
  --c-bg: 250 247 241;
  --c-bg-2: 243 237 226;
  --c-card: 255 255 255;
  --c-bg-3: 236 229 216;
  --c-bg-4: 226 218 203;
  --c-bg-5: 212 203 186;
  --c-bg-6: 190 180 160;
  --c-fg: 28 25 20;
  --c-fg-2: 45 40 33;
  --c-fg-3: 70 63 53;
  --c-gold-100: 92 72 26;
  --c-gold-200: 110 86 30;
  --c-gold-300: 128 99 34;
  --c-gold-400: 145 113 40;
  color-scheme: light;
}

:root {
  --gold: #AD8C3A;
  --gold-dark: #9A7729;
  --ease-luxe: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Base -------------------------------------------------------------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: rgb(var(--c-bg));
  color: rgb(var(--c-fg));
  font-family: Jost, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .4s, color .4s;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--gold); color: #fff; }

.ico { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---- Typography -------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .85rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  color: rgb(var(--c-gold-300));
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--gold); }
.eyebrow.no-line::before { display: none; }
.text-gold-gradient { color: rgb(var(--c-gold-300)); font-style: normal; }
.display { font-family: "Playfair Display", Georgia, serif; font-weight: 400; line-height: 1.12; letter-spacing: -.005em; }
h1.display { line-height: 1.06; }
.sec-num { font-family: "Playfair Display", Georgia, serif; font-size: 1.05rem; color: rgb(var(--c-gold-400)); letter-spacing: .08em; }
.font-serif, .display, .sec-num, .eyebrow { font-variant-numeric: lining-nums; }

/* ---- Buttons & links --------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 2rem; border-radius: 0; font-size: 1rem; font-weight: 500;
  letter-spacing: .02em; white-space: nowrap;
  transition: background-color .35s, color .35s, border-color .35s;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-gold { color: #fff; background: var(--gold); border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-ghost { color: rgb(var(--c-fg)); border: 1px solid rgb(var(--c-fg) / .55); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); background: var(--gold); color: #fff; }
.btn-sm { padding: .75rem 1.5rem; font-size: 1rem; }
.btn[disabled] { opacity: .7; pointer-events: none; }
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem; font-size: 1rem; font-weight: 500;
  color: rgb(var(--c-gold-300)); border-bottom: 1px solid rgba(173,140,58,.5); padding-bottom: 2px;
  transition: color .3s, border-color .3s;
}
.link-arrow:hover { color: rgb(var(--c-fg)); border-color: rgb(var(--c-fg)); }
.link-arrow .ico { transition: transform .5s var(--ease-luxe); }
.link-arrow:hover .ico, .group:hover .link-arrow .ico { transform: translateX(5px); }

/* ---- Header ------------------------------------------------------------ */
#siteHeader .header-shell { transition: background-color .5s, border-color .5s, height .5s var(--ease-luxe); }
#siteHeader.is-scrolled .header-shell,
#siteHeader.menu-open .header-shell { background-color: rgb(var(--c-bg) / .9); border-color: rgba(173,140,58,.2); height: 5rem; }
.nav-link { position: relative; padding: .5rem 0; font-size: 1rem; font-weight: 400; letter-spacing: .03em; color: rgb(var(--c-fg) / .85); transition: color .3s; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-luxe); }
.nav-link:hover, .nav-link[aria-current="page"] { color: rgb(var(--c-fg)); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.logo-mark { height: 84px; width: auto; transition: height .5s var(--ease-luxe); }
#siteHeader.is-scrolled .logo-mark { height: 72px; }

.theme-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgb(var(--c-fg) / .3); color: rgb(var(--c-fg)); transition: border-color .3s, color .3s; }
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }

#mobileMenu { transition: opacity .5s var(--ease-luxe), visibility .5s; }
#mobileMenu:not(.is-open) { opacity: 0; visibility: hidden; pointer-events: none; }
#mobileMenu .m-link { transform: translateY(18px); opacity: 0; transition: transform .7s var(--ease-luxe), opacity .7s var(--ease-luxe); }
#mobileMenu.is-open .m-link { transform: none; opacity: 1; }
.burger i { display: block; height: 1px; width: 22px; background: currentColor; transition: transform .45s var(--ease-luxe), opacity .3s; }
.burger i + i { margin-top: 6px; }
.burger.is-active i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active i:nth-child(2) { opacity: 0; }
.burger.is-active i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Heroes ------------------------------------------------------------ */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 35%, rgba(0,0,0,.45) 65%, rgba(0,0,0,.92) 100%); }
.scroll-cue { width: 1px; height: 48px; background: linear-gradient(to bottom, rgba(173,140,58,0), rgba(173,140,58,1)); position: relative; overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cue 2.4s var(--ease-luxe) infinite; }
@keyframes cue { to { top: 110%; } }

.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: inline-block; transform: translateY(105%); animation: rise 1.4s var(--ease-luxe) forwards; }
.hero-line:nth-child(2) > span { animation-delay: .15s; }
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 1.2s var(--ease-luxe) forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: slowZoom 14s var(--ease-luxe) forwards; }
@keyframes slowZoom { to { transform: scale(1); } }

/* ---- Scroll reveal ----------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1.1s var(--ease-luxe), transform 1.1s var(--ease-luxe); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(10% 0 10% 0); transition: clip-path 1.4s var(--ease-luxe); }
.js .reveal-img.is-visible { clip-path: inset(0 0 0 0); }

/* ---- Boxes & imagery --------------------------------------------------- */
.card-lux {
  position: relative; border: 1px solid rgba(173,140,58,.32); background: rgb(var(--c-card));
  transition: border-color .5s var(--ease-luxe), transform .5s var(--ease-luxe), box-shadow .5s;
}
.card-lux:hover { border-color: var(--gold); transform: translateY(-4px); }
[data-theme="light"] .card-lux { box-shadow: 0 1px 2px rgba(60,45,10,.04); }
[data-theme="light"] .card-lux:hover { box-shadow: 0 18px 40px -18px rgba(60,45,10,.25); }
.img-zoom img { transition: transform 1.6s var(--ease-luxe); }
.img-zoom:hover img, .group:hover .img-zoom img { transform: scale(1.05); }
.icon-badge { display: grid; place-items: center; flex-shrink: 0; width: 3.25rem; height: 3.25rem; border-radius: 50%; color: rgb(var(--c-gold-300)); border: 1px solid rgba(173,140,58,.55); }
.frame-gold { position: relative; }
.frame-gold::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(220,196,142,.45); pointer-events: none; z-index: 2; }
.gold-rule { width: 56px; height: 1px; background: var(--gold); }

/* Intro feature rows */
.feature-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border: 1px solid rgba(173,140,58,.25); background: rgb(var(--c-card)); transition: border-color .4s; }
.feature-row:hover { border-color: var(--gold); }

/* Discipline showcase (home) */
.showcase-tab { display: flex; width: 100%; align-items: baseline; gap: 1rem; padding: .85rem 1.1rem; text-align: left; white-space: nowrap; border: 1px solid rgb(var(--c-fg) / .12); color: rgb(var(--c-fg) / .7); transition: color .35s, border-color .35s, background-color .35s; }
.showcase-name { font-family: "Playfair Display", Georgia, serif; font-size: 1.15rem; }
.showcase-tab:hover { color: rgb(var(--c-fg)); border-color: rgba(173,140,58,.6); }
.showcase-tab.is-active { color: rgb(var(--c-fg)); border-color: var(--gold); background: rgba(173,140,58,.1); }
@media (min-width: 1024px) {
  .showcase-tab { border: 0; border-bottom: 1px solid rgb(var(--c-fg) / .12); padding: 1.05rem .25rem; }
  .showcase-name { font-size: 1.5rem; }
  .showcase-tab.is-active { background: transparent; border-color: var(--gold); padding-left: 1rem; }
  .showcase-tab { transition: color .35s, border-color .35s, padding .45s var(--ease-luxe); }
}
.showcase-list { scrollbar-width: none; }
.showcase-list::-webkit-scrollbar { display: none; }
.showcase-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease-luxe), visibility .8s; }
.showcase-slide.is-active { opacity: 1; visibility: visible; }
.showcase-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s linear; }
.showcase-slide.is-active > img { transform: scale(1); }

/* Process timeline */
@media (min-width: 768px) {
  .timeline::before { content: ""; position: absolute; top: 2rem; left: 12.5%; right: 12.5%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 12%, var(--gold) 88%, transparent); }
}
.timeline-dot { position: relative; display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto; border-radius: 50%; border: 1px solid var(--gold); background: rgb(var(--c-bg-2)); font-family: "Playfair Display", Georgia, serif; font-size: 1.25rem; color: rgb(var(--c-gold-300)); font-variant-numeric: lining-nums; transition: background-color .4s, color .4s; }
.timeline li:hover .timeline-dot { background: var(--gold); color: #fff; }

/* Expanding industry panels (home) */
.ind-panel { position: relative; display: block; overflow: hidden; min-height: 15rem; border: 1px solid rgba(173,140,58,.3); transition: flex .8s var(--ease-luxe), border-color .4s; }
.ind-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-luxe); }
.ind-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.92), rgba(0,0,0,.35) 55%, rgba(0,0,0,.15)); }
.ind-body { position: absolute; inset: auto 0 0 0; padding: 1.75rem; display: flex; flex-direction: column; gap: .35rem; }
.ind-title { font-family: "Playfair Display", Georgia, serif; font-size: 1.75rem; line-height: 1.15; color: #fff; }
.ind-text { max-width: 26rem; color: rgba(255,255,255,.88); font-size: 1.05rem; }
.ind-panel:hover > img { transform: scale(1.05); }
@media (min-width: 1024px) {
  .ind-panel { flex: 1 1 0; min-height: 0; }
  .ind-panel.is-open { flex: 3.2 1 0; border-color: var(--gold); }
  .ind-text { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--ease-luxe); }
  .ind-panel.is-open .ind-text { opacity: 1; transform: none; transition-delay: .25s; }
  .ind-panel:not(.is-open) .ind-title { font-size: 1.35rem; }
}

/* ---- Filters / pills --------------------------------------------------- */
.pill { padding: .6rem 1.2rem; border: 1px solid rgb(var(--c-fg) / .18); font-size: 1rem; color: rgb(var(--c-fg) / .8); transition: all .35s var(--ease-luxe); }
.pill:hover { border-color: rgba(173,140,58,.7); color: rgb(var(--c-fg)); }
.pill.is-active, .subnav a.is-active { background: var(--gold); border-color: var(--gold); color: #fff; }
.subnav > div { scrollbar-width: none; }
.subnav > div::-webkit-scrollbar { display: none; }

.project-card { transition: opacity .5s var(--ease-luxe), transform .5s var(--ease-luxe); }
.project-card.is-hidden { display: none; }
.project-card.is-entering { opacity: 0; transform: translateY(20px) scale(.98); }

/* ---- Forms ------------------------------------------------------------- */
.field-label { display: block; margin-bottom: .25rem; font-size: .95rem; color: rgb(var(--c-fg) / .75); }
.field {
  width: 100%; padding: .7rem 0; font-size: 1rem; color: rgb(var(--c-fg));
  background: transparent; border: 0; border-bottom: 1px solid rgb(var(--c-fg) / .28); border-radius: 0;
  transition: border-color .3s, box-shadow .3s;
}
.field::placeholder { color: rgb(var(--c-fg) / .38); }
.field:focus { outline: none; border-bottom-color: var(--gold); box-shadow: 0 1px 0 0 var(--gold); }
.field.is-invalid { border-bottom-color: #d0604e; box-shadow: 0 1px 0 0 #d0604e; }
select.field { appearance: none; -webkit-appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23AD8C3A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .25rem center; }
select.field option { background: rgb(var(--c-card)); color: rgb(var(--c-fg)); }
textarea.field { resize: vertical; min-height: 96px; border: 1px solid rgb(var(--c-fg) / .22); padding: .8rem 1rem; }
textarea.field:focus { border-color: var(--gold); box-shadow: none; }
.field-error { margin-top: .4rem; font-size: .9rem; color: #d0604e; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Modals & panels --------------------------------------------------- */
.modal { transition: opacity .45s var(--ease-luxe), visibility .45s; }
.modal:not(.is-open) { opacity: 0; visibility: hidden; pointer-events: none; }
.modal .modal-panel { transform: translateY(24px) scale(.97); transition: transform .6s var(--ease-luxe); }
.modal.is-open .modal-panel { transform: none; }
.modal-panel-tech { background: rgb(var(--c-card)); border: 1px solid rgba(173,140,58,.35); box-shadow: 0 40px 120px -30px rgba(0,0,0,.5); }

.success-ring { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(173,140,58,.5); animation: pop .8s var(--ease-luxe); }
.success-ring svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .8s .3s var(--ease-luxe) forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Misc -------------------------------------------------------------- */
.faq summary { list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq .faq-icon { transition: transform .5s var(--ease-luxe); }
.faq[open] .faq-icon { transform: rotate(45deg); }

.fab { box-shadow: 0 12px 30px -8px rgba(0,0,0,.45); transition: transform .4s var(--ease-luxe); }
.fab:hover { transform: translateY(-3px) scale(1.04); }
.pulse-dot { position: relative; }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.toast { transition: opacity .4s, transform .4s var(--ease-luxe); }
.toast:not(.is-show) { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }

[data-theme="light"] .map-frame { filter: grayscale(.25) !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-img { clip-path: none; }
  .hero-line > span, .fade-up { transform: none; opacity: 1; }
}
