/* Custom CSS Stylesheet for Stass Studio */

/* Navbar scroll offset — targets headings inside sections so content lands just below the fixed 80px nav */
section[id] header,
section[id] h1,
section[id] h2 {
    scroll-margin-top: 90px;
}

/* Service Tab Styles */
.service-tab {
    background: transparent;
    color: var(--color-on-surface-variant, #4a5568);
    border-color: rgba(0,0,0,0.12);
}
.service-tab:hover {
    background: rgba(13, 36, 98, 0.08);
    color: #0d2462;
    border-color: rgba(13, 36, 98, 0.3);
}
.service-tab.active-tab {
    background: #0d2462;
    color: #ffffff;
    border-color: #0d2462;
}

/* Panel fade-in animation */
@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.service-panel:not(.hidden) {
    animation: panelFadeIn 0.35s ease forwards;
}


/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #eff4ff;
    transition: background-color 0.3s ease;
}
::-webkit-scrollbar-thumb {
    background: #b9cacb;
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: #6a7a7b;
    background-clip: padding-box;
}

/* Base Body Adjustments */
html {
    overflow-x: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: #f8f9ff;
    color: #0b1c30;
    overflow-x: hidden;
    max-width: 100%;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Material Symbols Adjustments */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* Custom UI Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(13, 36, 98, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card {
    background: #ffffff;
    border: 1px solid rgba(13, 36, 98, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    border-color: #0d2462;
    box-shadow: 0 10px 30px rgba(13, 36, 98, 0.08);
    transform: translateY(-4px);
}

/* Glowing Neon Elements */
.neon-glow {
    box-shadow: 0 10px 40px -10px rgba(13, 36, 98, 0.15);
}

.neon-glow-primary {
    box-shadow: 0 10px 40px -10px rgba(13, 36, 98, 0.1);
}

.glow-cyan {
    text-shadow: 0 0 12px rgba(29, 78, 216, 0.4);
    color: #0d2462;
}

/* Gradient Mesh Backgrounds */
.mesh-bg {
    background-color: #f8f9ff;
    background-image: radial-gradient(at 0% 0%, rgba(29, 78, 216, 0.05) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(13, 36, 98, 0.05) 0px, transparent 50%);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal Stagger Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Floating Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Nav brand mark — slow idle breathing glow, pauses on hover so the hover transform reads cleanly */
@keyframes logo-breathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(13, 36, 98, 0)); transform: translateY(0); }
    50% { filter: drop-shadow(0 0 6px rgba(13, 36, 98, 0.35)); transform: translateY(-1px); }
}
.logo-mark {
    animation: logo-breathe 4s ease-in-out infinite;
}
.group:hover .logo-mark {
    animation-play-state: paused;
}

/* Service Detail Modal entrance */
@keyframes modal-pop-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modal-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
#service-detail-modal.flex #service-detail-backdrop {
    animation: modal-backdrop-in 0.2s ease-out;
}
#service-detail-modal.flex #service-detail-box {
    animation: modal-pop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
#law-detail-modal.flex #law-detail-backdrop {
    animation: modal-backdrop-in 0.2s ease-out;
}
#law-detail-modal.flex #law-detail-box {
    animation: modal-pop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Breathing Light Animation */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.pulse-glow {
    animation: pulse-glow 10s ease-in-out infinite;
}

/* Transition Smoothing */
*, *::before, *::after {
    transition-property: background-color, border-color, text-decoration-color, fill, stroke, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Custom input style focus ring for contact form */
.form-input-focus:focus {
    outline: none;
    border-color: #0d2462;
    box-shadow: 0 0 0 2px rgba(13, 36, 98, 0.2);
}

/* AI Dashboard Visual Animations */
@keyframes console-scroll {
    0%, 8% { transform: translateY(0); }
    11%, 19% { transform: translateY(-16px); }
    22%, 30% { transform: translateY(-32px); }
    33%, 41% { transform: translateY(-48px); }
    44%, 52% { transform: translateY(-64px); }
    55%, 63% { transform: translateY(-80px); }
    66%, 74% { transform: translateY(-96px); }
    77%, 85% { transform: translateY(-112px); }
    88%, 96% { transform: translateY(-128px); }
    98%, 100% { transform: translateY(0); }
}
.animate-console-scroll {
    animation: console-scroll 18s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes draw-chart {
    0% { stroke-dashoffset: 600; }
    100% { stroke-dashoffset: 0; }
}
.chart-stroke {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-chart 6s ease-in-out forwards infinite alternate;
}

@keyframes chart-pulse-dot {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 1; filter: drop-shadow(0 0 6px #1d4ed8); }
    100% { transform: scale(1); opacity: 0.8; }
}
.chart-pulse {
    transform-origin: center;
    animation: chart-pulse-dot 2s ease-in-out infinite;
}

/* Capability Ticker — infinite scroll of real services/stack, pauses on hover, fades at edges */
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker-track {
    animation: ticker-scroll 34s linear infinite;
}
.ticker-track:hover {
    animation-play-state: paused;
}
.ticker-mask {
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* Hero copy is centered on the viewport, but the laptop screen in the background photo
   sits slightly below viewport-center once object-cover crops it at typical laptop
   window heights — nudge the text block down so it lands on the screen, not above it. */
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 1000px) {
    .hero-copy {
        transform: translateY(64px);
    }
}

/* Gap Strip Animations — each section-divider gets its own entrance motion, driven by the
   existing .reveal/.active IntersectionObserver toggle (no JS changes needed) */

/* UK Law badges: pop in with a slight scale, staggered via existing delay-100..400 */
.law-badge {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active .law-badge {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Process stepper: connecting line draws left-to-right, steps pop in after it via delay-100..500 */
.stepper-line {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}
.reveal.active .stepper-line {
    transform: scaleX(1);
}
.step-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.active .step-item {
    opacity: 1;
    transform: translateY(0);
}
.step-item .step-circle {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
    transform: scale(0);
}
.reveal.active .step-item .step-circle {
    transform: scale(1);
}

/* Commitments grid: staggered pop-in via delay-100..400 */
.commit-card {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active .commit-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Security status bar: one-time light sweep across the dark panel on reveal */
@keyframes status-sweep {
    from { transform: translateX(-120%) skewX(-15deg); }
    to   { transform: translateX(220%) skewX(-15deg); }
}
.status-sweep {
    position: relative;
    overflow: hidden;
}
.status-sweep::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: translateX(-120%) skewX(-15deg);
    pointer-events: none;
}
.reveal.active .status-sweep::after {
    animation: status-sweep 1.6s cubic-bezier(0.25, 1, 0.5, 1) 0.3s 1;
}

/* Confidentiality lock icon: pops in once on reveal, then settles into the idle
   breathing glow (matches nav logo-breathe language). Gated behind .reveal.active
   so it plays when scrolled into view rather than on page load. */
@keyframes lock-intro {
    0%   { transform: scale(0.4) rotate(-10deg); }
    60%  { transform: scale(1.15) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes lock-breathe {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(13, 36, 98, 0)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 8px rgba(13, 36, 98, 0.45)); transform: scale(1.05); }
}
.lock-pulse {
    opacity: 0;
}
.reveal.active .lock-pulse {
    opacity: 1;
    animation: lock-intro 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
               lock-breathe 3.5s ease-in-out 0.6s infinite;
}

/* Icon pop-in: small overshoot bounce for law-badge / commit-card icons, staggered to
   match each item's existing delay-100..400 class. Ends at an identity transform so it
   never fights the icons' own hover:scale-110 utility once the animation has finished. */
@keyframes icon-pop-in {
    0%   { transform: scale(0.3) rotate(-12deg); }
    55%  { transform: scale(1.18) rotate(6deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.law-badge .material-symbols-outlined:first-of-type,
.commit-card .material-symbols-outlined {
    opacity: 0;
}
.reveal.active .law-badge .material-symbols-outlined:first-of-type,
.reveal.active .commit-card .material-symbols-outlined {
    opacity: 1;
}
.reveal.active .law-badge:nth-child(1) .material-symbols-outlined:first-of-type,
.reveal.active .commit-card:nth-child(1) .material-symbols-outlined {
    animation: icon-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
}
.reveal.active .law-badge:nth-child(2) .material-symbols-outlined:first-of-type,
.reveal.active .commit-card:nth-child(2) .material-symbols-outlined {
    animation: icon-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s;
}
.reveal.active .law-badge:nth-child(3) .material-symbols-outlined:first-of-type,
.reveal.active .commit-card:nth-child(3) .material-symbols-outlined {
    animation: icon-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s;
}
.reveal.active .law-badge:nth-child(4) .material-symbols-outlined:first-of-type,
.reveal.active .commit-card:nth-child(4) .material-symbols-outlined {
    animation: icon-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s;
}

/* Process stepper: small glowing dot travels the line in sync with its draw-in */
@keyframes stepper-dot-travel {
    0%   { left: 0%; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { left: calc(100% - 8px); opacity: 0; }
}
.stepper-dot {
    left: 0;
    opacity: 0;
    box-shadow: 0 0 8px rgba(13, 36, 98, 0.6);
}
.reveal.active .stepper-dot {
    animation: stepper-dot-travel 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s 1;
}

/* Security status bar: soft ambient border-glow loop that kicks in once the one-time
   sweep has passed. Uses border opacity (not box-shadow) so it never competes with the
   panel's own hover:shadow utility. */
@keyframes ambient-border-glow {
    0%, 100% { opacity: 0.15; }
    50%      { opacity: 0.6; }
}
.status-sweep::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(29, 78, 216, 0.3);
    opacity: 0;
    pointer-events: none;
}
.reveal.active .status-sweep::before {
    animation: ambient-border-glow 3.2s ease-in-out 1.6s infinite;
}

/* Shared pop/draw keyframes for anything explaining a step-by-step process: the
   per-tab "How It Works" strips and the service-detail modal's mini step flow both
   use these so a connecting line draws in just before each icon pops into place. */
@keyframes hiw-icon-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
@keyframes hiw-line-draw {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Per-tab "How It Works" strip: icons and connecting segments start hidden and only
   animate once .howitworks-animate is toggled on (see replayAnimation() in the tab
   switcher JS), so the sequence replays every time a tab is opened. Delays are baked
   into each element's inline style by the build so this file stays generic. */
.howitworks-icon {
    transform: scale(0);
    opacity: 0;
}
.howitworks-divider {
    transform: scaleX(0);
    transform-origin: left;
}
.howitworks-strip.howitworks-animate .howitworks-icon {
    animation: hiw-icon-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.howitworks-strip.howitworks-animate .howitworks-divider {
    animation: hiw-line-draw 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* Feature list rows: staggered fade/slide-in, replayed on every tab switch the same way. */
.feature-list .feature-row {
    opacity: 0;
    transform: translateY(8px);
}
.feature-list.feature-list-animate .feature-row {
    animation: feature-row-in 0.4s ease forwards;
}
@keyframes feature-row-in {
    to { opacity: 1; transform: translateY(0); }
}
.feature-list.feature-list-animate .feature-row:nth-child(1) { animation-delay: 0.03s; }
.feature-list.feature-list-animate .feature-row:nth-child(2) { animation-delay: 0.08s; }
.feature-list.feature-list-animate .feature-row:nth-child(3) { animation-delay: 0.13s; }
.feature-list.feature-list-animate .feature-row:nth-child(4) { animation-delay: 0.18s; }
.feature-list.feature-list-animate .feature-row:nth-child(5) { animation-delay: 0.23s; }
.feature-list.feature-list-animate .feature-row:nth-child(6) { animation-delay: 0.28s; }
.feature-list.feature-list-animate .feature-row:nth-child(7) { animation-delay: 0.33s; }
.feature-list.feature-list-animate .feature-row:nth-child(8) { animation-delay: 0.38s; }

/* Service-detail modal: staged reveal so the explanation reads as a guided sequence —
   the example box settles in first, then the mini step-flow plays (icon pop + line
   draw, reusing the keyframes above). Retriggered every open via .modal-content-animate
   (see openDetail() forcing a reflow before re-adding the class). */
.modal-example-box {
    opacity: 0;
    transform: translateY(6px);
}
#service-detail-box.modal-content-animate .modal-example-box {
    animation: modal-block-in 0.4s ease forwards;
    animation-delay: 0.15s;
}
@keyframes modal-block-in {
    to { opacity: 1; transform: translateY(0); }
}
.modal-step-icon {
    transform: scale(0);
    opacity: 0;
    animation: hiw-icon-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modal-step-label {
    opacity: 0;
    animation: modal-block-in 0.3s ease forwards;
}
.modal-step-divider {
    transform: scaleX(0);
    transform-origin: left;
    animation: hiw-line-draw 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}


