/*
Theme Name:   Is That Natural? Child
Template:     twentytwentyfour
Version:      1.1.0
Author:       Is That Natural?
*/

/* ================================================================
   INGREDIENT PAGE — PROFESSIONAL DESIGN SYSTEM
   Uses the earthy palette from TwentyTwentyFour (sage, sandstone,
   rust) while adding a scientific, data-driven feel.
   ================================================================ */

:root {
    --color-100-renewable:    #1B5E20;
    --color-mostly-renewable: #2E7D32;
    --color-half-renewable:   #E65100;
    --color-mostly-petroleum: #BF360C;
    --color-100-petroleum:    #B71C1C;

    --color-bg:        #F9F8F6;
    --color-surface:   #FFFFFF;
    --color-border:    #E5E0D8;
    --color-text:      #1A1815;
    --color-muted:     #6B645A;
    --color-accent:    #2E7D32;

    --font-heading: 'Jost', system-ui, sans-serif;
    --font-body:    'Instrument Sans', system-ui, sans-serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-card: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.08);
    --shadow-badge: 0 2px 8px rgba(0,0,0,.20);
}

/* ── Page wrapper ───────────────────────────────────────────── */
.itn-ingredient-page {
    background: var(--color-bg);
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--color-text);
}

/* ── Hero band ──────────────────────────────────────────────── */
.itn-hero {
    padding: 48px 0 36px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.itn-hero__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.itn-hero__breadcrumb {
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 16px;
    letter-spacing: .02em;
}

.itn-hero__breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
}

.itn-hero__breadcrumb a:hover { text-decoration: underline; }

.itn-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-lg);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    box-shadow: var(--shadow-badge);
    margin-bottom: 20px;
}

.itn-hero__badge--100-renewable    { background: var(--color-100-renewable); }
.itn-hero__badge--mostly-renewable { background: var(--color-mostly-renewable); }
.itn-hero__badge--half-renewable   { background: var(--color-half-renewable); }
.itn-hero__badge--mostly-petroleum { background: var(--color-mostly-petroleum); }
.itn-hero__badge--100-petroleum    { background: var(--color-100-petroleum); }

.itn-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 8px;
    color: var(--color-text);
}

.itn-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--color-muted);
    margin: 0 0 28px;
    font-weight: 400;
}

/* ── NOI Meter ──────────────────────────────────────────────── */
.itn-noi-meter {
    margin-top: 8px;
}

.itn-noi-meter__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.itn-noi-meter__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.itn-noi-meter__value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
}

.itn-noi-meter__value span {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-muted);
    margin-left: 4px;
}

.itn-noi-meter__track {
    height: 12px;
    border-radius: 100px;
    background: linear-gradient(to right, #B71C1C 0%, #E65100 25%, #F9A825 50%, #388E3C 75%, #1B5E20 100%);
    position: relative;
}

.itn-noi-meter__pointer {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #fff;
    border: 3px solid var(--color-text);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transition: left .4s ease;
}

.itn-noi-meter__endpoints {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: var(--color-muted);
    letter-spacing: .03em;
}

/* ── Content grid ───────────────────────────────────────────── */
.itn-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Generic card ───────────────────────────────────────────── */
.itn-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.itn-card--full { grid-column: 1 / -1; }

.itn-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.itn-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: #EFF8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.itn-card__title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0;
}

/* ── Quick facts table ──────────────────────────────────────── */
.itn-facts-table {
    width: 100%;
    border-collapse: collapse;
}

.itn-facts-table tr + tr td {
    border-top: 1px solid var(--color-border);
}

.itn-facts-table td {
    padding: 10px 0;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.5;
}

.itn-facts-table td:first-child {
    font-weight: 600;
    color: var(--color-muted);
    width: 48%;
    padding-right: 12px;
}

.itn-facts-table td:last-child {
    color: var(--color-text);
    font-family: monospace;
    font-size: 13px;
}

/* ── Structure image ─────────────────────────────────────────── */
.itn-structure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.itn-structure__img {
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #f4f2ef;
    padding: 12px;
}

.itn-structure__caption {
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-muted);
    text-align: center;
}

/* ── Origin bars ─────────────────────────────────────────────── */
.itn-origin-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.itn-origin-bar__label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.itn-origin-bar__track {
    height: 10px;
    background: var(--color-border);
    border-radius: 100px;
    overflow: hidden;
}

.itn-origin-bar__fill {
    height: 100%;
    border-radius: 100px;
    transition: width .6s ease;
}

.itn-origin-bar__fill--renewable { background: var(--color-mostly-renewable); }
.itn-origin-bar__fill--petroleum { background: var(--color-100-petroleum); }

/* ── Prose content ───────────────────────────────────────────── */
.itn-prose {
    font-size: 15px;
    line-height: 1.75;
    color: var(--color-text);
}

.itn-prose p { margin: 0 0 16px; }
.itn-prose p:last-child { margin-bottom: 0; }

/* ── References ──────────────────────────────────────────────── */
.itn-references-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: ref-counter;
}

.itn-references-list li {
    counter-increment: ref-counter;
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-muted);
}

.itn-references-list li:last-child { border-bottom: none; }

.itn-references-list li::before {
    content: counter(ref-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── CTA Banner ──────────────────────────────────────────────── */
.itn-cta {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    border-radius: var(--radius-md);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #fff;
    box-shadow: var(--shadow-card);
}

.itn-cta__text h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #fff;
}

.itn-cta__text p {
    font-size: 14px;
    opacity: .85;
    margin: 0;
    color: rgba(255,255,255,.9);
}

.itn-cta__btn {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: var(--color-100-renewable);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: var(--radius-lg);
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.itn-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 680px) {
    .itn-content {
        grid-template-columns: 1fr;
    }
    .itn-cta {
        flex-direction: column;
        text-align: center;
    }
}


/* ================================================================
   LOGO & NAV — Spectrum Renewal Mark
   ================================================================ */

/* Logo link — no underline, flex aligned */
.itn-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    flex-shrink: 0;
}

.itn-logo-link:hover {
    opacity: 0.88;
    transition: opacity 0.15s ease;
}

.itn-logo-link svg {
    display: block;
}

/* Nav outer wrapper: sticky, frosted */
.itn-nav-outer {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.92) !important;
    border-bottom: 1px solid #E8E8E8 !important;
}

/* Nav inner: max-width + padding */
.itn-nav-inner {
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
}

/* Navigation links styling */
.itn-nav-outer .wp-block-navigation a {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6B6B6B !important;
    text-decoration: none !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    transition: color 0.12s, background 0.12s !important;
}

.itn-nav-outer .wp-block-navigation a:hover {
    color: #111 !important;
    background: #F5F5F3 !important;
}

/* Hide the default site-logo and site-title if they appear */
.itn-nav-outer .wp-block-site-logo,
.itn-nav-outer .wp-block-site-title {
    display: none !important;
}
