/* JGreaterLab — red / black, inspired by clawbro.ai (dark surfaces, red accents) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cb-bg: #000000;
    --cb-bg-raised: #0a0a0a;
    --cb-surface: #0f0f0f;
    --cb-surface-hover: #171717;
    --cb-border: rgba(255, 255, 255, 0.08);
    --cb-border-strong: rgba(255, 255, 255, 0.16);
    --cb-text: #fafafa;
    --cb-text-secondary: #a3a3a3;
    --cb-text-tertiary: #737373;
    --cb-accent: #e11d48;
    --cb-accent-bright: #ff4d4d;
    --cb-accent-deep: #9f1239;
    --cb-rose: #fb7185;
    --cb-warm: #f59e0b;
    --font-display: "Syne", system-ui, sans-serif;
    --font-sans: "Space Grotesk", system-ui, sans-serif;
    --shadow-glow: 0 0 60px -12px rgba(239, 68, 68, 0.42);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--cb-text);
    background: var(--cb-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nav-menu-open {
    overflow: hidden;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* —— Navigation —— */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--cb-border);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    border-bottom-color: var(--cb-border-strong);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 20px 0.55rem 12px;
    max-width: 1160px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    text-decoration: none;
    color: var(--cb-text);
    flex-shrink: 0;
    margin-right: auto;
    min-width: 0;
}

.nav-logo-img {
    display: block;
    height: 50px;
    width: auto;
    max-width: min(50vw, 240px);
    flex-shrink: 0;
    object-fit: contain;
    object-position: left center;
    -webkit-user-drag: none;
}

.nav-brand-text {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(1.12rem, 3.1vw, 1.38rem);
    letter-spacing: -0.015em;
    color: var(--cb-text);
    white-space: nowrap;
    line-height: 1.42;
}

.nav-brand-name {
    font-weight: 700;
}

.nav-brand-tld {
    font-weight: 500;
    color: var(--cb-text-secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.15rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--cb-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: color var(--transition), background var(--transition);
}

.nav-menu a:hover {
    color: var(--cb-text);
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu a.nav-link-cta {
    color: #fff;
    background: linear-gradient(135deg, var(--cb-accent) 0%, var(--cb-accent-deep) 100%);
    margin-left: 0.35rem;
    box-shadow: 0 4px 22px rgba(239, 68, 68, 0.4);
}

.nav-menu a.nav-link-cta:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--cb-accent-bright) 0%, var(--cb-accent) 100%);
    box-shadow: 0 6px 28px rgba(239, 68, 68, 0.5);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--cb-text);
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
    transform-origin: center;
}

.nav-backdrop {
    display: none;
}

/* —— Hero —— */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 88px;
    overflow: hidden;
    background: var(--cb-bg);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 80% at 50% -30%, rgba(239, 68, 68, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 10%, rgba(225, 29, 72, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 0% 40%, rgba(127, 29, 29, 0.12) 0%, transparent 45%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 100%);
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 820px;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cb-accent-bright);
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.09);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--cb-text);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.hero-title .accent-word {
    background: linear-gradient(90deg, var(--cb-accent-bright) 0%, var(--cb-rose) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--cb-text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--cb-text-tertiary);
    margin-bottom: 2.25rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* —— Buttons —— */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-sans);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--cb-accent-bright) 0%, var(--cb-accent) 55%, var(--cb-accent-deep) 100%);
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.55);
}

.btn-secondary {
    color: var(--cb-text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--cb-border-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-disabled,
.btn-primary.btn-disabled {
    opacity: 0.45;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* —— Sections —— */
section {
    padding: 88px 0;
    position: relative;
}

.projects {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--cb-text);
    letter-spacing: -0.03em;
}

/* —— About —— */
.about {
    background: var(--cb-bg-raised);
    border-top: 1px solid var(--cb-border);
    border-bottom: 1px solid var(--cb-border);
}

.about-content {
    max-width: 820px;
    margin: 0 auto;
}

.about-profile {
    display: flex;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.about-profile-img {
    width: min(240px, 62vw);
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--cb-border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
    object-fit: cover;
}

.about-text .lead {
    font-size: 1.2rem;
    color: var(--cb-text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.75;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--cb-text-tertiary);
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.highlight-item {
    text-align: center;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--cb-border);
    background: rgba(13, 18, 32, 0.6);
    min-width: 120px;
}

.highlight-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cb-accent-bright) 0%, var(--cb-rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-label {
    display: block;
    color: var(--cb-text-tertiary);
    margin-top: 0.4rem;
    font-size: 0.85rem;
}

/* —— Projects —— */
.projects {
    background: var(--cb-bg);
}

.projects::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cb-border-strong), transparent);
}

.projects .section-title {
    margin-bottom: 2.25rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(280px * 1.2), calc(360px * 1.2)));
    gap: 1.1rem;
    justify-content: center;
}

.project-card {
    background: var(--cb-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
    border: 1px solid var(--cb-border);
    display: flex;
    flex-direction: column;
    max-width: calc(360px * 1.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.project-card:hover {
    border-color: rgba(248, 113, 113, 0.32);
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(248, 113, 113, 0.1);
    background: var(--cb-surface-hover);
}

.project-image {
    width: 100%;
    height: calc(128px * 1.2);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(12, 12, 12, 0.95) 0%, rgba(8, 8, 8, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(0.5rem * 1.2) calc(0.6rem * 1.2);
    border-bottom: 1px solid var(--cb-border);
}

.project-image-large {
    height: calc(140px * 1.2);
}

.project-img {
    width: auto;
    max-width: calc(100% - 0.6rem);
    height: auto;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1) saturate(1);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    background: rgba(15, 15, 15, 0.6);
    padding: calc(0.3rem * 1.2);
}

.project-card:hover .project-img {
    transform: scale(1.02);
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--cb-text-secondary);
    font-weight: 700;
    background: linear-gradient(145deg, var(--cb-bg-raised), var(--cb-surface));
    border-radius: var(--radius-sm);
}

.project-content {
    padding: calc(0.85rem * 1.2) calc(1rem * 1.2) calc(1rem * 1.2);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--cb-text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-align: center;
}

.project-category {
    color: var(--cb-accent-bright);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    padding: 0.2rem 0.55rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.26);
    border-radius: 999px;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.project-description {
    color: var(--cb-text-tertiary);
    margin-bottom: 0.55rem;
    line-height: 1.5;
    font-size: 0.82rem;
    max-height: clamp(4.25rem, 11vh, 5.25rem);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cb-border);
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-description::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.project-features {
    list-style: none;
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
}

.project-features li {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--cb-text-secondary);
    border: 1px solid var(--cb-border);
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition);
    line-height: 1.25;
}

.project-features li:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.38);
    color: var(--cb-text);
}

.project-card .btn-primary {
    width: 100%;
    text-align: center;
    padding: 0.52rem 1rem;
    font-weight: 600;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.04);
    color: var(--cb-text);
    border: 1px solid var(--cb-border);
    box-shadow: none;
    font-size: 0.82rem;
}

.project-card .btn-primary + .btn-primary {
    margin-top: 0.45rem;
}

.project-card .btn-primary:hover {
    transform: none;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.45);
    color: var(--cb-accent-bright);
    box-shadow: none;
}

.project-card .btn-primary.btn-disabled:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--cb-border);
    color: var(--cb-text);
}

/* —— Services —— */
.services {
    background: var(--cb-bg-raised);
    border-top: 1px solid var(--cb-border);
}

/* —— Tools & Platforms (tile style) —— */
.tools {
    background: var(--cb-bg);
    border-top: 1px solid var(--cb-border);
    border-bottom: 1px solid var(--cb-border);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.95rem;
}

.tool-link-card {
    text-decoration: none;
    color: var(--cb-text);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(225, 29, 72, 0.14) 0%, rgba(225, 29, 72, 0) 58%),
        linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(8, 8, 8, 0.98) 100%);
    padding: 1.05rem 0.95rem;
    min-height: 138px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.tool-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.68rem;
    background: rgba(255, 255, 255, 0.04);
}

.tool-link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.tool-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.68rem;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(239, 68, 68, 0.1);
    color: #ff8a8a;
}

.tool-link-title {
    font-family: var(--font-display);
    font-size: 1.22rem;
    margin-bottom: 0.26rem;
    letter-spacing: -0.01em;
}

.tool-link-subtitle {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--cb-text-tertiary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid var(--cb-border);
    background: var(--cb-surface);
}

.service-card:hover {
    border-color: rgba(248, 113, 113, 0.26);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    background: var(--cb-surface-hover);
}

.service-icon {
    margin-bottom: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.service-icon-img {
    max-width: 72px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.22));
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--cb-text);
    letter-spacing: -0.02em;
}

.service-description {
    color: var(--cb-text-tertiary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* —— Contact —— */
.contact {
    background: var(--cb-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--cb-text);
    letter-spacing: -0.03em;
}

.contact-info p {
    color: var(--cb-text-tertiary);
    margin-bottom: 2rem;
    line-height: 1.75;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    color: var(--cb-text-tertiary);
}

.contact-item strong {
    display: block;
    color: var(--cb-text);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-item a {
    color: var(--cb-accent-bright);
    text-decoration: none;
    transition: color var(--transition);
}

.contact-item a:hover {
    color: #fff;
    text-decoration: underline;
}

.contact-item address {
    font-style: normal;
    line-height: 1.8;
}

.contact-form-wrapper {
    background: var(--cb-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--cb-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--cb-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--cb-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: var(--cb-bg-raised);
    color: var(--cb-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--cb-text-tertiary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    width: 100%;
    text-align: center;
}

/* —— Footer —— */
.footer {
    background: var(--cb-bg-raised);
    color: var(--cb-text);
    padding: 2.25rem 0;
    border-top: 1px solid var(--cb-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-content p {
    color: var(--cb-text-tertiary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--cb-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

.btn-legal-notice {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cb-text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--cb-border-strong);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-legal-notice:hover {
    color: var(--cb-accent-bright);
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(239, 68, 68, 0.1);
}

.btn-legal-notice:focus-visible {
    outline: 2px solid var(--cb-accent-bright);
    outline-offset: 2px;
}

body.legal-modal-open {
    overflow: hidden;
}

.legal-modal[hidden] {
    display: none !important;
}

.legal-modal:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.legal-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    max-height: min(85vh, 640px);
    background: var(--cb-surface);
    border: 1px solid var(--cb-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
}

.legal-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--cb-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.legal-modal__close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--cb-accent-bright);
}

.legal-modal__scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.75rem 1.35rem 1.25rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.legal-modal__scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.legal-modal__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 2.25rem 0.75rem 0;
    color: var(--cb-text);
    letter-spacing: -0.02em;
}

.legal-modal__intro {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--cb-text-tertiary);
    margin: 0 0 1.25rem;
}

.legal-modal__intro a {
    color: var(--cb-accent-bright);
}

.legal-modal__h {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.15rem 0 0.45rem;
    color: var(--cb-text);
}

.legal-modal__scroll p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--cb-text-secondary);
    margin: 0 0 0.65rem;
}

.legal-modal__scroll a {
    color: var(--cb-accent-bright);
}

.legal-modal__foot {
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    text-align: center;
}

.legal-modal__done {
    min-width: 8rem;
}

/* —— Responsive —— */
@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1160px;
        margin: 0 auto;
    }

    .project-card {
        max-width: calc(360px * 1.2);
        width: 100%;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        position: relative;
        z-index: 2;
    }

    /* Full-screen dim behind open menu; sits under .navbar (1000), above page content */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(0, 0, 0, 0.72);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu {
        position: fixed;
        top: calc(4.5rem + env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        max-width: 100vw;
        max-height: min(560px, calc(100vh - 5.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
        max-height: min(560px, calc(100dvh - 5.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
        flex-direction: column;
        align-items: stretch;
        background: rgba(0, 0, 0, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 100%;
        padding: 0.65rem max(1.25rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--cb-border);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        border: 1px solid var(--cb-border);
        border-top: none;
        transform: translateX(-100%);
        opacity: 0;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.26s ease;
        gap: 0.2rem;
        z-index: 3;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        pointer-events: none;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu a {
        color: var(--cb-text);
        padding: 0.95rem 1.05rem;
        border-radius: var(--radius-sm);
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-menu a:active {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-menu a.nav-link-cta {
        margin-left: 0;
        text-align: center;
        justify-content: center;
        margin-top: 0.35rem;
        min-height: 50px;
    }

    .nav-toggle {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        margin-left: 0.35rem;
        border: 1px solid var(--cb-border-strong);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.04);
        gap: 5px;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle:focus-visible {
        outline: 2px solid var(--cb-accent-bright);
        outline-offset: 2px;
    }

    .nav-toggle:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-toggle span {
        width: 18px;
    }

    .nav-toggle.is-open {
        border-color: rgba(248, 113, 113, 0.5);
        background: rgba(239, 68, 68, 0.12);
    }

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

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

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

    /* Brand “JGreaterLab” / “.com” on two lines — fits narrow viewports next to logo + menu */
    .nav-brand-text {
        white-space: normal;
    }

    .nav-brand-tld {
        display: block;
        line-height: 1.15;
    }

    .hero-title .accent-word {
        display: block;
        line-height: 1.05;
    }

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

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-logo-img {
        height: 42px;
        max-width: min(58vw, 220px);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        margin: 0 -8px;
        border-radius: var(--radius-md);
    }
}
