@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/iransans-fanum/woff2/IRANSansWeb(FaNum)_Light.woff2") format("woff2"),
         url("../fonts/iransans-fanum/woff/IRANSansWeb(FaNum)_Light.woff") format("woff");
}
@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/iransans-fanum/woff2/IRANSansWeb(FaNum).woff2") format("woff2"),
         url("../fonts/iransans-fanum/woff/IRANSansWeb(FaNum).woff") format("woff");
}
@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/iransans-fanum/woff2/IRANSansWeb(FaNum)_Medium.woff2") format("woff2"),
         url("../fonts/iransans-fanum/woff/IRANSansWeb(FaNum)_Medium.woff") format("woff");
}
@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/iransans-fanum/woff2/IRANSansWeb(FaNum)_Bold.woff2") format("woff2"),
         url("../fonts/iransans-fanum/woff/IRANSansWeb(FaNum)_Bold.woff") format("woff");
}

:root {
    --ink: #0c0d11;
    --ink-soft: #16181f;
    --ivory: #f4efe6;
    --ivory-dim: #d8d0c3;
    --mute: #b7ad9e;
    --gold: #e4d0a4;
    --gold-deep: #b8925a;
    --steel: #a9b7cc;
    --ok: #c5ddcf;
    --danger: #f0c2c2;
    --line: rgba(228, 208, 164, 0.28);
    --glass: rgba(16, 18, 24, 0.62);
    --paper: #f3ece1;
    --shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body.atelier {
    margin: 0;
    min-height: 100%;
    background: var(--ink);
    color: var(--ivory);
    font-family: IranSans, Tahoma, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.85;
    text-align: right;
}

body.atelier {
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ivory); }

.skip {
    position: absolute;
    inset-inline-start: 16px;
    top: -40px;
    z-index: 20;
    background: var(--gold);
    color: #1a140c;
    padding: 8px 14px;
    border-radius: 999px;
}
.skip:focus { top: 12px; }

.atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(184, 146, 90, 0.18), transparent 60%),
        radial-gradient(700px 480px at -10% 110%, rgba(90, 112, 145, 0.18), transparent 55%),
        var(--ink);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
}
.orb-a {
    width: 420px;
    height: 420px;
    background: rgba(228, 208, 164, 0.16);
    top: -120px;
    left: -80px;
    animation: drift 22s var(--ease) infinite alternate;
}
.orb-b {
    width: 360px;
    height: 360px;
    background: rgba(120, 146, 178, 0.16);
    bottom: -100px;
    right: -60px;
    animation: drift 26s var(--ease) infinite alternate-reverse;
}

.guilloche {
    position: absolute;
    inset: -20%;
    background:
        repeating-radial-gradient(circle at 50% 40%, rgba(228, 208, 164, 0.05) 0 1px, transparent 1px 14px);
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 68%);
    opacity: 0.7;
}

.dial {
    position: absolute;
    width: min(68vw, 640px);
    height: auto;
    left: -8vw;
    bottom: -12vh;
    color: rgba(228, 208, 164, 0.22);
    opacity: 0.7;
}
.dial .ticks { stroke: currentColor; }
.dial .hand {
    stroke: var(--gold);
    stroke-width: 1.2;
    transform-origin: 200px 200px;
    animation: sweep 48s linear infinite;
}

.mast, .stage, .colophon { position: relative; z-index: 1; }

.mast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
}

.mast-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.logo-plaque {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #f7f3ec, #e7dfd2);
    border-radius: 14px;
    padding: 8px 12px 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 #fff;
}
.logo-plaque img {
    height: 46px;
    width: auto;
    display: block;
}

.mast-kicker {
    color: var(--ivory-dim);
    letter-spacing: 0.18em;
    font-size: 11px;
    text-transform: uppercase;
}

.rail {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    border-radius: 999px;
}
.rail li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mute);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
}
.rail-index {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(228, 208, 164, 0.35);
    font-size: 11px;
}
.rail .is-now {
    color: #1a140c;
    background: linear-gradient(180deg, #f3e6c8, #d7bc86);
}
.rail .is-now .rail-index { border-color: transparent; background: rgba(26, 20, 12, 0.12); }
.rail .is-done { color: var(--gold); }

.stage {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 48px;
}

.colophon {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 28px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--mute);
    font-size: 12px;
    letter-spacing: 0.08em;
    border-top: 1px solid rgba(228, 208, 164, 0.14);
    padding-top: 16px;
}
.colophon-mark { color: var(--ivory-dim); }

.glass {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.07), rgba(255, 252, 246, 0.03));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px) saturate(1.2);
    padding: 32px;
}

.hero-grid, .split, .duo {
    display: grid;
    gap: 22px;
}
.hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: stretch; }
.split { grid-template-columns: 0.92fr 1.08fr; align-items: start; }
.duo { grid-template-columns: 0.9fr 1.1fr; align-items: start; }

.kicker {
    margin: 0 0 10px;
    color: var(--gold);
    letter-spacing: 0.22em;
    font-size: 12px;
    text-transform: uppercase;
}

h1, .display {
    margin: 0 0 12px;
    font-weight: 500;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--ivory);
}

.lede {
    margin: 0 0 22px;
    color: var(--ivory-dim);
    font-weight: 300;
    font-size: 17px;
    max-width: 38em;
}

.essay {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(12, 13, 17, 0.1), rgba(12, 13, 17, 0.45)),
        radial-gradient(400px 220px at 20% 0%, rgba(228, 208, 164, 0.2), transparent 70%);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 28px;
}
.stat {
    padding: 12px 10px;
    border-top: 1px solid var(--line);
}
.stat b {
    display: block;
    font-weight: 500;
    color: var(--ivory);
    font-size: 15px;
}
.stat span { color: var(--mute); font-size: 12px; }

.field { margin-bottom: 16px; }
.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ivory-dim);
    font-size: 13px;
}

.serial-input,
.form-control,
.form-select,
select.form-control,
textarea.form-control {
    width: 100%;
    background: rgba(8, 9, 12, 0.45);
    color: var(--ivory);
    border: 1px solid rgba(228, 208, 164, 0.24);
    border-radius: 16px;
    min-height: 54px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
textarea.form-control { min-height: 140px; resize: vertical; }
.serial-input {
    direction: ltr;
    text-align: center;
    letter-spacing: 0.55em;
    font-size: 28px;
    font-weight: 500;
    padding-right: 0.55em;
}
.actions .form-control { flex: 1; width: auto; min-width: 0; }
.form-control:focus,
.form-select:focus,
.serial-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(228, 208, 164, 0.15);
    background: rgba(8, 9, 12, 0.7);
    color: var(--ivory);
}
.form-control::placeholder { color: rgba(216, 208, 195, 0.45); }
.ltr-field { direction: ltr; text-align: left; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.btn {
    --btn-bg: transparent;
    --btn-ink: var(--ivory);
    appearance: none;
    border: 1px solid var(--line);
    background: var(--btn-bg);
    color: var(--btn-ink);
    border-radius: 999px;
    min-height: 52px;
    padding: 0 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-ink); }
.btn:disabled, .btn.is-sending { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-gold {
    --btn-bg: linear-gradient(180deg, #f6e7c6, #d7bc86);
    --btn-ink: #1a140c;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(184, 146, 90, 0.25);
}
.btn-gold::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55), transparent 70%);
    transform: translateX(-120%);
}
.btn-gold:hover::after { animation: sheen 0.8s var(--ease); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); }
.btn-line { background: transparent; }
.btn-block { width: 100%; }

.note, .alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ivory-dim);
}
.alert-danger, .note-danger {
    border-color: rgba(240, 194, 194, 0.45);
    background: rgba(120, 48, 48, 0.25);
    color: #f6dddd;
}
.alert-success, .note-ok {
    border-color: rgba(197, 221, 207, 0.4);
    background: rgba(40, 78, 62, 0.28);
    color: var(--ok);
}
.alert-info { color: var(--ivory); }
.alert .btn-close, .alert .close {
    filter: invert(1);
    opacity: 0.7;
}

.catalogue {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.piece {
    display: flex;
    flex-direction: column;
    padding: 12px;
    min-height: 100%;
    transition: transform 0.45s var(--ease), border-color 0.45s;
}
.piece:hover { transform: translateY(-6px); border-color: rgba(228, 208, 164, 0.55); }
.stage-photo {
    background:
        radial-gradient(120px 80px at 50% 30%, rgba(255, 255, 255, 0.7), transparent 70%),
        linear-gradient(180deg, #f7f1e7, #e6dccb);
    border-radius: 20px;
    aspect-ratio: 1 / 1.05;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}
.stage-photo > img:not(.seal),
.stage-photo .product-shot {
    width: auto;
    max-width: 86%;
    height: auto;
    max-height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(70, 50, 20, 0.18));
    transition: transform 0.6s var(--ease);
}
.piece:hover .stage-photo > img:not(.seal) { transform: scale(1.04) rotate(-1.5deg); }
.stage-photo.is-hero {
    aspect-ratio: 1 / 1.08;
    width: 100%;
    min-height: 0;
    align-self: start;
    position: sticky;
    top: 24px;
}
.stage-photo.is-hero .product-shot {
    width: 78%;
    max-width: 78%;
    height: auto;
    max-height: 78%;
}
.stage-photo .seal,
.cert-side .seal {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 16px;
    width: 92px;
    height: auto;
    max-width: 24%;
    max-height: 120px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}
.piece-body { padding: 16px 8px 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price-chip {
    align-self: flex-start;
    background: rgba(228, 208, 164, 0.14);
    color: var(--gold);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}
.piece-title { margin: 0; font-size: 20px; font-weight: 500; color: var(--ivory); }
.piece-copy { margin: 0; color: var(--ivory-dim); font-size: 14px; }
.meta { color: var(--mute); font-size: 13px; }
.piece .btn { margin-top: auto; }

.sheet { display: flex; flex-direction: column; gap: 16px; }
.spec-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(228, 208, 164, 0.16);
    padding-bottom: 8px;
    color: var(--ivory-dim);
}
.spec-line strong { color: var(--ivory); font-weight: 500; }

.clauses { display: grid; gap: 10px; margin-top: 8px; }
.clause {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(228, 208, 164, 0.14);
}
.clause-no {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--gold);
    font-size: 12px;
}
.clause h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; color: var(--ivory); }
.clause p { margin: 0; color: var(--ivory-dim); font-size: 14px; }

.certificate {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
}
.cert-side {
    background: var(--paper);
    color: #241c12;
    border-radius: 24px;
    padding: 18px;
    position: relative;
    min-height: 360px;
}
.cert-side img.product { width: 100%; border-radius: 16px; background: #fff; }
.cert-kicker { letter-spacing: 0.16em; font-size: 11px; color: #8a7044; margin: 0 0 8px; }

.mobile-mask {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    direction: ltr;
    display: inline-block;
}

.guide {
    display: grid;
    gap: 8px;
}
.guide details {
    border-bottom: 1px solid rgba(228, 208, 164, 0.16);
    padding: 8px 0 12px;
}
.guide summary {
    cursor: pointer;
    color: var(--ivory);
    font-weight: 500;
    list-style: none;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary::before {
    content: "＋";
    color: var(--gold);
    margin-left: 8px;
    font-weight: 300;
}
.guide details[open] summary::before { content: "–"; }
.guide p { margin: 8px 0 0; color: var(--ivory-dim); font-size: 14px; white-space: pre-line; }

.captcha-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: center;
}
.captcha-plate {
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    letter-spacing: 0.28em;
    font-weight: 700;
    color: #241c12;
    background:
        repeating-linear-gradient(-18deg, rgba(36, 28, 18, 0.08) 0 2px, transparent 2px 7px),
        linear-gradient(180deg, #f6efe3, #e4d3ae);
    user-select: none;
}

.modal { z-index: 90; }
.modal-dialog { margin-top: 12vh; }
.modal-content {
    background: rgba(18, 19, 26, 0.86);
    color: var(--ivory);
    border: 1px solid var(--line);
    border-radius: 24px;
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}
.modal-header, .modal-footer { border-color: rgba(228, 208, 164, 0.16); }
.modal-title { font-weight: 500; }
.btn-close, .close {
    background: transparent;
    border: 0;
    color: var(--ivory);
    font-size: 26px;
    line-height: 1;
    opacity: 0.8;
}
.atelier-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(6, 7, 10, 0.62);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
}
body.backdrop-in .atelier-backdrop { opacity: 1; }
body.modal-open { overflow: hidden; }

.reveal { animation: rise 0.9s var(--ease) both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; }

.empty {
    text-align: center;
    padding: 48px 20px;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(30px, 24px, 0); }
}
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes sheen { to { transform: translateX(120%); } }

@media (max-width: 980px) {
    .hero-grid, .split, .duo, .certificate, .catalogue { grid-template-columns: 1fr; }
    .catalogue { grid-template-columns: 1fr 1fr; }
    .mast { flex-direction: column; align-items: stretch; }
    .rail { overflow-x: auto; }
    .dial { opacity: 0.35; }
}
@media (max-width: 640px) {
    .catalogue, .stat-row, .captcha-row { grid-template-columns: 1fr; }
    .glass { padding: 22px 16px; border-radius: 22px; }
    h1, .display { font-size: 32px; }
    .serial-input { font-size: 22px; letter-spacing: 0.35em; }
    .colophon { flex-direction: column; }
    .mast { margin-top: 16px; }
    .logo-plaque img { height: 38px; }
    .rail {
        width: 100%;
        justify-content: space-between;
        gap: 0;
        padding: 4px;
    }
    .rail li { padding: 6px 7px; font-size: 11px; gap: 4px; }
    .rail-index { width: 18px; height: 18px; }
}

.shot-open {
    appearance: none;
    border: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: zoom-in;
    position: relative;
}
.stage-photo.is-hero > .shot-open {
    align-self: stretch;
    justify-self: stretch;
}
.cert-side .shot-open { display: block; height: auto; }
.zoom-chip {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(12, 13, 17, 0.72);
    color: var(--ivory);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    font-size: 12px;
    letter-spacing: 0.04em;
    pointer-events: none;
}
.zoom-chip svg { width: 16px; height: 16px; }

.zoom-viewer[hidden] { display: none !important; }
.zoom-viewer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding:
        calc(10px + env(safe-area-inset-top))
        12px
        calc(12px + env(safe-area-inset-bottom))
        12px;
    background: #07080c;
    color: var(--ivory);
}
body.zoom-open { overflow: hidden; }
.zoom-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
}
.zoom-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ivory-dim);
}
.zoom-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    touch-action: none;
    border-radius: 22px;
    background:
        radial-gradient(280px 180px at 50% 30%, rgba(255, 255, 255, 0.16), transparent 70%),
        linear-gradient(180deg, #f7f1e7, #e6dccb);
}
.zoom-photo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}
.zoom-toolbar {
    direction: ltr;
    display: grid;
    grid-template-columns: 48px 1fr 48px 48px 48px;
    gap: 8px;
    align-items: center;
}
.zoom-toolbar button,
.zoom-close {
    min-width: 48px;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ivory);
    font: inherit;
    font-size: 20px;
    cursor: pointer;
}
.zoom-toolbar button:focus-visible,
.zoom-close:focus-visible,
.shot-open:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
.zoom-readout {
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    color: var(--gold);
    font-size: 14px;
}
.zoom-hint {
    margin: 0;
    text-align: center;
    color: var(--mute);
    font-size: 12px;
}
@media (min-width: 800px) {
    .zoom-viewer { padding: 24px 28px 20px; }
    .zoom-stage { border-radius: 28px; }
    .zoom-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
