/* ==========================================================
   NEXORA STUDIO — services.css
   Load AFTER styles.css. Contains:
   1. Services dropdown (desktop) + accordion (mobile)
   2. Service page layout: hero, feature grid, deliverables, FAQ, related
   ========================================================== */

/* ── 1. DROPDOWN ─────────────────────────────────────────── */
.has-dropdown { position: relative; }
/* invisible bridge so the pointer can travel from the button to the panel */
.has-dropdown::after { content: ''; position: absolute; left: -30px; right: -30px; top: 100%; height: 44px; pointer-events: none; }
.has-dropdown.open::after { pointer-events: auto; }

.dropdown-toggle {
  font: inherit; font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  background: none; border: 0; cursor: pointer; padding: 6px 2px;
  display: inline-flex; align-items: center; gap: 6px; transition: color .25s;
}
.dropdown-toggle svg { width: 15px; height: 15px; transition: transform .45s var(--ease); }
.dropdown-toggle:hover, .dropdown-toggle.is-active, .has-dropdown.open .dropdown-toggle { color: var(--indigo); }
.has-dropdown.open .dropdown-toggle svg { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 34px); left: 50%;
  width: min(640px, 92vw); padding: 14px; overflow: hidden;
  background: #fff;
  border: 1px solid #fff; border-radius: 32px;
  box-shadow: 0 50px 90px -30px rgba(50, 40, 170, .45), 0 0 0 1px rgba(91, 75, 245, .07);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -16px) scale(.95); transform-origin: 50% 0;
  transition: opacity .3s ease, visibility .3s, transform .55s var(--ease);
}
.has-dropdown.open .dropdown, html:not(.js) .has-dropdown:hover .dropdown {
  opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1);
}
/* drifting colour glow behind the panel = the "flow" */
.dropdown::before, .dropdown::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(46px); opacity: .5;
  animation: ddflow 9s ease-in-out infinite alternate;
}
.dropdown::before { width: 260px; height: 260px; background: #8fb4ff; top: -110px; left: -60px; }
.dropdown::after  { width: 240px; height: 240px; background: #cfb2ff; bottom: -100px; right: -50px; animation-delay: -4s; }
@keyframes ddflow { to { transform: translate(40px, 24px) scale(1.2); } }

.dd-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
nav ul li .dropdown a.dd-item {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 14px; border-radius: 22px; overflow: hidden;
  font-size: inherit; font-weight: 400; color: var(--ink); text-decoration: none;
  opacity: 0; transform: translateY(14px);
  transition: opacity .45s var(--ease) var(--d, 0s), transform .6s var(--ease) var(--d, 0s);
}
nav ul li .dropdown a.dd-item::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(120deg, rgba(47, 107, 255, .14), rgba(155, 92, 255, .16));
  opacity: 0; transform: scale(.94); transition: opacity .35s, transform .5s var(--ease);
}
nav ul li .dropdown a.dd-item::after { display: none; }
.has-dropdown.open .dd-item { opacity: 1; transform: none; }
.dd-item:nth-child(1) { --d: .04s; } .dd-item:nth-child(2) { --d: .09s; }
.dd-item:nth-child(3) { --d: .14s; } .dd-item:nth-child(4) { --d: .19s; }
nav ul li .dropdown a.dd-item:hover::before, nav ul li .dropdown a.dd-item:focus-visible::before,
nav ul li .dropdown a.dd-item[aria-current="page"]::before { opacity: 1; transform: scale(1); }
nav ul li .dropdown a.dd-item:hover { color: var(--ink); }

.dd-ico {
  flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 16px; color: #fff; background: var(--grad);
  box-shadow: 0 10px 22px -8px rgba(91, 75, 245, .65);
  transition: transform .5s var(--ease);
}
.dd-ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dd-item:hover .dd-ico { transform: rotate(-8deg) scale(1.1); }
.dd-text { display: block; min-width: 0; }
.dd-text strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: .96rem; letter-spacing: -.015em; margin-bottom: 3px; }
.dd-text small { display: block; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.dd-arrow { margin-left: auto; align-self: center; color: var(--indigo); opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .45s var(--ease); }
.dd-item:hover .dd-arrow { opacity: 1; transform: none; }

.dd-foot {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding: 12px 8px 2px 16px; border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease) .25s, transform .6s var(--ease) .25s;
}
.has-dropdown.open .dd-foot { opacity: 1; transform: none; }
nav ul li .dropdown .dd-foot a { font-size: .88rem; font-weight: 600; color: var(--indigo); padding: 4px 0; }
nav ul li .dropdown .dd-foot a::after { display: none; }
nav ul li .dropdown .dd-foot a.dd-quote {
  background: var(--grad); color: #fff; padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(91, 75, 245, .6); transition: transform .25s var(--ease);
}
nav ul li .dropdown .dd-foot a.dd-quote:hover { transform: translateY(-2px); color: #fff; }

/* mobile accordion (inside the existing .mobile-menu) */
.m-acc-toggle {
  font: inherit; width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border: 0; border-radius: 16px; background: none; cursor: pointer;
  font-weight: 500; color: var(--ink); text-align: left;
}
.m-acc-toggle:hover, .m-acc.open .m-acc-toggle { background: var(--grad-soft); color: var(--indigo); }
.m-acc-toggle svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.m-acc.open .m-acc-toggle svg { transform: rotate(180deg); }
.m-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.m-acc.open .m-acc-panel { grid-template-rows: 1fr; }
.m-acc-panel > div { overflow: hidden; }
.mobile-menu .m-acc-panel a {
  display: flex; align-items: center; gap: 12px; margin: 2px 0 2px 10px; padding: 12px 14px;
  font-size: .95rem; border-left: 2px solid rgba(91, 75, 245, .18); border-radius: 0 14px 14px 0;
}
.mobile-menu .m-acc-panel a svg { width: 20px; height: 20px; color: var(--indigo); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
@media (max-width: 900px) { .mobile-menu { background: #fff; max-height: calc(100vh - 150px); overflow-y: auto; } }

/* ── 2. SERVICE PAGES ────────────────────────────────────── */
.page-hero { padding-top: clamp(36px, 5vw, 70px); padding-bottom: clamp(60px, 8vw, 110px); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font-size: .85rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--indigo); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.breadcrumb i { font-style: normal; opacity: .5; }
.hero-actions .btn-ghost.alt::after { content: '↓'; }
.hero-actions .btn-ghost.alt:hover::after { transform: translateY(3px); }

/* shared visual helpers */
.hero-visual .chip.k3 { top: 46%; right: -2%; animation-delay: -2s; }

/* browser mock (website page) */
.mock {
  position: absolute; z-index: 2; left: 2%; right: 12%; top: 12%;
  background: #fff; border-radius: 22px; overflow: hidden; animation: bob 8s ease-in-out infinite;
  box-shadow: 0 34px 70px -24px rgba(30, 20, 120, .5);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 0 16px; height: 36px; background: #eef0ff; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff7a7a; }
.mock-bar i:nth-child(2) { background: #ffd166; }
.mock-bar i:nth-child(3) { background: #6ee7a8; }
.mock-bar span { flex: 1; margin-left: 12px; padding: 3px 12px; border-radius: 99px; background: #fff; font-size: .68rem; color: var(--muted); text-align: center; }
.mock-body { padding: 16px; }
.mock-hero { height: 150px; padding: 20px; border-radius: 16px; background: var(--grad); }
.mock-hero b { display: block; height: 12px; width: 62%; margin-bottom: 10px; border-radius: 6px; background: rgba(255, 255, 255, .9); }
.mock-hero b + b { width: 40%; opacity: .6; }
.mock-hero em { display: block; width: 92px; height: 28px; margin-top: 18px; border-radius: 99px; background: #fff; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mock-cards u { display: block; height: 74px; border-radius: 12px; background: var(--grad-soft); }
.mock-phone {
  position: absolute; z-index: 3; right: 0; bottom: 4%; width: 27%; aspect-ratio: 9 / 18;
  padding: 7px; border-radius: 26px; background: var(--ink); animation: bob 6s ease-in-out infinite -2s;
  box-shadow: 0 30px 60px -20px rgba(30, 20, 120, .6);
}
.mock-phone div { height: 100%; padding: 10px; border-radius: 20px; background: #fff; }
.mock-phone b { display: block; height: 70px; margin-bottom: 8px; border-radius: 12px; background: var(--grad); }
.mock-phone u { display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: #e3e6fb; }
.mock-phone u:last-child { width: 60%; }

/* video player mock (AI video page) */
.player {
  position: absolute; z-index: 2; left: 0; right: 14%; top: 12%; padding: 14px 14px 18px;
  background: var(--ink); border-radius: 26px; animation: bob 8s ease-in-out infinite;
  box-shadow: 0 34px 70px -24px rgba(30, 20, 120, .6);
}
.player-screen {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; border-radius: 18px;
  background: radial-gradient(circle at 25% 20%, #7aa2ff, transparent 55%), radial-gradient(circle at 80% 85%, #c08bff, transparent 55%), linear-gradient(135deg, #2f6bff, #6a3fe0);
}
.player-screen::before { content: ''; position: absolute; width: 180%; height: 60%; top: 55%; left: -40%; background: rgba(255, 255, 255, .12); border-radius: 50%; animation: wave 7s ease-in-out infinite alternate; }
@keyframes wave { to { transform: translateY(-18px) rotate(4deg); } }
.play { position: relative; width: 74px; height: 74px; border-radius: 50%; background: rgba(255, 255, 255, .25); backdrop-filter: blur(6px); box-shadow: 0 0 0 10px rgba(255, 255, 255, .12); animation: pulse 2.4s ease-in-out infinite; }
.play::before { content: ''; position: absolute; left: 30px; top: 22px; border-left: 22px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
@keyframes pulse { 50% { box-shadow: 0 0 0 20px rgba(255, 255, 255, .06); } }
.timeline { height: 6px; margin: 18px 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.timeline i { display: block; height: 100%; width: 62%; border-radius: inherit; background: var(--grad); animation: progress 7s ease-in-out infinite alternate; }
@keyframes progress { from { width: 8%; } to { width: 88%; } }
.player-meta { display: flex; justify-content: space-between; padding: 0 4px; font-size: .72rem; color: #9aa2d6; }
.reel {
  position: absolute; z-index: 3; right: 0; bottom: 2%; width: 28%; aspect-ratio: 9 / 16;
  border: 5px solid #fff; border-radius: 24px; overflow: hidden; animation: bob 6s ease-in-out infinite -2s;
  background: radial-gradient(circle at 70% 20%, #ffb3ec, transparent 55%), linear-gradient(160deg, #9b5cff, #2f6bff);
  box-shadow: 0 30px 60px -20px rgba(30, 20, 120, .55);
}
.reel::before { content: ''; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.reel::after { content: ''; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -6px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

/* feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 52px; }
.feature {
  padding: 30px 28px; background: rgba(255, 255, 255, .88); border: 1px solid #fff; border-radius: 26px; box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.feature:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.f-ico {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 15px;
  background: var(--grad-soft); color: var(--indigo); font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  transition: background .3s, color .3s, transform .45s var(--ease);
}
.feature:hover .f-ico { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.08); }
.feature h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: .95rem; line-height: 1.7; }

/* deliverables panel */
.deliver {
  position: relative; overflow: hidden; margin-top: 70px; padding: clamp(32px, 5vw, 60px);
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(240, 238, 255, .9)); border: 1px solid #fff; border-radius: 40px; box-shadow: var(--shadow);
}
.deliver::before { content: ''; position: absolute; width: 360px; height: 360px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(155, 92, 255, .28), transparent 65%); }
.deliver h3 { position: relative; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.025em; max-width: 560px; }
.tag-list { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tag { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .9rem; font-weight: 600; color: var(--ink-soft); transition: transform .3s var(--ease), color .3s, border-color .3s; }
.tag:hover { transform: translateY(-3px); color: var(--indigo); border-color: var(--indigo); }

/* work samples */
.sample-link { display: block; overflow: hidden; }
.sample-link img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s var(--ease); }
.portfolio-card:hover .sample-link img { transform: scale(1.06); }
.samples { margin-top: 48px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin-top: 44px; }
.faq details { background: rgba(255, 255, 255, .9); border: 1px solid #fff; border-radius: 22px; box-shadow: var(--shadow-sm); padding: 0 26px; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 600; font-size: 1rem; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--grad-soft); color: var(--indigo); font-size: 1.3rem; line-height: 1; transition: transform .4s var(--ease), background .3s, color .3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--grad); color: #fff; }
.faq p { padding: 0 0 24px; color: var(--ink-soft); line-height: 1.75; max-width: 700px; }

/* other services */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.more-card {
  display: flex; align-items: center; gap: 18px; padding: 24px; text-decoration: none;
  background: rgba(255, 255, 255, .9); border: 1px solid #fff; border-radius: 26px; box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.more-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.more-card .dd-ico { transition: transform .5s var(--ease); }
.more-card:hover .dd-ico { transform: rotate(-8deg) scale(1.08); }
.more-card strong { display: block; font-family: var(--font-head); font-weight: 600; letter-spacing: -.015em; }
.more-card span { display: block; margin-top: 2px; font-size: .88rem; font-weight: 600; color: var(--indigo); }

@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .page-hero .hero-visual { height: clamp(340px, 78vw, 480px); }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .faq details { padding: 0 20px; }
  .mock { right: 6%; }
  .player { right: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  .dropdown, .dropdown::before, .dropdown::after, .mock, .mock-phone, .player, .reel, .play, .timeline i { animation: none !important; }
}
