/* -----------------------------------------------------------------------------
   IDENTITY — Resources / Learn / Identity  (concept launch page)
   Persistent Digital Identity for Natural Materials
   Prefix: idn-
----------------------------------------------------------------------------- */

/* ===== PAGE RHYTHM ========================================================
   Bulma's .section gives 48px top/bottom and each section also carries a
   40px .placeholder40 at both ends, putting adjacent sections 176px apart.
   This is a concept launch page, so the vertical rhythm is opened up to
   240px between sections. The dark .idn-enterprise band carries no
   placeholders, so it gets the full 120px in padding to match the same
   optical gap. Mobile scales back, matching how .placeholder40 halves. */
.idn-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
/* .fade-in-right parks at translateX(60px) until IntersectionObserver adds
   .is-visible, which pushes past the viewport and produces a horizontal
   scrollbar on load. Clipping at section level contains it. overflow-x: clip
   (not hidden) avoids creating a scroll container. */
.idn-section,
.idn-enterprise { overflow-x: clip; }

/* ===== 1. HERO — full-bleed photo ========================================= */
.idn-hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(100deg, rgba(10, 14, 8, 0.78) 0%, rgba(10, 14, 8, 0.45) 45%, rgba(10, 14, 8, 0.08) 75%),
        url('/img/resources/identity/identity-hero.jpg');
    background-size: cover;
    background-position: center 60%;
}
/* This is the only flex hero on the site (ab-hero / dc-hero / eco-hero all use
   plain padding). A flex item defaults to min-width: auto, so Bulma's
   .container refused to shrink below its content width and pushed past narrow
   viewports, clipping the hero on phones. min-width: 0 lets it shrink.
   The hero is also not a .section, so it never inherited Bulma's horizontal
   padding - added here to match the sections below it. */
.idn-hero > .container {
    min-width: 0;
    padding-left: 3rem;
    padding-right: 3rem;
}
.idn-hero-inner {
    max-width: 640px;
    padding: 90px 0;
}
/* Hero type comes from the shared .hero-tagline / .hero-h1 / .hero-body-text
   classes in css/layout/hero.css — only the green standfirst is page-specific. */

/* Scoped override: .hero-body-text--dark is rgba(255,255,255,.65), which reads
   fine on the solid dark gradients of /ecosystem, /edn and /offering but goes
   weak over this hero's photograph. Lifted here only, so those pages are
   untouched. */
.idn-hero .hero-body-text--dark {
    color: rgba(255, 255, 255, 0.95);
}

/* Credential tags, below the CTAs. The /dcode hero's 12% red fill works there
   because that hero is a flat dark gradient; over this photograph it has no
   consistent ground and disappears. Kept translucent but taken to a dense 58%
   red with a frosted backdrop, so the pill reads as a layer over the image
   rather than a wash - and white text stays legible wherever the photo is
   bright. backdrop-filter simply no-ops on browsers that lack it. */
.idn-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.75rem;
}
.idn-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(185, 28, 28, 0.58);
    border: 1px solid rgba(255, 130, 120, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 0.4rem 0.95rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #fff;
}
.idn-hero-tags span i { font-size: 0.62rem; }

.idn-hero-subtitle {
    color: var(--primary-green);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.idn-btn-primary,
.idn-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: var(--btn-radius);
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}
.idn-btn-primary {
    background: var(--primary-green);
    color: #fff;
    border: 1px solid var(--primary-green);
}
.idn-btn-primary:hover {
    background: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    color: #fff;
    transform: translateY(-2px);
}
.idn-btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.idn-btn-outline:hover {
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== shared section furniture ========================================== */
.idn-eyebrow {
    display: block;
    color: var(--primary-green-darker);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}
.idn-h2 {
    color: var(--navbar-bg);
    font-size: clamp(1.4rem, 2.5vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}
.idn-lead {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    max-width: 1000px;
}
.idn-lead + .idn-lead { margin-top: 1.1rem; }
/* Inline body-copy link. #4d7826 rather than --primary-green-darker so it holds
   4.5:1 on both the white and --light-green section grounds. */
.idn-link {
    color: #4d7826;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.idn-link:hover { color: var(--primary-green); text-decoration: underline; }
.idn-img-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.idn-img-card img,
.idn-img-card video {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== 2. THE MISSING LAYER =============================================== */
/* Both columns share one height (Bulma .columns is already align-items: stretch
   once is-vcentered is dropped), and each centres its own content. The image
   therefore keeps its natural aspect ratio - never cropped or letterboxed -
   and sits optically centred against the text block. */
@media screen and (min-width: 769px) {
    .idn-row-equal > .column {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ===== 3. DEMONSTRATED TECHNOLOGY ========================================= */
/* Single column on purpose: the longest fact measures ~424px, so a two-column
   split inside a half-width column (~260px per cell) wrapped every other item
   onto a second line and read as a ragged block. One column per line keeps each
   fact scannable. The row uses is-desktop so on tablet it stacks to full width
   rather than squeezing these to a wrapping width. */
.idn-facts {
    list-style: none;
    margin: 1.75rem 0 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}
.idn-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.idn-facts li i {
    color: var(--primary-green);
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.idn-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}
.idn-status-strip span {
    background: var(--light-green);
    color: var(--primary-green-darker);
    border: 1px solid #c1de90;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
}

/* ===== 4. HOW IT WORKS — 4 cards ========================================== */
.idn-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}
.idn-step-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.idn-step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.idn-step-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.idn-step-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.idn-step-body { padding: 1.25rem 1.4rem 1.5rem; }
.idn-step-num {
    color: var(--primary-green);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}
.idn-step-title {
    color: var(--navbar-bg);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.35rem 0 0.5rem;
}
.idn-step-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== 5. DEMONSTRATION — looping video =================================== */
/* Silent, looping, autoplaying clip (the source file carries an AAC track, so
   muted is required both by the brief and by browser autoplay policy). The
   footage is 1:1 and already shows two phones on white, so it sits in the same
   .idn-img-card treatment as the rest of the page media. */
.idn-demo-video {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #fff;
}
/* App Store badges. The product pages' .mapp-badge-link / .mcs-badge-link are
   defined in mobile-app.css / mobile-mcs.css, neither of which loads on this
   page, so the same treatment is replicated here. Both apps share one badge
   artwork - on a product page the badge stands alone, but side by side they are
   indistinguishable, hence the app name above each. The height that the product
   pages set inline lives here instead. */
.idn-store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.25rem;
}
.idn-store-badge {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.idn-store-badge-app {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.idn-badge-link {
    display: inline-block;
    background: var(--navbar-bg);
    border-radius: var(--radius-small);
    padding: 3px;
    line-height: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.idn-badge-link:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
.idn-badge-link img {
    display: block;
    height: 50px;
    width: auto;
}

.idn-demo-caption {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.7;
    text-align: center;
}

/* ===== 6. ENTERPRISE INTEGRATION (dark) =================================== */
/* Horizontal padding matters here: this band is not a .section, so it never got
   Bulma's 1.5rem/3rem. Without it the inner .columns.is-variable negative
   -24px margins spilled past the viewport at every width, and content touched
   the screen edge on phones. */
.idn-enterprise {
    background: linear-gradient(135deg, var(--navbar-bg) 0%, #1a3012 100%);
    padding: 7.5rem 3rem;
}
.idn-enterprise .idn-eyebrow { color: var(--primary-green); }
.idn-enterprise .idn-h2      { color: #fff; }
.idn-enterprise .idn-lead    { color: rgba(255, 255, 255, 0.7); }
.idn-eco-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}
.idn-eco-chips span {
    border: 1px solid rgba(123, 185, 62, 0.45);
    color: rgba(255, 255, 255, 0.85);
    background: rgba(123, 185, 62, 0.08);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
}
.idn-eco-platform {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
}
.idn-eco-platform a {
    color: var(--primary-green);
    font-weight: 600;
}
.idn-eco-platform a:hover { text-decoration: underline; }

/* ===== 7. WHY DCODE ======================================================= */
.idn-why-title {
    color: var(--navbar-bg);
    font-size: clamp(1.4rem, 2.5vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 0.75rem;
}
.idn-why-title span { color: var(--primary-green); }
.idn-why-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 1200px;
    margin: 0 auto 3.25rem;
    line-height: 1.75;
}
/* Two equal columns matching the two halves of the comparison image above,
   so each caption sits centred under the pallet it describes. Never collapses
   to one column - the image halves are baked into a single PNG. */
.idn-why-labels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
/* Pills rather than bare captions. justify-self keeps each one centred under
   its half of the comparison image instead of stretching across the grid cell,
   which is what preserves the alignment with the two pallets. */
.idn-why-labels span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 0.45rem;
    text-align: center;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    padding: 0.5rem 1.05rem;
}
.idn-why-labels span i { flex-shrink: 0; }
.idn-why-labels .is-old {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: #c0392b;
}
.idn-why-labels .is-new {
    background: var(--light-green);
    border: 1px solid #c1de90;
    /* One step darker than --primary-green-darker: that token gives only
       4.08:1 on --light-green, which misses AA at this size. #4d7826 = 4.79:1. */
    color: #4d7826;
}

/* ===== 8. BEYOND TIMBER =================================================== */
.idn-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}
.idn-materials span,
.idn-partner-types span {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
}

/* ===== 9. PARTNER PROGRAM ================================================= */
/* Compressed to heading + who we are looking for + one CTA. The partner types
   reuse the section 8 chip treatment (centred here) instead of icon cards -
   five cards with icons and descriptions competed with the call to action, and
   the brief asks to avoid icons where possible. */
.idn-partner-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
}
.idn-cta-final {
    text-align: center;
    margin-top: 2.5rem;
}
.idn-cta-final .idn-btn-primary { font-size: 1.05rem; padding: 1rem 2.2rem; }

/* ===== Responsive ========================================================= */
@media screen and (max-width: 1023px) {
    .idn-steps        { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 768px) {
    .idn-section    { padding-top: 4rem; padding-bottom: 4rem; }
    .idn-enterprise { padding: 4.5rem 1.5rem; }
    .idn-steps { margin-top: 2.5rem; }
    .idn-hero { min-height: 520px; }
    .idn-hero > .container { padding-left: 1.5rem; padding-right: 1.5rem; }
    /* Centred hero on mobile, matching how hero.css treats .hero-custom. Those
       rules are scoped to .hero-custom, so this hero has to opt in explicitly:
       the block itself centres, the text centres, and the two flex rows
       (buttons, credential tags) need justify-content since flex-start is the
       Bulma default and text-align does not reach them. */
    .idn-hero-inner {
        padding: 70px 0;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .idn-hero .hero-body-text {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .idn-hero .buttons,
    .idn-hero-tags { justify-content: center; }
    /* Section titles, leads and every chip/badge row centre on phones, matching
       the hero. The fact list is deliberately excluded - centred bullet lines
       read badly - so it is pinned back to the left. */
    .idn-h2,
    .idn-lead {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .idn-status-strip,
    .idn-eco-chips,
    .idn-materials,
    .idn-partner-types,
    .idn-store-badges { justify-content: center; }
    .idn-store-badge   { align-items: center; }
    .idn-eco-platform  { justify-content: center; text-align: center; }
    .idn-facts         { text-align: left; }
    .idn-facts li { font-size: 0.9rem; }

    /* One step card per row (was two from the 1023px rule above). */
    .idn-steps { grid-template-columns: 1fr; }
    .idn-why-labels { gap: 0.5rem; }
    .idn-why-labels .is-old,
    .idn-why-labels .is-new { font-size: 0.72rem; padding: 0.4rem 0.75rem; }
}
@media screen and (max-width: 480px) {
    .idn-steps { grid-template-columns: 1fr; }
}

/* utility variants (keep markup free of inline styles) */
.idn-lead.is-centered { margin-left: auto; margin-right: auto; }
