/* FanarSpins - Finland Social Casino Styles */
/* Mobile-first responsive design with performance optimization */

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-weight: 400;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

    .skip-link:focus {
        top: 8px;
    }

/* Layout Framework */
.frame-skylark-nz {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.grid-shell-nz {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.stratum-mainflow {
    flex: 1;
    padding: 24px 0;
}

/* Responsible Gaming Disclosure Panel */
.slab-disclosure-nz {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 16px 0;
    position: relative;
    z-index: 10;
    margin-top: auto;
}

.rail-rg-ethos {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    font-size: 14px;
    line-height: 1.4;
}

    .rail-rg-ethos p {
        margin-bottom: 8px;
    }

        .rail-rg-ethos p:last-child {
            margin-bottom: 0;
        }

    .rail-rg-ethos small {
        opacity: 0.9;
        font-size: 12px;
    }

/* Header & Navigation */
.header-main {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-primary {
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-link {
    text-decoration: none;
    color: #1e40af;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

    .nav-link:hover,
    .nav-link:focus {
        color: #1e40af;
        background-color: #f1f5f9;
    }

.nav-link--current {
    color: #1e40af;
    background-color: #eff6ff;
}

.nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 50%, #1e3a8a 100%);
    color: white;
    padding: 64px 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0.95;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.85;
    font-weight: 400;
}

/* Sections */
.about-section,
.games-section {
    padding: 64px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
    color: #1e40af;
}

.about-text {
    font-size: 18px;
    line-height: 1.6;
    color: #374151;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Games Section */
.deck-game-trio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.tile-gamelet {
    background: white;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

    .tile-gamelet:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

.game-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 16px;
}

.game-description {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-playpulse {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

    .btn-playpulse:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .btn-playpulse:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

    .btn-playpulse:active {
        transform: translateY(0);
    }

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.toast-soonplay {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    animation: slideInRight 0.3s ease-out;
    margin-bottom: 12px;
}

.toast-content {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

    .toast-content p {
        flex: 1;
        margin: 0;
        color: #374151;
        font-size: 14px;
        line-height: 1.4;
    }

.toast-closelet {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

    .toast-closelet:hover {
        background-color: #f3f4f6;
        color: #374151;
    }

    .toast-closelet:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 1px;
    }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.footer-main {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    display: block;
    margin-bottom: 8px;
}

.footer-tagline {
    color: #6b7280;
    font-size: 14px;
}

.footer-nav {
    text-align: center;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

    .footer-link:hover,
    .footer-link:focus {
        color: #1e40af;
        background-color: #f1f5f9;
    }

    .footer-link:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

.footer-contact {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.footer-email {
    color: #1e40af;
    text-decoration: none;
}

    .footer-email:hover {
        text-decoration: underline;
    }

.footer-address {
    font-style: normal;
    margin-top: 12px;
    line-height: 1.4;
}

.footer-legal {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* Age Gate */
.bar-age-20nz {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #dc2626;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 200;
    padding: 24px 0;
}

.age-gate-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.age-gate-title {
    font-size: 24px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 12px;
}

.age-gate-desc {
    font-size: 16px;
    color: #374151;
    margin-bottom: 24px;
}

.age-gate-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-affirm-20,
.btn-decline-20 {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-affirm-20 {
    background: #10b981;
    color: white;
}

    .btn-affirm-20:hover {
        background: #059669;
    }

.btn-decline-20 {
    background: #6b7280;
    color: white;
}

    .btn-decline-20:hover {
        background: #4b5563;
    }

    .btn-affirm-20:focus,
    .btn-decline-20:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #d1d5db;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 150;
    padding: 16px 0;
}

.cookie-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

.cookie-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.cookie-desc {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 14px;
}

.cookie-categories {
    margin-bottom: 16px;
}

.cookie-category {
    margin-bottom: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-category h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-always-on {
    background: #d1d5db;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.cookie-category p {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}

/* Cookie Toggle Switches */
.switchlet-analytics,
.switchlet-marketing {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    cursor: pointer;
}

    .switchlet-analytics input,
    .switchlet-marketing input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.2s ease;
    border-radius: 20px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 2px;
        bottom: 3px;
        background-color: white;
        transition: 0.2s ease;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #3b82f6;
}

    input:checked + .slider:before {
        transform: translateX(20px);
    }

input:focus + .slider {
    box-shadow: 0 0 0 2px #3b82f6;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-cookie-accept-all,
.btn-cookie-reject,
.btn-cookie-save {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cookie-accept-all {
    background: #10b981;
    color: white;
}

    .btn-cookie-accept-all:hover {
        background: #059669;
    }

.btn-cookie-reject {
    background: #6b7280;
    color: white;
}

    .btn-cookie-reject:hover {
        background: #4b5563;
    }

.btn-cookie-save {
    background: #3b82f6;
    color: white;
}

    .btn-cookie-save:hover {
        background: #1d4ed8;
    }

    .btn-cookie-accept-all:focus,
    .btn-cookie-reject:focus,
    .btn-cookie-save:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

/* Legal Documents */
.legal-document {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 36px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 32px;
}

.legal-document h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-top: 32px;
    margin-bottom: 16px;
}

.legal-document h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin-top: 24px;
    margin-bottom: 12px;
}

.legal-document p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #374151;
}

.legal-document ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-document li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #374151;
}

.legal-document a {
    color: #1e40af;
    text-decoration: none;
}

    .legal-document a:hover {
        text-decoration: underline;
    }

.legal-document address {
    font-style: normal;
    background: #f9fafb;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    margin: 16px 0;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.6;
}

.contact-details h2,
.contact-details h3 {
    color: #1f2937;
    margin-bottom: 12px;
}

.contact-details h2 {
    font-size: 24px;
    font-weight: 600;
}

.contact-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
}

.contact-details p {
    margin-bottom: 12px;
    color: #374151;
    line-height: 1.5;
}

.contact-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
}

.business-address {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
    font-style: normal;
    line-height: 1.5;
}

/* Contact Form */
.contact-form-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
}

.contact-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.required {
    color: #dc2626;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: white;
}

    .form-input:focus,
    .form-textarea:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .form-submit:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 4px;
    min-height: 20px;
}

.has-error .form-input,
.has-error .form-textarea {
    border-color: #dc2626;
}

.success-message {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

    .success-message h3 {
        color: #065f46;
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .success-message p {
        color: #047857;
        margin: 0;
        line-height: 1.5;
    }

/* Cookie Policy Specific */
.cookie-category-detail {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

    .cookie-category-detail h3 {
        color: #1e40af;
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 12px;
    }

    .cookie-category-detail p:first-of-type {
        font-weight: 600;
        color: #374151;
    }

.cookie-controls {
    text-align: center;
    margin: 32px 0;
}

.btn-manage-cookies {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-manage-cookies:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .btn-manage-cookies:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

/* Accessibility Utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-section {
        background: #1a1a1a;
        color: #ffffff;
    }

    .btn-playpulse {
        background: #000000;
        border: 2px solid #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .grid-shell-nz {
        padding: 0 32px;
    }

    .nav-container {
        padding: 0 32px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-tagline {
        font-size: 28px;
    }

    .deck-game-trio {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer-nav {
        text-align: right;
    }

    .footer-links {
        justify-content: flex-end;
    }

    .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .age-gate-buttons,
    .cookie-buttons {
        justify-content: center;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .stratum-mainflow {
        padding: 48px 0;
    }

    .about-section,
    .games-section {
        padding: 80px 0;
    }

    .hero-section {
        padding: 96px 0;
    }

    .hero-title {
        font-size: 64px;
    }

    .deck-game-trio {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .footer-contact {
        text-align: right;
    }

    .toast-container {
        top: 24px;
        right: 24px;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 72px;
    }

    .hero-tagline {
        font-size: 32px;
    }

    .section-title {
        font-size: 42px;
    }

    .about-text {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .slab-disclosure-nz,
    .header-main,
    .footer-main,
    .bar-age-20nz,
    .cookie-consent,
    .toast-container,
    .btn-playpulse,
    .btn-manage-cookies,
    .form-submit {
        display: none;
    }

    .frame-skylark-nz {
        display: block;
    }

    .stratum-mainflow {
        padding: 0;
    }

    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

        a[href]:after {
            content: " (" attr(href) ")";
        }
}
