/* Extracted from index.html */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #151520;
    --text-primary: #ffffff;
    --text-secondary: #a8a8b8;
    --accent-cyan: #34d399;
    --accent-purple: #16a34a;
    --accent-yellow: #fbbf24;
    --accent-green: #22c55e;
    --gradient-1: linear-gradient(135deg, #34d399 0%, #15803d 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #6ee7b7 0%, #22c55e 100%);
    --gradient-hero: linear-gradient(180deg, #0a0a0f 0%, #10221a 50%, #0f2f1f 100%);
    --hero-control-height: 5.2rem;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 20px; /* larger base size to match site scale */
}

h1, h2, h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Subpage header for smaller titles (e.g. terms, support) */
.subpage-header {
    padding: 2rem 1rem; /* equal top and bottom padding so logo spacing matches */
    background: var(--gradient-hero);
    text-align: left; /* align header content to the left on desktop */
    position: relative;
}

/* Small screens: keep header centered for narrow viewports */
@media (max-width: 800px) {
    .subpage-header {
        text-align: left; /* keep left alignment on mobile per request */
        padding: 1.5rem 1rem; /* equal top/bottom padding on small screens */
    }
    .subpage-content {
        align-items: center; /* center icon and text on mobile */
    }
    .home-link {
        align-self: center;
    }
}

/* Removed all animations from the subpage header */
.subpage-header::before {
    animation: none;
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: none;
}

.subpage-content {
    max-width: 900px;
    margin: 0; /* default: left-aligned for small screens */
    padding-left: 1rem; /* keep breathing room from the header edge */
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start; /* align icon to the top of the text block */
    gap: 1rem;
}

/* Desktop: center the content and add horizontal padding so it isn't flush-left */
@media (min-width: 801px) {
    .subpage-content {
        margin: 0 auto; /* center within available space */
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Desktop: make the "Back to home" link larger for better balance with the header */
@media (min-width: 801px) {
    .subpage-header .home-link {
        font-size: 1.25rem; /* ~25px on the site's 20px base */
    }
    .subpage-header .home-link a {
        font-size: inherit; /* ensure the anchor scales with the wrapper */
        display: inline-block;
        line-height: 1.2;
    }
}

.subpage-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem; /* reduced spacing between title and link */
    flex: 1 1 auto; /* allow text column to take remaining space */
    min-width: 0; /* allow flex children to shrink without overflowing */
    align-items: flex-start; /* left-align all content in the text column */
}

.subpage-content .page-icon {
    align-self: flex-start; /* ensure logo sticks to the top */
}

.home-link {
    align-self: flex-start; /* keep link starting at text block left edge */
    font-size: inherit; /* Match the font size of .content p */
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Adjusted .home-link to match the font size of 20px */
.home-link {
    font-size: 20px; /* Match the font size of the paragraph */
    color: var(--text-secondary);
}

 .subpage-header h1 {
     font-size: clamp(2.5rem, 4vw, 3.5rem);
     display: block; /* ensure predictable vertical layout */
     line-height: 0.95; /* tighter leading for multi-line titles */
     color: var(--text-primary);
     background: none;
     margin: 0; /* remove inner margins */
     padding: 0;
 }

.subpage-header .page-icon {
    width: 60px;
    height: 60px;
    display: inline-block;
}

.subpage-subtitle {
    max-width: 700px;
    margin: 0.5rem auto 0 auto;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hero::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 20% 50%, rgba(22, 163, 74, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(52, 211, 153, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    transform: translateY(-4vh);
}

.logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 0.0rem;
    background: linear-gradient(135deg, #ffffff 0%, #a8a8b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.membership-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: min(900px, 100%);
    margin: 1.5rem auto 2rem;
}

.hero .membership-container {
    gap: 1.5rem;
}

.membership-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: auto;
    min-height: var(--hero-control-height);
    margin: 0;
    padding: 0.9rem 1.1rem;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.membership-badge-logo {
    width: 132px;
    max-width: 42vw;
    height: auto;
    display: block;
}

.membership-badge-copy {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-secondary);
    text-align: left;
}

.support-badge {
    margin-top: 0;
}

.support-badge-logo-wrap {
    width: 132px;
    max-width: 42vw;
}

.support-badge-logo {
    width: 100%;
}

.cta-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    width: min(900px, 100%);
    margin: 0 auto;
}

.hero .cta-container {
    gap: 1.5rem;
}

.cta-button {
    padding: 1rem 2rem; /* slightly less vertical padding for shorter height */
    font-size: 2rem; /* increased per request */
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* allow buttons to shrink on small screens */
    min-width: 0;
    min-height: var(--hero-control-height);
    flex: 1 1 0;
    max-width: 100%;
}

.cta-primary {
    background: var(--gradient-3);
    color: var(--bg-dark);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.4);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.cta-secondary:hover {
    background: rgba(52, 211, 153, 0.1);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.5;
    margin-bottom: 4rem;
}

/* Harmonize content spacing for subpages */
.content h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.6rem;
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Add vertical spacing above each section heading inside content */
.content h2 {
    margin-top: 2.25rem; /* space above each section title */
    margin-bottom: 0.6rem; /* keep a bit of space below the title */
    color: var(--text-primary);
}

/* Style mailto links inside content to match site accent */
.content a[href^="mailto:"] {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}
.content a[href^="mailto:"]:hover {
    text-decoration: underline;
    opacity: 0.95;
}

/* Desktop adjustments: make the subpage header more prominent on large screens */
/* Medium breakpoint: scale header to sit between tablet and large-desktop sizes */
@media (min-width: 800px) and (max-width: 999px) {
    .subpage-text h1 {
        font-size: 4.5rem; /* medium screens: larger than clamp but smaller than desktop */
    }

    .page-icon,
    .subpage-content img.page-icon {
        width: 68px;
        height: 68px;
    }
}

@media (min-width: 1000px) {
    .subpage-header {
        padding: 2rem 2rem; /* larger vertical space on desktop */
    }

    .subpage-content {
        gap: 1.25rem;
    }

    /* larger icon for desktop */
    .page-icon,
    .subpage-content img.page-icon {
        width: 76px;
        height: 76px;
    }

    /* increase title size for desktop while keeping clamp fallback */
    .subpage-text h1 {
        font-size: 5rem; /* capped so title doesn't break layout */
        line-height: 0.95; /* tighter leading so the two lines sit closer */
        margin: 0; /* remove inner margins */
        padding: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        hyphens: auto;
        text-align: left; /* ensure title is left-aligned */
    }

    .home-link a {
        font-size: 1rem;
    }
}

/* Portfolio Section */
.portfolio {
    /* reduce vertical padding so footer is closer */
    padding: 3rem 2rem;
    background: var(--bg-dark);
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.portfolio-row {
    display: flex;
    align-items: flex-start; /* align thumbnail and text to top */
    gap: 1rem;
}

/* on mobile, stack thumbnail above text */
@media (max-width: 800px) {
    .hero {
        padding-top: 2.25rem;
    }

    .hero-content {
        transform: translateY(-1.5vh);
    }

    .membership-container,
    .cta-container {
        grid-template-columns: 1fr;
    }

    .portfolio-row {
        flex-direction: column;
        align-items: center;
        text-align: center; /* center text when stacked */
    }
    .portfolio-thumb-img {
        margin-right: 0;
        margin-bottom: 1rem;
        /* width already responsive globally, just ensure no extra cap needed */
        box-sizing: border-box;/* include padding/border in width */
    }

    /* allow CTA button text to wrap on phones instead of forcing a single line */
    .cta-button {
        white-space: normal;
        word-break: break-word;
    }

    .membership-badge {
        gap: 0.8rem;
        align-items: center;
    }

    .membership-badge-logo {
        width: 100px;
        max-width: 24vw;
    }

    .membership-badge-copy {
        font-size: 0.95rem;
    }

    .support-badge {
        margin-top: 0;
    }

    .support-badge-logo-wrap {
        width: 100px;
        max-width: 24vw;
    }
}

.portfolio-thumb {
    font-size: 3rem;
    line-height: 1;
}

.portfolio-thumb-img {
    width: 100%;             /* fill space but never exceed container */
    max-width: 400px;        /* cap on large screens */
    height: auto;            /* preserve aspect ratio */
    border-radius: 4px; /* subtler corners */
    object-fit: cover;
    margin-right: 1rem;
    flex-shrink: 0;          /* prevent shrinking on narrow viewports */
}

/* placeholder used by CTA item to reserve thumbnail space */
.portfolio-thumb-placeholder {
    width: 100%;
    max-width: 400px;        /* match thumbnail max width */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* make CTA button the same width as thumbnails */
.cta-portfolio .cta-wide {
    display: inline-block;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* add extra gap above the call-to-action row so it sits apart
   from the preceding portfolio items */
.cta-portfolio {
    margin-top: 2rem; /* adjusted to half the previous spacing */
}

/* ensure the CTA item's text aligns with standard portfolio entries
   by providing the same space between thumbnail and info that images
   create via their margin-right + row gap */
.cta-portfolio .portfolio-info {
    margin-left: 1rem;
}

.portfolio-info h3 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    margin-bottom: 0.5rem;
    line-height: 1.1; /* reduce extra space between lines */
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.4;
}


/* Comparison Section */
.comparison {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #10221a 100%);
}

.comparison-container {
    max-width: 1200px;
    margin: 0 auto;
}

.comparison-table {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-row {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-label {
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-before {
    color: #ef4444;
}

.comparison-after {
    color: var(--accent-green);
    font-weight: 600;
}

/* Team Section */
.team {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.team-container {
    max-width: 1200px;
    margin: 0 auto;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.member-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    /* reduce vertical padding so content sits closer to top edge */
    padding: 1rem 0;
    color: var(--text-secondary);
    /* text-align: center will be handled by flex on desktop but
       we keep it here for mobile fallback */
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* When the page has a centered main content (subpages), align the footer inner width
   to match the main content so left/right edges line up visually. */
main.content + footer .footer-content,
footer + main.content + footer .footer-content {
    max-width: 900px;
    padding: 0 2rem; /* match main's horizontal padding */
}

.footer-left,
.footer-right {
    font-size: 0.9rem;
}

.footer-right a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1rem;
}

footer p {
    margin: 0;
}

@media (max-width: 800px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-right {
        margin-top: 0.5rem;
    }
}

/* Lightbox styles */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#lightbox.active {
    display: flex;
}
#lightbox .lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}
#lightbox .lightbox-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
}
/* when using touch-mode we handle panning ourselves, hide scrollbars */
#lightbox.touch-mode .lightbox-content {

/* spacing for pages with numbered points (terms, privacy, etc.) */
.content h2 {
    /* extra space before each numbered section */
    margin-top: 3rem;
    margin-bottom: 1rem;
}
.content p {
    /* more room between paragraphs so points don't feel crowded */
    margin-bottom: 2rem;
}

    overflow: hidden;
}
#lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}
#lightbox.touch-mode #lightbox-img {
    cursor: grab;
    /* allow original dimensions or oversized images instead of
       forcing them to fit the viewport width */
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
}
#lightbox-img.dragging {
    cursor: grabbing;
}

/* instruction text at bottom of lightbox in touch mode */
.lightbox-instructions {
    position: fixed;
    /* attach to bottom and span most of the width */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    color: #fff;
    font-size: 1rem;
    background: rgba(0,0,0,0.7);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1001;
}
#lightbox.touch-mode .lightbox-instructions {
    opacity: 1;
}
/* close button inside instructions */
.lightbox-instructions button {
    margin-top: 0.5rem;
    background: var(--gradient-3);
    color: var(--bg-dark);
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.3rem;
    cursor: pointer;
    display: block;
    width: 100%;
    max-width: 300px; /* keep sensible max width */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
/* ensure button doesn't interfere when instructions hidden */
#lightbox .lightbox-instructions button {
    pointer-events: auto;
}

/* Align terms title to the left on mobile */
@media (max-width: 800px) {
    .subpage-header {
        text-align: left;
    }
    .subpage-content {
        align-items: flex-start; /* Align icon and text to the left */
    }
}

/* Cookie consent banner */
.cookie-consent-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 2rem));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(21, 21, 32, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    z-index: 1100;
}

.cookie-consent-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.45;
}

.cookie-consent-text a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.cookie-btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn-primary {
    color: var(--bg-dark);
    background: var(--accent-cyan);
}

.cookie-btn-secondary {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
}

@media (max-width: 800px) {
    .cookie-consent-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-consent-actions {
        width: 100%;
    }
    .cookie-btn {
        flex: 1 1 0;
    }
}
