/* ==========================================================
   ANCHOR — HOME V2
   Premium industrial identity
   Hero, navbar, and footer
========================================================== */

/* ==========================================================
   FONTS
========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ==========================================================
   DESIGN TOKENS
========================================================== */
:root {
    --ink: #0b0e13;
    --ink-2: #131821;
    --ink-3: #1c2330;
    --paper: #f3f1eb;
    --paper-2: #e9e6dd;
    --white: #fff;
    --amber: #ffb31a;
    --amber-2: #f29100;
    --text: #11151b;
    --muted: #5c6472;
    --muted-d: #9aa3b1;
    --line: rgba(17, 21, 27, .12);
    --line-d: rgba(255, 255, 255, .1);
    --f-display: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --f-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --wrap: 1280px;
    --gut: clamp(16px, 4vw, 40px);
    --r: 18px;
    --ease: cubic-bezier(.2, .7, .1, 1);
    --header-h: 72px;
}

/* ==========================================================
   GLOBAL FOUNDATION
========================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--ink);
    color: var(--white);
    font-family: var(--f-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea,
select {
    font-family: var(--f-body);
}

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

a {
    color: inherit;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================
   HERO — STRUCTURE
========================================================== */

.anchor-hero-v2 {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--ink);
    color: var(--white);
    direction: rtl;
    text-align: right;
    font-family: var(--f-body);
    -webkit-font-smoothing: antialiased;
}

/* Background image */
.anchor-hero-v2-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url("/img/hero.png");
    background-size: cover;
    background-position: 30% center;
    background-repeat: no-repeat;
    opacity: .32;
    filter: saturate(.7) contrast(1.05);
    transform: translateY(var(--hp, 0px));
    will-change: transform;
}

/* Dark overlay */
.anchor-hero-v2-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to left, rgba(11, 14, 19, .96) 0%, rgba(11, 14, 19, .8) 45%, rgba(11, 14, 19, .45) 100%), linear-gradient(to top, var(--ink) 2%, transparent 40%);
    pointer-events: none;
}

/* Technical grid */
.anchor-hero-v2-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .5;
    pointer-events: none;
    background-image: linear-gradient(var(--line-d) 1px, transparent 1px), linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 65%);
}

/* Full-width hero container */
.anchor-hero-v2-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: calc(var(--header-h) + 1px);
    padding-bottom: 4px;
    /* Shared horizontal alignment */
    padding-left: var(--gut);
    padding-right: var(--gut);
    box-sizing: border-box;
    direction: rtl;
}

/* Hero text and actions */
.anchor-hero-v2-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    transform: translateX(-100px);
}


/* ==========================================================
   HERO — EYEBROW, TITLE, DESCRIPTION
========================================================== */
.anchor-hero-v2-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--amber);
    font-family: var(--f-body);
    font-size: clamp(18px, 1.75vw, 25px);
    max-width: 100%;
    font-weight: 500;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.anchor-hero-v2-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 179, 26, .22);
}

.anchor-hero-v2-title {
    max-width: 850px;
    margin: 22px 0 26px;
    color: var(--white);
    font-family: var(--f-display);
    font-size: clamp(2.6rem, 5.4vw, 5.1rem);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: normal;
    text-wrap: balance;
    direction: rtl;
    text-align: right;
}

.anchor-hero-v2-title span {
    color: var(--amber);
}

.anchor-hero-v2-description {
    max-width: 50ch;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-family: var(--f-body);
    font-size: clamp(14px, 1.6vw, 20px);
    font-weight: 400;
    line-height: 1.85;
    direction: rtl;
    text-align: right;
}

/* ==========================================================
   HERO — ACTIONS AND BUTTONS
========================================================== */
.anchor-hero-v2-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
    direction: rtl;
}

.anchor-hero-v2-btn {
    --bg: var(--amber);
    --fg: var(--ink);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--f-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), color .25s ease;
}

.anchor-hero-v2-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--ease);
}

.anchor-hero-v2-btn:hover::before {
    transform: scaleX(1);
}

.anchor-hero-v2-btn:hover {
    box-shadow: 0 10px 30px -10px rgba(255, 179, 26, .7);
}

.anchor-hero-v2-btn:active {
    transform: scale(.97);
}

.anchor-hero-v2-btn:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 4px;
}

.anchor-hero-v2-btn-primary {
    --bg: var(--amber);
    --fg: var(--ink);
}

.anchor-hero-v2-btn-secondary {
    --bg: transparent;
    --fg: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3);
}

.anchor-hero-v2-btn-secondary::before {
    background: rgba(255, 255, 255, .1);
}

.anchor-hero-v2-btn-secondary:hover {
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6);
}

.anchor-hero-v2-btn-icon {
    display: inline-block;
    font-family: Arial, sans-serif;
    transition: transform .3s var(--ease);
}

.anchor-hero-v2-btn:hover .anchor-hero-v2-btn-icon {
    transform: translateX(-5px);
}

/* ==========================================================
   HERO — TECHNICAL STATISTICS
   Matches the four-stat block inside the hero HTML.
========================================================== */
.anchor-hero-v2-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100vw;
    max-width: none;
    min-width: 0;
    margin-top: 45px;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    border-top: 1px solid var(--line-d);
    border-bottom: 1px solid var(--line-d);
}

.anchor-hero-v2-stat {
    min-width: 0;
    padding: 26px 16px 30px;
    border-inline-start: 1px solid var(--line-d);
}

.anchor-hero-v2-stat:first-child {
    border-inline-start: 0;
}

.anchor-hero-v2-stat strong {
    display: block;
    color: var(--white);
    font-family: var(--f-display);
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    direction: ltr;
    text-align: center;
}

.anchor-stat-plus,
.anchor-stat-unit {
    color: var(--amber);
    font-size: .5em;
    font-weight: 500;
}

.anchor-hero-v2-stat-label {
    display: block;
    margin-top: 8px;
    color: var(--muted-d);
    font-family: var(--f-body);
    font-size: 14.5px;
    line-height: 1.6;
    direction: rtl;
    text-align: center;
}


/* ==========================================================
   ANCHOR — CONTINUOUS PROJECT MARQUEE
   Two identical groups create a seamless scrolling loop.
========================================================== */

.anchor-marquee {
    position: relative;
    width: 100vw;
    margin-top: 22px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    direction: ltr;
    color: var(--ink);
    background: var(--amber);
}

/* ==========================================================
   MARQUEE TRACK
========================================================== */

.anchor-marquee__track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    animation: anchor-marquee-scroll 25s linear infinite;
    will-change: transform;
}

/* ==========================================================
   MARQUEE GROUP
========================================================== */

.anchor-marquee__group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: clamp(22px, 3vw, 48px);
    padding: 17px clamp(22px, 3vw, 48px);
    white-space: nowrap;
}

/* ==========================================================
   PROJECT NAME
========================================================== */

.anchor-marquee__item {
    display: inline-block;
    flex: 0 0 auto;
    direction: rtl;
    white-space: nowrap;
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(20px, 2.4vw, 34px);
    font-weight: 800;
    line-height: 1.35;
}

/* ==========================================================
   PROJECT SEPARATOR
========================================================== */

.anchor-marquee__separator {
    display: inline-block;
    flex: 0 0 auto;
    color: var(--ink);
    font-family: Arial, sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1;
}

/* ==========================================================
   CONTINUOUS SCROLL
   Moves exactly one half of the duplicated track.
========================================================== */

@keyframes anchor-marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}


/* ==========================================================
   ANCHOR — PROJECT NAMES MARQUEE
========================================================== */

.anchor-projects-section {
    width: 100%;
    overflow: hidden;
}

.anchor-projects-section .anchor-marquee {
    position: relative;
    display: block;
    width: 100vw;
    max-width: none;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 0;
    overflow: hidden;
    direction: ltr;
    background: var(--amber);
    color: var(--ink);
}

.anchor-projects-section .anchor-marquee__track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    /* Keep the project-name strip moving, including on hover. */
    animation: anchor-projects-scroll var(--marquee-duration, 45s) linear infinite;
    animation-play-state: running;
    will-change: transform;
}

.anchor-projects-section .anchor-marquee__group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: clamp(22px, 3vw, 48px);
    padding: 17px clamp(22px, 3vw, 48px);
    white-space: nowrap;
}

.anchor-projects-section .anchor-marquee__item {
    display: inline-block;
    flex: 0 0 auto;
    direction: rtl;
    white-space: nowrap;
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(20px, 2.4vw, 34px);
    font-weight: 800;
    line-height: 1.35;
}

.anchor-projects-section .anchor-marquee__separator {
    display: inline-block;
    flex: 0 0 auto;
    color: var(--ink);
    font-family: Arial, sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1;
}

@keyframes anchor-projects-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(-1 * var(--marquee-distance, 50%)), 0, 0);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .anchor-projects-section .anchor-marquee__group {
        gap: 22px;
        padding: 14px 22px;
    }

    .anchor-projects-section .anchor-marquee__item {
        font-size: 20px;
    }
}

/* ==========================================================
   NAVBAR
========================================================== */
/* ==========================================================
   FOOTER
========================================================== */
.anchor-footer {
    position: relative;
    overflow: hidden;
    direction: rtl;
    color: var(--white);
    background: #090c11;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-family: var(--f-body);
}

.anchor-footer-main {
    padding: 76px 0 64px;
}

.anchor-footer .container {
    max-width: 1440px;
}

.anchor-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: clamp(28px, 4vw, 64px);
}

.anchor-footer-brand,
.anchor-footer-column {
    min-width: 0;
}

.anchor-footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 22px;
}

.anchor-footer-logo img {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 58px;
    object-fit: contain;
}

.anchor-footer-description,
.anchor-footer-column-text {
    max-width: 360px;
    margin: 0;
    color: rgba(255, 255, 255, .58);
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 2;
}

.anchor-footer-heading {
    position: relative;
    margin: 0 0 24px;
    padding-bottom: 14px;
    color: var(--white);
    font-family: var(--f-body);
    font-size: 16px;
    font-weight: 700;
}

.anchor-footer-heading::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    background: var(--amber);
}

.anchor-footer-links,
.anchor-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.anchor-footer-links a,
.anchor-footer-contact a {
    color: rgba(255, 255, 255, .62);
    font-family: var(--f-body);
    font-size: 14px;
    text-decoration: none;
    transition: color .2s ease;
}

.anchor-footer-links a:hover,
.anchor-footer-contact a:hover {
    color: var(--amber);
}

.anchor-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, .62);
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.8;
}

.anchor-footer-contact-icon {
    flex: none;
    color: var(--amber);
    font-size: 11px;
    line-height: 2;
}

.anchor-footer-bottom {
    background: rgba(0, 0, 0, .16);
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.anchor-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 66px;
    color: rgba(255, 255, 255, .45);
    font-family: var(--f-body);
    font-size: 12px;
}

.anchor-footer-tagline {
    direction: ltr;
    color: var(--amber);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .04em;
}

/* ==========================================================
   RESPONSIVE — TABLET AND SMALLER
========================================================== */
@media (max-width: 1024px) {
    .anchor-hero-v2-container {
        padding-top: calc(var(--header-h) + 40px);
        padding-bottom: 40px;
    }

    .anchor-hero-v2-content {
        width: 100%;
        max-width: 760px;
        margin-right: 0;
        margin-left: auto;
    }
}

@media (max-width: 991.98px) {
    .anchor-hero-v2-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .anchor-hero-v2-stat:nth-child(3) {
        border-inline-start: 0;
    }

    .anchor-hero-v2-stat:nth-child(n + 3) {
        border-top: 1px solid var(--line-d);
    }

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

    .navbar-content {
        flex-wrap: wrap;
    }

    .navbar-navigation {
        flex-basis: 100%;
        order: 3;
        padding: 0 0 16px;
    }

    .custom-navbar .navbar-nav {
        align-items: stretch;
        gap: 4px;
        padding-top: 12px;
    }

    .custom-navbar .nav-link {
        display: block;
        padding: 12px 4px;
        font-size: 20px;
        line-height: 1.5;
    }

    .custom-navbar .anchor-navbar-login {
        display: inline-flex;
        width: fit-content;
        margin-top: 6px;
    }
}

@media (max-width: 860px) {
    .anchor-hero-v2-scroll {
        display: none;
    }
}

/* ==========================================================
   RESPONSIVE — MOBILE
========================================================== */
@media (max-width: 575.98px) {
    :root {
        --header-h: 64px;
        --gut: 18px;
    }

    .logo-img {
        max-width: 138px;
        max-height: 42px;
    }

    .navbar-content {
        gap: 12px;
    }

    .anchor-footer-main {
        padding: 54px 0 42px;
    }

    .anchor-footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .anchor-footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .anchor-marquee__group {
        gap: 22px;
        padding: 14px 22px;
    }

    .anchor-marquee__item {
        font-size: 21px;
    }
}

@media (max-width: 520px) {
    .anchor-hero-v2 {
        align-items: center;
        min-height: 100vh;
        min-height: 100svh;
    }

    .anchor-hero-v2-container {
        padding-top: calc(var(--header-h) + 28px);
        padding-bottom: 32px;
    }

    .anchor-hero-v2-content {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: auto;
    }

    .anchor-hero-v2-eyebrow {
        gap: 9px;
        margin-bottom: 18px;
        font-size: 18px;
    }

    .anchor-hero-v2-title {
        margin: 18px 0 22px;
        font-size: clamp(2.4rem, 11.5vw, 3.4rem);
        line-height: 1.32;
    }

    .anchor-hero-v2-description {
        font-size: 16px;
        line-height: 1.8;
    }

    .anchor-hero-v2-actions {
        gap: 10px;
        margin-top: 28px;
    }

    .anchor-hero-v2-btn {
        min-height: 48px;
        padding: 12px 19px;
        font-size: 14px;
    }

    .anchor-hero-v2-stats {
        margin-top: 32px;
    }

    .anchor-hero-v2-stat {
        padding: 20px 10px 22px;
    }

    .anchor-hero-v2-stat strong {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    .anchor-hero-v2-stat-label {
        font-size: 13px;
    }

    .anchor-marquee {
        margin-top: 18px;
    }
}

@media (max-width: 360px) {
    .anchor-hero-v2-container {
        padding-inline: 16px;
    }

    .anchor-hero-v2-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .anchor-hero-v2-btn {
        width: 100%;
    }

    .anchor-hero-v2-stat {
        padding-inline: 8px;
    }
}

/* ==========================================================
   ACCESSIBILITY — REDUCED MOTION
========================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .custom-navbar *,
    .anchor-footer *,
    .anchor-hero-v2-btn,
    .anchor-hero-v2-btn::before,
    .anchor-hero-v2-btn-icon {
        transition: none !important;
    }

    .anchor-hero-v2-bg {
        transform: none;
        will-change: auto;
    }

    .anchor-hero-v2-scroll-line::after {
        animation: none;
    }
}

/* ==========================================================
   FINAL LAYOUT OVERRIDES — HERO + SEPARATE STATS + MARQUEE
   Keep these rules at the end of the stylesheet.
========================================================== */

/* Hero text positioning; stats are outside this element in the HTML. */
.anchor-hero-v2-content {
    transform: translateX(-100px);
}

/* Separate statistics section: full viewport width, no inherited shift. */
.anchor-stats-section {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--ink);
    direction: rtl;
}

.anchor-stats-section .anchor-hero-v2-stats {
    display: grid;
    direction: rtl;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0 var(--gut);
    border-top: 1px solid var(--line-d);
    border-bottom: 1px solid var(--line-d);
    text-align: center;
}

/* RTL grid placement: first HTML item starts at the right. */
.anchor-stats-section .anchor-hero-v2-stat {
    min-width: 0;
    margin: 0;
    padding: 26px 16px 30px;
    border-top: 0;
    border-inline-start: 1px solid var(--line-d);
    direction: rtl;
    text-align: center;
}

.anchor-stats-section .anchor-hero-v2-stat:first-child {
    border-inline-start: 0;
}

.anchor-stats-section .anchor-hero-v2-stat strong {
    display: block;
    direction: ltr;
    text-align: center;
}

.anchor-stats-section .anchor-hero-v2-stat-label {
    display: block;
    direction: rtl;
    text-align: center;
}

/* Yellow projects strip touches the stats, with a tiny 5px separation. */
.anchor-projects-section {
    position: relative;
    width: 100%;
    margin: 5px 0 0;
    padding: 0;
    overflow: hidden;
    background: var(--amber);
    direction: ltr;
}

.anchor-projects-section .anchor-marquee {
    width: 100%;
    max-width: none;
    min-height: 60px;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--amber);
}

/* Preserve the existing seamless animation and group styling. */
.anchor-projects-section .anchor-marquee__track {
    display: flex;
    width: max-content;
    flex-wrap: nowrap;
    align-items: center;
}

/* Responsive stats: two columns, retaining RTL order. */
@media (max-width: 991.98px) {
    .anchor-stats-section .anchor-hero-v2-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .anchor-stats-section .anchor-hero-v2-stat:nth-child(3) {
        border-inline-start: 0;
        border-top: 1px solid var(--line-d);
    }

    .anchor-stats-section .anchor-hero-v2-stat:nth-child(4) {
        border-top: 1px solid var(--line-d);
    }
}

/* The hero text shift should not push content off smaller screens. */
@media (max-width: 1024px) {
    .anchor-hero-v2-content {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .anchor-stats-section .anchor-hero-v2-stat {
        padding: 20px 10px 22px;
    }
}

@media (max-width: 360px) {
    .anchor-stats-section .anchor-hero-v2-stats {
        padding-inline: 16px;
    }

    .anchor-stats-section .anchor-hero-v2-stat {
        padding-inline: 8px;
    }
}

/* =========================================
   FIX: HERO → STATS → PROJECTS SPACING
========================================= */

/* 1. Stop the hero from occupying the full screen */
.anchor-hero-v2 {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

/* 2. Reduce space inside the hero */
.anchor-hero-v2-container {
    padding-top: calc(var(--header-h) + 15px) !important;
    padding-bottom: 15px !important;
}

/* 3. Remove extra space around statistics */
.anchor-stats-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.anchor-stats-section .anchor-hero-v2-stats {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 4. Make the stats row more compact */
.anchor-stats-section .anchor-hero-v2-stat {
    padding-top: 12px !important;
    padding-bottom: 14px !important;
}

/* 5. Keep only 5px before the yellow strip */
.anchor-projects-section {
    margin-top: 5px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.anchor-projects-section .anchor-marquee {
    margin-top: 0 !important;
    min-height: 65px !important;
}
/* WHAT WE BUILD — Design 1's paper section, with database-backed panels. */
.anchor-build { --muted-d: #5c6472; --line-d: rgba(17,21,27,.12); --ink-2: #e9e6dd; --build-accent: #f29100; position: relative; padding-block: clamp(72px, 10vw, 144px); background: var(--paper); color: var(--text); direction: rtl; }
.anchor-build-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.anchor-build-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.anchor-build-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--build-accent); font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; }
.anchor-build-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255,179,26,.12); }
.anchor-build-heading h2 { color: var(--text); margin: 18px 0 0; font-family: var(--f-display); font-size: clamp(1.8rem, 4.2vw, 3.4rem); font-weight: 800; line-height: 1.4; }
.anchor-build-heading h2 span { color: var(--amber-2); }
.anchor-build-heading > p { margin: 0; max-width: 42ch; font-size: 18px; line-height: 1.9; color: var(--muted-d); }
.anchor-build:not(.is-enhanced) .anchor-build-layout { grid-template-columns: minmax(0, 1fr); }
.anchor-build-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.anchor-build-item { padding-block: clamp(32px, 5vh, 56px); border-top: 1px solid var(--line-d); min-height: 48vh; display: flex; flex-direction: column; justify-content: center; transition: opacity .5s var(--ease); }
.anchor-build-item:last-child { border-bottom: 1px solid var(--line-d); }
.anchor-build.is-enhanced .anchor-build-item { opacity: .85; }
.anchor-build.is-enhanced .anchor-build-item.is-active, .anchor-build.is-enhanced .anchor-build-item:focus-within { opacity: 1; }
.anchor-build-code { display: flex; align-items: center; gap: 14px; justify-content: flex-end; font-family: var(--f-mono); font-size: 18px; letter-spacing: .08em; color: var(--muted-d); }
.anchor-build-code > span:first-child { color: var(--build-accent); }
.anchor-build-rule { height: 1px; width: 40px; background: var(--amber); opacity: .6; }
.anchor-build-item h3 { color: var(--text); margin: 18px 0 6px; font-family: var(--f-display); font-size: clamp(1.8rem, 3.1vw, 2.8rem); font-weight: 800; line-height: 1.5; }
.anchor-build-english { text-align: right; font-family: var(--f-mono); color: var(--amber); font-size: 11px; letter-spacing: .04em; }
.anchor-build-item > p { max-width: 44ch; margin: 18px 0 0; color: var(--muted-d); font-size: clamp(18px, 1.25vw, 20px); line-height: 1.9; }
.anchor-build-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; font-size: clamp(18px, 1.25vw, 20px); }
.anchor-build-project { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 16px; border: 1px solid var(--line-d); border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; transition: background .3s, border-color .3s, color .3s; }
.anchor-build-project:hover { background: #fff; border-color: var(--build-accent); color: var(--build-accent); }
.anchor-build-project > span { flex-shrink: 0; color: var(--build-accent); }
.anchor-build-link { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 20px; border: 1px solid var(--amber); border-radius: 999px; background: var(--amber); color: var(--ink); font-weight: 600; text-decoration: none; transition: background .3s, box-shadow .3s; }
.anchor-build-link span { transition: transform .25s var(--ease); }
.anchor-build-link:hover { color: var(--ink); background: #ffc044; box-shadow: 0 8px 20px -12px rgba(242,145,0,.55); }
.anchor-build-link:hover span { transform: translateX(-4px); }
.anchor-build-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 4px; }
.anchor-build-stage { display: none; }
.anchor-build.is-enhanced .anchor-build-stage { display: block; position: sticky; top: calc(var(--header-h) + 24px); height: min(660px, calc(100svh - var(--header-h) - 48px)); min-height: 300px; border: 1px solid var(--line-d); border-radius: var(--r); overflow: hidden; background: var(--ink-2); }
.anchor-build-frame { position: absolute; inset: 0; margin: 0; z-index: 0; opacity: 0; transform: translate3d(-10px, 0, 0) scale(1.015); transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s var(--ease); }
.anchor-build-frame.is-active { z-index: 2; opacity: 1; transform: none; }
.anchor-build-frame.is-leaving { z-index: 1; opacity: 1; transform: none; transition: none; }
.anchor-build-frame img, .anchor-build-inline img { width: 100%; height: 100%; object-fit: contain; background: var(--ink-2); }
.anchor-build-frame img { padding: 52px 16px 112px; }
.anchor-build-frame figcaption, .anchor-build-inline figcaption { position: absolute; inset-inline: 16px; bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line-d); border-radius: 12px; background: rgba(11,14,19,.92); color: #fff; font-size: 14px; line-height: 1.6; }
.anchor-build-frame figcaption small { display: block; margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.75); }
.anchor-build-frame figcaption b, .anchor-build-inline figcaption b { color: var(--amber); font-family: var(--f-mono); font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.anchor-build-stage-code, .anchor-build-stage-count { position: absolute; top: 18px; z-index: 4; font-family: var(--f-mono); font-size: 12px; }
.anchor-build-stage-code { inset-inline-start: 18px; background: var(--amber); color: var(--ink); padding: 4px 12px; border-radius: 999px; }
.anchor-build-stage-count { inset-inline-end: 18px; color: var(--muted-d); }
.anchor-build-stage-count [data-build-current] { color: var(--text); }
.anchor-build-inline { position: relative; aspect-ratio: 4/5; max-height: 560px; margin: 24px 0 0; border: 1px solid var(--line-d); border-radius: var(--r); overflow: hidden; }
.anchor-build-inline img { padding: 16px 12px 100px; }
.anchor-build.is-enhanced .anchor-build-inline { display: none; }
.anchor-build.has-reveals [data-build-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.anchor-build.has-reveals [data-build-reveal].is-visible { opacity: 1; transform: none; }
@media (max-width: 1024px), (max-height: 560px) {
    .anchor-build-layout { grid-template-columns: minmax(0, 1fr); }
    .anchor-build.is-enhanced .anchor-build-stage { display: none; }
    .anchor-build.is-enhanced .anchor-build-item { opacity: 1; min-height: 0; }
    .anchor-build.is-enhanced .anchor-build-inline { display: block; }
    .anchor-build-inline { aspect-ratio: 4/3; max-height: 560px; }
    .anchor-build-item > p { max-width: 60ch; }
}
@media (max-width: 520px) {
    .anchor-build-heading > p, .anchor-build-item > p { font-size: 18px; }
    .anchor-build-inline { aspect-ratio: 4/5; }
    .anchor-build-inline figcaption { inset-inline: 10px; bottom: 10px; padding: 10px 12px; font-size: 12px; }
    .anchor-build-english { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .anchor-build *, .anchor-build *::before, .anchor-build *::after { transition: none !important; animation: none !important; }
    .anchor-build.has-reveals [data-build-reveal] { opacity: 1; transform: none; }
    .anchor-build-frame, .anchor-build-link:hover span { transform: none; }
}

.anchor-build-empty { margin: 0; padding-block: 32px; border-top: 1px solid var(--line-d); color: var(--muted-d); }
.anchor-build-item > p { white-space: pre-line; overflow-wrap: anywhere; }
.anchor-build-item h3, .anchor-build-frame figcaption, .anchor-build-inline figcaption { overflow-wrap: anywhere; }

/* Photos open their own panel; project links remain beside the cards. */
.anchor-build-photo { position: absolute; inset: 0; display: block; color: #fff; }
.anchor-build-photo-link img { transition: transform .65s var(--ease), filter .4s ease; }
.anchor-build-photo-link:is(:hover, :focus-visible) img { transform: scale(1.02); filter: brightness(1.06); }
.anchor-build-photo-link:focus-visible { outline: 3px solid var(--amber); outline-offset: -5px; }
.anchor-build-photo-cta { position: absolute; inset-inline-end: 24px; bottom: 124px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--ink); font-size: 24px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .3s var(--ease); }
.anchor-build-photo-link:is(:hover, :focus-visible) .anchor-build-photo-cta { opacity: 1; transform: none; }
.anchor-build-frame { pointer-events: none; }
.anchor-build-frame.is-active { pointer-events: auto; }
.anchor-build-frame figcaption, .anchor-build-inline figcaption { cursor: default; }
.anchor-build-stage-code, .anchor-build-stage-count { pointer-events: none; }
@media (hover: none) { .anchor-build-photo-cta { opacity: 1; transform: none; width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .anchor-build-photo-link:is(:hover, :focus-visible) img, .anchor-build-photo-cta { transform: none; } }
.anchor-build-inline.has-photo-reveal { opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity .5s ease, transform .6s var(--ease); }
.anchor-build-inline.is-photo-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .anchor-build .anchor-build-frame { transform: none; transition: opacity .35s ease !important; }
    .anchor-build .anchor-build-inline.has-photo-reveal { transform: none; transition: opacity .35s ease !important; }
}

.anchor-build-project:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 4px;
}
