/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

:root {
    --bg: #0b0f1a;
    --fg: #e6f1ff;
    --muted: #9fb0c3;
    --accent1: #43ffd6;
    --accent2: #ff5bd3;
    --card: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.14);
    --shadow: rgba(0, 0, 0, 0.2);
    --glow1: rgba(67, 255, 214, 0.3);
    --glow2: rgba(255, 91, 211, 0.3);
    
    --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --spacing-unit: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 10% 20%, rgba(80, 128, 255, 0.1), transparent 30%),
                radial-gradient(circle at 90% 80%, rgba(255, 91, 211, 0.1), transparent 40%);
}

.background-shimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(
        115deg,
        transparent 40%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: shimmer 15s linear infinite;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

img, video {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--muted);
}

a {
    color: var(--accent1);
    text-decoration: none;
    transition: color 200ms ease;
}

a:hover {
    color: var(--accent2);
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 6);
    font-weight: 700;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--fg);
    color: var(--bg);
    padding: 1rem;
    z-index: 9999;
    transition: top 0.3s ease-in-out;
}

.skip-link:focus {
    top: 1rem;
}

/* ==========================================================================
   2. Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: calc(var(--spacing-unit) * 2) 0;
    background: rgba(11, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent1), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: none;
    list-style: none;
}

.nav-links a {
    color: var(--fg);
    padding: 0.5rem 1rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    transition: width 300ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 80%;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--fg);
    transition: transform 0.3s ease, background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--fg);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-open .hamburger { background: transparent; }
.nav-open .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-open .hamburger::after { bottom: 0; transform: rotate(-45deg); }

.header-ctas { 
    display: none; 
    gap: var(--spacing-unit);
}

.header-ctas .btn {
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2.5);
    font-size: 0.875rem;
}

/* Mobile Nav Menu */
@media (max-width: 767px) {
    .header-ctas {
        display: none;
    }
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-open .nav-links {
        display: flex;
        transform: translateX(0);
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: var(--bg);
    background-size: 200% 100%;
    transition: transform 200ms ease, box-shadow 200ms ease, background-position 300ms ease;
}

.btn-primary:hover {
    color: var(--bg);
    box-shadow: 0 4px 20px var(--glow1), 0 4px 20px var(--glow2);
    background-position: -100% 0;
}

.btn-secondary {
    background-color: var(--card);
    border-color: var(--border);
    color: var(--fg);
}

.btn-secondary:hover {
    color: var(--fg);
    border-color: var(--accent1);
}

.btn-ghost {
    background: transparent;
    border-color: var(--accent1);
    color: var(--accent1);
}

.btn-ghost:hover {
    background-color: var(--accent1);
    color: var(--bg);
}

/* ==========================================================================
   4. Cards (Glassmorphism)
   ========================================================================== */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 4);
    backdrop-filter: blur(10px);
    transition: transform 200ms ease, border-color 200ms ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent1);
}

/* ==========================================================================
   5. Page Sections
   ========================================================================== */

section {
    padding: calc(var(--spacing-unit) * 10) 0;
}

/* Hero */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: calc(var(--spacing-unit) * 15);
    padding-bottom: calc(var(--spacing-unit) * 15);
}

.hero-headline {
    margin-bottom: calc(var(--spacing-unit) * 3);
    font-weight: 800;
}

.hero-subtext {
    max-width: 600px;
    margin: 0 auto calc(var(--spacing-unit) * 4);
    font-size: 1.125rem;
}

.hero-ctas .btn {
    margin: calc(var(--spacing-unit) * 1.5);
}

.app-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: calc(var(--spacing-unit) * 4);
}

.app-badges a {
    display: inline-block;
    transition: transform 0.2s ease;
    width: 135px; /* Set a fixed width for both badges */
}

.app-badges a:hover {
    transform: scale(1.05);
}

.app-badges img {
    width: 100%;
    height: auto;
}

/* How It Works */
.process-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
}

.process-grid .card h3 {
    margin-bottom: var(--spacing-unit);
    color: var(--accent1);
}

/* Services */
.services-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
}

.services-grid .card h3 {
    margin-bottom: var(--spacing-unit);
}

.learn-more {
    font-weight: 600;
    display: inline-block;
    margin-top: var(--spacing-unit);
}

/* Featured Apps */
.apps-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
}

.app-tile {
    text-align: center;
}

.app-cover-placeholder {
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    background: var(--border);
    border-radius: 12px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    position: relative;
    overflow: hidden;
}

.app-cover-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-tile h4 {
    margin-bottom: var(--spacing-unit);
}

.app-tile p {
    font-size: 0.9rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* About */
.about {
    text-align: center;
}

.mission-statement {
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 4);
    font-size: 1.25rem;
    color: var(--fg);
}

.legal-line {
    font-size: 0.9rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 2);
}

.gallery-tile {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 3 / 2;
    background: var(--border);
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.gallery-tile:hover img {
    transform: scale(1.05);
}

.gallery-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 20px 10px var(--bg);
    opacity: 0;
    transition: opacity 300ms ease;
}

.gallery-tile:hover::after {
    opacity: 1;
}

/* Contact */
.contact-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 4);
}

.contact-form-wrapper {
    padding: calc(var(--spacing-unit) * 5);
}

.form-group {
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-unit);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 1.5);
    color: var(--fg);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent1);
    box-shadow: 0 0 0 2px var(--glow1);
}

.form-group .error-message {
    color: var(--accent2);
    font-size: 0.8rem;
    display: none;
    margin-top: var(--spacing-unit);
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--accent2);
}

.contact-details {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
}

.contact-details .card {
    text-align: center;
}

.contact-details .card h4 {
    margin-bottom: var(--spacing-unit);
}

.map-embed {
    padding: 0; /* Remove padding from card for map */
    overflow: hidden;
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.map-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: calc(var(--spacing-unit) * 2); /* Inherit card border-radius */
}

/* Privacy Summary */
.privacy-summary .card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.privacy-summary .btn {
    margin-top: var(--spacing-unit) * 2;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.site-footer {
    background: #060912;
    padding: calc(var(--spacing-unit) * 5) 0;
    font-size: 0.875rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: calc(var(--spacing-unit) * 4);
}

.footer-legal p {
    margin: 0;
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit) * 3);
}

.social-icons {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

.social-placeholder {
    width: 32px;
    height: 32px;
    background: var(--border);
    border-radius: 50%;
}

.footer-nav {
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
}

.footer-nav a {
    color: var(--muted);
}

.footer-nav a:hover {
    color: var(--fg);
}

/* ==========================================================================
   7. Responsive Tablet & Desktop Styles
   ========================================================================== */

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav-links { display: flex; }
    .header-ctas { display: flex; gap: var(--spacing-unit); }

    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .apps-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    
    .contact-grid {
        grid-template-columns: 2fr 1fr;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .process-grid { grid-template-columns: repeat(4, 1fr); }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   8. Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus states */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--accent1);
    outline-offset: 2px;
}

.btn:focus {
    outline-offset: 4px;
}

/* === Equal Store Badge Sizing Fix === */
.store-badges {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.store-badge {
  height: 60px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.store-badge.appstore {
  transform: scale(0.95); /* visually match sizes */
  transform-origin: center;
}
.store-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255,255,255,0.25);
}
