/* ==========================================================================
   COMPONENTS: buttons, header, tabs, work cards, dialog, forms, ticks, FAQ
   ========================================================================== */

/* ---------- Icons ---------- */
.ico { font-size: 1.15em; flex: none; }
.chip { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--cobalt-tint); color: var(--cobalt); font-size: 1.2rem; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); box-shadow: 0 14px 28px -14px rgba(27, 184, 27, 0.8); transform: translateY(-2px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-light { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--marigold); color: var(--ink); }
.btn-gold:hover { color:#fff; box-shadow: 0 14px 28px -14px rgba(0,0,0,.45); transform: translateY(-2px); }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--cobalt); border-color: #fff; transform: translateY(-2px); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Light sweep on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%);
}
@media (hover: hover) { .btn:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); } }

.text-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--cobalt); transition: color .2s, text-underline-offset .2s; }
.text-link:hover { color: var(--cobalt); text-underline-offset: 8px; }

/* ---------- Header ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--cobalt); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(18, 22, 51, 0.123); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); transition: border-color .3s, box-shadow .3s, background-color .3s; }
.site-header.scrolled { border-bottom-color: var(--mist); box-shadow: 0 10px 30px -22px rgba(18,22,51,.5); }
.bar { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); transition: min-height .3s var(--ease); }
.site-header.scrolled .bar { min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; margin-right: auto; }
.brand-mark { width: 50px;  transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }

.nav { display: flex; gap: 4px; }
.nav a { position: relative; text-decoration: none; font-weight: 500; color: var(--ink-soft); padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--cobalt); }
.nav a.active { color: var(--cobalt); background: var(--cobalt-tint); }
.nav-cta { display: none; align-items: center; gap: 10px; font-weight: 600; }

.head-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; cursor: pointer; place-items: center; font-size: 1.15rem; text-decoration: none; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--ink); color: #fff; }
.icon-btn.wa { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.icon-btn.wa:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.menu-btn .fa-xmark { display: none; }
.menu-btn[aria-expanded="true"] .fa-bars { display: none; }
.menu-btn[aria-expanded="true"] .fa-xmark { display: inline-block; }

/* ---------- Work tabs ---------- */
.tabs { display: none; position: relative; gap: 4px; padding: 6px; background: var(--white); border: 1px solid var(--mist); border-radius: 999px; margin-bottom: 28px; max-width: 100%; }
.js .tabs { display: inline-flex; }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 0; background: none; border-radius: 999px; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; transition: color .3s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: #fff; }
.tab .short { display: none; }
.tab-ink { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; background: var(--cobalt); box-shadow: 0 10px 20px -10px rgba(40, 184, 27, 0.8); transition: transform .5s var(--ease-in-out), width .5s var(--ease-in-out); }

.panel-title { font-size: 1.5rem; margin: 40px 0 16px; }
.panel-title:first-child { margin-top: 0; }
.js .panel-title { display: none; }

/* ---------- Work cards ---------- */
.work { position: relative; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; background: var(--bg-3); text-align: left; display: block; isolation: isolate; transition: border-color var(--transition), box-shadow var(--transition); }
.work img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.work-cap { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; background-color: var(--ink); color: var(--mist); padding: 12px 16px; border-radius: var(--radius); max-width: calc(100% - 28px); font-size: .9375rem; line-height: 1.3; transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform .5s var(--ease); }
.work-cap strong { color: var(--white); font-family: var(--font-display, var(--font-body)); font-size: 1.125rem; letter-spacing: -0.01em; transition: color var(--transition); }
.work-badge { position: absolute; left: 14px; top: 14px; background-color: #fff; color: var(--gold-light); font-size: .8125rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.work-open { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--cobalt); color: var(--on-gold); display: grid; place-items: center; font-size: 1rem; opacity: 0; transform: scale(.7); transition: opacity var(--transition), transform .4s var(--ease); }
@media (hover: hover) {
  .work:hover { border-color: var(--gold); box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--gold) 70%, transparent); }
  .work:hover img { transform: scale(1.07); }
  .work:hover .work-cap { background: var(--cobalt); color: var(--on-gold); transform: translateY(-4px); transition: background-color .5s var(--ease), color .5s var(--ease), transform .5s var(--ease);}
  .work:hover .work-cap strong { color: var(--on-gold); }
  .work:hover .work-open { opacity: 1; transform: none; }
}
.work:focus-visible .work-open { opacity: 1; transform: none; }


/* ---------- Ticks ---------- */
.ticks { margin: 0 0 28px; flex: 1; }
.ticks li { position: relative; padding: 8px 0 8px 32px; line-height: 1.4; }
.ticks li::before { content: "\f00c"; font-family: "Font Awesome 7 Free"; font-weight: 900; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; display: grid; place-items: center; font-size: .8rem; color: var(--ink); background: var(--marigold); border-radius: 50%; }
.dark-ticks li::before { background: var(--cobalt); color: #fff; }
.dark-ticks { margin-bottom: 14px; }

/* ---------- Project dialog ---------- */
.case { border: 1px solid var(--border-strong); padding: 0; border-radius: var(--radius-lg); width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--bg-2); color: var(--white); overscroll-behavior: contain; box-shadow: 0 40px 100px -30px #000; }
.case { font-size: 15px; }
.case::backdrop { background: rgba(3, 5, 10, .82); backdrop-filter: blur(4px); }
.case[open] { animation: caseIn .35s var(--ease); }
.case.closing { animation: caseOut .22s ease-in forwards; }
.case-media { position: relative; background: #000; line-height: 0; }
.case-media img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.case-media video, .case-media iframe { display: block; width: 100%; aspect-ratio: var(--ratio, 16 / 9); max-height: 72dvh; background: #000; border: 0; object-fit: contain; }
.case-close { position: absolute; z-index: 5; top: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--white); display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; backdrop-filter: blur(8px); transition: transform .3s var(--ease), background-color var(--transition), color var(--transition); }
.case-close:hover { transform: rotate(90deg); background: var(--gold); color: var(--on-gold); }
.case-body { padding: clamp(22px, 4vw, 40px); }
.case-meta { margin: 0 0 8px; color: var(--gold-light); font-weight: 200; }
.case h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.case-body > p { color: var(--text-soft); }
.case h4 { font-size: 1.125rem; margin: 22px 0 6px; }
.case-stack { color: var(--muted); margin: 0 0 24px; }
/* ---------- Form fields ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field select, .field textarea { font: inherit; width: 100%; padding: 13px 14px; border: 2px solid var(--mist); border-radius: 12px; background: var(--paper); color: var(--ink); min-height: 50px; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); background: #fff; box-shadow: 0 0 0 4px rgba(43,53,245,.14); }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--mist); overflow: hidden; }
.faq details:last-child { border-bottom: 1px solid var(--mist); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 56px 22px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; position: relative; transition: color .2s; }
.faq summary:hover { color: var(--cobalt); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\f078"; font-family: "Font Awesome 7 Free"; font-weight: 900; font-size: .8rem; position: absolute; right: 0; top: 50%; width: 36px; height: 36px; margin-top: -18px; display: grid; place-items: center; border-radius: 50%; background: var(--cobalt-tint); color: var(--cobalt); transition: transform .4s var(--ease), background-color .2s, color .2s; }
.faq details[open] summary::after { transform: rotate(180deg); background: var(--cobalt); color: #fff; }
.faq .faq-body { overflow: hidden; }
.faq details p { margin: 0 0 24px; color: var(--ink-soft); max-width: 40em; }

/* ---------- Floating controls ---------- */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 24px -10px rgba(18,22,51,.6); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease), background-color .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--cobalt); }
.sticky-cta { display: none; }

/* Project videos: a "Watch" tag on cards that have a video, and an optional silent preview on hover */
.work-play { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; background: var(--cobalt); color: var(--on-gold); font-weight: 800; font-size: .875rem; line-height: 1; padding: 9px 14px 9px 12px; border-radius: 999px; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--gold) 80%, transparent); transition: transform .4s var(--ease); }
.work-play i { font-size: .75rem; }
.has-video .work-open { display: none; }
.work-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.work-preview.on { opacity: 1; }
@media (hover: hover) { .work:hover .work-play { transform: scale(1.07); } }