/* =========================================
   Premium Depth System (2026 Compact UI)
========================================= */
:root {
    /* 3-Layer Hierarchy */
    --layer-1-bg: #030305;
    --layer-2-surface: #111114;
    --layer-3-cta-top: #242429;
    --layer-3-cta-bottom: #161619;
    
    /* Accents & Borders */
    --brand-green: #00a651;
    --brand-green-dim: rgba(0, 166, 81, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-highlight: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #9aa0a6;
    --text-tertiary: #6e7379;
    
    /* Layout */
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    
    /* Motion */
    --spring-fast: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    --fade-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--layer-1-bg);
    color: var(--text-primary);
    font-family: var(--font-system);
    line-height: 1.3;
    height: 100dvh; 
    overflow: hidden; 
    display: flex;
    justify-content: center;
}

/* Accessibility */
:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 3px; border-radius: 4px; }
.segment-btn:focus-visible { border-radius: var(--radius-sm); z-index: 10; }
.action-btn:focus-visible { border-radius: var(--radius-lg); }

/* =========================================
   App Container
========================================= */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    padding: clamp(10px, 2vh, 20px) 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    gap: clamp(8px, 1.2vh, 16px);
}

/* =========================================
   Header (Layer 2)
========================================= */
.brand-header {
    background-color: var(--layer-2-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: clamp(12px, 1.8vh, 16px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-tile {
    width: clamp(52px, 7vh, 60px);
    height: clamp(52px, 7vh, 60px);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1a1a1f 0%, #0d0d10 100%);
    padding: 8px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 
                0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text h1 {
    font-size: clamp(1.15rem, 2.5vh, 1.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.brand-text p {
    font-size: clamp(0.75rem, 1.5vh, 0.85rem);
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 4px;
}

.brand-tagline {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   Branch Selector (Real Segmented Control)
========================================= */
.branch-selector {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vh, 10px);
}

.segmented-control {
    position: relative;
    display: flex;
    background-color: var(--layer-2-surface);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.segmented-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: linear-gradient(180deg, #00b85a 0%, var(--brand-green) 100%);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 
                inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.segmented-control[data-active="poole"] .segmented-slider {
    transform: translateX(100%);
}

.segment-btn {
    position: relative;
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    padding: clamp(8px, 1.4vh, 12px) 0;
    font-size: clamp(0.8rem, 1.6vh, 0.9rem);
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    z-index: 2;
}

.segment-btn:active {
    transform: scale(0.97);
}

.segment-btn.active {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.branch-status {
    text-align: center;
    font-size: clamp(0.75rem, 1.5vh, 0.85rem);
}

.branch-status strong {
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* =========================================
   Animations
========================================= */
.fade-transition {
    transition: opacity var(--fade-smooth), transform var(--fade-smooth);
    will-change: opacity, transform;
}

.fade-transition.updating {
    opacity: 0;
    transform: translateY(4px);
}

/* =========================================
   Layer 3: Delivery CTAs
========================================= */
.delivery-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.2vh, 12px);
}

.action-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: var(--spring-fast);
}

.primary-action {
    background: linear-gradient(180deg, var(--layer-3-cta-top) 0%, var(--layer-3-cta-bottom) 100%);
    padding: clamp(10px, 1.6vh, 14px);
    gap: 14px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 
                inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.primary-action:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Premium Inset Logo Container */
.action-icon-wrapper {
    width: clamp(42px, 6vh, 50px);
    height: clamp(42px, 6vh, 50px);
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.platform-logo {
    width: 65%;
    height: 65%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.action-content h2 {
    font-size: clamp(0.95rem, 2vh, 1.05rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.action-content p {
    font-size: clamp(0.7rem, 1.4vh, 0.75rem);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.partner-label {
    font-size: clamp(0.6rem, 1.2vh, 0.65rem);
    color: var(--brand-green);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

/* Micro-surface for Arrow */
.chevron-surface {
    width: clamp(28px, 4vh, 32px);
    height: clamp(28px, 4vh, 32px);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--spring-fast);
}

.chevron {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

/* =========================================
   Secondary Actions
========================================= */
.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 1.2vh, 12px);
}

.secondary-btn {
    background-color: var(--layer-2-surface);
    border: 1px solid var(--border-subtle);
    flex-direction: column;
    justify-content: center;
    padding: clamp(10px, 1.6vh, 14px) 12px;
    gap: clamp(6px, 1vh, 8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.secondary-btn:hover {
    background-color: var(--layer-3-cta-top);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: translateY(1px) scale(0.98);
}

.secondary-btn svg {
    width: clamp(20px, 3vh, 24px);
    height: clamp(20px, 3vh, 24px);
    color: var(--text-secondary);
    transition: color var(--spring-fast);
}

.secondary-btn span {
    font-size: clamp(0.7rem, 1.4vh, 0.8rem);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--spring-fast);
}

.secondary-btn:hover svg,
.secondary-btn:hover span {
    color: var(--text-primary);
}

/* =========================================
   Footer
========================================= */
.app-footer {
    text-align: center;
    padding-top: clamp(6px, 1vh, 12px);
}

.app-footer p {
    font-size: clamp(0.65rem, 1.2vh, 0.7rem);
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.app-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: var(--text-primary);
}

/* =========================================
   Responsive Compact Mode (Sub 844px Height)
========================================= */
@media (max-height: 844px) {
    .app-container { gap: 8px; padding-top: 12px; padding-bottom: 12px; }
    .brand-header { padding: 10px 14px; }
    .action-btn { padding: 10px; }
    .secondary-btn { padding: 10px; }
}

/* =========================================
   Platform Hover/Active Colour Feedback
========================================= */
/* CTA Base Variables */
.cta-uber { --hover-tint: rgba(6, 193, 103, 0.12); --hover-border: rgba(6, 193, 103, 0.3); --hover-brand: #06C167; }
.cta-justeat { --hover-tint: rgba(255, 128, 0, 0.12); --hover-border: rgba(255, 128, 0, 0.3); --hover-brand: #FF8000; }
.cta-deliveroo { --hover-tint: rgba(0, 204, 188, 0.12); --hover-border: rgba(0, 204, 188, 0.3); --hover-brand: #00CCBC; }

.action-content h2, .action-content p, .partner-label, .chevron, .primary-action {
    transition: all 0.2s ease;
}

/* Applied on hover (desktop) & focus/active (mobile) */
.primary-action:hover, .primary-action:focus-visible, .primary-action:active {
    background: linear-gradient(180deg, var(--hover-tint) 0%, var(--layer-3-cta-bottom) 100%);
    border-color: var(--hover-border);
}

.primary-action:hover .partner-label, .primary-action:focus-visible .partner-label, .primary-action:active .partner-label {
    color: var(--hover-brand);
}

.primary-action:hover .chevron, .primary-action:focus-visible .chevron, .primary-action:active .chevron {
    color: var(--hover-brand);
}

.primary-action:hover .chevron-surface, .primary-action:focus-visible .chevron-surface, .primary-action:active .chevron-surface {
    background-color: var(--hover-tint);
    border-color: var(--hover-border);
    transform: translateX(2px);
}

/* Secondary Actions Colors */
a[href*="facebook.com"]:hover { border-color: rgba(24, 119, 242, 0.4); }
a[href*="facebook.com"]:hover svg { color: #1877F2; }

a[href*="instagram.com"]:hover { border-color: rgba(225, 48, 108, 0.4); }
a[href*="instagram.com"]:hover svg { color: #E1306C; }

#link-maps:hover { border-color: rgba(66, 133, 244, 0.4); }
#link-maps:hover svg { color: #4285F4; }

#link-call:hover { border-color: var(--brand-green-dim); }
#link-call:hover svg { color: var(--brand-green); }

/* =========================================
   Prefers Reduced Motion
========================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        transform: none !important;
    }
}