/* =========================================================
   VALENOR ATELIER — BRUTAL ELEGANCE SYSTEM
   Purposefully distinct from BlueNest + NeuroGrid
   File: /lab/valenor/assets/style.css
   ========================================================= */

:root {
    --bg: #f3efe8;
    --bg-soft: #faf6f0;
    --panel: #ffffff;
    --ink: #1e1f23;
    --ink-soft: #5d6169;
    --line: rgba(30, 31, 35, 0.16);

    --accent: #2c2f36;
    --accent-soft: #ece6dc;
    --gold: #ba8d52;

    --radius-lg: 1rem;
    --radius-md: 0.72rem;

    --shadow-soft: 0 14px 34px rgba(22, 24, 28, 0.08);
    --shadow-strong: 0 22px 52px rgba(15, 16, 20, 0.15);

    --shell: min(1220px, calc(100% - 2rem));
    --header-offset: 90px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px) 0 0 / 26px 26px,
        linear-gradient(0deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px) 0 0 / 26px 26px,
        var(--bg);
    line-height: 1.64;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
    margin: 0;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

a,
button {
    color: inherit;
}

button {
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* =========================================================
   Top Ribbon + Progress
   ========================================================= */
.top-ribbon {
    position: sticky;
    top: 0;
    z-index: 1200;
    border-bottom: 1px solid var(--line);
    background: #101215;
    color: #eef2f7;
    padding: 0.42rem 0.9rem;
    text-align: center;
}

.top-ribbon p {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.86;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1300;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

.reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ba8d52, #d8c3a4);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 34px;
    z-index: 1100;
    padding-top: 0.62rem;
}

.header-shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.56rem 0.64rem;
    transition: border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.site-header.is-scrolled .header-shell {
    border-color: var(--line);
    background: rgba(250, 246, 240, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.56rem;
    text-decoration: none;
}

.brand img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.brand span {
    display: grid;
    gap: 0.06rem;
}

.brand strong {
    font-size: 0.76rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.brand small {
    font-size: 0.65rem;
    color: var(--ink-soft);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.nav-link {
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #60646d;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.43rem 0.56rem;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--ink);
    border-color: rgba(186, 141, 82, 0.42);
    background: rgba(186, 141, 82, 0.14);
    outline: none;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #ffffff;
    border-radius: 0.62rem;
    background: #1d2026;
    padding: 0.58rem 0.7rem;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 0.66rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.24rem;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #1e1f23;
    transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}

/* =========================================================
   Generic section
   ========================================================= */
.section {
    position: relative;
    padding: clamp(3.6rem, 7vw, 5.6rem) 0;
    scroll-margin-top: calc(var(--header-offset) + 20px);
}

.kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: #8f6635;
    margin-bottom: 0.66rem;
}

.hero h1,
.story-intro h2,
.collection-head h2,
.craft-flow h2,
.materials-copy h2,
.services-head h2,
.contact-copy h2 {
    font-family: "Times New Roman", Georgia, serif;
    letter-spacing: 0.01em;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    padding-top: clamp(4.8rem, 10vw, 7.2rem);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1rem;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.2rem, 5.2vw, 4.6rem);
    line-height: 1.02;
    margin-bottom: 0.84rem;
    text-wrap: balance;
}

.hero-copy p {
    color: var(--ink-soft);
    max-width: 62ch;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
}

.hero-meta {
    margin-top: 0.96rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.hero-meta li {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-weight: 600;
    color: #4c5058;
    padding: 0.52rem 0.56rem;
}

.hero-visual {
    position: relative;
    min-height: 530px;
}

.hero-card {
    position: absolute;
    border: 1px solid rgba(30, 31, 35, 0.13);
    background: #fff;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.hero-main {
    width: 70%;
    height: 420px;
    top: 0;
    left: 0;
    border-radius: 1.2rem 0.8rem 0.8rem 0.8rem;
}

.hero-detail {
    width: 42%;
    height: 240px;
    right: 0;
    bottom: 80px;
    border-radius: 0.8rem;
}

.hero-main img,
.hero-detail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-note {
    position: absolute;
    right: 0;
    top: 0;
    width: 42%;
    border: 1px solid rgba(30, 31, 35, 0.18);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.76);
    padding: 0.66rem;
}

.hero-note p {
    font-size: 0.83rem;
    color: #4d535d;
}

/* ticker */
.ticker {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-top: 1.4rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
    min-width: 100%;
    padding: 0.66rem 0;
    animation: ticker-move 24s linear infinite;
}

.ticker-track span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #59616c;
}

/* =========================================================
   Story
   ========================================================= */
.story {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
}

.story-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: start;
}

.story-intro h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.8rem);
    line-height: 1.12;
    margin-bottom: 0.64rem;
}

.story-intro p {
    color: var(--ink-soft);
}

.story-points {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
    overflow: hidden;
}

.story-points li {
    border-bottom: 1px solid var(--line);
    padding: 0.74rem 0.8rem;
}

.story-points li:last-child {
    border-bottom: 0;
}

.story-points h3 {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.28rem;
}

.story-points p {
    color: #5f646d;
    font-size: 0.92rem;
}

/* =========================================================
   Collection Tabs
   ========================================================= */
.collection-head {
    max-width: 760px;
    margin-bottom: 1rem;
}

.collection-head h2 {
    font-size: clamp(1.65rem, 3.2vw, 2.7rem);
    line-height: 1.14;
}

.collection-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.82rem;
}

.tab-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: #555a62;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.56rem 0.72rem;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tab-btn:hover,
.tab-btn:focus-visible,
.tab-btn.is-active {
    color: #1d1f23;
    border-color: rgba(186, 141, 82, 0.42);
    background: rgba(186, 141, 82, 0.14);
    outline: none;
}

.tab-stage {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    min-height: 380px;
}

.tab-panel {
    display: none;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem;
}

.tab-panel.is-active {
    display: grid;
}

.tab-panel figure {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    min-height: 300px;
}

.tab-panel figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tab-panel h3 {
    font-size: clamp(1.34rem, 2.4vw, 2rem);
    margin-bottom: 0.4rem;
}

.tab-panel p {
    color: var(--ink-soft);
    margin-bottom: 0.66rem;
}

.tab-panel ul {
    display: grid;
    gap: 0.38rem;
}

.tab-panel li {
    position: relative;
    color: #565d67;
    padding-left: 0.92rem;
    font-size: 0.9rem;
}

.tab-panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.48rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #bc955e;
}

/* =========================================================
   Craft
   ========================================================= */
.craft {
    background: #1d2128;
    color: #edf3ff;
}

.craft .kicker {
    color: #dcb989;
}

.craft-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: center;
}

.craft-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.craft-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.craft-flow h2 {
    font-size: clamp(1.58rem, 3vw, 2.5rem);
    line-height: 1.12;
    margin-bottom: 0.7rem;
}

.craft-flow ol {
    display: grid;
    gap: 0.54rem;
}

.craft-flow li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.74rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.62rem;
}

.craft-flow span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(220, 185, 137, 0.55);
    color: #e9d5b6;
    font-size: 0.77rem;
    font-weight: 700;
}

.craft-flow h3 {
    font-size: 0.98rem;
    margin-bottom: 0.16rem;
}

.craft-flow p {
    color: #b9c4d5;
    font-size: 0.88rem;
}

/* =========================================================
   Materials / Accordion
   ========================================================= */
.materials-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: start;
}

.materials-copy h2 {
    font-size: clamp(1.6rem, 3.1vw, 2.6rem);
    line-height: 1.13;
    margin-bottom: 0.6rem;
}

.materials-copy p {
    color: var(--ink-soft);
}

.materials-media {
    margin-top: 0.86rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
}

.materials-media img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.ledger {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    overflow: hidden;
}

.ledger-item {
    border-bottom: 1px solid var(--line);
}

.ledger-item:last-child {
    border-bottom: 0;
}

.ledger-trigger {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: 0.89rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #343842;
    padding: 0.74rem 0.8rem;
}

.ledger-trigger span {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.ledger-item.is-open .ledger-trigger span {
    transform: rotate(45deg);
}

.ledger-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.24s ease;
}

.ledger-panel p {
    overflow: hidden;
    color: #5e646f;
    padding: 0 0.8rem;
    margin-bottom: 0;
}

.ledger-item.is-open .ledger-panel {
    grid-template-rows: 1fr;
}

.ledger-item.is-open .ledger-panel p {
    padding-bottom: 0.72rem;
}

/* =========================================================
   Services
   ========================================================= */
.services {
    background: var(--bg-soft);
}

.services-head {
    max-width: 780px;
    margin-bottom: 0.88rem;
}

.services-head h2 {
    font-size: clamp(1.62rem, 3.1vw, 2.5rem);
    line-height: 1.12;
}

.service-rows {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
}

.service-row {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 0.82rem;
}

.service-row:last-child {
    border-bottom: 0;
}

.service-row h3 {
    font-size: 1.05rem;
}

.service-row p {
    color: #60646c;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
    background: #15181f;
    color: #ecf2ff;
}

.contact .kicker {
    color: #d4b182;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.contact-copy h2 {
    font-size: clamp(1.65rem, 3.1vw, 2.6rem);
    line-height: 1.13;
    margin-bottom: 0.58rem;
}

.contact-copy p {
    color: #adb7cb;
}

.appointment-form {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.84rem;
    display: grid;
    gap: 0.56rem;
}

.appointment-form label {
    display: grid;
    gap: 0.26rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c4cfdf;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.62rem;
    background: rgba(255, 255, 255, 0.08);
    color: #f2f7ff;
    font: inherit;
    padding: 0.58rem 0.62rem;
}

.appointment-form input::placeholder,
.appointment-form textarea::placeholder {
    color: #98a8c2;
}

.appointment-form select option {
    color: #1d2128;
}

/* =========================================================
   Footer + top btn
   ========================================================= */
.site-footer {
    border-top: 1px solid var(--line);
    background: #0f1218;
    padding: 1.2rem 0 1.6rem;
}

.footer-shell {
    text-align: center;
}

.footer-shell img {
    width: 34px;
    height: 34px;
    margin-inline: auto;
    margin-bottom: 0.44rem;
}

.footer-shell p {
    color: #99a6be;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(186, 141, 82, 0.45);
    background: linear-gradient(140deg, #f3e1c6, #ba8d52);
    color: #242a33;
    display: grid;
    place-items: center;
    font-size: 1rem;
    box-shadow: 0 14px 30px rgba(18, 20, 24, 0.18);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    z-index: 900;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* =========================================================
   Buttons + interaction helpers
   ========================================================= */
.magnetic {
    --mx: 0px;
    --my: 0px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.81rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-radius: 0.66rem;
    border: 1px solid transparent;
    padding: 0.68rem 0.8rem;
    transform: translate3d(var(--mx), var(--my), 0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translate3d(var(--mx), calc(var(--my) - 2px), 0);
    outline: none;
}

.btn-dark {
    color: #fff;
    background: #191c22;
    box-shadow: 0 12px 24px rgba(17, 18, 21, 0.22);
}

.btn-line {
    color: #22262d;
    border-color: rgba(34, 38, 45, 0.34);
    background: rgba(255, 255, 255, 0.7);
}

.parallax {
    --py: 0px;
}

.parallax:not(.tilt-card) {
    transform: translate3d(0, var(--py), 0);
}

.tilt-card {
    --rx: 0deg;
    --ry: 0deg;
    transform: translate3d(0, var(--py, 0px), 0) perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform 0.24s ease;
}

.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    transition:
        opacity 0.72s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.72s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--d, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes ticker-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
    .hero-layout,
    .story-layout,
    .tab-panel,
    .craft-layout,
    .materials-layout,
    .service-row,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 640px;
    }

    .hero-main {
        width: 100%;
        height: 360px;
        position: static;
    }

    .hero-detail,
    .hero-note {
        position: static;
        width: 100%;
        margin-top: 0.56rem;
    }
}

@media (max-width: 980px) {
    .site-header {
        top: 32px;
    }

    .header-shell {
        grid-template-columns: auto auto auto;
    }

    .nav-toggle {
        display: inline-flex;
        justify-self: end;
    }

    .header-cta {
        display: none;
    }

    .primary-nav {
        position: absolute;
        top: calc(100% + 0.46rem);
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.32rem;
        border: 1px solid var(--line);
        border-radius: 0.74rem;
        background: rgba(250, 246, 240, 0.97);
        box-shadow: var(--shadow-soft);
        padding: 0.7rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.24s ease;
    }

    .primary-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        max-height: 80vh;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        border-radius: 0.62rem;
    }
}

@media (max-width: 760px) {
    :root {
        --shell: min(1220px, calc(100% - 1.2rem));
    }

    .top-ribbon p {
        font-size: 0.62rem;
    }

    .site-header {
        top: 30px;
        padding-top: 0.5rem;
    }

    .header-shell {
        padding: 0.46rem 0.52rem;
    }

    .brand span {
        display: none;
    }

    .hero-actions,
    .hero-meta {
        width: 100%;
    }

    .hero-actions .btn,
    .appointment-form .btn {
        width: 100%;
    }

    .hero-meta {
        grid-template-columns: 1fr;
    }

    .craft-flow li {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
