*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --green-900: #063f2b;
    --green-800: #006a43;
    --green-700: #008456;
    --green-100: #e7f6ee;
    --green-50: #f4fbf7;
    --blue-800: #1456ad;
    --blue-100: #e7f0ff;
    --amber-700: #b76000;
    --amber-100: #fff2d9;
    --ink: #10231d;
    --muted: #60736b;
    --line: #dce7e1;
    --soft: #f7faf8;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(6, 63, 43, 0.16);
    --container: 1120px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--white);
    color: var(--ink);
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
    background: var(--white);
    color: var(--green-900);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.skip-link:focus {
    top: 1rem;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(16, 35, 29, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.nav-inner {
    width: min(100% - 2rem, var(--container));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-weight: 800;
    color: var(--green-900);
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted);
    transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: var(--green-800);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--green-900);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.menu-toggle svg,
.btn svg,
.small-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.mobile-menu {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.78rem 1.05rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--white);
    background: var(--green-800);
    box-shadow: 0 12px 30px rgba(0, 106, 67, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--green-900);
}

.btn-outline {
    color: var(--green-900);
    background: var(--white);
    border-color: var(--line);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--green-800);
    box-shadow: 0 12px 30px rgba(6, 63, 43, 0.1);
}

.hero {
    background:
        linear-gradient(90deg, rgba(5, 39, 27, 0.94), rgba(5, 39, 27, 0.72)),
        url("../assets/tutorials/tairudb-qgis/06-zoom-area.png") center / cover no-repeat;
    color: var(--white);
}

.hero-inner {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
    min-height: 420px;
    display: grid;
    align-items: center;
    padding: 4.8rem 0;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 1rem;
    padding: 0.38rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0;
    font-size: 4.5rem;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 900;
}

.hero p.lede {
    margin: 1.25rem 0 0;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.12rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.8rem;
}

.section {
    padding: 4.8rem 0;
}

.section.tight {
    padding: 3.5rem 0;
}

.band-soft {
    background: var(--soft);
    border-block: 1px solid var(--line);
}

.container {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2.4rem;
}

.section-heading.center {
    margin-inline: auto;
    text-align: center;
}

.section-kicker {
    margin: 0 0 0.65rem;
    color: var(--green-800);
    font-weight: 900;
    font-size: 0.86rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: 0;
    font-weight: 900;
}

.section-heading p {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tutorial-card {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tutorial-card:hover,
.tutorial-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(0, 106, 67, 0.28);
    box-shadow: 0 18px 40px rgba(6, 63, 43, 0.08);
}

.tutorial-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--green-50);
}

.tutorial-card.map-card {
    position: relative;
    min-height: 360px;
    grid-template-rows: 1fr;
    align-items: stretch;
    border-color: rgba(6, 63, 43, 0.16);
    background: var(--green-900);
}

.tutorial-card.map-card::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: url("../assets/tutorials/tutorial-o-que-e-expedicao-02-mapa-expedicao.png") center / cover no-repeat;
    filter: blur(2px);
}

.tutorial-card.map-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 39, 27, 0.40) 0%, rgba(5, 39, 27, 0.88) 60%, rgba(5, 39, 27, 0.97) 100%);
}

.tutorial-card.map-card .tutorial-card-body {
    position: relative;
    z-index: 1;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
}

.tutorial-card.map-card .pill {
    color: var(--green-900);
    background: rgba(255, 255, 255, 0.9);
}

.tutorial-card.map-card h2,
.tutorial-card.map-card p,
.tutorial-card.map-card .tutorial-card-link {
    color: var(--white);
}

.tutorial-card.map-card p {
    color: rgba(255, 255, 255, 0.82);
    margin-top: auto;
}

.tutorial-card-body {
    padding: 1.2rem;
}

.pill {
    padding: 0.28rem 0.58rem;
    color: var(--green-900);
    background: var(--green-100);
}

.tutorial-card h2,
.tutorial-card h3 {
    margin: 0.75rem 0 0;
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1.2;
}

.tutorial-card p {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.tutorial-card-link {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--green-800);
    font-size: 0.92rem;
    font-weight: 900;
}

.tutorial-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.tutorial-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.placeholder-card {
    padding: 1.2rem;
    border: 1px dashed rgba(0, 106, 67, 0.34);
    border-radius: 8px;
    background: var(--green-50);
}

.placeholder-card h3 {
    margin: 0.75rem 0 0;
    font-size: 1.15rem;
    line-height: 1.25;
}

.placeholder-card p {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.overview-item {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.overview-item strong {
    display: block;
    color: var(--green-900);
    font-size: 0.9rem;
}

.overview-item span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    align-items: start;
}

.tutorial-content {
    min-width: 0;
}

.toc {
    position: sticky;
    top: 92px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.toc h2 {
    margin: 0;
    color: var(--green-900);
    font-size: 0.95rem;
}

.toc a {
    display: block;
    margin-top: 0.7rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.toc a:hover,
.toc a:focus-visible {
    color: var(--green-800);
}

.callout {
    margin: 0 0 1.2rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(0, 106, 67, 0.2);
    border-radius: 8px;
    background: var(--green-50);
}

.callout h2,
.callout h3 {
    margin: 0;
    color: var(--green-900);
    font-size: 1.05rem;
}

.callout p {
    margin: 0.5rem 0 0;
    color: var(--muted);
}

.section-title {
    margin: 0 0 1.4rem;
    font-size: 2rem;
    line-height: 1.15;
}

.tutorial-step {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
}

.tutorial-step:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.step-number {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--white);
    background: var(--green-800);
    font-weight: 900;
}

.tutorial-step h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.tutorial-step p {
    margin: 0.65rem 0 0;
    color: var(--muted);
}

.tutorial-step ul {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.tutorial-step li + li {
    margin-top: 0.35rem;
}

.figure {
    margin: 1rem 0 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.figure img {
    width: 100%;
    height: auto;
}

.figure figcaption {
    padding: 0.75rem 0.9rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}

.figure--phone {
    max-width: 50%;
    margin-inline: auto;
}

.figure-pair {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-block: 1rem;
}

.figure-pair .figure--phone {
    flex: 1;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
}

.tip-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tip-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.tip-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.tip-card p {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.site-footer {
    padding: 2.5rem 0;
    background: #071b15;
    color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-weight: 900;
}

.footer-brand img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.footer-note {
    margin: 0.6rem 0 0;
    max-width: 560px;
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--white);
}

@media (max-width: 980px) {
    .tutorial-grid,
    .tip-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .toc {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-nav {
        height: 66px;
    }

    .nav-links,
    .nav-actions .btn {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .mobile-menu {
        position: fixed;
        inset: 66px 0 auto;
        z-index: 90;
        display: none;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 60px rgba(6, 63, 43, 0.14);
    }

    .mobile-menu.open {
        display: grid;
        gap: 0.65rem;
    }

    .mobile-menu a {
        padding: 0.9rem 1rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        text-decoration: none;
        font-weight: 800;
        color: var(--green-900);
        background: var(--white);
    }

    .hero-inner {
        min-height: 360px;
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section {
        padding: 3.8rem 0;
    }

    .section-heading h2,
    .section-title {
        font-size: 2rem;
    }

    .tutorial-grid,
    .tip-list,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-step {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .figure--phone {
        max-width: 85%;
    }

    .figure-pair {
        flex-direction: column;
        align-items: center;
    }

    .figure-pair .figure--phone {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .brand span {
        font-size: 0.98rem;
    }

    .hero h1 {
        font-size: 2.45rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .overview-item,
    .tutorial-card-body,
    .placeholder-card,
    .tip-card {
        padding: 1rem;
    }
}
