/* ===================================================================
 * ITAMOA Rebrand - Luxury Editorial Style
 * Shared styles for Option A and Option B
 * ------------------------------------------------------------------- */

:root {
    --rebrand-bg: #F8F7F5;
    --rebrand-text: #2C2C2C;
    --rebrand-text-muted: #5a5a5a;
    --rebrand-border: rgba(44, 44, 44, 0.15);
    --rebrand-link: #2C2C2C;
    --rebrand-link-hover: #5a5a5a;
}

/* Dark theme */
body.rebrand-body.theme-dark {
    --rebrand-bg: #0a0a0a;
    --rebrand-text: #e8e8e8;
    --rebrand-text-muted: #b0b0b0;
    --rebrand-border: rgba(255, 255, 255, 0.15);
    --rebrand-link: #e8e8e8;
    --rebrand-link-hover: #ffffff;
}

body.rebrand-body.theme-dark #preloader.rebrand-preloader {
    background: #0a0a0a;
}

/* Black logo on light theme; white logo on dark theme */
body.rebrand-body .rebrand-logo img,
body.rebrand-body #preloader .preloader-logo {
    filter: brightness(0);
}
body.rebrand-body.theme-dark .rebrand-logo img,
body.rebrand-body.theme-dark #preloader .preloader-logo {
    filter: brightness(0) invert(1);
}

/* Header actions: theme toggle + language nav (top-right, nav below icon) */
.rebrand-header-actions {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

/* Theme toggle (moon on light = switch to dark, sun on dark = switch to light) */
.rebrand-theme-toggle {
    width: 72px;
    height: 72px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}
.rebrand-theme-toggle:hover {
    opacity: 1;
}
.rebrand-theme-toggle svg {
    width: 2.8rem;
    height: 2.8rem;
}
.rebrand-theme-toggle .theme-icon {
    color: var(--rebrand-text);
    fill: currentColor;
}
/* Moon: force black on light mode, no colors */
body.rebrand-body:not(.theme-dark) .rebrand-theme-toggle .theme-icon {
    color: #000;
    fill: #000;
}
body.rebrand-body.theme-dark .rebrand-theme-toggle .theme-icon {
    color: #fff;
    fill: #fff;
}
.rebrand-header {
    position: relative;
}

/* Base overrides */
body.rebrand-body {
    background: var(--rebrand-bg);
    color: var(--rebrand-text);
    font-family: "montserrat-light", sans-serif;
    font-size: 1.6rem;
    line-height: 1.7;
}

body.rebrand-body a {
    color: var(--rebrand-link);
    text-decoration: none;
}

body.rebrand-body a:hover {
    color: var(--rebrand-link-hover);
    text-decoration: underline;
}

/* Header - centered logo, thin line, text nav */
.rebrand-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.rebrand-header .rebrand-logo {
    display: block;
    margin: 0 auto 2rem;
    max-width: 160px;
    height: auto;
}

.rebrand-nav {
    font-family: "montserrat-regular", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.rebrand-nav a,
.rebrand-nav .rebrand-nav-sep {
    margin: 0 0.3rem;
}

.rebrand-nav a:first-of-type {
    margin-left: 0;
}

.rebrand-nav-lang {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
}

.rebrand-nav-lang .rebrand-flag {
    margin-left: 0.15em;
}

/* Language nav in header: vertical stack, centered with theme icon (same width) */
.rebrand-header-actions .rebrand-nav.rebrand-nav-lang {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 72px;
    min-width: 72px;
    text-align: center;
}
.rebrand-header-actions .rebrand-nav-lang .rebrand-nav-sep {
    display: none;
}

/* Header language: flags same width as theme icon (2.8rem), square box so they align vertically */
.rebrand-header-actions .rebrand-nav-lang .rebrand-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    max-width: 2.8rem;
    font-size: 2.8rem;
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
    overflow: hidden;
}
.rebrand-header-actions .rebrand-nav-lang .rebrand-lang-fallback {
    display: none !important;
}
.rebrand-header-actions .rebrand-nav-lang a {
    position: relative;
    width: 72px;
    min-width: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}
.rebrand-header-actions .rebrand-nav-lang a .rebrand-flag {
    font-size: 2.8rem;
}

/* Uppercase label */
.rebrand-label {
    display: block;
    font-family: "montserrat-regular", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--rebrand-text-muted);
    margin-bottom: 1.5rem;
}

/* Main serif headline */
.rebrand-headline {
    font-family: "lora-regular", serif;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    line-height: 1.2;
    color: var(--rebrand-text);
    margin: 0 auto 2rem;
    font-weight: normal;
    max-width: 800px;
}

/* Subhead for services */
.rebrand-subhead {
    font-family: "lora-regular", serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.3;
    color: var(--rebrand-text);
    margin: 0 auto 1.5rem;
    font-weight: normal;
}

/* Body paragraph */
.rebrand-body-text {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--rebrand-text-muted);
    font-size: 1.5rem;
    line-height: 1.7;
}

.rebrand-block .rebrand-body-text {
    margin-bottom: 4rem;
}

.rebrand-block:last-child .rebrand-body-text {
    margin-bottom: 0;
}

/* Breadcrumb nav */
.rebrand-breadcrumb {
    font-family: "montserrat-regular", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 2rem;
}

.rebrand-breadcrumb a {
    color: var(--rebrand-text-muted);
}

/* CTA link */
.rebrand-link {
    display: inline-block;
    margin-top: 2rem;
    font-family: "montserrat-regular", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid var(--rebrand-text);
    transition: all 0.2s ease;
}

.rebrand-link:hover {
    background: var(--rebrand-text);
    color: var(--rebrand-bg);
    text-decoration: none;
}

/* Contact line */
.rebrand-contact-line {
    font-size: 1.5rem;
    margin: 0;
}

/* Hero section - Option A (no image) */
.rebrand-hero {
    padding: 8rem 2rem 10rem;
    text-align: center;
}

.rebrand-hero.rebrand-hero--soft {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.rebrand-hero.rebrand-hero--soft::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(248, 247, 245, 0.88);
}

.rebrand-hero.rebrand-hero--soft .rebrand-hero-inner {
    position: relative;
    z-index: 1;
}

/* Services section */
.rebrand-section {
    padding: 8rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.rebrand-block {
    text-align: center;
    margin-bottom: 6rem;
}

.rebrand-block:last-child {
    margin-bottom: 0;
}

.rebrand-block .rebrand-label {
    margin-bottom: 1rem;
}

.rebrand-block .rebrand-subhead {
    margin-bottom: 1.5rem;
}

/* ITAMOAi Labs */
.rebrand-labs {
    text-align: center;
    padding: 6rem 2rem;
}

.rebrand-labs .rebrand-cta {
    display: inline-block;
    margin-top: 2rem;
    font-family: "montserrat-regular", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid var(--rebrand-text);
    transition: all 0.2s ease;
}

.rebrand-labs .rebrand-cta:hover {
    background: var(--rebrand-text);
    color: var(--rebrand-bg);
    text-decoration: none;
}

/* Request access form (ITAMOAi) */
.rebrand-request-hint {
    margin: 0 auto 1.5rem;
    max-width: 400px;
    font-size: 1.4rem;
    color: var(--rebrand-text-muted);
}
.rebrand-request-heading {
    margin-top: 3rem;
}

.rebrand-request-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0;
    max-width: 400px;
}
.rebrand-request-email {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.2rem;
    font-family: inherit;
    font-size: 1.5rem;
    border: 1px solid var(--rebrand-border);
    background: var(--rebrand-bg);
    color: var(--rebrand-text);
}
.rebrand-request-email::placeholder {
    color: var(--rebrand-text-muted);
}
.rebrand-request-btn {
    margin-top: 0;
}
.rebrand-request-error {
    margin-top: 1rem;
    font-size: 1.4rem;
    color: var(--rebrand-text-muted);
}
.rebrand-request-error a {
    color: var(--rebrand-link);
    text-decoration: underline;
}
.rebrand-request-success {
    margin-top: 1rem;
    font-size: 1.6rem;
    color: var(--rebrand-text);
}
.rebrand-request-thanks {
    margin-top: 2rem;
    font-style: italic;
}

/* Contact */
.rebrand-contact {
    text-align: center;
    padding: 8rem 2rem;
}

.rebrand-contact .rebrand-contact-line {
    margin-bottom: 0;
}

.rebrand-contact a[href^="mailto"] {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Footer */
.rebrand-footer {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 1.2rem;
    color: var(--rebrand-text-muted);
}

.rebrand-footer span {
    margin: 0 1rem;
}

/* Preloader - logo on cream, centered */
#preloader.rebrand-preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rebrand-bg);
    z-index: 9999;
    display: table;
    width: 100%;
    height: 100%;
}

#preloader.rebrand-preloader #loader {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

#preloader.rebrand-preloader .preloader-logo {
    max-width: 120px;
    max-height: 60px;
    display: block;
    margin: 0 auto;
}

/* Hide default header/nav when using rebrand */
body.rebrand .s-header,
body.rebrand .home-social {
    display: none;
}

/* Header actions: smaller on mobile, same width for icon and flags */
@media (max-width: 600px) {
    .rebrand-header-actions {
        top: 1rem;
        right: 1rem;
    }
    .rebrand-theme-toggle {
        width: 48px;
        height: 48px;
    }
    .rebrand-theme-toggle svg {
        width: 2rem;
        height: 2rem;
    }
    .rebrand-header-actions .rebrand-nav.rebrand-nav-lang {
        width: 48px;
        min-width: 48px;
    }
    .rebrand-header-actions .rebrand-nav-lang a {
        width: 48px;
        min-width: 48px;
    }
    .rebrand-header-actions .rebrand-nav-lang .rebrand-flag,
    .rebrand-header-actions .rebrand-nav-lang a .rebrand-flag {
        width: 2rem;
        height: 2rem;
        max-width: 2rem;
        font-size: 2rem;
    }
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}
