/* ============================================================
   Wisanna – Site v3 layer (homepage "operating system for legal work")
   Loads AFTER site-v2.css. New rules only; nothing here touches
   the header, footer, modal or the LP chain.
   Palette: navy #0D2C54, gold #FFB700 (CTAs and the "Next" marker only).
   ============================================================ */

/* ── Rhythm: more vertical air, calmer headings ─────────────── */
.section--v3 { padding: 72px 20px; }
.section--v3 .section__header { margin-bottom: 40px; }
.section--v3 .section__header h2 {
    font-size: clamp(1.7rem, 4.2vw, 2.45rem);
    line-height: 1.18;
    letter-spacing: -0.015em;
    text-wrap: balance;
}
.section--v3 .section__subtitle { max-width: 680px; }
@media (min-width: 768px) {
    .section--v3 { padding: 96px 32px; }
    .section--v3 .section__header { margin-bottom: 52px; }
}
@media (min-width: 1024px) {
    .section--v3 { padding: 120px 32px; }
}

/* Fixed header: anchors land below it */
.section--v3, #hero, .anchor-alias, .pillar--v3 { scroll-margin-top: 80px; }
.anchor-alias { display: block; position: relative; height: 0; width: 0; overflow: hidden; }

/* ── Hero: flat navy, faint grid, no decoration ─────────────── */
.hero-v3 {
    background-color: var(--primary-navy);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: center top;
}
.hero-v3::after {
    /* soft fade of the grid towards the bottom edge, keeps the logo wall clean */
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(to bottom, rgba(13, 44, 84, 0), var(--primary-navy));
    pointer-events: none;
}
.hero-v3 .container { z-index: 1; }
.hero-v3 h1 { font-size: clamp(2.05rem, 6.6vw, 3.25rem); letter-spacing: -0.022em; }
.hero-v3 .hero-v2__sub { max-width: 540px; }
.hero-v3__chips { margin-top: 1.5rem; }
.hero-v3__chips li { color: rgba(255, 255, 255, 0.78); align-items: flex-start; }
.hero-v3__chips svg { margin-top: 3px; }
@media (min-width: 1024px) {
    /* Two columns: 428px of copy at 1024, 551px from 1280 up (the container is capped at 1200px).
       The headline takes two lines in every language from 1280 up, three at 1024. */
    .hero-v3 h1 { font-size: 2.6rem; }
    .hero-v3 .hero-v2__eyebrow { font-size: 0.64rem; letter-spacing: 0.06em; padding: 0.32rem 0.75rem; }
}
@media (min-width: 1280px) {
    .hero-v3 h1 { font-size: 2.85rem; }
    .hero-v3 .hero-v2__eyebrow { font-size: 0.72rem; letter-spacing: 0.08em; padding: 0.35rem 0.85rem; }
}

/* Screenshot frame (thin border, 16px radius, soft navy shadow) */
.shot-frame--v3 {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 56px rgba(2, 12, 28, 0.42);
    background: var(--neutral-off-white);
}
.section--white .shot-frame--v3,
.section--offwhite .shot-frame--v3 {
    border-color: var(--border-medium);
    box-shadow: 0 18px 48px rgba(13, 44, 84, 0.14);
}
.hero-v3__visual .shot-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
html[dir="rtl"] .hero-v3__visual .shot-frame img { object-position: top right; }

/* The one gold callout on the hero shot: "Next: Internal review · Partner" */
.hero-v3__callout {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gold);
    color: var(--primary-navy);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    padding: 7px 11px 7px 8px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}
.hero-v3__callout-k {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--primary-navy);
    color: #fff;
    padding: 4px 7px;
    border-radius: 999px;
}
.hero-v3__callout-sep { opacity: 0.55; }
@media (max-width: 639.98px) {
    .hero-v3__callout { font-size: 0.72rem; top: 10px; inset-inline-end: 10px; }
}
/* Where the frame is narrow (phones; the 1024 to 1279 two-column hero) the callout keeps
   only the step name, so it never covers more than about half of the frame in any language. */
@media (max-width: 639.98px), (min-width: 1024px) and (max-width: 1279.98px) {
    .hero-v3__callout-sep, .hero-v3__callout-owner { display: none; }
}
@media (min-width: 1024px) {
    .hero-v3 { padding: 150px 32px 96px; }
}

/* ── H3: workflow diagram ───────────────────────────────────── */
.how-v3 .section__header { margin-bottom: 36px; }
.wf { max-width: 1120px; margin: 0 auto; }
.wf__canvas { position: relative; }
.wf__canvas svg { display: block; max-width: 100%; height: auto; margin: 0 auto; overflow: visible; }
@media (min-width: 768px) {
    .how-v3 .section__header { margin-bottom: 44px; }
}
.wf__canvas text { font-family: var(--font-body); }
.wf-chip-done { fill: var(--primary-navy); }
.wf-chip-next { fill: var(--accent-gold); }
.wf-chip-todo { fill: #fff; stroke: rgba(13, 44, 84, 0.55); stroke-width: 1.4; }
.wf-chip-text { font-weight: 600; fill: #fff; }
.wf-chip-text--dark { fill: var(--primary-navy); }
.wf-box { fill: #fff; stroke: rgba(13, 44, 84, 0.28); stroke-width: 1.2; }
.wf-box-title { font-weight: 600; fill: var(--primary-navy); }
.wf-box-sub { fill: var(--secondary-slate); }
.wf-line { fill: none; stroke: rgba(13, 44, 84, 0.42); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wf-caps { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--secondary-slate); }
.wf-owner { fill: var(--secondary-slate); font-weight: 500; }
.wf-work { fill: var(--primary-navy); font-weight: 600; }
.wf-next-pill { fill: var(--accent-gold); }
.wf-next-text { font-weight: 700; fill: var(--primary-navy); letter-spacing: 0.04em; text-transform: uppercase; }

/* Drawn on scroll: items fade in one by one, connectors draw themselves.
   Only when JS runs (html.js-v3); otherwise everything is simply visible. */
html.js-v3 .wf-item {
    opacity: 0;
    transition: opacity 0.55s ease;
    transition-delay: calc(var(--i, 0) * 110ms);
}
html.js-v3 .wf-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.55s ease;
    transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}
html.js-v3 .wf.is-drawn .wf-item { opacity: 1; }
html.js-v3 .wf.is-drawn .wf-line { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
    html.js-v3 .wf-item { opacity: 1; transition: none; }
    html.js-v3 .wf-line { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
}

.how-v3__body {
    font-size: 1.08rem;
    line-height: 1.72;
    color: var(--neutral-dark);
    max-width: 680px;
    margin: 36px auto 0;
}
.how-v3__caps { display: grid; gap: 22px; max-width: 1120px; margin: 40px auto 0; }
.how-v3__cap { border-top: 1px solid var(--border-medium); padding-top: 16px; }
.how-v3__cap h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-navy);
    margin: 0 0 6px;
}
.how-v3__cap p { font-size: 0.94rem; line-height: 1.6; color: var(--secondary-slate); margin: 0; }
@media (min-width: 768px) {
    .how-v3__body { font-size: 1.125rem; margin-top: 44px; }
    .how-v3__caps { grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 52px; }
}

/* ── H4: pillars ────────────────────────────────────────────── */
.pillar--v3 { padding: 32px 0; }
.pillar--v3 h3 { font-size: clamp(1.4rem, 4vw, 1.85rem); letter-spacing: -0.015em; }
.pillar--v3 .pillar__body { font-size: 1.02rem; color: var(--neutral-dark); }
.pillar--v3 .pillar__visual .shot-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
@media (min-width: 1024px) {
    .pillar--v3 { padding: 56px 0; gap: 72px; }
}

/* P4: compact integration row (four tiles + the Word still) */
.int-tiles { display: grid; gap: 14px; margin-top: 6px; }
.int-tile {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 14px 12px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--neutral-white);
}
.int-tile > svg {
    width: 22px; height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    fill: none;
    stroke: var(--primary-navy);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.int-tile h4 { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600; color: var(--primary-navy); margin: 0 0 3px; }
.int-tile p { font-size: 0.85rem; line-height: 1.5; color: var(--secondary-slate); margin: 0; }
@media (min-width: 560px) {
    .int-tiles { grid-template-columns: 1fr 1fr; }
}

/* ── H5: audience cards with a product strip ────────────────── */
.aud-card--v3 { padding: 0; overflow: hidden; }
.aud-card__shot {
    border-bottom: 1px solid var(--border-light);
    background: var(--neutral-off-white);
}
.aud-card__shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6.5;
    object-fit: cover;
    object-position: top center;
}
.aud-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 22px; }
.aud-card--v3 h3 { margin-bottom: 12px; }
.aud-card--v3 ul { margin-bottom: 20px; }
.aud-solo {
    text-align: center;
    font-size: 0.95rem;
    color: var(--secondary-slate);
    margin: 28px auto 0;
    max-width: 680px;
    line-height: 1.6;
}
.aud-solo a { color: var(--primary-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) {
    .aud-card__body { padding: 26px 28px 26px; }
}

/* ── H6: smaller video slot ─────────────────────────────────── */
.video-wrap--v3 { max-width: 760px; }

/* ── H7: control, trust and security (navy) ─────────────────── */
.trust-v3__head { margin-bottom: 44px; }
.trust-v3__head .section__subtitle { font-size: clamp(1rem, 2.4vw, 1.12rem); color: rgba(255, 255, 255, 0.8); }
.trust-grid--v3 { gap: 16px; max-width: 1120px; margin: 0 auto; }
.section--navy .trust-item--v3 {
    text-align: start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px 22px 22px;
    display: flex;
    flex-direction: column;
}
.section--navy .trust-item--v3:hover { box-shadow: none; border-color: rgba(255, 183, 0, 0.4); }
.section--navy .trust-item--v3 .trust-item__icon {
    width: 44px; height: 44px;
    margin: 0 0 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
}
.section--navy .trust-item--v3 .trust-item__icon svg { width: 22px; height: 22px; stroke: var(--accent-gold); stroke-width: 1.6; }
.section--navy .trust-item--v3 h4 { color: #fff; font-size: 1.02rem; margin-bottom: 8px; }
.section--navy .trust-item--v3 p { color: rgba(255, 255, 255, 0.74); font-size: 0.9rem; line-height: 1.6; margin: 0; }
.trust-item__link {
    display: inline-block;
    margin-top: auto;
    padding-top: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-decoration: none;
}
.trust-item__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.trust-v3__strip {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin: 36px auto 0;
    max-width: 760px;
    line-height: 1.8;
}
@media (min-width: 640px) {
    .trust-grid--v3 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 1024px) {
    .trust-grid--v3 { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .section--navy .trust-item--v3 { padding: 28px 26px 26px; }
}

/* ── H8: rolled out with you ────────────────────────────────── */
.rollout-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: rollout; }
.rollout-step {
    position: relative;
    background: var(--neutral-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 22px 22px;
    box-shadow: var(--shadow-sm);
}
.rollout-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--primary-navy);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.rollout-step h3 { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; color: var(--primary-navy); margin: 0 0 6px; line-height: 1.3; }
.rollout-step p { font-size: 0.92rem; line-height: 1.6; color: var(--secondary-slate); margin: 0; }
.rollout-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
    text-align: center;
}
.rollout-foot p { font-size: 0.98rem; line-height: 1.65; color: var(--neutral-dark); max-width: 640px; margin: 0; }
.rollout-foot .btn { min-width: 200px; justify-content: center; }
@media (min-width: 640px) {
    .rollout-steps { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 1024px) {
    .rollout-steps { grid-template-columns: repeat(4, 1fr); gap: 22px; }
    .rollout-step { padding: 28px 26px 26px; }
    .rollout-foot { margin-top: 44px; }
}

/* ── H9: customers, quote + press card ──────────────────────── */
.cust-duo { display: grid; gap: 18px; margin-top: 28px; }
.cust-duo .quote-card { margin: 0; max-width: none; }
.press-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px 24px 22px;
    color: #fff;
    text-decoration: none;
    transition: border-color var(--transition-base), background var(--transition-base);
}
.press-card:hover { border-color: rgba(255, 183, 0, 0.45); background: rgba(255, 255, 255, 0.085); }
.press-card__kicker {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 8px;
}
.press-card__source { font-size: 0.86rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 10px; }
.press-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 18px;
}
.press-card__cta { margin-top: auto; font-size: 0.9rem; font-weight: 600; color: var(--accent-gold); }
.press-card:hover .press-card__cta { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) {
    .cust-duo { grid-template-columns: 1.45fr 1fr; gap: 24px; margin-top: 36px; align-items: stretch; }
}

/* ── H10: blog cards ────────────────────────────────────────── */
.blog-cards { display: grid; gap: 18px; }
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--neutral-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 22px 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-medium); }
.blog-card__tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 10px;
}
.blog-card__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary-navy);
    margin-bottom: 8px;
}
.blog-card__body { font-size: 0.92rem; line-height: 1.6; color: var(--secondary-slate); margin-bottom: 18px; }
.blog-card__more { margin-top: auto; font-size: 0.88rem; font-weight: 600; color: var(--primary-navy); }
.blog-card:hover .blog-card__more { text-decoration: underline; text-underline-offset: 3px; }
.blog-all { text-align: center; margin: 28px 0 0; }
.blog-all a { font-weight: 600; color: var(--primary-navy); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
    .blog-cards { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .blog-card { padding: 28px 26px 24px; }
}

/* ── H11: final band, flat navy ─────────────────────────────── */
.final-band--v3 {
    background-color: var(--primary-navy);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}
.final-band--v3 h2 { font-weight: 600; letter-spacing: -0.02em; }
.final-band--v3 .final-band__ctas { margin-bottom: 0; }

/* ── Balanced titles, aligned card rows ─────────────────────── */
.pillar--v3 h3,
.how-v3__cap h3,
.rollout-step h3,
.blog-card__title,
.press-card__title,
.int-tile h4,
.section--navy .trust-item--v3 h4,
.aud-card--v3 h3,
.section--v3 .section__kicker,
.logo-wall__title,
.trust-v3__strip { text-wrap: balance; }

/* Cards in one grid row share their title and body rows (subgrid), so bodies start on the same
   line whether a title wraps or not. Browsers without subgrid keep the stacked layout. */
@supports (grid-template-rows: subgrid) {
    .how-v3__cap, .rollout-step, .blog-card, .section--navy .trust-item--v3, .int-tile {
        display: grid;
        grid-template-rows: subgrid;
        row-gap: 0;
        align-content: start;
    }
    .how-v3__cap { grid-row: span 2; }
    .rollout-step { grid-row: span 3; }
    .blog-card { grid-row: span 4; }
    .section--navy .trust-item--v3 { grid-row: span 4; }
    .section--navy .trust-item--v3 .trust-item__link { margin-top: 0; align-self: start; }
    .blog-card__more { margin-top: 0; }
    .int-tile { grid-template-columns: 22px 1fr; column-gap: 12px; grid-row: span 2; }
    .int-tile > svg { grid-row: 1 / span 2; }
    .int-tile > h4, .int-tile > p { grid-column: 2; }
}
.int-tile > svg { margin-top: 2px; }

/* Keyboard users can reach the language switcher */
.language-current:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .blog-card:hover, .aud-card:hover { transform: none; }
}

/* Section titles on one line on desktop in all four languages: the v2 header
   is 760px wide, the longest v3 title (RO customers) needs about 940px. The
   subtitle keeps its 680px measure. */
@media (min-width: 1100px) {
    .section--v3 .section__header { max-width: 1000px; }
    .final-band--v3 h2 { max-width: 1000px; }
}

/* ── RTL ────────────────────────────────────────────────────── */
html[dir="rtl"] .how-v3__body,
html[dir="rtl"] .how-v3__cap,
html[dir="rtl"] .int-tile,
html[dir="rtl"] .rollout-step,
html[dir="rtl"] .blog-card,
html[dir="rtl"] .press-card,
html[dir="rtl"] .section--navy .trust-item--v3,
html[dir="rtl"] .aud-card__body { text-align: right; }
html[dir="rtl"] .pillar--v3 h3,
html[dir="rtl"] .pillar--v3 .pillar__body { text-align: right; }
html[dir="rtl"] .hero-v3__callout { padding: 7px 8px 7px 11px; }
