:root {
    --bg: #0b0c10;
    /* deep charcoal */
    --panel: #121418;
    /* card background */
    --muted: #8b8f98;
    /* subdued text */
    --text: #e7e9ee;
    /* primary text */
    --accent: #fff;
    /* white highlight */
    --accent-2: #8b8f98;
    /* blueish gray highlight */
    --link: #9be7ff;
    --border: #242834;
    --ring: rgba(155, 231, 255, .35);
    --shadow: 0 10px 25px rgba(0, 0, 0, .45);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

        * {
    box-sizing: border-box;
}

html {
    background-color: #06070b;
    color-scheme: dark;
    scrollbar-gutter: stable both-edges;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background-color: #090a0e;
    background: linear-gradient(180deg, #090a0e 0%, #0b0c10 60%, #08090c 100%);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--link);
    text-decoration: none
}

a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px
}

/* Nav */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 12, 16, .85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding-top: var(--safe-top);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0
}

.brand {
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff
}

.brand span {
    color: var(--accent-2)
}

.tabs {
    display: flex;
    gap: 18px
}

.tab {
    position: relative;
    color: var(--muted);
    padding: 6px 2px;
    font-weight: 600
}

.tab:hover {
    color: #fff
}

.tab.active {
    color: #fff
}

.tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

header .container {
    /* Bigger side padding on narrow screens */
    padding-left: calc(clamp(20px, 6vw, 56px) + var(--safe-left));
    padding-right: calc(clamp(20px, 6vw, 56px) + var(--safe-right));
}

header .nav {
    max-width: 1000px;
    /* tune as you like */
    margin-inline: auto;
    /* centers the nav group within the header */
    width: 100%;
    gap: clamp(8px, 3vw, 24px);
}

header .tabs {
    gap: clamp(12px, 4vw, 28px);
}

/* Optional: tiny bump so the brand doesn't visually kiss the left side */
header .brand {
    padding-left: 2px;
}

/* Sections */
section {
    display: none;
}

section.active {
    display: block;
}

/* Hero / headline for Home */
.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 18px
}

.hero h1 {
    margin: 0;
    font-size: clamp(22px, 3.8vw, 36px);
    line-height: 1.2
}

.subtle {
    color: var(--muted)
}

/* Grid of product tiles */
.grid {
    display: grid;
    gap: 16px
}

/* 4 on desktop, 2 on tablet, 1 on phone */
@media(min-width:980px) {
    .grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

@media(min-width:640px) and (max-width:979.98px) {
    .grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:639.98px) {
    .grid {
        grid-template-columns: 1fr
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: calc(24px + var(--safe-left));
        padding-right: calc(24px + var(--safe-right));
    }

    /* Slightly larger tap targets on phones */
    .nav {
        padding: 16px 0;
    }
}

.card {
    position: relative;
    min-height: 200px;
    aspect-ratio: 1/1;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: radial-gradient(100% 100% at 100% 0%, #171a20 0%, #0f1116 50%, #0c0e12 100%);
    box-shadow: var(--shadow);
    overflow: hidden
}

/* NEW: real image layer; placeholder remains as fallback */
.card .media {
    position: absolute;
    inset: 0
}

.card .media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(.9)
}

.card .placeholder {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, #1a1d24 0, #1a1d24 12px, #14171d 12px, #14171d 24px);
    opacity: .7
}

.card .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .0) 55%);
    transition: opacity .2s ease;
    opacity: 0
}

.card:hover .overlay {
    opacity: 1
}

.card:focus-within .overlay {
    opacity: 1
}

.label {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .2em;
    color: #0b0c10;
    background: var(--accent);
    padding: 4px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
    align-self: flex-start
}

.title {
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 2px
}

.desc {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: rgba(18, 20, 24, .7);
    border-radius: 10px
}

.cta .arrows {
    font-weight: 700
}

/* Mobile tap-to-reveal */
@media (hover:none) and (pointer:coarse) {
    .card .overlay {
        opacity: 0;
        transition: opacity .18s ease
    }

    .card[data-revealed="true"] .overlay {
        opacity: 1
    }
}

/* About */
.about-wrap {
    display: grid;
    gap: 22px;
    align-items: start
}

@media(min-width:980px) {
    .about-wrap {
        grid-template-columns: 360px 1fr
    }
}

.about-photo {
    aspect-ratio: 1/1;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: repeating-linear-gradient(135deg, #1b1e25 0, #1b1e25 14px, #13161b 14px, #13161b 28px)
}

.about h2 {
    margin: 0 0 6px
}

.about p {
    margin-top: 0;
    color: var(--muted)
}

.product-section {
    margin: 26px 0;
    border-top: 1px solid var(--border);
    padding-top: 18px
}

.product-section h3 {
    margin: 0 0 6px
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #0f1217;
    color: var(--text);
    font-size: 14px
}

/* Contact */
.contact p {
    color: var(--muted)
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #10141b;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px
}

/* Footer */
footer {
    margin-top: 36px;
    border-top: 1px solid var(--border);
    padding: 18px;
    color: var(--muted);
    font-size: 14px;
    text-align: center
}

.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    color: var(--muted);
    font-size: 14px
}

/* Stronger readability on cards */
.card .overlay {
    /* darker, denser scrim than before */
    background: linear-gradient(to top,
            rgba(0, 0, 0, .72) 0%,
            rgba(0, 0, 0, .45) 45%,
            rgba(0, 0, 0, .10) 70%,
            rgba(0, 0, 0, 0) 100%);
    backdrop-filter: blur(2px);
}

/* Dim the image slightly on hover/focus so text stands out */
.card:hover .media img,
.card:focus-within .media img {
    filter: brightness(.6) saturate(.9);
}

/* Keep overlay more visible on hover/focus */
.card:hover .overlay,
.card:focus-within .overlay {
    opacity: 1;
}

/* Title/desc legibility boost */
.card .title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.card .desc {
    text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

/* Label/CTA chips: stronger contrast */
.card .label {
    background: rgba(255, 255, 255, .92);
    color: #0b0c10;
}

.card .cta {
    background: rgba(16, 20, 24, .85);
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

/* Mobile tap reveal should also be readable immediately */
@media (hover:none) and (pointer:coarse) {
    .card .overlay {
        opacity: 1;
    }

    .card .media img {
        filter: brightness(.7);
    }
}

/* Fallback if user prefers reduced transparency (accessibility) */
@media (prefers-reduced-transparency: reduce) {
    .card .overlay {
        backdrop-filter: none;
    }
}


/* === Home Hero (scoped) === */
.home-hero {
    min-height: min(calc(var(--vh, 1vh) * 72), 760px);
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(20px, 5vw, 48px);
    background: linear-gradient(180deg, #0e1014 0%, #0b0c10 100%);
    box-shadow: var(--shadow);
    margin: 22px 0 18px;
}

@supports (min-height: 100dvh) {
    .home-hero {
        min-height: min(72dvh, 760px);
    }
}

.home-hero .brand {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: .2ch;
    flex-wrap: wrap;
    font-weight: 800;
    letter-spacing: .04em;
    font-size: clamp(36px, 8vw, 84px);
    line-height: 1
}

.home-hero .brand .word {
    display: inline-flex;
    gap: .05ch
}

.home-hero .brand .word span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(.95);
    filter: blur(8px);
    animation: slideUp .8s cubic-bezier(.2, .8, .2, 1) forwards;
}

.home-hero .brand .word span:nth-child(1) {
    animation-delay: .02s
}

.home-hero .brand .word span:nth-child(2) {
    animation-delay: .06s
}

.home-hero .brand .word span:nth-child(3) {
    animation-delay: .10s
}

.home-hero .brand .word span:nth-child(4) {
    animation-delay: .14s
}

.home-hero .brand .word span:nth-child(5) {
    animation-delay: .18s
}

.home-hero .brand .word span:nth-child(6) {
    animation-delay: .22s
}

.home-hero .brand .word span:nth-child(7) {
    animation-delay: .26s
}

.home-hero .brand .word span:nth-child(8) {
    animation-delay: .30s
}

.home-hero .underline {
    position: relative;
    display: block;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(90deg, transparent, var(--text) 35%, transparent);
    transform-origin: left;
    transform: scaleX(0);
    opacity: .6;
    animation: underline .9s .25s ease-out forwards;
    margin-inline: auto;
}

.home-hero .sub {
    margin-top: clamp(10px, 1.8vw, 16px);
    color: var(--muted);
    max-width: 60ch;
    font-size: clamp(14px, 2.2vw, 16px);
    margin-inline: auto
}

.home-hero .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: clamp(16px, 2.5vw, 24px)
}

.home-hero .link-stroke {
    position: relative;
    display: inline-block;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--text);
    text-decoration: none;
    padding: 4px 6px;
    transition: transform .15s ease;
}

.home-hero .link-stroke:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 4px;
    border-radius: 8px
}

.home-hero .link-stroke:hover {
    transform: translateY(-1px)
}

/* Calligraphy-style thin stroke */
.home-hero .link-stroke::after {
    content: "";
    position: absolute;
    left: -.1ch;
    right: -.1ch;
    bottom: -4px;
    height: .3em;
    background:
        linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, .8) 20%,
            rgba(255, 255, 255, 1) 60%,
            rgba(255, 255, 255, .75) 85%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: 6px;
    transform-origin: left center;
    transform: scaleX(0) skewX(-12deg);
    transition: transform .6s cubic-bezier(.4, .0, .2, 1);
    opacity: .9;
    pointer-events: none;
}

.home-hero .link-stroke:hover::after {
    transform: scaleX(1) skewX(-12deg)
}

@media (max-width:700px) {
    .home-hero .link-stroke.auto-reveal::after {
        animation: paint 1s .4s cubic-bezier(.2, .8, .2, 1) forwards;
    }

    @keyframes paint {
        from {
            transform: scaleX(0) skewX(-8deg)
        }

        to {
            transform: scaleX(1) skewX(-8deg)
        }
    }
}

@media (prefers-reduced-motion: reduce) {

    .home-hero .brand .word span,
    .home-hero .underline {
        animation: none;
        opacity: 1;
        filter: none;
        transform: none
    }

    .home-hero .link-stroke::after {
        transition: none
    }

    @media (max-width:700px) {
        .home-hero .link-stroke.auto-reveal::after {
            animation: none;
            transform: scaleX(1) skewX(-8deg)
        }
    }
}

/* Keyframes reused */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.95);
        filter: blur(8px)
    }

    80% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
        filter: blur(2px)
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0)
    }
}

@keyframes underline {
    from {
        transform: scaleX(0)
    }

    to {
        transform: scaleX(1)
    }
}