/* ==========================================================================
   Kundly — base styles shared by every page
   Palette is drawn from Indian astrology materials: chandan (sandalwood)
   paper, kumkum maroon ink, kesar (saffron), haldi gold and the night sky.
   ========================================================================== */

/* Fonts (self-hosted, Latin subset) ------------------------------------- */
@font-face {
    font-family: "Eczar";
    src: url("../fonts/eczar-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Mukta";
    src: url("../fonts/mukta-400-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Mukta";
    src: url("../fonts/mukta-500-latin.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "Mukta";
    src: url("../fonts/mukta-600-latin.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "Mukta";
    src: url("../fonts/mukta-700-latin.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* Tokens ------------------------------------------------------------------ */
:root {
    /* Surfaces */
    --c-bg: #fdf6ea;            /* chandan — page background */
    --c-bg-deep: #f7ead4;       /* deeper sandalwood for media wells */
    --c-surface: #ffffff;       /* card paper */
    --c-surface-warm: #fff8ee;  /* summary / add-on fill */

    /* Ink */
    --c-text: #2c1e18;          /* kajal — body text */
    --c-text-muted: #6b574b;
    --c-brand: #74210f;         /* kumkum maroon — headings, brand */
    --c-brand-soft: #8a4a2c;

    /* Action & accents */
    --c-action: #b9560c;        /* kesar — buttons */
    --c-action-dark: #974307;
    --c-action-tint: #fdeedd;
    --c-gold: #c99a2e;          /* haldi gold */
    --c-gold-bright: #f2c14e;
    --c-night: #1f1a4f;         /* ratri — night sky */
    --c-night-deep: #16123b;
    --c-offer: #1d7a44;         /* tulsi green — offers & success */
    --c-offer-tint: #e9f6ee;
    --c-offer-line: #9fd2b2;
    --c-error: #c4281c;
    --c-error-tint: #fdeceb;

    /* Lines */
    --c-line: #ead2b1;
    --c-line-strong: #c8854a;
    --c-input-line: #e2c7a3;
    --c-focus: #2f63d6;

    /* Type */
    --font-display: "Eczar", Georgia, "Times New Roman", serif;
    --font-body: "Mukta", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Layout */
    --max: 1240px;
    --gutter: clamp(16px, 4vw, 40px);

    /* Radii — larger containers get larger corners */
    --r-panel: 22px;
    --r-card: 18px;
    --r-control: 8px;
    --r-button: 10px;
}

/* Reset ------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html:has(dialog[open]) {
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    flex: 1 0 auto;
}

img,
svg,
video,
picture {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--c-brand);
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 3px;
}

::selection {
    background: #f9d9a8;
    color: var(--c-text);
}

/* Utilities ----------------------------------------------------------------- */
.container {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 1.2em;
    height: 1.2em;
    flex: none;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.7rem 1.5rem;
    border: 1.5px solid transparent;
    border-radius: var(--r-button);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
    background: var(--c-action);
    color: #fff;
    box-shadow: 0 10px 20px -12px rgba(151, 67, 7, 0.9);
}

.btn--primary:hover {
    background: var(--c-action-dark);
}

.btn--outline {
    background: var(--c-surface);
    border-color: var(--c-action);
    color: var(--c-action-dark);
}

.btn--outline:hover {
    background: var(--c-action-tint);
}

.btn--sm {
    min-height: 40px;
    padding: 0.4rem 1rem;
    font-size: 15px;
    border-radius: var(--r-control);
}

.btn--lg {
    min-height: 56px;
    padding-inline: 1.9rem;
    font-size: 18px;
}

.btn--xl {
    min-height: 72px;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-size: 22px;
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn--primary:disabled:hover {
    background: var(--c-action);
}

.btn .icon {
    width: 1.15em;
    height: 1.15em;
}

.link-button {
    padding: 0.25rem 0.15rem;
    border: 0;
    background: none;
    color: var(--c-text-muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.link-button:hover {
    color: var(--c-error);
}

.text-link,
.back-link {
    color: var(--c-action-dark);
    font-weight: 600;
    text-underline-offset: 4px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 16px;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Offer badge and price row ------------------------------------------------ */
.badge-offer {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.75rem;
    border: 1.5px solid var(--c-offer-line);
    border-radius: 999px;
    background: var(--c-offer-tint);
    color: var(--c-offer);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

/* Offer price: final price, original price struck through, "Save X%" */
.offer-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.offer-price__amount {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--c-text);
    font-variant-numeric: lining-nums;
}

.offer-price__original {
    font-size: 17px;
    font-weight: 500;
    color: #8c7b6f;
}

.offer-price__original s {
    text-decoration-thickness: 1.5px;
}

/* Feature list (sparkle bullets, as on the reference checkout) ------------- */
.feature-list {
    display: grid;
    gap: 0.4rem;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 16px;
    line-height: 1.5;
}

.feature-list .icon {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--c-action);
}

/* Brand ----------------------------------------------------------------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--c-brand);
    text-decoration: none;
}

.brand__mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    object-fit: contain;
}

.brand__name {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.brand--light {
    color: #f8e7c4;
}

.brand--light .brand__mark {
    color: var(--c-gold-bright);
}

/* Shared sticky navigation ------------------------------------------------ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid rgba(248, 231, 196, 0.2);
    background: rgba(31, 26, 79, 0.96);
    color: #fbefd9;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.site-nav__inner {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-nav__brand {
    min-width: 0;
}

.site-nav__brand .brand__mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
}

.site-nav__brand .brand__name {
    font-size: clamp(20px, 2vw, 28px);
}

.site-nav__actions,
.site-nav__social {
    display: flex;
    align-items: center;
}

.site-nav__actions {
    gap: clamp(12px, 2vw, 22px);
}

.site-nav__unlock {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--c-gold-bright);
    border-radius: 999px;
    color: var(--c-gold-bright);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav__unlock:hover {
    transform: translateY(-2px);
    background: var(--c-gold-bright);
    color: var(--c-night-deep);
}

.site-nav__social {
    gap: 8px;
}

.site-nav__social a {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(248, 231, 196, 0.28);
    border-radius: 50%;
    color: #fff4de;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav__social a:hover {
    transform: translateY(-2px);
    background: rgba(242, 193, 78, 0.18);
    color: var(--c-gold-bright);
}

.site-nav__social .icon {
    width: 19px;
    height: 19px;
}

.site-nav__call {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid var(--c-gold-bright);
    border-radius: 999px;
    background: var(--c-gold-bright);
    color: var(--c-night-deep);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav__call:hover {
    transform: translateY(-2px);
    background: #ffdb75;
}

.site-nav__call .icon {
    width: 18px;
    height: 18px;
}

.site-nav__social a:focus-visible,
.site-nav__unlock:focus-visible,
.site-nav__call:focus-visible,
.site-nav__brand:focus-visible {
    outline-color: var(--c-gold-bright);
}

.page-home .site-nav {
    margin-bottom: -80px;
    background: rgba(31, 26, 79, 0.96)
}

@media (max-width: 767px) {
    .site-nav__inner {
        min-height: 0;
        padding-block: 10px;
        gap: 8px;
    }

    .site-nav__brand {
        flex: 1 1 100%;
        gap: 6px;
    }

    .site-nav__brand .brand__mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .site-nav__brand .brand__name {
        max-width: none;
        font-size: clamp(16px, 4.5vw, 20px);
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }

    .site-nav__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .site-nav__actions {
        gap: 7px;
    }

    .site-nav__social {
        display: none;
    }

    .site-nav__social .icon,
    .site-nav__call .icon {
        width: 16px;
        height: 16px;
    }

    .site-nav__call {
        min-height: 36px;
        gap: 5px;
        padding-inline: 11px;
        font-size: 14px;
    }

    .site-nav__unlock {
        min-height: 36px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .page-home .site-nav {
        margin-bottom: 0;
    }
}

@media (max-width: 400px) {
    .site-nav__brand .brand__name {
        font-size: 16px;
    }

    .site-nav__actions {
        gap: 5px;
    }

    .site-nav__unlock {
        min-height: 34px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .site-nav__call {
        width: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 0;
    }

    .site-nav__call span {
        display: none;
    }
}

/* Dialog base ----------------------------------------------------------- */
dialog {
    padding: 0;
    border: 0;
    color: var(--c-text);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
}

dialog::backdrop {
    background: rgba(22, 18, 59, 0.66);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--c-brand);
    transition: background-color 0.18s ease;
}

.dialog-close:hover {
    background: var(--c-action-tint);
}

.dialog-close .icon {
    width: 20px;
    height: 20px;
}

/* Notices --------------------------------------------------------------- */
.notice,
.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
}

.notice {
    background: #fff3df;
    border: 1px solid #f0d2a2;
    color: var(--c-brand);
}

.form-alert {
    background: var(--c-error-tint);
    border: 1px solid #f3c1bd;
    color: #9b1f15;
}

.notice .icon,
.form-alert .icon {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.dev-note {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px dashed #8d7ec9;
    border-radius: 12px;
    background: #f4f1ff;
    color: #3a2f7a;
    font-size: 14px;
    line-height: 1.55;
}

.dev-note p + p {
    margin-top: 0.35rem;
}

.dev-note code,
.legal code {
    font-size: 0.92em;
    padding: 0.05em 0.35em;
    border-radius: 4px;
    background: rgba(58, 47, 122, 0.08);
}

/* Footer ---------------------------------------------------------------- */
.site-footer {
    padding: 44px 0 22px;
    background: var(--c-night);
    color: #ede2cf;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    justify-content: space-between;
    gap: 28px 48px;
}

.site-footer__about {
    max-width: 560px;
}

.site-footer .brand__mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.site-footer .brand__name {
    font-size: 23px;
}

.site-footer__text {
    max-width: 540px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(237, 226, 207, 0.78);
}

.site-footer__contact {
    display: grid;
    gap: 8px;
    justify-self: end;
}

.site-footer__nav {
    justify-self: right;
    text-align: start;
}

.site-footer__heading {
    margin: 0 0 8px;
    color: #f8e7c4;
    font-size: 16px;
    font-weight: 700;
}

.site-footer__contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f8e7c4;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-footer__contact a:hover {
    color: var(--c-gold-bright);
}

.site-footer__contact .icon {
    width: 17px;
    height: 17px;
    color: var(--c-gold-bright);
}

.site-footer__links {
    display: grid;
    justify-items: start;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    color: #f8e7c4;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-footer__links a:hover {
    color: var(--c-gold-bright);
}

.site-footer__links a:focus-visible,
.site-footer__contact a:focus-visible,
.site-footer .brand:focus-visible {
    outline-color: var(--c-gold-bright);
}

.site-footer__bottom {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid rgba(242, 193, 78, 0.18);
    font-size: 14px;
    color: rgba(237, 226, 207, 0.6);
}

@media (max-width: 767px) {
    .site-footer {
        padding-top: 36px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer__about,
    .site-footer__nav,
    .site-footer__contact {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .site-footer__nav {
        text-align: left;
    }

    .site-footer__links {
        justify-items: start;
    }

    .site-footer__links {
        gap: 4px;
    }

    .site-footer__links a {
        min-height: 40px;
        padding-inline: 0;
        font-size: 14px;
    }

    .site-footer__contact a {
        white-space: normal;
    }

    .site-footer__bottom {
        margin-top: 36px;
    }
}

/* Motion preferences ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
