:root {
    --paper: #faf7f0;
    --paper-soft: #eee9df;
    --ink: #15191d;
    --ink-soft: #30383d;
    --muted: #6f7474;
    --line: #ded6ca;
    --line-strong: #bcb1a3;
    --accent-primary: #ff4f5e;
    --accent-hover: #dd3e4d;
    --accent-warm: #f2b84b;
    --accent-cool: #00a7a5;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(17, 20, 22, 0.08);
    --shadow-tight: 0 10px 25px rgba(17, 20, 22, 0.08);
    --radius: 8px;
    --radius-sm: 6px;
    --container: 1180px;
    --bg-main: var(--paper);
    --bg-alt: var(--paper-soft);
    --text-dark: var(--ink);
    --text-muted: var(--muted);
    --border-color: var(--line);
    --brand: var(--accent-primary);
    --gold-main: var(--accent-warm);
    --text-main: #e8eee9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(115deg, rgba(255, 79, 94, 0.07) 0 18%, transparent 18% 100%),
        linear-gradient(290deg, rgba(0, 167, 165, 0.08) 0 12%, transparent 12% 100%),
        linear-gradient(90deg, rgba(21, 25, 29, 0.032) 1px, transparent 1px),
        linear-gradient(180deg, rgba(21, 25, 29, 0.025) 1px, transparent 1px),
        var(--paper);
    background-size: 72px 72px, 72px 72px, auto;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: rgba(15, 118, 110, 0.18);
}

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

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

main {
    padding-top: 76px;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 1000;
    transform: translateY(-140%);
    background: var(--ink);
    color: var(--white);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

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

.section-band,
.services,
.portfolio,
.blog-section,
.blog-archive,
.contact-section {
    padding: 96px 0;
}

.section-band {
    background: rgba(255, 255, 255, 0.72);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-header {
    max-width: 760px;
    margin-bottom: 44px;
}

.section-header.text-center {
    margin-left: auto;
    margin-right: auto;
}

.section-header.compact {
    max-width: 520px;
    margin-bottom: 0;
}

.eyebrow,
.news-date,
.news-tag,
.tool-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    color: var(--accent-primary);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.eyebrow::before,
.news-date::before,
.news-tag::before {
    content: "";
    width: 20px;
    height: 2px;
    margin-right: 10px;
    background: currentColor;
}

.section-title,
.hero-title,
.page-title,
.article-title,
h1,
h2,
h3 {
    color: var(--ink);
    font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
    font-weight: 800;
    line-height: 1.08;
}

.section-title {
    font-size: 3.2rem;
    margin-top: 10px;
}

.section-header p,
.hero-subtitle,
.page-subtitle,
.article-subtitle {
    color: var(--muted);
    font-size: 1.1rem;
    margin-top: 18px;
    max-width: 720px;
}

.section-header.text-center p,
.page-subtitle,
.article-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* Navigation */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    border-bottom: 1px solid rgba(220, 229, 223, 0.9);
    background: rgba(251, 252, 251, 0.88);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.brand-mark.fallback::before {
    content: "A";
    color: var(--accent-primary);
    font-weight: 900;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text span,
.logo span {
    color: var(--accent-primary);
}

.word-logo .brand-text {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-size: 1.34rem;
}

.word-logo .brand-text span {
    color: var(--ink);
}

.word-logo .brand-text strong {
    color: var(--accent-primary);
    font-weight: 900;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links a:not(.btn-primary) {
    color: var(--ink-soft);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a.is-active {
    color: var(--accent-primary);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    grid-column: 1;
    grid-row: 1;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) {
    transform: translateY(-6px);
}

.nav-toggle span:nth-child(3) {
    transform: translateY(6px);
}

.nav-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
    box-shadow: 0 10px 22px rgba(17, 20, 22, 0.14);
}

.btn-primary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.btn-nav {
    min-height: 40px;
    padding: 9px 18px;
    font-size: 0.9rem;
}

/* Hero */
.hero,
.landing-hero,
.page-header {
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 243, 0.94)),
        repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.06) 0 1px, transparent 1px 96px);
    border-bottom: 1px solid var(--line);
}

.home-hero {
    display: flex;
    align-items: center;
    padding: 76px 0 58px;
}

.landing-hero {
    padding: 104px 0;
}

.hero-grid,
.split-layout,
.contact-grid,
.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
    gap: 56px;
    align-items: center;
}

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

.hero-title {
    font-size: 4.8rem;
    margin-top: 14px;
    overflow-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.22rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.hero-proof span,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 800;
}

.hero-visual {
    display: grid;
    align-content: center;
    gap: 16px;
}

.visual-card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.visual-card-main {
    width: min(100%, 520px);
    justify-self: end;
    padding: 24px;
}

.visual-card-side {
    width: min(84%, 360px);
    justify-self: start;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    align-items: center;
    padding: 22px;
    background: var(--ink);
    color: var(--white);
}

.visual-card-side img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--white);
}

.visual-card-side p {
    color: #dbe7df;
    font-weight: 700;
}

.visual-header,
.solution-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.visual-header strong,
.solution-panel-header strong {
    color: var(--accent-primary);
}

.pipeline-map {
    display: grid;
    gap: 12px;
    margin: 26px 0;
}

.pipeline-node {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-soft);
    color: var(--ink-soft);
    font-weight: 800;
}

.pipeline-node.active {
    background: var(--ink);
    color: var(--white);
}

.pipeline-line {
    width: 2px;
    height: 24px;
    margin-left: 20px;
    background: var(--line-strong);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric-row div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.metric-row span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.metric-row strong {
    display: block;
    color: var(--ink);
    font-size: 1.35rem;
    margin-top: 4px;
}

.signal-strip {
    overflow: hidden;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: var(--ink);
    color: var(--white);
}

.signal-track {
    display: flex;
    width: max-content;
    gap: 0;
    animation: signal 28s linear infinite;
}

.signal-track span {
    padding: 16px 34px;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    color: #edf6f1;
    font-weight: 800;
    white-space: nowrap;
}

@keyframes signal {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Cards and grids */
.services-grid,
.news-grid,
.portfolio-grid,
.grid-3 {
    display: grid;
    gap: 24px;
}

.services-grid,
.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.service-card,
.project-card,
.news-card,
.card,
.contact-card,
.solution-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.service-card,
.card {
    padding: 30px;
}

.service-card,
.project-card,
.news-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.service-card:hover,
.project-card:hover,
.news-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-tight);
}

.card-index {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 22px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    font-weight: 900;
}

.service-card h3,
.project-info h3,
.news-content h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.service-card p,
.project-info p,
.news-content p,
.card p {
    color: var(--muted);
}

.automation-section {
    padding: 100px 0;
    background: var(--ink);
    color: var(--white);
}

.automation-section .section-title,
.automation-section h2 {
    color: var(--white);
}

.automation-section .section-header p {
    color: #c6d3cc;
}

.automation-section .eyebrow,
.contact-section .eyebrow {
    color: #9fd3cb;
}

.automation-section .btn-secondary {
    margin-top: 24px;
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.28);
}

.ops-lanes {
    display: grid;
    gap: 16px;
}

.ops-lane {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.ops-lane span {
    color: #9fd3cb;
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ops-lane strong {
    display: block;
    margin: 8px 0;
    color: var(--white);
    font-size: 1.2rem;
}

.ops-lane p {
    color: #c6d3cc;
}

/* Portfolio */
.project-card {
    overflow: hidden;
}

.project-image {
    min-height: 310px;
    display: flex;
    align-items: end;
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.project-image div {
    width: 100%;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.project-image span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.project-image strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 2rem;
}

.zestia-panel {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(56, 95, 113, 0.22)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 18px);
}

.oleoteca-panel {
    background:
        linear-gradient(135deg, rgba(184, 107, 47, 0.2), rgba(15, 118, 110, 0.12)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 22px);
}

.project-info {
    padding: 28px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

/* Blog and content */
.blog-section {
    background: var(--paper-soft);
    border-top: 1px solid var(--line);
}

.archive-grid {
    padding-top: 8px;
}

.news-card {
    min-height: 100%;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.news-image {
    min-height: 218px;
    background-color: var(--paper-soft);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.placeholder-img {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(184, 107, 47, 0.12)),
        repeating-linear-gradient(0deg, rgba(17, 20, 22, 0.04) 0 1px, transparent 1px 18px);
}

.placeholder-img::after {
    content: "AnforaSoft Newsroom";
    color: rgba(17, 20, 22, 0.42);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px;
}

.news-content h3 {
    margin-top: 8px;
}

.news-content p {
    flex: 1;
    margin-bottom: 22px;
}

.read-more {
    color: var(--accent-primary);
    font-weight: 900;
}

.section-action {
    margin-top: 40px;
}

.page-header {
    padding: 92px 0 70px;
}

.page-title {
    font-size: 4rem;
    margin-top: 10px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 72px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
}

.empty-state p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 22px;
}

.article-container {
    width: min(860px, calc(100% - 40px));
    margin: 0 auto;
    padding: 96px 0;
}

.article-header {
    margin-bottom: 42px;
}

.article-title {
    font-size: 4rem;
    margin: 16px 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.94rem;
}

.article-meta span::before {
    content: "/";
    margin-right: 10px;
    color: var(--line-strong);
}

.article-cover {
    overflow: hidden;
    margin-bottom: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.article-cover img {
    width: 100%;
    height: auto;
}

.article-project-link {
    margin-bottom: 34px;
}

.article-body {
    color: #2f3a35;
    font-size: 1.12rem;
    line-height: 1.82;
}

.article-body h2 {
    font-size: 2rem;
    margin: 46px 0 18px;
}

.article-body h3 {
    font-size: 1.48rem;
    margin: 34px 0 12px;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
    margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
    padding-left: 24px;
}

.article-body a {
    color: var(--accent-primary);
    font-weight: 800;
}

.article-body blockquote {
    padding: 18px 22px;
    border-left: 4px solid var(--accent-primary);
    background: var(--paper-soft);
    border-radius: var(--radius-sm);
}

.article-footer {
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    text-align: center;
}

/* Landing pages */
.solution-panel {
    padding: 26px;
}

.solution-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.solution-step:last-child {
    border-bottom: 0;
}

.solution-step span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--paper-soft);
    color: var(--accent-primary);
    font-weight: 900;
}

.solution-step p {
    color: var(--ink);
    font-weight: 800;
}

/* Forms and admin */
.contact-section {
    background:
        linear-gradient(135deg, rgba(17, 20, 22, 0.96), rgba(27, 39, 34, 0.96)),
        var(--ink);
    color: var(--white);
}

.contact-section .section-title,
.contact-section h2 {
    color: var(--white);
}

.contact-section p {
    color: #cbd8d1;
}

.contact-card {
    padding: 30px;
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--ink);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    padding: 13px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    min-height: 136px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.btn-submit {
    width: 100%;
}

.form-status {
    min-height: 24px;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 800;
}

.contact-card .form-status {
    color: var(--muted);
}

.form-card {
    display: grid;
    gap: 14px;
}

.form-card input,
.form-card textarea,
.form-card select {
    margin-bottom: 0;
}

.section {
    padding: 96px 0;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink);
    font-size: 0.94rem;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

/* Footer */
.site-footer {
    padding: 64px 0 42px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 36px;
    align-items: start;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-note {
    text-align: right;
}

/* Reveal */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* AnforaSoft modular identity */
.home-lab,
.section-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 84px;
    background:
        linear-gradient(135deg, rgba(250, 247, 240, 0.96), rgba(238, 233, 223, 0.86)),
        var(--paper);
    border-bottom: 1px solid var(--line);
}

.home-lab::after,
.section-hero::after {
    content: "";
    position: absolute;
    right: -8vw;
    bottom: -18%;
    width: 42vw;
    height: 72%;
    background: var(--ink);
    transform: skewX(-14deg);
    opacity: 0.05;
    pointer-events: none;
}

.lab-grid,
.section-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    gap: 58px;
    align-items: center;
}

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

.lab-console,
.scope-panel,
.automation-diagram,
.commerce-frame,
.b2b-board {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

.lab-console {
    padding: 18px;
    transform: rotate(-1.3deg);
}

.console-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px 18px;
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

.console-toolbar strong {
    color: var(--accent-primary);
}

.console-row {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 12px 16px;
    align-items: start;
    padding: 18px;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.console-row:hover {
    background: var(--paper-soft);
    transform: translateX(4px);
}

.console-row span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    font-weight: 900;
}

.console-row strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.console-row em {
    color: var(--muted);
    font-style: normal;
}

.module-hub,
.deep-section,
.operating-method,
.closing-cta {
    padding: 96px 0;
}

.module-hub {
    background: rgba(255, 255, 255, 0.56);
}

.module-grid,
.service-map,
.project-stories,
.client-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
    position: relative;
    min-height: 245px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.client-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-tight);
}

.client-card-top {
    display: grid;
    gap: 16px;
}

.client-badge {
    width: fit-content;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.client-card h2 {
    font-size: 2.3rem;
}

.client-card p {
    color: var(--muted);
    font-size: 1.05rem;
}

.client-card.is-next {
    background:
        linear-gradient(135deg, rgba(255, 79, 94, 0.11), rgba(0, 167, 165, 0.08)),
        var(--white);
}

.module-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--accent-primary);
    border-radius: var(--radius) 0 0 var(--radius);
}

.module-card:nth-child(even)::before {
    background: var(--accent-cool);
}

.module-card:hover {
    transform: translateY(-6px) rotate(-0.4deg);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-tight);
}

.module-card span,
.scope-panel span,
.automation-diagram span,
.commerce-stats span,
.board-column span,
.story-block span,
.method-board span {
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.module-card h3 {
    font-size: 1.48rem;
    margin: 24px 0 12px;
}

.module-card p,
.scope-panel p,
.story-block p {
    color: var(--muted);
}

.operating-method {
    background: var(--ink);
    color: var(--white);
}

.operating-method .section-title,
.operating-method h2 {
    color: var(--white);
}

.operating-method p {
    color: #d7d0c5;
}

.method-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
    gap: 48px;
    align-items: start;
}

.method-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.method-board div,
.process-list div,
.solution-step,
.story-block {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
}

.operating-method .method-board div {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
}

.method-board strong {
    display: block;
    margin-top: 8px;
    color: inherit;
    font-size: 1.08rem;
}

.scope-panel {
    padding: 34px;
    transform: rotate(1deg);
}

.scope-panel strong {
    display: block;
    margin: 16px 0;
    color: var(--ink);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 2rem;
    line-height: 1.12;
}

.automation-diagram,
.b2b-board {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.automation-diagram div,
.board-column {
    padding: 20px;
    border-radius: var(--radius-sm);
    background: var(--paper-soft);
    border: 1px solid var(--line);
}

.automation-diagram strong,
.board-column p {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-weight: 900;
}

.commerce-frame {
    overflow: hidden;
    padding: 14px;
}

.commerce-photo {
    min-height: 330px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
}

.commerce-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.commerce-stats span {
    display: grid;
    place-items: center;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    text-align: center;
}

.process-list {
    display: grid;
    gap: 14px;
}

.process-list div {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: start;
}

.process-list span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--accent-primary);
    color: var(--white);
    font-weight: 900;
}

.process-list p {
    color: var(--ink);
    font-weight: 800;
}

.story-block {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

.story-block h2 {
    font-size: 2rem;
    margin: 18px 0;
}

.closing-cta {
    background: var(--paper-soft);
}

.cta-panel {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: center;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.cta-panel h2 {
    max-width: 760px;
    font-size: 2.25rem;
}

.asset-credit {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-soft);
    color: var(--muted);
    font-size: 0.96rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1040px) {
    .lab-grid,
    .section-hero-grid,
    .method-grid,
    .hero-grid,
    .split-layout,
    .contact-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .news-grid,
    .portfolio-grid,
    .module-grid,
    .service-map,
    .project-stories,
    .client-grid,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    main {
        padding-top: 68px;
    }

    .nav-shell {
        min-height: 68px;
    }

    .nav-toggle {
        display: grid;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--white);
        box-shadow: var(--shadow-soft);
    }

    .nav-links.is-open {
        display: grid;
        gap: 12px;
    }

    .nav-links a,
    .nav-links .btn-primary {
        width: 100%;
        justify-content: flex-start;
    }

    .home-hero,
    .home-lab,
    .section-hero,
    .module-hub,
    .deep-section,
    .operating-method,
    .closing-cta,
    .landing-hero,
    .section-band,
    .services,
    .portfolio,
    .blog-section,
    .blog-archive,
    .contact-section,
    .section {
        padding: 64px 0;
    }

    .hero-title,
    .page-title,
    .article-title {
        font-size: 3.1rem;
    }

    .section-title {
        font-size: 2.45rem;
    }

    .hero-visual {
        min-height: auto;
    }

    .visual-card-main,
    .visual-card-side {
        position: static;
        width: 100%;
    }

    .visual-card-side {
        margin-top: 16px;
    }

    .metric-row,
    .form-row,
    .lab-grid,
    .section-hero-grid,
    .method-grid,
    .method-board,
    .module-grid,
    .service-map,
    .project-stories,
    .client-grid,
    .commerce-stats,
    .services-grid,
    .news-grid,
    .portfolio-grid,
    .grid-3,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .lab-console,
    .scope-panel {
        transform: none;
    }

    .module-card {
        min-height: 210px;
    }

    .cta-panel {
        display: grid;
    }

    .project-image {
        min-height: 240px;
    }

    .footer-note {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .container,
    .article-container {
        width: calc(100% - 28px);
        max-width: 360px;
        margin-left: 14px;
        margin-right: auto;
    }

    .hero-title,
    .page-title,
    .article-title {
        font-size: 2.28rem;
    }

    .home-hero .hero-title {
        max-width: 12ch;
    }

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

    .hero-subtitle,
    .page-subtitle,
    .article-subtitle {
        font-size: 1rem;
    }

    .service-card,
    .project-info,
    .news-content,
    .contact-card,
    .card,
    .solution-panel {
        padding: 22px;
    }

    .hero-buttons {
        display: grid;
    }

    .hero-proof {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-proof span {
        justify-content: center;
        text-align: center;
    }

    .visual-card {
        max-width: 100%;
        overflow: hidden;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
