/* ============================================
   Brookline Value Management
   "Quiet Luxury" — seamless, breathing layout
   ============================================ */

:root {
    --navy: #1e2252;
    --navy-deep: #171b40;
    --white: #ffffff;
    --cream: #f9f8f5;
    --text: #2a2a2a;
    --text-secondary: #6b6b6b;
    --text-muted: #9a9a9a;
    --border: #dfdcd7;
    --border-light: #ece9e4;
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--white);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 2.5rem;
    background-color: transparent;
    /* No transition on background-color: iOS 26 Safari reads it for
       dynamic-island chrome tinting and reading mid-transition values
       gives a translucent chrome that lets text bleed through. */
    transition: box-shadow 0.4s ease;
}

.nav.scrolled {
    /* Explicit background-color (not shorthand) so iOS 26 Safari can read it
       for dynamic-island chrome auto-tinting. */
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border-light);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 56px;
}

.nav-links {
    display: flex;
    gap: 2.25rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--navy);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-links a.active {
    color: var(--navy);
}

/* Mobile toggle — two lines → X */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 22px;
    height: 14px;
    position: relative;
    z-index: 101;
}

.nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
}

.nav-toggle span:first-child { top: 0; }
.nav-toggle span:last-child { bottom: 0; }

.nav-toggle.active span:first-child {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active span:last-child {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 2rem 48px;
    position: relative;
    background: var(--white);
}

.hero-content {
    text-align: center;
    max-width: 500px;
    padding-bottom: 5vh;
}

.hero-logo {
    width: 280px;
    height: auto;
    margin: 0 auto 2.5rem;
}

.hero-rule {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin: 0 auto 2.5rem;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--border);
    animation: drift 2.5s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(6px); opacity: 0.9; }
}

/* ---- About ---- */

.about {
    padding: 6rem 2.5rem;
    background: var(--cream);
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy);
    text-align: center;
    margin-bottom: 3rem;
}

.about-content {
    display: flex;
    gap: 3rem;
    max-width: 780px;
    margin: 0 auto;
    align-items: flex-start;
}

.about-photo { flex-shrink: 0; }

.about-photo img {
    width: 180px;
    height: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.about-photo img:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

.about-text h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.linkedin-link {
    color: var(--text-muted);
    display: inline-flex;
    transition: color 0.25s;
}

.linkedin-link:hover { color: var(--navy); }

.about-text p {
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 0.9rem;
}

/* ---- Contact / Mailing List ---- */

.contact {
    padding: 6rem 2.5rem;
    background: var(--white);
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-muted);
}

.contact-form-wrap {
    max-width: 440px;
    margin: 0 auto;
}

.subscribe-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.form-group input {
    width: 100%;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    background: transparent;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-bottom-color: var(--navy);
}

.form-check {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 1.75rem;
}

.form-check input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--navy);
}

.form-check label {
    font-size: 0.6rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.form-check label a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-check label a:hover { color: var(--navy); }

.btn-subscribe {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-subscribe:hover { background: var(--navy-deep); }

.privacy-note {
    font-size: 0.6rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---- Footer ---- */

.footer {
    background: var(--navy);
    padding: 2.75rem 2rem;
}

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

.footer-logo {
    height: 48px;
    width: auto;
    margin: 0 auto 0.85rem;
    filter: brightness(0) invert(1);
    opacity: 0.75;
}

.footer-text {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

.footer-sep { margin: 0 0.4rem; }

.footer-text a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.25s;
}

.footer-text a:hover { color: rgba(255, 255, 255, 0.75); }

/* ---- Disclosure page ---- */

.disclosure-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 5rem 2.5rem 4rem;
    min-height: calc(100vh - 200px);
}

.disclosure-body h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2rem;
}

.disclosure-body h2 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.disclosure-body p {
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1rem;
}

.disclosure-body ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.disclosure-body ol li {
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 0.6rem;
}

/* ---- Essays / Partner Login ---- */

.essays-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 5rem 2.5rem 4rem;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.essays-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.essays-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
}

.login-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.login-card .form-group {
    margin-bottom: 1.25rem;
}

.login-card .form-group label {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.login-card .form-group input {
    width: 100%;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    background: transparent;
    transition: border-color 0.3s ease;
    outline: none;
}

.login-card .form-group input:focus {
    border-bottom-color: var(--navy);
}

.btn-login {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.btn-login:hover { background: var(--navy-deep); }

.login-forgot {
    display: block;
    text-align: right;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    transition: color 0.25s;
}

.login-forgot:hover { color: var(--navy); }

.login-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 2.5rem;
    max-width: 360px;
}

.login-note a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.25s;
}

.login-note a:hover { color: var(--navy); }

/* ---- CJK typography overrides ---- */

html[lang="ja"] .disclosure-body h1,
html[lang="zh-TW"] .disclosure-body h1 {
    letter-spacing: 0.06em;
    font-feature-settings: "palt";
}

html[lang="ja"] .disclosure-body p,
html[lang="ja"] .disclosure-body ol li,
html[lang="zh-TW"] .disclosure-body p,
html[lang="zh-TW"] .disclosure-body ol li {
    letter-spacing: 0.04em;
    line-height: 2.0;
    font-feature-settings: "palt";
}

html[lang="ja"] .disclosure-body h2,
html[lang="zh-TW"] .disclosure-body h2 {
    letter-spacing: 0.04em;
    font-feature-settings: "palt";
}

/* ---- Scroll-reveal animation ---- */

.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .nav { padding: 0 1.5rem; }

    .nav-toggle { display: block; }

    /* display:none when closed so this fixed-inset:0 element doesn't
       compete with .nav for iOS 26's dynamic-island chrome tinting. */
    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 100;
    }

    .nav-links.open {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a { font-size: 0.85rem; }

    .hero { padding: 60px 1.5rem 40px; }
    .hero-logo { width: 220px; }
    .hero-tagline { font-size: 1.25rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .about { padding: 4rem 1.5rem; }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-text h3 { justify-content: center; }

    .contact { padding: 4rem 1.5rem; }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
