/* ============================================================
   Total Growth Investing — Site Stylesheet
   tgi.css  |  All pages link to this file
   ============================================================ */

/* ── VARIABLES ───────────────────────────────────────────────
   Logo colors are the exact values from logo_v1.svg.
   UI-safe versions are used for small text and backgrounds
   where pure green/red/yellow won't contrast well on white.
   ──────────────────────────────────────────────────────────── */
:root {
    /* Exact logo colors */
    --green-logo:   #00bf00;
    --red-logo:     #ff0000;
    --yellow-logo:  #ffff00;

    /* UI-safe versions (readable on white backgrounds) */
    --green:        #00a800;   /* logo green, slightly deepened */
    --green-dark:   #008800;
    --green-light:  #eafaea;
    --green-border: #a8e4b8;
    --red:          #cc0000;   /* logo red, one step back from pure */
    --red-dark:     #aa0000;
    --red-light:    #fdf0ee;
    --yellow:       #b87e00;   /* amber — pure yellow can't work small on white */
    --yellow-light: #fef8ec;
    --yellow-border:#f0d080;

    /* Neutrals */
    --dark:         #1a1a1e;
    --mid:          #4a4a55;
    --muted:        #8e8e9a;
    --bg:           #f8f8f6;
    --surface:      #ffffff;
    --border:       #e4e4e8;
}

/* ── RESET & BASE ────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
}

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.nav-brand img {
    height: 38px;
    width: 38px;
    object-fit: contain;
}

.nav-brand-text {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.15;
    color: var(--dark);
}

.nav-brand-text .T { color: var(--green-logo); }
.nav-brand-text .G { color: var(--red-logo); }
.nav-brand-text .I { color: var(--yellow); }   /* amber at small nav size */

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav ul a {
    text-decoration: none;
    color: var(--mid);
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.18s;
}

nav ul a:hover { color: var(--green); }

nav .btn-nav {
    background: var(--green);
    color: white !important;
    padding: 0.45rem 1.1rem;
    border-radius: 5px;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    transition: background 0.18s !important;
}

nav .btn-nav:hover { background: var(--green-dark) !important; }

/* ── DROPDOWN ────────────────────────────────────────────────── */
nav ul li.has-dropdown {
    position: relative;
}

nav ul li.has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav ul li.has-dropdown > a::after {
    content: '▾';
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.18s;
}

nav ul li.has-dropdown:hover > a::after {
    transform: rotate(-180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    min-width: 200px;
    z-index: 300;
    overflow: hidden;
    padding: 0.35rem 0;
    /* Invisible top padding bridges the gap between nav and dropdown */
    margin-top: 0;
}

/* Bridge element prevents mouse from leaving hover zone */
nav ul li.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

nav ul li.has-dropdown:hover .dropdown-menu {
    display: block;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem !important;
    font-weight: 500;
    color: var(--mid) !important;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover {
    background: var(--green-light);
    color: var(--green) !important;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
}


.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 5rem 2rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 15% 60%, rgba(0,191,0,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 85% 40%, rgba(255,0,0,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-letters {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: clamp(6rem, 18vw, 11rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
    position: relative;
}

/* Hero uses exact logo colors — size makes yellow readable */
.hero-letters .T { color: var(--green-logo); }
.hero-letters .G { color: var(--red-logo); }
.hero-letters .I { color: var(--yellow-logo); text-shadow: 0 0 1px rgba(0,0,0,0.15); }

.hero-not-enough {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.hero-strike {
    font-family: 'Fraunces', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    font-style: italic;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.hero-strike.green { color: var(--green); background: var(--green-light); }
.hero-strike.red   { color: var(--red);   background: var(--red-light);   }

.hero-divider {
    font-family: 'Fraunces', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--muted);
    font-style: italic;
    align-self: center;
}

.hero-tagline {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-weight: 300;
    color: var(--mid);
    max-width: 580px;
    margin: 0.75rem auto 0;
    line-height: 1.5;
}

.hero-tagline em {
    font-style: normal;
    font-weight: 700;
    color: var(--dark);
}

.hero-punch {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    color: var(--green);
    margin: 1.5rem auto 2.5rem;
    max-width: 520px;
    line-height: 1.3;
}

.hero-ctas {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.18s;
    cursor: pointer;
}

.btn-green {
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,168,0,0.28);
}
.btn-green:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,168,0,0.38);
}

.btn-red {
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 10px rgba(192,0,0,0.25);
}
.btn-red:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--mid);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
}

/* ── DISCLAIMER STRIP ────────────────────────────────────────── */
.disclaimer {
    background: var(--yellow-light);
    border-top: 2px solid var(--yellow-border);
    border-bottom: 1px solid var(--yellow-border);
    padding: 0.55rem 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--mid);
}

/* ── SECTION WRAPPERS & TYPOGRAPHY ──────────────────────────── */
.section-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem 2rem;
}

.section-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 0.9rem;
}

.section-intro {
    font-size: 1.02rem;
    color: var(--mid);
    max-width: 580px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ── THREE PILLARS ───────────────────────────────────────────── */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
}

.pillar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.pillar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 10px 10px 0 0;
}

.pillar.p-green::before  { background: var(--green);  }
.pillar.p-red::before    { background: var(--red);    }
.pillar.p-yellow::before { background: var(--yellow); }

.pillar-num {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 3rem;
    line-height: 1;
    opacity: 0.12;
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
}

.pillar.p-green  .pillar-num { color: var(--green);  }
.pillar.p-red    .pillar-num { color: var(--red);    }
.pillar.p-yellow .pillar-num { color: var(--yellow); }

.pillar h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.pillar.p-green  h3 { color: var(--green);  }
.pillar.p-red    h3 { color: var(--red);    }
.pillar.p-yellow h3 { color: var(--yellow); }

.pillar p {
    font-size: 0.92rem;
    color: var(--mid);
    line-height: 1.65;
}

/* ── PHILOSOPHY BAND ─────────────────────────────────────────── */
.philosophy-band {
    background: var(--dark);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

.philosophy-band blockquote {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.4rem, 3.5vw, 2.1rem);
    font-weight: 300;
    font-style: italic;
    max-width: 680px;
    margin: 0 auto 1rem;
    line-height: 1.45;
    color: rgba(255,255,255,0.9);
}

.philosophy-band blockquote strong {
    font-style: normal;
    font-weight: 900;
    color: var(--green-logo);
}

.philosophy-band cite {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-style: normal;
}

/* ── TOOLS ───────────────────────────────────────────────────── */
.tools-bg {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.18s;
}

.tool-card:hover {
    border-color: var(--green);
    background: var(--green-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.tool-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green);
}

.tool-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}

.tool-card p {
    font-size: 0.87rem;
    color: var(--mid);
    line-height: 1.55;
    flex: 1;
}

.tool-arrow {
    font-size: 1rem;
    color: var(--green);
    align-self: flex-end;
    margin-top: 0.5rem;
}

/* ── BOOK BAND ───────────────────────────────────────────────── */
.book-band {
    background: var(--green-light);
    border-top: 1px solid var(--green-border);
    border-bottom: 1px solid var(--green-border);
}

.book-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4.5rem 2rem;
    display: flex;
    gap: 3.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.book-cover-wrap { flex-shrink: 0; }

.book-cover-wrap img {
    width: 190px;
    display: block;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
}

.book-content { flex: 1; min-width: 260px; }

.book-content .section-label { color: var(--green); }

.book-content p {
    font-size: 1rem;
    color: var(--mid);
    line-height: 1.72;
    margin-bottom: 1.25rem;
}

/* ── COMMUNITY ───────────────────────────────────────────────── */
.community-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.community-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--mid);
    transition: all 0.18s;
}

.community-link:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-1px);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.4);
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.8;
}

footer strong { color: rgba(255,255,255,0.75); }
footer a { color: rgba(255,255,255,0.55); text-decoration: none; }
footer a:hover { color: var(--green-logo); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 700px) {
    nav ul { display: none; }
    .hero-letters { font-size: clamp(5rem, 28vw, 7rem); }
    .book-inner { flex-direction: column; }
    .book-cover-wrap img { width: 160px; }
}