/* ═══════════════════════════════════════════════════════
   03-base.css — Body, Typography & Layout Primitives
   Intecracy Group Theme v3.2.0
   ─────────────────────────────────────────────────────
   Body/html, heading scale, global text defaults,
   .container, section spacing, .line, .ig-icon system,
   .tag, .highlight.
   No component or page-specific rules.
   ═══════════════════════════════════════════════════════ */

/* ── Body ── */
body {
    font-family: var(--font-family-base);
    background: var(--navy);
    color: var(--text);
    overflow-x: hidden;
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout primitives ── */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-gutter);
    width: 100%;
}

section {
    position: relative;
    padding: var(--section-padding-v) var(--section-padding-h);
    z-index: 1;
}

@media (max-width: 1024px) {
    section {
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
    }
}

/* ── Headings ── */
h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 800;
    line-height: var(--line-height-heading);
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: var(--space-text-gap);
}

@media (max-width: 1024px) {
    h2 {
        font-size: clamp(26px, 3.8vw, 34px);
    }
}

h3 {
    font-size: 17px;
    font-weight: 600;
}

/* ── Body copy ── */
p {
    color: var(--muted);
    line-height: var(--line-height-copy);
    font-size: var(--font-size-body);
}

/* ── Section header ── */
.section-header {
    margin-bottom: var(--section-header-gap);
}

.section-header.text-center {
    text-align: center;
}

.section-header:not(.text-center),
.section-header--editorial {
    max-width: 620px;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.section-header > .tag,
.section-header > .hero-tag {
    margin-bottom: 14px;
}

.section-header > h1,
.section-header > h2,
.section-header > h3 {
    margin-bottom: 0;
}

.section-header > h1 + p,
.section-header > h2 + p,
.section-header > h3 + p {
    margin-top: 18px;
}

/* ── Decorative line ── */
.line {
    width: var(--accent-line-width);
    height: var(--accent-line-height);
    background: var(--teal);
    margin-top: var(--accent-line-gap-before);
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.section-header > .line,
.line-center-20,
.line-center-24 {
    margin-top: var(--accent-line-gap-before) !important;
    margin-bottom: var(--accent-line-gap-after-left) !important;
}

.section-header.text-center > .line,
.line-center-20,
.line-center-24 {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--accent-line-gap-after-centered) !important;
}

.section-header > .line + p,
.section-header > .line + .intro-narrow-12,
.section-header > .line + .intro-narrow-20,
.section-header > .line + .intro-narrow-650 {
    margin-top: 0 !important;
}

.section-header > p {
    margin-bottom: 0;
}

.section-header > p + p {
    margin-top: 12px;
}

.section-header.text-center > h1,
.section-header.text-center > h2,
.section-header.text-center > h3,
.section-header.text-center > p,
.section-header.text-center > .intro-narrow-12,
.section-header.text-center > .intro-narrow-20,
.section-header.text-center > .intro-narrow-650 {
    margin-left: auto;
    margin-right: auto;
}

.section-header.text-center > p,
.section-header.text-center > .intro-narrow-12,
.section-header.text-center > .intro-narrow-20,
.section-header.text-center > .intro-narrow-650 {
    max-width: 720px;
}

.section-header:not(.text-center) > h1,
.section-header:not(.text-center) > h2,
.section-header:not(.text-center) > h3,
.section-header:not(.text-center) > p,
.section-header--editorial > h1,
.section-header--editorial > h2,
.section-header--editorial > h3,
.section-header--editorial > p {
    margin-left: 0;
    margin-right: 0;
}

.section-header:not(.text-center) > p,
.section-header--editorial > p {
    max-width: 640px;
}

.intro-narrow-12,
.intro-narrow-20,
.intro-narrow-650 {
    color: var(--text-dim);
}

.intro-narrow-12 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.intro-narrow-20 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.intro-narrow-650 {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.section-header--editorial {
    margin-bottom: 0;
}

.section-header--editorial > .tag,
.section-header--editorial > .hero-tag {
    margin-bottom: 12px;
}

.section-copy-stack {
    display: grid;
    gap: 14px;
    max-width: 640px;
}

.section-copy-stack > p {
    margin: 0;
}

/* ── Utility text styles ── */
.highlight {
    color: var(--teal);
}

.tag,
div.tag {
    font-family: inherit;
    color: var(--teal);
    font-size: var(--font-size-overline);
    letter-spacing: var(--tracking-overline);
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: var(--space-tag-gap);
    display: block;
}

/* Reset: WP adds .tag class to <body> on tag archives — must not inherit section-label styles */
body.tag {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    letter-spacing: normal;
    text-transform: none;
    opacity: 1;
    margin-bottom: 0;
    display: block;
}

/* ════════════════════════════════════════════════
   STANDARD ICON CONTAINER — .ig-icon
   Base, circle, small, large variants.
   Replaces segment-icon, service-icon, method-card-icon, etc.
════════════════════════════════════════════════ */
.ig-icon {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ig-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Circle variant — segments / industries grid */
.ig-icon--circle {
    width: var(--icon-size-circle);
    height: var(--icon-size-circle);
    border-radius: 50%;
    border: 1px solid var(--teal-border);
    background: var(--icon-circle-bg);
    margin: 0 auto var(--space-icon-gap);
    transition: border-color var(--transition-base),
                background  var(--transition-base);
}

.ig-icon--circle svg {
    width: var(--icon-size-circle-glyph);
    height: var(--icon-size-circle-glyph);
}

/* Compatibility hook while segment cards still rely on foundation hover states. */
.segment:hover .ig-icon--circle,
.segment-card:hover .ig-icon--circle {
    border-color: var(--teal-border-h);
    background: var(--card-hover);
}

/* Small variant — inline text use */
.ig-icon--sm {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

/* Large variant — hero / section accents */
.ig-icon--lg {
    width: var(--icon-size-lg);
    height: var(--icon-size-lg);
}

.ig-icon--lg svg {
    width: var(--icon-size-lg-glyph);
    height: var(--icon-size-lg-glyph);
}

@media (max-width: 768px) {
    .service-icon,
    .feature-icon,
    .method-card-icon,
    .flagship-feature-icon {
        width: 56px !important;
        height: 56px !important;
    }

    .service-icon svg,
    .feature-icon svg,
    .method-card-icon svg,
    .flagship-feature-icon svg {
        width: 32px !important;
        height: 32px !important;
    }

    .segment-icon,
    .ig-icon--circle {
        width: 64px !important;
        height: 64px !important;
    }

    .segment-icon svg,
    .ig-icon--circle svg {
        width: 32px !important;
        height: 32px !important;
    }
}
.ig-form-success {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: min(420px, calc(100vw - 32px));
    padding: 20px 20px 18px;
    border: 1px solid rgba(20, 198, 181, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(19, 35, 58, 0.96) 0%, rgba(11, 26, 48, 0.98) 100%);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.ig-form-success.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.ig-form-success__inner {
    min-width: 0;
}

.ig-form-success__eyebrow {
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ig-form-success__title {
    margin-bottom: 8px;
    color: var(--white);
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
}

.ig-form-success__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
    line-height: 1.5;
}

.ig-form-success__close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 198, 181, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.ig-form-success__close:hover,
.ig-form-success__close:focus-visible {
    border-color: rgba(20, 198, 181, 0.44);
    background: rgba(20, 198, 181, 0.08);
    color: var(--white);
}

.ig-form-success__close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.ig-form-success.is-error {
    border-color: rgba(255, 122, 90, 0.32);
    background:
        linear-gradient(180deg, rgba(43, 24, 26, 0.97) 0%, rgba(23, 17, 23, 0.99) 100%);
}

.ig-form-success.is-error .ig-form-success__eyebrow {
    color: #ff8e72;
}

@media (max-width: 768px) {
    .ig-form-success {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        padding: 18px 18px 16px;
        gap: 12px;
        border-radius: 16px;
    }

    .ig-form-success__title {
        font-size: 20px;
    }

    .ig-form-success__text {
        font-size: 14px;
    }
}
