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

:root {
    --coral:     #e35d48;
    --coral-deep:#d84e39;
    --ink:       #0a0a0a;
    --ink-soft:  rgba(10, 10, 10, 0.65);
    --cream:     #f5f0ea;
    --line:      rgba(10, 10, 10, 0.25);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--coral);
    color: var(--ink);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--cream);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
    background: var(--ink);
    border-radius: 999px;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — flip counter with line fill
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--coral);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loader__num {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(10rem, 28vw, 26rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.loader__label {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--ink);
}
.loader__dots { display: inline-flex; gap: 0; }
.loader__dots span {
    opacity: 0;
    animation: dotBlink 1.2s ease-in-out infinite;
}
.loader__dots span:nth-child(1) { animation-delay: 0s; }
.loader__dots span:nth-child(2) { animation-delay: 0.2s; }
.loader__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBlink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.loader__line {
    width: min(540px, 80vw);
    height: 2px;
    background: rgba(10, 10, 10, 0.15);
    overflow: hidden;
}
.loader__line-fill {
    height: 100%;
    width: 0%;
    background: var(--ink);
}

/* =========================================================
   EDITORIAL SECTION
   ========================================================= */
.editorial {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 780px;
    overflow: hidden;
    background: var(--coral);
    padding: 0 2rem;
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 1.25rem 0;
    gap: 2rem;
}

.topnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--ink);
    will-change: transform;
}
.topnav__logo-mark { width: 28px; height: 28px; }
.topnav__logo-mark svg {
    width: 100%; height: 100%;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__logo:hover .topnav__logo-mark svg { transform: rotate(180deg); }
.topnav__logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}
.topnav__logo-text em { font-style: normal; font-weight: 500; }

.topnav__links {
    margin: 0 auto;
    display: flex;
    gap: 2.25rem;
}
.topnav__links a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.2rem 0;
    will-change: transform;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.topnav__caret { font-size: 0.65em; opacity: 0.7; }

.topnav__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.topnav__cart {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.topnav__cart:hover { text-decoration: underline; text-underline-offset: 4px; }

.topnav__cta {
    background: var(--ink);
    color: var(--cream);
    text-decoration: none;
    padding: 0.7rem 1.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 4px;
    display: inline-block;
    will-change: transform;
    transition: background 0.3s ease;
}
.topnav__cta:hover { background: #222; }

/* ---------- Divider ---------- */
.divider {
    height: 1px;
    background: var(--line);
    transform-origin: left;
}

/* ---------- Meta row ---------- */
.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--ink);
}
.meta__cell {
    display: inline-block;
}
.meta__cell:nth-child(2) { margin: 0 auto; }

/* ---------- Hero (title + categories + desc) ---------- */
.hero {
    position: relative;
    height: calc(100vh - 160px);
    min-height: 620px;
}

.hero__title {
    position: absolute;
    inset: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    color: var(--ink);
    line-height: 0.82;
    letter-spacing: -0.055em;
    pointer-events: none;
    margin: 0;
}
.hero__line {
    display: block;
    white-space: nowrap;
    pointer-events: auto;
}
.hero__line--top {
    position: absolute;
    top: 6%;
    left: 0;
    font-size: clamp(6rem, 22vw, 24rem);
}
.hero__line--bottom {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    font-size: clamp(5rem, 14vw, 16rem);
}
.hero__char {
    display: inline-block;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.hero__char.is-space {
    width: 0.25em;
}

/* Categories (right side, vertically between the two title lines) */
.categories {
    position: absolute;
    right: 0;
    top: 45%;
    transform: translateY(-50%);
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 3;
}
.categories li {
    overflow: hidden;
}
.categories a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink);
    text-decoration: none;
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    font-weight: 500;
    padding: 0.2rem 0;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.categories a::before {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.categories a:hover {
    transform: translateX(-10px);
}
.categories a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}
.cat__arrow {
    font-size: 0.9em;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    display: inline-block;
}
.categories a:hover .cat__arrow {
    transform: translate(6px, -6px) rotate(5deg);
}

/* Description (bottom left) */
.desc {
    position: absolute;
    left: 0;
    bottom: 12%;
    max-width: 300px;
    z-index: 3;
}
.desc__text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink);
    font-weight: 400;
    margin-bottom: 1.25rem;
}
.desc__more {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.2rem 0;
    will-change: transform;
}
.desc__more::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
}
.desc__more-arrow {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.desc__more:hover .desc__more-arrow {
    transform: translate(6px, -6px) rotate(3deg);
}

/* ---------- Ruler ---------- */
.ruler {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22px;
    display: flex;
    align-items: flex-end;
    padding: 0 2rem;
    pointer-events: auto;
}
.ruler__tick {
    flex: 1;
    height: 6px;
    background: var(--ink);
    margin-right: 2px;
    transform-origin: bottom;
    transition: height 0.25s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform, height;
}
.ruler__tick:nth-child(5n) { height: 12px; }
.ruler__tick:nth-child(10n) { height: 18px; }
.ruler__tick:last-child { margin-right: 0; }

/* ---------- Initial hidden states ---------- */
[data-magnetic], [data-link], [data-cart], [data-meta],
[data-title-line] .hero__char, [data-cat], [data-desc], [data-divider] {
    opacity: 0;
}
[data-divider] { transform: scaleX(0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .topnav__links { display: none; }
    .categories {
        top: auto;
        bottom: 18%;
        transform: none;
        gap: 0.2rem;
    }
    .categories a { font-size: 1rem; }
    .desc { max-width: 260px; bottom: 6%; }
    .hero__line--top { font-size: 22vw; }
    .hero__line--bottom { font-size: 16vw; }
}
@media (max-width: 600px) {
    .meta__cell:nth-child(2) { display: none; }
    .hero__line--top { top: 4%; }
    .categories { display: none; }
}
