:root {
    --ink: #17130f;
    --muted: #6d6258;
    --paper: #f7f3ed;
    --paper-deep: #ece4d9;
    --gold: #b99755;
    --silver: #b8b7b1;
    --line: rgba(23, 19, 15, 0.14);
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.2rem clamp(1.25rem, 4vw, 4rem);
    background: rgba(247, 243, 237, 0.94);
    border-bottom: 1px solid var(--line);
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: 154px;
    height: auto;
    display: block;
}

.site-nav {
    display: flex;
    gap: clamp(1rem, 3vw, 3rem);
    font-family: "Cormorant SC", serif;
    font-size: 0.76rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-nav a,
.text-link {
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.site-nav a {
    border-bottom-color: transparent;
}

.site-nav a:hover {
    border-bottom-color: currentColor;
}

.text-link-light {
    color: var(--paper);
}

.hero,
.section {
    width: min(var(--max), calc(100% - clamp(2rem, 8vw, 8rem)));
    margin: 0 auto;
}

.home-hero,
.product-hero {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: clamp(3rem, 8vw, 7rem);
    padding: clamp(4rem, 9vw, 8rem) 0;
}

.page-intro {
    padding-top: clamp(5rem, 10vw, 9rem);
}

.hero-copy {
    max-width: 690px;
}

.eyebrow,
.section-kicker,
.piece-edition,
.field-label,
.counter {
    font-family: "Cormorant SC", serif;
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1.5rem;
    font-family: "Cormorant SC", serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0.04em;
}

h2 {
    font-size: clamp(2.1rem, 4vw, 4.2rem);
    font-weight: 300;
    line-height: 1.08;
}

h3 {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-weight: 300;
    line-height: 1.12;
}

.hero-statement {
    max-width: 620px;
    margin-bottom: 2.5rem;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.42;
}

.hero-object,
.piece-visual,
.product-image-stage {
    position: relative;
    min-height: 520px;
}

.hero-object::before,
.piece-visual::before,
.product-image-stage::before {
    content: "";
    position: absolute;
    inset: 7% 0 3% 16%;
    border: 1px solid rgba(23, 19, 15, 0.13);
}

.product-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 26px 38px rgba(23, 19, 15, 0.18));
}

.product-photo-hero {
    object-position: center right;
}

.product-photo-preview {
    object-position: center;
}

.leather-form,
.piece-surface,
.preview-surface {
    position: absolute;
    inset: 0 10% 0 0;
    border-radius: 2px 18px 18px 2px;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(132deg, rgba(255, 255, 255, 0.06), transparent 38%),
        repeating-linear-gradient(88deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, #5a3825, #27180f 64%, #17100b);
    box-shadow: inset 18px 0 0 rgba(0, 0, 0, 0.12);
}

.leather-form::after,
.piece-surface::after,
.preview-surface::after {
    content: "";
    position: absolute;
    inset: 1.2rem;
    border: 1px solid rgba(247, 243, 237, 0.16);
    border-radius: 1px 12px 12px 1px;
}

.edition-mark,
.piece-surface span {
    position: absolute;
    right: 2rem;
    bottom: 1.8rem;
    color: rgba(247, 243, 237, 0.74);
    font-family: "Cormorant SC", serif;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section {
    padding: clamp(5rem, 10vw, 9rem) 0;
    border-top: 1px solid var(--line);
}

.split-copy,
.piece-row,
.product-layout,
.inscription-grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);
}

.split-copy {
    grid-template-columns: minmax(0, 0.88fr) minmax(260px, 0.7fr);
}

.piece-row {
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 0.8fr);
    align-items: center;
}

.product-layout {
    grid-template-columns: minmax(0, 0.75fr) minmax(300px, 0.9fr);
    align-items: start;
}

.inscription-grid {
    grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 0.8fr);
    align-items: start;
}

.split-copy p,
.atelier-panel p,
.contact-section p,
.piece-details p,
.product-story p,
.care-list,
.purchase-note,
.preview-caption {
    color: var(--muted);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-bottom: 3rem;
}

.piece-visual {
    display: block;
}

.piece-surface {
    inset: 0;
}

.piece-details,
.product-story {
    max-width: 620px;
}

.spec-list,
.product-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 2rem 0;
    background: var(--line);
}

.spec-list div,
.product-specs div {
    padding: 1.1rem;
    background: var(--paper);
}

dt {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-family: "Cormorant SC", serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

dd {
    margin: 0;
    font-size: 1.2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: "Cormorant SC", serif;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
}

.button-secondary,
.button-quiet {
    background: transparent;
    color: var(--ink);
}

.button[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.42;
}

.atelier-section {
    width: 100%;
    max-width: none;
    padding-inline: clamp(1rem, 4vw, 4rem);
    background: var(--ink);
    color: var(--paper);
}

.atelier-panel {
    width: min(850px, 100%);
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 7rem) 0;
}

.atelier-panel .section-kicker,
.atelier-panel p {
    color: rgba(247, 243, 237, 0.72);
}

.contact-section {
    text-align: center;
}

.contact-section p {
    max-width: 620px;
    margin-inline: auto;
}

.contact-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.filter-button {
    min-height: 42px;
    padding: 0.55rem 1rem;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-family: "Cormorant SC", serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.filter-button.is-active {
    border-color: var(--ink);
    color: var(--ink);
}

.archive-list {
    display: grid;
    gap: 1px;
    background: var(--line);
}

.archive-piece {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem) 0;
    background: var(--paper);
}

.archive-visual {
    position: relative;
    display: block;
    min-height: 330px;
}

.archive-visual .piece-surface {
    inset: 0;
}

.archive-visual-muted {
    opacity: 0.54;
    filter: saturate(0.7);
}

.archive-copy {
    max-width: 620px;
}

.archive-copy h2 {
    margin-bottom: 1rem;
}

.site-footer {
    padding: 3rem clamp(1.25rem, 4vw, 4rem);
    text-align: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-logo {
    width: 132px;
    opacity: 0.82;
}

.site-footer p {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.back-link {
    display: inline-flex;
    margin-bottom: 2rem;
}

.product-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.product-meta span {
    border-top: 1px solid var(--line);
    padding-top: 0.5rem;
    color: var(--muted);
}

.inscription-panel {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
}

.preview-frame {
    position: sticky;
    top: 112px;
}

.product-image-stage {
    min-height: 560px;
}

.preview-surface {
    inset: 0;
}

.inscription-preview {
    position: absolute;
    z-index: 2;
    right: 10%;
    bottom: 12%;
    max-width: 76%;
    color: rgba(70, 45, 28, 0.75);
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-style: italic;
    line-height: 1;
    text-align: right;
    text-shadow:
        1px 1px 1px rgba(255,255,255,0.08),
        -1px -1px 1px rgba(0,0,0,0.35);
    white-space: nowrap;
    mix-blend-mode: multiply;
}

.inscription-preview[data-finish="dorado"] {
    color: var(--gold);
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    mix-blend-mode: normal;
}

.inscription-preview[data-finish="plateado"] {
    color: var(--silver);
    text-shadow: 0 1px 0 rgba(0,0,0,0.18);
    mix-blend-mode: normal;
}

.inscription-preview[data-location="interior"] {
    left: 20%;
    bottom: 22%;
    right: auto;
    top: auto;
    transform: none;
    text-align: left;
    opacity: 0.82;
}

.preview-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.field-group {
    margin-bottom: 1.7rem;
}

.field-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.55rem;
}

input[type="text"] {
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 0;
    border: 0;
    border-bottom: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 1.45rem;
    outline: none;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
}

.segmented.two {
    grid-template-columns: repeat(2, 1fr);
}

.segmented input,
.confirm input {
    position: absolute;
    opacity: 0;
}

.segmented label {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem;
    border-right: 1px solid var(--line);
    cursor: pointer;
    font-family: "Cormorant SC", serif;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.segmented input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    pointer-events: auto;
}

.segmented span {
    pointer-events: none;
}

.segmented label:last-child {
    border-right: 0;
}

.segmented input:checked + span {
    border-bottom: 1px solid currentColor;
}

.confirm {
    position: relative;
    display: block;
    margin: 2rem 0;
    padding-left: 2.2rem;
    color: var(--muted);
    cursor: pointer;
}

.confirm input {
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 18px;
    height: 18px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    pointer-events: auto;
}

.confirm span {
    pointer-events: none;
}

.confirm span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 18px;
    height: 18px;
    border: 1px solid var(--ink);
}

.confirm input:checked + span::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 0.73rem;
    width: 9px;
    height: 5px;
    border-left: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    transform: rotate(-45deg);
}

.purchase-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.care-list {
    padding-left: 1.2rem;
}

@media (max-width: 860px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .home-hero,
    .product-hero,
    .split-copy,
    .piece-row,
    .product-layout,
    .inscription-grid,
    .archive-piece {
        grid-template-columns: 1fr;
    }

    .home-hero,
    .product-hero {
        min-height: auto;
    }

    .hero-object,
    .piece-visual,
    .product-image-stage,
    .archive-visual {
        min-height: 430px;
    }

    .section-heading {
        display: block;
    }

    .preview-frame {
        position: static;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 17px;
    }

    .hero,
    .section {
        width: min(var(--max), calc(100% - 2rem));
    }

    .brand-logo {
        width: 132px;
    }

    .site-nav {
        gap: 1rem;
        font-size: 0.68rem;
    }

    .hero-object,
    .piece-visual,
    .product-image-stage,
    .archive-visual {
        min-height: 340px;
    }

    .spec-list,
    .product-specs,
    .segmented {
        grid-template-columns: 1fr;
    }

    .segmented label {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .segmented label:last-child {
        border-bottom: 0;
    }

    .purchase-line {
        align-items: flex-start;
        flex-direction: column;
    }
}
