/* ==========================================================================
   adoc Studio - Global Styles (site.css)
   Shared variables and base styles for all pages
   ========================================================================== */

/* ==========================================================================
   Web Fonts
   ========================================================================== */
@font-face { font-family: "Meta Pro"; src: url("/assets/fonts/MetaPro-Book.woff") format("woff"); font-weight: 400; font-style: normal; }
@font-face { font-family: "Meta Pro"; src: url("/assets/fonts/MetaPro-Medium.woff") format("woff"); font-weight: 600; font-style: normal; }
@font-face { font-family: "Meta Pro"; src: url("/assets/fonts/MetaPro-Bold.woff") format("woff"); font-weight: 700; font-style: normal; }

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors - Primary */
    --color-primary: #2eb4ef;
    --color-primary-dark: #1a9cd4;
    --color-primary-light: #5fcaff;

    /* Colors - Text */
    --color-text-dark: #2e3738;
    --color-text-white: #ffffff;
    --color-text-muted: #86868b;
    --color-dark-blue: #102F48;

    /* Colors - Backgrounds */
    --color-bg-light-blue: #eff9fe;
    --color-bg-cream: #faf9f7;
    --color-surface: #f5f5f7;
    --color-bg-dark: #1c1c1c;
    --border-light: var(--color-surface);

    /* Colors - Special (features.css major tier) */
    --color-major-tier: #1e2a3a;

    /* Navigation */
    --color-nav-bg: #0a1628;

    /* Gradients */
    --gradient-hero: linear-gradient(160deg, #0a1628 0%, #102F48 40%, #1a4a6e 100%);

    /* SF Symbol Filter for --color-primary (#2eb4ef) */
    --filter-primary: brightness(0) saturate(100%) invert(56%) sepia(76%) saturate(567%) hue-rotate(161deg) brightness(96%) contrast(91%);

    /* Typography */
    --font-main: 'Meta Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --prose-font-size: clamp(1rem, 1.2vw, 1.0625rem);
    --prose-line-height: 1.8;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 60px rgba(46, 180, 239, 0.3);
    --shadow-nav: 0 2px 20px rgba(0, 0, 0, 0.2);

    /* Layout */
    --container-max-width: 1200px;
    --content-width: 720px;
    --content-width-wide: 800px;
    --sidebar-width: 280px;
    --layout-gap: 48px;

    /* Code Block Colors */
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    --color-code-bg: #1d1f21;
    --color-code-text: #c5c8c6;
    --color-code-comment: #969896;
    --color-code-keyword: #b294bb;
    --color-code-string: #b5bd68;
    --color-code-function: #f0c674;

    /* Transitions */
    --transition-base: all 0.3s ease;

    /* Card Styling */
    --card-padding: clamp(24px, 4vw, 40px);
    --card-margin-bottom: 24px;
    --card-border: 1px solid var(--border-light);

    /* Button Styling */
    --btn-padding: 12px 24px;
    --btn-padding-large: 14px 28px;

    /* Hero Padding */
    --hero-padding-top: 120px;
    --hero-padding-bottom: 60px;
    --hero-padding-top-mobile: 100px;
    --hero-padding-bottom-mobile: 48px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
    font-family: var(--font-main);
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.6;
    color: var(--color-text-dark);
    background: var(--color-text-white);
}

::selection { background: var(--color-primary); color: white; }
a { color: inherit; text-decoration: none; transition: var(--transition-base); }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3 {
    font-family: var(--font-main);
    color: var(--color-dark-blue);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.35; }
p { margin-bottom: 1rem; }
.lead { font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--color-text-dark); }

/* Animated Link Underline */
.link-animated { position: relative; display: inline; }
.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}
.link-animated:hover::after { width: 100%; }

/* ==========================================================================
   Layout
   ========================================================================== */
.container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px); }
.section { padding: clamp(60px, 10vw, 100px) 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--btn-padding);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
    corner-shape: squircle;
}

.btn--primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    color: white;
}

.btn--secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}
.btn--outline:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn--large { padding: var(--btn-padding-large); }
.btn--small { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn--full { width: 100%; justify-content: center; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: clamp(12px, 2vw, 20px) 0;
    transition: var(--transition-base);
}

.nav--scrolled {
    background: var(--color-nav-bg);
    box-shadow: var(--shadow-nav);
    padding: 12px 0;
}

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

.nav__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: white;
    z-index: 1001;
}

.nav__logo-img {
    height: 74px;
    width: auto;
    transition: height 0.3s ease;
}

.nav--scrolled .nav__logo-img { height: 50px; }

.nav__links {
    display: flex;
    gap: clamp(24px, 4vw, 40px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    padding: 8px 0;
    transition: color 0.2s ease;
}
.nav__link:hover { color: white; }

.nav__cta { display: flex; gap: 12px; }

/* Mobile Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    corner-shape: squircle;
}

.nav__toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    transform-origin: center;
}

.nav__toggle.is-active .nav__toggle-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-active .nav__toggle-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle.is-active .nav__toggle-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.nav__mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav__mobile.is-open { opacity: 1; visibility: visible; }

.nav__mobile-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 100px 24px 40px;
}

.nav__mobile-links {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav__mobile-item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.nav__mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 0;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    background: none;
    border: none;
    outline: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav__mobile-link:hover { color: var(--color-primary); }

.nav__mobile-cta { padding-top: 24px; margin-top: auto; }

body.nav-open { overflow: hidden; }

/* ==========================================================================
   Content Typography (Global)
   ========================================================================== */

/* Content Links (prose text only, not components) */
.prose a,
.default-main a,
.article-content a,
.slide-text a {
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
    display: inline;
}

.prose a::after,
.default-main a::after,
.article-content a::after,
.slide-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.prose a:hover::after,
.default-main a:hover::after,
.article-content a:hover::after,
.slide-text a:hover::after {
    width: 100%;
}

/* Exclude component links from animated underline */
.article-toc a::after,
.article-cta a::after,
.article-related a::after,
.blog-card a::after,
.footer__social-link::after,
.industry-card::after,
.industry-feature a::after,
.default-toc a::after,
.gallery-bullet::after {
    display: none !important;
}

strong {
    font-weight: 600;
    color: var(--color-dark-blue);
}

/* Lists */
ul, ol {
    margin: 0 0 1.5em;
    padding-left: 1.5em;
}

li { margin-bottom: 0.5em; }
li::marker { color: var(--color-primary); }

/* Reset for nav/footer lists */
.nav__links,
.nav__mobile-links,
.footer__links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__links li,
.nav__mobile-links li {
    margin-bottom: 0;
}

.nav__links li::marker,
.nav__mobile-links li::marker,
.footer__links li::marker {
    color: transparent;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 2em 0;
    padding: 1.25em 1.5em;
    background: var(--color-bg-light-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-dark);
}

blockquote p:last-child { margin-bottom: 0; }

/* Inline Code (exclude code inside pre blocks) */
:not(pre) > code {
    background: var(--color-surface);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--color-dark-blue);
}

/* ==========================================================================
   Code Blocks
   ========================================================================== */

.code-block-wrapper {
    position: relative;
    margin: 2em 0;
}

.prose pre,
.article-body pre,
.default-main pre {
    background: var(--color-code-bg) !important;
    color: var(--color-code-text) !important;
    padding: 24px !important;
    padding-top: 44px !important; /* Space for copy button */
    border-radius: var(--radius-md) !important;
    overflow-x: auto !important;
    margin: 0 !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    font-family: var(--font-mono) !important;
}

.prose pre code,
.article-body pre code,
.default-main pre code {
    background: none !important;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
    font-family: inherit;
}

/* Code Copy Button */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 10;
    overflow: visible;
    padding: 0;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.code-copy-btn .sf-symbol {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: opacity 0.2s ease;
    object-fit: contain;
}

.code-copy-btn .copy-icon {
    width: 20px;
    height: 20px;
    color: #fff;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.code-copy-btn:hover .sf-symbol,
.code-copy-btn:hover .copy-icon {
    opacity: 1;
}

.code-copy-btn.copied {
    background: rgba(46, 180, 239, 0.3);
    border-color: var(--color-primary);
}

.code-copy-btn.copied .sf-symbol {
    filter: var(--filter-primary);
    opacity: 1;
}

.code-copy-btn.copied .copy-icon {
    color: var(--color-primary);
    opacity: 1;
}

.code-copy-btn .check-icon {
    width: 20px;
    height: 20px;
    color: #fff;
}

.code-copy-btn.copied .check-icon {
    color: var(--color-primary);
}

@media print {
    .code-copy-btn {
        display: none;
    }
}

/* Content Images (prose areas only) */
.prose img,
.default-main img,
.article-body img,
.slide-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2em 0;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: var(--card-border);
    margin: 3em 0;
}

/* ==========================================================================
   Prose Container (Optional)
   ========================================================================== */
.prose {
    font-size: var(--prose-font-size);
    line-height: var(--prose-line-height);
    color: var(--color-text-dark);
}

.prose h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 20px;
    scroll-margin-top: 100px;
}

.prose h3 {
    font-size: clamp(1.25rem, 2vw, 1.375rem);
    font-weight: 600;
    color: var(--color-dark-blue);
    margin-top: 40px;
    margin-bottom: 16px;
}

.prose p { margin-bottom: 1.5em; }


/* ==========================================================================
   Assets
   ========================================================================== */

img, video {border-radius: var(--radius-md);}
video {background: #000; clip-path: inset(0 round var(--radius-md));}

/* ==========================================================================
   Cards (Generic)
   ========================================================================== */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--card-padding);
    margin-bottom: var(--card-margin-bottom);
    border: var(--card-border);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-base);
    corner-shape: squircle;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   Tables
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
}

thead { background: var(--color-surface); }

th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--color-dark-blue);
    border-bottom: 2px solid var(--border-light);
}

td {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    color: var(--color-text-dark);
}

/* ==========================================================================
   SF Symbol Styles
   ========================================================================== */
.sf-symbol {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

img.sf-symbol {
    width: 1em;
    height: 1em;
    object-fit: contain;
    border-radius: 0 !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #020a14;
    color: white;
    padding: 48px 0 32px;
}

/* 4-Column Grid */
.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer__column-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 16px;
    cursor: default;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
}

.footer__column-title {
    color: var(--color-primary-light);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.footer__column-chevron {
    width: 16px;
    height: 16px;
    stroke: var(--color-primary-light);
    margin-left: auto;
    transition: transform 0.2s ease;
    display: none;
}

.footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__links li {
    margin-bottom: 4px;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: white;
}

/* Brand Column (Newsletter) */
.footer__column--brand {
    text-align: left;
}

.footer__column--brand .footer__column-title {
    margin-bottom: 16px;
}

.footer__newsletter-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 16px;
}

/* Logos */
.footer__left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__logos {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer__webring {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    margin: 0;
}

.footer__webring a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s;
}

.footer__webring a:hover {
    color: white;
}

.footer__logo {
    display: inline-block;
}

.footer__logo-img {
    height: 40px;
    width: auto;
    border-radius: 0 !important;
}

.footer__logo-img--tekom {
    height: 36px;
}

/* Newsletter Form */
.footer-newsletter {
    position: relative;
}

.footer-newsletter__honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.footer-newsletter__field {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
}

.footer-newsletter__input {
    width: 230px;
    padding: 10px 14px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: white;
    transition: border-color 0.2s, background-color 0.2s;
}

.footer-newsletter__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.footer-newsletter__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.1);
}

.footer-newsletter__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.footer-newsletter__button:hover:not(:disabled) {
    background: var(--color-primary-dark, #1a9fd4);
}

.footer-newsletter__button:active:not(:disabled) {
    transform: scale(0.95);
}

.footer-newsletter__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.footer-newsletter__icon,
.footer-newsletter__spinner {
    width: 18px;
    height: 18px;
    color: white;
}

.footer-newsletter__spinner {
    display: none;
}

.footer-newsletter__button.is-loading .footer-newsletter__icon {
    display: none;
}

.footer-newsletter__button.is-loading .footer-newsletter__spinner {
    display: block;
}

.footer-newsletter__status {
    font-size: 0.75rem;
    margin: 6px 0 0;
}

.footer-newsletter__status:empty {
    display: none;
}

.footer-newsletter__status.is-success {
    color: #34c759;
}

.footer-newsletter__status.is-error {
    color: #ff6b6b;
}

/* Bottom Bar */
.footer__bottom {
    padding-top: 32px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer__center {
    text-align: center;
}

.footer__copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
    margin: 0 0 4px;
}

.footer__legal {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer__legal a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.footer__legal a:hover {
    color: white;
}

/* ==========================================================================
   Newsletter Box (Embeddable Snippet)
   ========================================================================== */
.newsletter-box {
    background: var(--color-surface, #f5f5f7);
    border-radius: var(--radius-lg);
    padding: 32px 32px 28px;
    margin: 40px 0;
    text-align: center;
}

.newsletter-box__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px !important;
}

.newsletter-box__text {
    color: var(--color-text-dark);
    font-size: 0.9375rem;
    margin: 0 auto 20px;
    line-height: 1.5;
    max-width: 500px;
    text-align: center;
}

.newsletter-box__form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.newsletter-box__honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.newsletter-box__field {
    display: flex;
    gap: 8px;
}

.newsletter-box__input {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border: 1px solid #d1d1d6;
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-box__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 180, 239, 0.15);
}

.newsletter-box__input::placeholder {
    color: #8e8e93;
}

.newsletter-box__button {
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-box__button:hover:not(:disabled) {
    background: var(--color-primary-dark, #1a9fd4);
}

.newsletter-box__button:active:not(:disabled) {
    transform: scale(0.98);
}

.newsletter-box__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.newsletter-box__spinner {
    width: 18px;
    height: 18px;
    display: none;
}

.newsletter-box__button.is-loading .newsletter-box__button-text {
    display: none;
}

.newsletter-box__button.is-loading .newsletter-box__spinner {
    display: block;
}

.newsletter-box__status {
    font-size: 0.8125rem;
    margin: 12px 0 0;
    min-height: 1.2em;
    text-align: center;
}

.newsletter-box__status:empty {
    display: none;
}

.newsletter-box__status.is-success {
    color: #34c759;
}

.newsletter-box__status.is-error {
    color: #ff3b30;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .newsletter-box {
        background: #1c1c1e;
    }

    .newsletter-box__input {
        background: #3c3c3e;
        border-color: #48484a;
        color: #f5f5f7;
    }

    .newsletter-box__input:focus {
        border-color: var(--color-primary-light);
        box-shadow: 0 0 0 3px rgba(100, 210, 255, 0.2);
    }
}

@media (max-width: 480px) {
    .newsletter-box {
        padding: 24px 20px;
    }

    .newsletter-box__field {
        flex-direction: column;
    }

    .newsletter-box__button {
        justify-content: center;
    }
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-main);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.lang-switcher__icon { width: 18px; height: 18px; opacity: 0.8; }
.lang-switcher__current { font-weight: 600; letter-spacing: 0.02em; }

/* Language Modal */
.lang-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lang-modal.is-open { opacity: 1; visibility: visible; }

.lang-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lang-modal__content {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #1a2535;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-large);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.lang-modal.is-open .lang-modal__content { transform: scale(1) translateY(0); }

.lang-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-modal__title { font-size: 1.125rem; font-weight: 600; color: white; margin: 0; }

.lang-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang-modal__close:hover { background: rgba(255, 255, 255, 0.15); color: white; }
.lang-modal__close svg { width: 18px; height: 18px; }

.lang-modal__options { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.lang-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.lang-option:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.lang-option--active { background: rgba(46, 180, 239, 0.15); color: white; }
.lang-option--active:hover { background: rgba(46, 180, 239, 0.2); }
.lang-option__flag { font-size: 1.75rem; line-height: 1; }
.lang-option__details { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.lang-option__name { font-size: 0.9375rem; font-weight: 600; color: white; }
.lang-option__native { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.5); }
.lang-option--active .lang-option__native { color: rgba(255, 255, 255, 0.7); }
.lang-option__check { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

@media (max-width: 600px) {
    .lang-modal__content { max-width: 100%; margin: 0 16px; }
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(46, 180, 239, 0.2), transparent 60%);
    pointer-events: none;
}

.cta-section__inner {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-section__title {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.cta-section__title .accent { color: var(--color-primary); }

.cta-section__text {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    margin-bottom: 40px;
}

.cta-section__buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-section__note {
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    margin-top: 24px;
}

/* Typewriter Effect & Cursor */
.typewriter {
    display: inline;
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: var(--color-primary);
    margin-left: 2px;
    vertical-align: baseline;
    position: relative;
    top: 0.05em;
    opacity: 1;
}

.typewriter-cursor.blink {
    animation: cursor-blink 1s step-end infinite;
}

.typewriter-cursor.hidden {
    opacity: 0;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Responsive - Navigation
   ========================================================================== */
@media (max-width: 900px) {
    .nav__links { display: none; }
    .nav__cta { display: none !important; }
    .nav__toggle { display: flex; }

    .nav__logo-img,
    .nav--scrolled .nav__logo-img { height: 48px; }
}

@media (max-width: 480px) {
    .nav__mobile-inner { padding: 90px 20px 32px; }
    .nav__mobile-link { font-size: 1.125rem; padding: 16px 0; }
    .nav__logo-img,
    .nav--scrolled .nav__logo-img { height: 40px; }
}

/* ==========================================================================
   Responsive - Footer
   ========================================================================== */
@media (max-width: 900px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer__column--brand {
        grid-column: span 2;
        text-align: left;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-newsletter__field {
        justify-content: flex-start;
    }

    .footer__left {
        align-items: center;
    }

    .footer__logos {
        justify-content: center;
    }

    .footer__webring {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: left;
    }

    .footer__column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 16px 0;
    }

    .footer__column-toggle {
        cursor: pointer;
        margin: 0;
    }

    .footer__column-chevron {
        display: block;
    }

    .footer__column-toggle[aria-expanded="true"] .footer__column-chevron {
        transform: rotate(180deg);
    }

    .footer__links {
        display: none;
        padding-top: 12px;
    }

    .footer__column.is-open .footer__links {
        display: block;
    }

    .footer__column--brand {
        grid-column: span 1;
        border-bottom: none;
        text-align: left;
        padding-top: 24px;
    }

    .footer-newsletter__field {
        justify-content: flex-start;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .footer__logos {
        justify-content: center;
    }

    .footer__legal {
        gap: 16px;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-text-dark: #e5e5e7;
        --color-bg-cream: #1c1c1c;
        --color-surface: #2c2c2e;
        --color-bg-light-blue: #1a2a3a;
        --color-text-muted: #98989d;
        --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.4);
    }

    body { background: #000000; }

    .nav--scrolled { background: var(--color-nav-bg); }

    h1, h2, h3 { color: #f5f5f7; }

    .footer { background: #000000; }

    :not(pre) > code {
        background: #2c2c2e;
        color: #e5e5e7;
    }

    table {
        background: #1c1c1c;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    thead { background: #2c2c2e; }
    th { color: #f5f5f7; border-bottom-color: #3c3c3e; }
    td { color: #a1a1a6; border-bottom-color: #2c2c2e; }
    tbody tr:hover { background: rgba(46, 180, 239, 0.05); }

    blockquote { background: #1c1c1c; }

    strong { color: #f5f5f7; }

    .card {
        background: #2c2c2e;
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-large);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .lightbox-modal {
        padding: 20px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .nav,
    .footer,
    .cta-section { display: none; }

    body { background: white; color: black; }

    h1, h2, h3 { color: black; }

    .container { max-width: 100%; padding: 0; }
}
