/* ==========================================================================
   PopovaBooks — Landing + Pre-order
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg-dark: #1c1917;
    --color-bg-cream: #f8f3ec;
    --color-bg-warm: #f0ebe3;
    --color-bg-white: #ffffff;
    --color-accent: #8b4d3b;
    --color-accent-hover: #7a4234;
    --color-accent-soft: rgba(139, 77, 59, 0.08);
    --color-gold: #b8976a;
    --color-text: #2c2420;
    --color-text-light: #5c534d;
    --color-text-muted: #9a918a;
    --color-border: #ddd5cb;
    --color-error: #c0392b;
    --color-success: #27ae60;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    --container-width: 1240px;
    --nav-height: 68px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg-cream);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

body.body--light {
    background: var(--color-bg-cream);
}

/* Subtle film-grain overlay */
.page-grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Ornamental divider */
.ornament {
    font-size: 28px;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1;
    opacity: 0.7;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 28px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn--primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 77, 59, 0.25);
    animation: submit-pulse 2.8s ease-in-out infinite;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(139, 77, 59, 0.35);
    animation: none;
}

@keyframes submit-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 77, 59, 0.25); transform: scale(1); }
    50%       { box-shadow: 0 6px 28px rgba(139, 77, 59, 0.4), 0 0 0 8px rgba(139, 77, 59, 0.1); transform: scale(1.013); }
}

.btn--outline {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
}

.btn--full {
    display: block;
    width: 100%;
}

.btn--secondary {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn--secondary:hover {
    background: var(--color-accent-soft);
    text-decoration: none;
}

/* --- Structured Address Grid --- */
.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.address-grid__zip {
    max-width: 200px;
}

@media (max-width: 600px) {
    .address-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Price Summary --- */
.price-summary {
    background: linear-gradient(165deg, #fff9f3 0%, #f5ece3 100%);
    border-radius: 12px;
    padding: 0 28px 24px;
    margin: 24px 0;
    text-align: center;
    border: 1.5px solid var(--color-accent);
    box-shadow:
        inset 0 0 0 3px rgba(139, 77, 59, 0.06),
        0 2px 12px rgba(139, 77, 59, 0.10);
    position: relative;
    overflow: hidden;
}

/* Заголовок блока итого */
.price-summary__heading {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    background: rgba(139, 77, 59, 0.08);
    margin: 0 -28px 20px;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(139, 77, 59, 0.15);
}

.price-summary__heading::before,
.price-summary__heading::after {
    content: '❧';
    font-size: 0.75rem;
    vertical-align: middle;
    opacity: 0.6;
}

.price-summary__heading::before {
    margin-right: 10px;
}

.price-summary__heading::after {
    margin-left: 10px;
}

.block-appear.price-summary,
.block-appear .price-summary {
    animation: block-appear 0.4s cubic-bezier(0.22, 1, 0.36, 1) both,
               price-highlight 1.5s 0.4s ease-out both;
}

@keyframes price-highlight {
    0%   { box-shadow: inset 0 0 0 3px rgba(139, 77, 59, 0.06), 0 2px 12px rgba(139, 77, 59, 0.10); }
    30%  { box-shadow: inset 0 0 0 3px rgba(139, 77, 59, 0.12), 0 4px 24px rgba(139, 77, 59, 0.18); }
    100% { box-shadow: inset 0 0 0 3px rgba(139, 77, 59, 0.06), 0 2px 12px rgba(139, 77, 59, 0.10); }
}

.price-summary__rows {
    margin-bottom: 12px;
}

.price-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.price-summary__rows:empty {
    margin-bottom: 0;
}

.price-summary__row--free {
    justify-content: center;
    color: #2d8a56;
}

.price-summary__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 77, 59, 0.15);
}

.price-summary__rows:empty + .price-summary__total {
    border-top: none;
    justify-content: center;
    gap: 10px;
    padding-top: 0;
}

/* Плавное появление блоков формы */
@keyframes block-appear {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.block-appear {
    animation: block-appear 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.price-summary__label {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.price-summary__value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.price-summary__currency {
    font-size: 0.75em;
}

.price-summary__patron-note {
    display: none;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 77, 59, 0.1);
    font-family: var(--font-serif);
    font-size: 17px;
    font-style: italic;
    line-height: 1.5;
    color: var(--color-text-light);
    text-align: center;
}

/* --- Calculate Button --- */
.calculate-btn {
    margin-top: 16px;
    background: var(--color-accent);
    color: #fff;
    border: 2px solid var(--color-accent);
    animation: calculate-pulse 2.5s ease-in-out infinite;
}

.calculate-btn:hover {
    animation: none;
    background: #6e3a2b;
    border-color: #6e3a2b;
    color: #fff;
}

.calculate-btn--done {
    animation: none;
}

@keyframes calculate-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 77, 59, 0.0); transform: scale(1); }
    50%       { box-shadow: 0 0 0 7px rgba(139, 77, 59, 0.18); transform: scale(1.012); }
}

.calculate-hint {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 13px;
    color: var(--color-text-light);
    text-align: center;
    font-style: italic;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(28, 25, 23, 0.95);
    backdrop-filter: blur(12px);
}

.nav--light {
    background: rgba(248, 243, 236, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-gold);
    text-decoration: none;
}

.nav--light .nav__logo {
    color: var(--color-text);
}

.nav__cta {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--color-gold);
    text-decoration: none;
    padding: 9px 22px;
    border: 1px solid var(--color-gold);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav__cta:hover {
    background: var(--color-gold);
    color: var(--color-bg-dark);
    text-decoration: none;
}

.nav--light .nav__cta {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.nav--light .nav__cta:hover,
.nav__cta--active {
    background: var(--color-accent) !important;
    color: #fff !important;
    border-color: var(--color-accent) !important;
}

/* --- Hero --- */
.hero {
    background: var(--color-bg-cream);
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(184, 151, 106, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.hero__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 80px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.hero__content {
    justify-self: end;
}

.hero__book {
    justify-self: start;
}

.hero__accent-line {
    width: 48px;
    height: 2px;
    background: var(--color-gold);
    margin-bottom: 32px;
    opacity: 0.6;
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(46px, 5.8vw, 78px);
    color: var(--color-text);
    line-height: 1.02;
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.hero__title-small {
    font-size: 0.5em;
    font-style: normal;
    font-weight: 400;
    display: block;
    margin-top: 8px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: 17px;
    color: var(--color-text-light);
    line-height: 1.75;
    max-width: 460px;
}

.hero__cta {
    margin-top: 36px;
}

.hero__book-img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(10px 24px 12px rgba(0, 0, 0, 0.2));
}

/* Book cover placeholder */
.book-cover-placeholder {
    width: 320px;
    height: 460px;
    background: linear-gradient(160deg, #6b3a2a 0%, #9b6744 40%, #c9a96e 100%);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    text-align: center;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.06),
        0 8px 24px rgba(107, 58, 42, 0.15),
        0 24px 48px rgba(107, 58, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.book-cover-placeholder::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1px;
}

.book-cover-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 40%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}

.book-cover-placeholder__author {
    font-family: var(--font-sans);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 24px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.book-cover-placeholder__title {
    font-family: var(--font-serif);
    font-size: 24px;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.book-cover-placeholder__and {
    font-weight: 400;
    font-style: italic;
    font-size: 20px;
}

.book-cover-placeholder--small {
    width: 140px;
    height: 200px;
    padding: 15px;
}

.book-cover-placeholder--small .book-cover-placeholder__author {
    font-size: 8px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.book-cover-placeholder--small .book-cover-placeholder__title {
    font-size: 11px;
}

.book-cover-placeholder--small .book-cover-placeholder__and {
    font-size: 10px;
}

.book-cover-placeholder--small::before {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
}

/* --- Buy Section --- */
.buy {
    background: var(--color-bg-white);
    padding: 100px 24px;
    text-align: center;
    position: relative;
    scroll-margin-top: var(--nav-height);
}

.buy__container {
    max-width: 720px;
    margin: 0 auto;
}

.buy__title {
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.buy__text {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 40px;
}

.buy__stores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.buy-store {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 32px;
    min-height: 108px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.buy-store:hover {
    border-color: var(--color-accent);
    box-shadow: 0 12px 28px rgba(44, 36, 32, 0.09);
    transform: translateY(-3px);
}

.buy-store__logo {
    max-width: 170px;
    max-height: 40px;
    width: auto;
    height: auto;
}

.buy__review {
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid var(--color-border);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-light);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.buy__review-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    margin-top: 22px;
}

.buy__review-links a {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 77, 59, 0.35);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.buy__review-links a:hover {
    color: var(--color-accent-hover);
    border-color: var(--color-accent);
}

.buy__review-sign {
    margin-top: 22px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-style: italic;
    color: var(--color-text);
}

/* --- Annotation --- */
.annotation {
    background: var(--color-bg-cream);
    padding: 120px 24px;
    position: relative;
}

.annotation__container {
    max-width: 740px;
    margin: 0 auto;
    text-align: center;
}

.annotation__quote {
    font-family: var(--font-serif);
    font-size: clamp(19px, 2.2vw, 23px);
    line-height: 1.85;
    color: var(--color-text);
    font-style: italic;
    font-weight: 400;
    position: relative;
}

.annotation__quote::before {
    content: '\201C';
    display: block;
    font-size: 72px;
    font-style: normal;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.5;
}

.annotation__quote p + p {
    margin-top: 24px;
}

.annotation__title-accent {
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-accent);
}

.annotation__divider {
    width: 40px;
    height: 1.5px;
    background: var(--color-accent);
    margin: 48px auto 0;
    opacity: 0.5;
}

/* --- Author --- */
.author {
    background: var(--color-bg-warm);
    padding: 120px 24px;
}

.author__container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 80px;
    align-items: center;
}

.author__photo-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.author__photo-credit {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 8px;
    text-align: right;
}

.author__photo-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(160deg, var(--color-bg-cream) 0%, #e5dbd0 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.author__label {
    font-family: var(--font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.author__name {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 500;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
    color: var(--color-accent);
}

.author__bio {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.85;
    margin-bottom: 20px;
}

.author__closing {
    font-family: var(--font-serif);
    font-size: 19px;
    font-style: italic;
    font-weight: 500;
    color: var(--color-accent);
    line-height: 1.65;
    margin-top: 28px;
}

.author__quote {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    color: var(--color-accent);
    line-height: 1.65;
    margin-top: 28px;
    padding-left: 20px;
    border-left: 2px solid var(--color-gold);
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-dark);
    padding: 60px 24px 40px;
    text-align: center;
}

.footer--light {
    background: var(--color-bg-warm);
}

.footer__container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer__ornament {
    font-size: 24px;
    color: var(--color-gold);
    opacity: 0.5;
    margin-bottom: 20px;
    line-height: 1;
}

.footer__author {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.footer__contact {
    font-size: 14px;
    margin-bottom: 0;
}

.footer__contact a {
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.footer__contact a:hover {
    color: var(--color-accent-hover);
}

.footer__divider {
    width: 32px;
    height: 1px;
    background: var(--color-border);
    margin: 24px auto;
}

.footer__copy {
    font-size: 12px;
    color: var(--color-text-muted);
    letter-spacing: 0.3px;
}

/* ==========================================================================
   Order Page
   ========================================================================== */

.order-page {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 80px;
    min-height: 100vh;
}

.order-page__container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.order-page__header {
    margin-bottom: 40px;
}

.order-page__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.order-page__title {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 400;
    color: var(--color-text);
}

.order-page__grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 48px;
    align-items: start;
}

/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert--error {
    background: #fdf0ef;
    border: 1px solid #f5c6c0;
    color: var(--color-error);
}

.alert--error ul {
    list-style: none;
    padding: 0;
}

.alert--error li + li {
    margin-top: 4px;
}

/* Book Card */
.book-card {
    background: var(--color-bg-white);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: start;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.book-card__cover {
    flex-shrink: 0;
}

.book-card__cover-img {
    width: 140px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.book-card__title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 12px;
}

.book-card__pages {
    font-size: 14px;
    color: var(--color-accent);
}

.book-card__detail {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 6px;
}

.book-card__detail--muted {
    color: var(--color-text-muted);
    font-size: 12px;
}

/* --- Tier Options --- */
.tier-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tier-option {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    background: var(--color-bg-white);
}

.tier-option:hover {
    border-color: var(--color-accent);
}

.tier-option--active {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
}

.tier-option__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tier-option__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.tier-option__name {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text);
}

.tier-option__price {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent);
}

.tier-option__desc {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.tier-option__thanks {
    font-family: var(--font-serif);
    font-size: 15px;
    font-style: italic;
    color: var(--color-gold);
    margin-top: 10px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .tier-options {
        grid-template-columns: 1fr;
    }
}

.book-card__credit {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 12px;
}

/* Payment Details */
.payment-details {
    background: var(--color-bg-white);
    border-radius: 16px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.payment-details__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.payment-details__item {
    padding: 12px 0;
    border-top: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.payment-details__item--active {
    background: var(--color-bg-cream);
    margin: 0 -24px;
    padding: 12px 24px;
    border-radius: 8px;
    border-top-color: transparent;
}

.payment-details__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.payment-details__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.payment-details__recipient {
    font-size: 13px;
    color: var(--color-text-light);
}

/* --- Order Form --- */
.order-form__section {
    border: none;
    margin-bottom: 32px;
}

.order-form__legend {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.required {
    color: var(--color-accent);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg-white);
    transition: border-color 0.2s ease;
}

.form-input::placeholder {
    color: #bbb;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 77, 59, 0.1);
}

.form-input--error {
    border-color: var(--color-error);
}

.field-error {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 4px;
}

.section-error {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 8px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Contact Toggle */
.contact-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.contact-toggle__btn {
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-warm);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-toggle__btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.contact-toggle__btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* Payment Options */
.payment-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: var(--color-accent);
}

.payment-option__radio {
    accent-color: var(--color-accent);
    width: 18px;
    height: 18px;
    margin-right: 14px;
    flex-shrink: 0;
}

.payment-option__radio:checked ~ .payment-option__content {
    color: var(--color-text);
}

.payment-option__content {
    display: flex;
    flex-direction: column;
}

.payment-option__name {
    font-size: 15px;
    font-weight: 500;
}

.payment-option__desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Country selection */
.country-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.country-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-white);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.country-option:hover {
    border-color: var(--color-accent-light, #c49a8a);
}

.country-option--active {
    border-color: var(--color-accent);
    background: rgba(139, 77, 59, 0.04);
}

.country-option__radio {
    display: none;
}

.country-option__flag {
    font-size: 24px;
    line-height: 1;
}

.country-option__name {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text);
}

.country-other-note {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.country-other-note a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.payment-note {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

/* Payment expand (реквизиты при выборе) */
.payment-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.payment-expand--open {
    max-height: 600px;
}

/* Pay details — redesigned */
.pay-details {
    padding: 24px;
    background: var(--color-bg-warm);
    border-radius: 10px;
    border: 1px solid var(--color-border);
    margin-bottom: 8px;
}

.pay-details__qr {
    text-align: center;
    margin-bottom: 16px;
}

.pay-details__qr img {
    width: 220px;
    height: 220px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    padding: 10px;
    object-fit: contain;
}

.pay-details__qr-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.pay-details__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.pay-details__divider::before,
.pay-details__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.pay-details__divider span {
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pay-details__fields {
    margin: 0;
}

.pay-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.pay-details__row:last-child {
    border-bottom: none;
}

.pay-details__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-right: 16px;
}

.pay-details__value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pay-details__value span {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.pay-details__logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Copy button */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg-white);
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.copy-btn--copied {
    border-color: var(--color-success);
    color: var(--color-success);
}

.copy-btn__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.copy-btn__text {
    display: none;
}

/* (old qr styles removed — replaced by .pay-details) */

/* Tier cards */
.tier-card {
    display: block;
    padding: 16px 20px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tier-card:hover {
    border-color: var(--color-accent-light, #c49a8a);
}

.tier-card--active {
    border-color: var(--color-accent);
    background: rgba(139, 77, 59, 0.03);
}

.tier-card__radio {
    display: none;
}

.tier-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.tier-card__name {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.tier-card--active .tier-card__name {
    color: var(--color-accent);
}

.tier-card__price {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
}


.tier-card__choose-badge {
    display: block;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(139, 77, 59, 0.08);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-accent);
    line-height: 1.4;
}

.tier-card__desc {
    display: block;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Patron-specific card content */
/* Book-style frame for Patron card */
.tier-card--patron {
    position: relative;
    clip-path: polygon(
        -8px -8px,
        calc(50% - 16px) -8px,
        calc(50% - 16px) 2px,
        calc(50% + 16px) 2px,
        calc(50% + 16px) -8px,
        calc(100% + 8px) -8px,
        calc(100% + 8px) calc(100% + 8px),
        -8px calc(100% + 8px)
    );
}

.tier-card--patron::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(139, 77, 59, 0.18);
    border-radius: 14px;
    pointer-events: none;
    clip-path: polygon(
        0 0, calc(50% - 15px) 0,
        calc(50% - 14px) 2px,
        calc(50% - 12px) 3.5px,
        calc(50% - 9px) 4.5px,
        50% 5px,
        calc(50% + 9px) 4.5px,
        calc(50% + 12px) 3.5px,
        calc(50% + 14px) 2px,
        calc(50% + 15px) 0,
        100% 0,
        100% 100%, 0 100%
    );
}

/* Ornament is now a separate sibling element, not ::after */

.tier-card-patron-wrap {
    position: relative;
    margin: 18px 0;
}

.tier-card-patron-ornament {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    color: var(--color-accent);
    line-height: 1;
    z-index: 2;
    opacity: 0.5;
}

.tier-card--patron.tier-card--active::before {
    border-color: rgba(139, 77, 59, 0.35);
}

.tier-card--patron .tier-card__headline {
    display: block;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    margin-top: 14px;
    line-height: 1.4;
}

.tier-card--patron .tier-card__quote {
    display: block;
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-top: 10px;
}

.tier-card--patron .tier-card__bonus {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    background: var(--color-accent);
    color: var(--color-bg-white);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* Patron details hidden until selected (except headline — always visible as hook) */
.tier-card--patron .tier-card__quote,
.tier-card--patron .tier-card__sign {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.tier-card--patron .tier-card__bonus {
    display: none;
}

.tier-card--patron.tier-card--active .tier-card__quote {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

.tier-card--patron .tier-card__sign {
    display: block;
    font-family: var(--font-serif);
    font-size: 15px;
    font-style: italic;
    color: var(--color-accent);
    text-align: right;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.tier-card--patron.tier-card--active .tier-card__sign {
    max-height: 40px;
    opacity: 1;
    margin-top: 10px;
}

.tier-card--patron.tier-card--active .tier-card__bonus {
    display: inline-block;
    margin-top: 12px;
}

.payment-expand__shipping-note {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 0 2px;
}

@media (max-width: 480px) {
    .payment-expand__tiers {
        grid-template-columns: 1fr;
    }
}

/* File Upload */
.file-upload__input {
    display: none;
}

.file-upload__zone {
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-bg-warm);
}

.file-upload__zone:hover,
.file-upload__zone--dragover {
    border-color: var(--color-accent);
    background: rgba(139, 77, 59, 0.05);
}

.file-upload__icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.file-upload__text {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.file-upload__hint {
    font-size: 13px;
    color: var(--color-text-muted);
}

.file-upload__preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-bg-warm);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.file-upload__filename {
    font-size: 14px;
    color: var(--color-text);
}

.file-upload__remove {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.file-upload__remove:hover {
    color: var(--color-error);
}

/* Order Form Disclaimer */
.order-form__disclaimer {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 16px;
}

/* ==========================================================================
   Success Page
   ========================================================================== */

.success-page {
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-page__container {
    text-align: center;
    max-width: 500px;
    padding: 40px 24px;
}

.success-page__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-success);
    color: #fff;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-page__title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 12px;
}

.success-page__order-id {
    font-size: 18px;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 24px;
}

.success-page__text {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.success-page__text:last-of-type {
    margin-bottom: 32px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .hero__container {
        gap: 48px;
    }

    .order-page__grid {
        grid-template-columns: 320px 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-bottom: 40px;
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 60px 24px;
    }

    .hero__accent-line {
        margin: 0 auto 24px;
    }

    .hero__content {
        justify-self: auto;
    }

    .hero__book {
        justify-self: center;
    }

    .hero__subtitle {
        margin: 0 auto;
    }

    .hero__book-img {
        max-height: none;
        width: 260px;
    }

    .book-cover-placeholder {
        width: 240px;
        height: 345px;
        padding: 20px;
    }

    .book-cover-placeholder__title {
        font-size: 18px;
    }

    .author__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .author__photo-placeholder {
        max-width: 360px;
        margin: 0 auto;
    }

    .order-page__grid {
        grid-template-columns: 1fr;
    }

    .order-page__sidebar {
        order: -1;
    }

    .order-page__title {
        font-size: 30px;
    }

    .buy,
    .annotation,
    .author {
        padding: 72px 24px;
    }

    .buy__stores {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .buy-store {
        min-height: 92px;
        padding: 24px;
    }

    .annotation__quote {
        font-size: 18px;
    }

    .author__name {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 38px;
    }

    .nav__container {
        padding: 0 16px;
    }

    .nav__cta {
        font-size: 12px;
        padding: 6px 14px;
    }

    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Large screens --- */
@media (min-width: 1440px) {
    :root {
        --container-width: 1400px;
    }

    .hero__title {
        font-size: 86px;
    }

    .hero__subtitle {
        font-size: 19px;
        max-width: 500px;
    }

    .hero__book-img {
        max-height: 80vh;
    }

    .hero__container {
        padding: 100px 48px;
        gap: 80px;
    }

    .buy__container {
        max-width: 780px;
    }

    .buy__title {
        font-size: 44px;
    }

    .buy__text {
        font-size: 18px;
    }

    .annotation__container {
        max-width: 820px;
    }

    .annotation__quote {
        font-size: 25px;
    }

    .author__name {
        font-size: 52px;
    }

    .author__bio {
        font-size: 16px;
    }

    .author__closing {
        font-size: 21px;
    }

    .nav__container {
        padding: 0 48px;
    }
}

@media (min-width: 1800px) {
    :root {
        --container-width: 1560px;
    }

    .hero__title {
        font-size: 96px;
    }

    .hero__book-img {
        max-height: 85vh;
    }

    .hero__container {
        gap: 100px;
    }
}
