/* Gold Price Today Sri Lanka - black & gold theme */
/* Fonts (Playfair Display + Inter) are loaded via <link> in layout.php / error views, not @import, to avoid a request waterfall. */

:root {
    --bg: #08070a;
    --bg-alt: #100d0a;
    --surface: #161310;
    --surface-2: #1e1911;
    --border: #2b2419;
    --border-gold: rgba(212, 175, 55, 0.38);
    --gold: #d4af37;
    --gold-light: #f6d675;
    --gold-lighter: #ffefc2;
    --gold-deep: #8a6a1e;
    --text: #f7f1e3;
    --text-dim: #bfb3a0;
    --text-faint: #8c8072;
    --ok: #5fbf82;
    --warn: #e0a940;
    --error: #e2685f;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 12px 34px rgba(212, 175, 55, 0.16);
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scrollbar-color: var(--gold-deep) var(--bg-alt);
    scrollbar-width: thin;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(720px 420px at 50% -8%, rgba(212, 175, 55, 0.14), transparent 65%),
        radial-gradient(900px 500px at 100% 10%, rgba(212, 175, 55, 0.05), transparent 60%);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;
    background-image: repeating-linear-gradient(115deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 3px);
}

::selection {
    background: var(--gold);
    color: #0a0908;
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--gold-deep), var(--gold));
    border-radius: 6px;
    border: 2px solid var(--bg-alt);
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    display: block;
    padding-bottom: 48px;
}

a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
    color: var(--gold-lighter);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--text);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.005em;
    margin: 1.7em 0 0.6em;
}

h1 {
    font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem);
    margin-top: 0.8em;
}

h2 {
    font-size: 1.5rem;
    padding-top: 0.5em;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: "\25C6";
    color: var(--gold);
    font-size: 0.5em;
}

section.wrap > h1:first-child,
section.wrap > h2:first-child {
    border-top: none;
    padding-top: 0;
}

p {
    color: var(--text-dim);
    margin: 0.8em 0;
}

strong {
    color: var(--text);
}

ul, ol {
    color: var(--text-dim);
    padding-left: 1.4em;
}

li {
    margin: 0.35em 0;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    color: var(--gold-light);
    font-size: 0.9em;
}

/* --- Gold shimmer text (decorative headlines only) --- */

.brand,
.no-data h1,
.error-page h1 {
    background: linear-gradient(100deg, var(--gold-deep) 10%, var(--gold-light) 35%, var(--gold-lighter) 50%, var(--gold-light) 65%, var(--gold-deep) 90%);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -240% 0;
    }
}

/* --- Header --- */

.site-header {
    background: rgba(8, 7, 10, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 1px 0 rgba(212, 175, 55, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand:hover {
    text-decoration: none;
    filter: brightness(1.15);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.main-nav a {
    position: relative;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 12px;
    border-radius: 6px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--gold-light);
    text-decoration: none;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
}

/* --- Hero / price grid --- */

.hero {
    padding-top: 32px;
}

.lede {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 68ch;
    margin: 0.6em 0 1.2em;
}

.breadcrumb {
    color: var(--text-faint);
    font-size: 0.82rem;
    margin-bottom: 0.6em;
}

.breadcrumb a {
    color: var(--text-faint);
}

.as-of {
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-bottom: 1.2em;
}

.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-ok {
    background: rgba(95, 191, 130, 0.15);
    color: var(--ok);
    border: 1px solid rgba(95, 191, 130, 0.35);
}

.badge-ok::before {
    content: "\25CF";
    margin-right: 5px;
    font-size: 0.7em;
    animation: pulseDot 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.badge-warn {
    background: rgba(224, 169, 64, 0.15);
    color: var(--warn);
    border: 1px solid rgba(224, 169, 64, 0.35);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.price-grid.single {
    grid-template-columns: minmax(200px, 340px);
}

.price-card {
    position: relative;
    display: block;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    animation: cardIn 0.5s ease forwards;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-grid .price-card:nth-child(1) { animation-delay: 0.02s; }
.price-grid .price-card:nth-child(2) { animation-delay: 0.09s; }
.price-grid .price-card:nth-child(3) { animation-delay: 0.16s; }
.price-grid .price-card:nth-child(4) { animation-delay: 0.23s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.price-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--gold-deep));
}

.price-card:hover,
.price-card:focus-visible {
    transform: translateY(-4px) scale(1.015);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
    text-decoration: none;
}

.price-card .karat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0a0908;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.price-grid:not(.single) .price-card:nth-child(2) .karat::after {
    content: "Popular";
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold-light);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    padding: 2px 9px;
    background: rgba(212, 175, 55, 0.08);
}

.price-card .lkr {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gold-light);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.price-card .unit {
    color: var(--text-faint);
    font-size: 0.8rem;
    margin-top: 3px;
}

.price-card .sub {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 9px;
    font-variant-numeric: tabular-nums;
}

.spot-line {
    color: var(--text-faint);
    font-size: 0.85rem;
}

.no-data {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 34px 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.no-data::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--gold-deep));
}

.no-data h1 {
    margin-top: 0;
}

/* --- Chart --- */

canvas#price-chart {
    display: block;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 12px;
}

/* --- Calculator --- */

.calculator-section {
    margin-top: 10px;
}

.calculator {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 20px;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}

.calculator:focus-within {
    box-shadow: var(--shadow-gold);
}

.calculator label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.calc-result {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-light);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

#calc-output.pulse {
    animation: resultPulse 0.35s ease;
}

@keyframes resultPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.09); color: var(--gold-lighter); }
    100% { transform: scale(1); }
}

/* --- Forms (calculator, admin, etc.) --- */

input,
select,
textarea,
button {
    font-family: inherit;
    /* 16px minimum stops iOS Safari auto-zooming the page on focus */
    font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px 11px;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4af37' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

button,
input[type="submit"] {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
    color: #0a0908;
    font-weight: 700;
    border: none;
    border-radius: 7px;
    padding: 10px 20px;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.22);
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

button:not(.link-button)::before,
input[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 45%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
}

button:not(.link-button):hover::before,
input[type="submit"]:hover::before {
    animation: sheen 0.85s ease forwards;
}

@keyframes sheen {
    from { left: -75%; }
    to { left: 130%; }
}

button:hover,
input[type="submit"]:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.32);
}

button:active,
input[type="submit"]:active {
    transform: translateY(1px);
}

.link-button {
    background: none;
    box-shadow: none;
    color: var(--text-dim);
    font-weight: 500;
    padding: 4px 0;
    text-decoration: underline;
}

.link-button:hover {
    filter: none;
    box-shadow: none;
    color: var(--gold-light);
}

/* --- Tables --- */

.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
    text-align: left;
    padding: 11px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

.price-table th {
    color: var(--gold-light);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-2);
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-table tbody tr {
    transition: background 0.15s ease;
}

.price-table tbody tr:hover td {
    background: rgba(212, 175, 55, 0.06);
    color: var(--text);
}

.price-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--gold);
}

@media (max-width: 560px) {
    .price-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* --- FAQ --- */

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 8px;
    padding: 13px 17px;
    margin-bottom: 9px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.faq details:hover {
    border-color: var(--border-gold);
}

.faq details[open] {
    border-left-color: var(--gold);
    background: var(--surface-2);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::before {
    content: "+";
    display: inline-block;
    width: 1em;
    color: var(--gold);
    font-weight: 800;
    transition: transform 0.25s ease, color 0.25s ease;
}

.faq details[open] summary::before {
    transform: rotate(45deg);
    color: var(--gold-light);
}

.faq p {
    margin: 0.7em 0 0.2em 1.9em;
}

/* --- Misc content blocks --- */

.news-list {
    list-style: none;
    padding-left: 0;
}

.news-list li {
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
}

.news-list li:last-child {
    border-bottom: none;
}

.year-link {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 6px 14px;
    margin: 0 6px 6px 0;
    color: var(--gold-light);
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}

.year-link:hover {
    background: var(--surface-2);
    transform: translateY(-2px);
    text-decoration: none;
}

.method-steps li {
    margin: 0.55em 0;
}

.code-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px 17px;
    color: var(--gold-light);
    overflow-x: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
}

.fine-print {
    color: var(--text-faint);
    font-size: 0.8rem;
}

/* --- Alerts --- */

.alert {
    border-radius: var(--radius);
    padding: 17px 19px;
    margin: 1em 0;
    border: 1px solid transparent;
}

.alert-warn {
    background: rgba(224, 169, 64, 0.08);
    border-color: rgba(224, 169, 64, 0.35);
    color: var(--warn);
}

.alert-warn h2 {
    border-top: none;
    color: var(--warn);
    margin-top: 0;
}

.alert-warn h2::before {
    color: var(--warn);
}

.alert-error {
    background: rgba(226, 104, 95, 0.1);
    border-color: rgba(226, 104, 95, 0.4);
    color: var(--error);
    padding: 11px 17px;
}

.pending-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px 15px;
    margin-top: 11px;
}

.pending-item label {
    color: var(--text-dim);
    font-size: 0.9rem;
    display: block;
    margin: 8px 0;
}

/* --- Admin --- */

.admin-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.admin-bar h1 {
    margin: 0;
}

.admin-dashboard section {
    margin: 1.9em 0;
}

.admin-login {
    max-width: 400px;
    margin: 56px auto;
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-gold);
}

.admin-login h1 {
    margin-top: 0;
    text-align: center;
}

.admin-login form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.admin-login label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.log-lines {
    max-height: 320px;
    overflow-y: auto;
    color: var(--text-dim);
    font-size: 0.78rem;
    white-space: pre-wrap;
}

/* --- Error pages --- */

.error-page {
    text-align: center;
    padding: 90px 20px;
}

.error-page h1 {
    font-size: 2.6rem;
}

/* --- Footer --- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 44px;
    padding: 26px 0 42px;
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-footer p {
    font-size: 0.85rem;
    color: var(--text-faint);
    margin: 0.4em 0;
}

.site-footer a {
    color: var(--text-dim);
}

.site-footer a:hover {
    color: var(--gold-light);
}

/* --- Responsive --- */

@media (max-width: 640px) {
    .wrap {
        padding: 0 16px;
    }

    /* Header: brand on its own row, nav becomes a horizontally
       scrollable tab strip instead of wrapping mid-label. */
    .site-header .wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 12px;
        padding-bottom: 10px;
    }

    .main-nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        -webkit-mask-image: linear-gradient(to right, #000 94%, transparent 100%);
        mask-image: linear-gradient(to right, #000 94%, transparent 100%);
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
        padding: 10px 13px;
    }

    h1 {
        margin-top: 0.6em;
    }

    h2 {
        font-size: 1.3rem;
    }

    .no-data {
        padding: 24px 20px;
    }

    .calculator {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 16px;
    }

    .calc-result {
        margin-left: 0;
        text-align: right;
    }

    .price-card {
        padding: 17px 18px;
    }

    .admin-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Touch targets: comfortable minimum tap height on small screens */
    button,
    input[type="submit"] {
        min-height: 44px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select {
        min-height: 44px;
    }

    .admin-dashboard form button,
    .pending-item form button {
        width: 100%;
    }
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .price-card {
        opacity: 1;
    }
}

/* ==========================================================================
   Modern layer (v2): softer glass surfaces, larger radii, mobile-first
   app-style navigation. Overrides the base rules above.
   ========================================================================== */

:root {
    --radius: 18px;
    --radius-sm: 12px;
    --glass: rgba(26, 21, 15, 0.72);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

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

body {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body::after {
    display: none;
}

img, canvas, svg {
    max-width: 100%;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}

.site-header .wrap {
    flex-wrap: nowrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    white-space: nowrap;
}

.brand-mark {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold-lighter), var(--gold) 55%, var(--gold-deep));
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.main-nav a {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 8px 14px;
}

.main-nav a:hover {
    background: rgba(212, 175, 55, 0.1);
}

.main-nav a::after {
    display: none;
}

/* Headings */
h2 {
    border-top: none;
    padding-top: 0;
    margin-top: 2.2em;
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
}

/* Hero */
.hero {
    padding-top: 28px;
}

.hero h1 {
    font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.6rem);
    letter-spacing: -0.01em;
}

.as-of {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 0.85rem;
}

.badge {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.78rem;
}

/* Price cards */
.price-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.price-card {
    border-radius: var(--radius);
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(212, 175, 55, 0.12), transparent 60%),
        linear-gradient(160deg, var(--surface), var(--surface-2));
    border-color: var(--border);
    padding: 18px 18px 16px;
}

.price-card:hover,
.price-card:focus-visible {
    transform: translateY(-3px);
}

.price-card .lkr {
    font-size: clamp(1.15rem, 0.9rem + 1vw, 1.6rem);
    white-space: nowrap;
}

.price-grid:not(.single) .price-card:nth-child(2) {
    border-color: var(--border-gold);
}

.price-grid:not(.single) .price-card:nth-child(2) .karat::after {
    top: 12px;
    right: 12px;
}

/* Chart, calculator, tables, details */
canvas#price-chart,
.calculator,
.price-table,
.no-data {
    border-color: var(--border);
    border-radius: var(--radius);
}

.calculator {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: end;
    gap: 16px;
}

.calculator label > input,
.calculator label > select {
    width: 100%;
}

.calculator label select + input,
.calculator label input + select {
    margin-top: 6px;
}

.calc-result {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 14px;
    border-top: 1px dashed var(--border-gold);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
}

.calc-result::before {
    content: "Estimated value";
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-faint);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    min-height: 46px;
    border-radius: var(--radius-sm);
}

button,
input[type="submit"] {
    border-radius: var(--radius-sm);
    min-height: 46px;
}

.faq details {
    border-radius: var(--radius-sm);
}

.faq summary {
    min-height: 28px;
}

.year-link {
    border-radius: 999px;
    padding: 9px 16px;
}

/* App-style bottom tab bar (mobile only) */
.tabbar {
    display: none;
}

@media (max-width: 760px) {
    .main-nav {
        display: none;
    }

    .site-header .wrap {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    body {
        padding-bottom: calc(68px + var(--safe-b));
    }

    .tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: 6px 6px calc(6px + var(--safe-b));
        background: rgba(12, 10, 8, 0.88);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-gold);
    }

    .tabbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        border-radius: 12px;
        color: var(--text-faint);
        font-size: 0.68rem;
        font-weight: 600;
    }

    .tabbar a:hover,
    .tabbar a:active,
    .tabbar a:focus-visible {
        color: var(--gold-light);
        background: rgba(212, 175, 55, 0.1);
        text-decoration: none;
    }

    .tabbar svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .site-footer {
        margin-top: 28px;
    }

    .price-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .price-card {
        padding: 14px;
    }

    .price-card .sub {
        font-size: 0.75rem;
    }

    .price-grid:not(.single) .price-card:nth-child(2) .karat::after {
        display: none;
    }

    .calculator {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    /* Stacked "card" rows instead of sideways-scrolling tables */
    .price-table.stack,
    .price-table.stack thead,
    .price-table.stack tbody,
    .price-table.stack tr,
    .price-table.stack td {
        display: block;
        white-space: normal;
    }

    .price-table.stack {
        background: none;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .price-table.stack thead {
        display: none;
    }

    .price-table.stack tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 10px;
        padding: 6px 0;
    }

    .price-table.stack td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border: none;
        padding: 8px 14px;
    }

    .price-table.stack td::before {
        content: attr(data-label);
        color: var(--text-faint);
        font-size: 0.8rem;
    }

    .price-table.stack tbody tr:hover td:first-child {
        box-shadow: none;
    }

    .lede {
        font-size: 1rem;
    }
}

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

@media (min-width: 761px) and (max-width: 980px) {
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   v3: price spotlight, chart range tabs, theme toggle, light theme
   ========================================================================== */

:root {
    --chart-grid: rgba(212, 175, 55, 0.12);
    --chart-tip: rgba(16, 13, 10, 0.94);
    --up: #5fbf82;
    --down: #e2685f;
}

.spotlight {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 24px;
    margin: 6px 0 18px;
    padding: 22px 24px;
    border-radius: 22px;
    border: 1px solid var(--border-gold);
    background:
        radial-gradient(90% 140% at 0% 0%, rgba(212, 175, 55, 0.20), transparent 60%),
        linear-gradient(160deg, var(--surface-2), var(--surface));
    box-shadow: var(--shadow-gold);
    overflow: hidden;
}

.spotlight::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 214, 117, 0.25), transparent 70%);
    pointer-events: none;
}

.spot-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.spot-price {
    font-size: clamp(2.1rem, 1.3rem + 4.2vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(100deg, var(--gold-light), var(--gold-lighter) 50%, var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.spot-price small {
    font-size: 0.4em;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--gold);
    -webkit-text-fill-color: var(--gold);
}

.chg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}

.chg-note {
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0.75;
}

.chg-up { color: var(--up); background: rgba(95, 191, 130, 0.12); border-color: rgba(95, 191, 130, 0.35); }
.chg-down { color: var(--down); background: rgba(226, 104, 95, 0.12); border-color: rgba(226, 104, 95, 0.35); }
.chg-flat { color: var(--text-dim); background: rgba(255, 255, 255, 0.05); border-color: var(--border); }

/* Segmented range control */
.chart-tools {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.seg {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.seg-btn {
    min-height: 34px;
    padding: 4px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    background: none;
    color: var(--text-dim);
    box-shadow: none;
}

.seg-btn::before {
    display: none;
}

.seg-btn:hover {
    filter: none;
    box-shadow: none;
    color: var(--gold-light);
}

.seg-btn.is-active {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #0a0908;
}

/* Theme toggle */
.theme-toggle {
    flex: none;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
    box-shadow: none;
}

.theme-toggle::before {
    display: none;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.site-header .wrap {
    gap: 12px;
}

.main-nav {
    margin-left: auto;
}

/* Light theme */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #faf7f0;
    --bg-alt: #f2ede1;
    --surface: #ffffff;
    --surface-2: #fbf6e8;
    --border: #e7dfcb;
    --border-gold: rgba(168, 128, 20, 0.40);
    --gold: #b8860b;
    --gold-light: #9a6f08;
    --gold-lighter: #7a5805;
    --gold-deep: #c9a24a;
    --text: #1f1a10;
    --text-dim: #5b5242;
    --text-faint: #857a66;
    --ok: #2f8a56;
    --warn: #a9740a;
    --error: #c0392b;
    --up: #2f8a56;
    --down: #c0392b;
    --shadow: 0 6px 22px rgba(90, 70, 20, 0.10);
    --shadow-gold: 0 10px 28px rgba(184, 134, 11, 0.16);
    --chart-grid: rgba(120, 90, 20, 0.14);
    --chart-tip: rgba(255, 255, 255, 0.96);
}

:root[data-theme="light"] body::before {
    background: radial-gradient(720px 420px at 50% -8%, rgba(212, 175, 55, 0.18), transparent 65%);
}

:root[data-theme="light"] .site-header {
    background: rgba(250, 247, 240, 0.85);
}

:root[data-theme="light"] .tabbar {
    background: rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .brand,
:root[data-theme="light"] .no-data h1,
:root[data-theme="light"] .error-page h1 {
    background-image: linear-gradient(100deg, #8a6a1e 10%, #c9a24a 50%, #8a6a1e 90%);
}

:root[data-theme="light"] .spot-price {
    background-image: linear-gradient(100deg, #8a6a1e, #b8860b 50%, #8a6a1e);
}

:root[data-theme="light"] .price-card .lkr,
:root[data-theme="light"] .calc-result {
    color: var(--gold-light);
}

:root[data-theme="light"] .price-card .karat,
:root[data-theme="light"] button,
:root[data-theme="light"] input[type="submit"],
:root[data-theme="light"] .seg-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, #d4a937, #b8860b);
}

:root[data-theme="light"] .seg-btn:not(.is-active),
:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .link-button {
    background: none;
    color: var(--text-dim);
}

:root[data-theme="light"] .theme-toggle {
    background: var(--surface);
    color: var(--gold-light);
}

:root[data-theme="light"] .badge-ok {
    background: rgba(47, 138, 86, 0.1);
    border-color: rgba(47, 138, 86, 0.35);
}

:root[data-theme="light"] ::selection {
    color: #fff;
}

@media (max-width: 760px) {
    .theme-toggle {
        margin-left: auto;
    }

    .spotlight {
        padding: 18px;
        border-radius: 18px;
    }

    .chg {
        font-size: 0.85rem;
    }
}

/* Centered hero text */
.hero h1,
.hero .lede,
.hero .as-of,
.hero .spot-line {
    text-align: center;
}

.hero .lede {
    margin-left: auto;
    margin-right: auto;
}

.hero .as-of {
    justify-content: center;
}

.spotlight {
    justify-content: center;
    text-align: center;
}

/* Language switcher + Sinhala/Tamil typography */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.lang-switch a {
    min-width: 34px;
    padding: 5px 9px;
    border-radius: 999px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.lang-switch a:hover {
    text-decoration: none;
    color: var(--gold-light);
}

.lang-switch a[aria-current] {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #0a0908;
}

html[lang="si-LK"] body {
    font-family: "Noto Sans Sinhala", var(--font);
    line-height: 1.8;
}

html[lang="ta-LK"] body {
    font-family: "Noto Sans Tamil", var(--font);
    line-height: 1.8;
}

html[lang="si-LK"] h1, html[lang="si-LK"] h2, html[lang="si-LK"] .price-card .karat,
html[lang="ta-LK"] h1, html[lang="ta-LK"] h2, html[lang="ta-LK"] .price-card .karat {
    font-family: inherit;
}

@media (max-width: 760px) {
    .site-header .wrap {
        gap: 8px;
    }

    .lang-switch {
        margin-left: auto;
    }

    .theme-toggle {
        margin-left: 0;
    }
}

/* ==========================================================================
   v3: header CTA, multi-column footer, advertise/contact page
   ========================================================================== */

/* Shared bits */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22); }
    50% { box-shadow: 0 0 0 7px rgba(212, 175, 55, 0); }
}

.gold-text {
    background: linear-gradient(100deg, var(--gold-lighter), var(--gold-light) 35%, var(--gold) 70%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

:root[data-theme="light"] .gold-text {
    background-image: linear-gradient(100deg, #7a5805, #b8860b 55%, #9a6f08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.98rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn svg,
.btn-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
    color: #0a0908;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.28);
}

.btn-gold:hover,
.btn-gold:focus-visible {
    color: #0a0908;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.38);
}

.btn-ghost {
    border: 1px solid var(--border-gold);
    color: var(--text);
    background: rgba(212, 175, 55, 0.05);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
}

.icon-badge {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(246, 214, 117, 0.2), rgba(138, 106, 30, 0.12));
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
}

.icon-badge svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.muted {
    color: var(--text-faint);
}

.table-scroll {
    overflow-x: auto;
}

/* Header CTA */
.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0a0908;
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
    white-space: nowrap;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    color: #0a0908;
    text-decoration: none;
    filter: brightness(1.08);
}

:root[data-theme="light"] .nav-cta,
:root[data-theme="light"] .btn-gold,
:root[data-theme="light"] .nav-cta:hover,
:root[data-theme="light"] .btn-gold:hover {
    color: #1f1a10;
}

@media (max-width: 760px) {
    .nav-cta {
        display: none;
    }
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.035));
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 26px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.site-footer .footer-about p {
    max-width: 34ch;
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.site-footer .footer-about .brand {
    color: var(--gold-light);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col h3 {
    margin: 0 0 4px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.site-footer .footer-col a {
    font-size: 0.9rem;
    color: var(--text-dim);
    width: fit-content;
}

.site-footer .footer-col a:hover {
    color: var(--gold-light);
    text-decoration: none;
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 26px 20px;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

/* Advertise / contact: hero */
.ad-hero {
    position: relative;
    padding: 18px 0 40px;
    overflow: hidden;
}

.ad-hero::before {
    content: "";
    position: absolute;
    top: -260px;
    right: -120px;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 65%);
    pointer-events: none;
}

.ad-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 44px;
    align-items: center;
}

.ad-hero h1 {
    font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem);
    letter-spacing: -0.015em;
    margin: 16px 0 14px;
}

.ad-hero .lede {
    max-width: 58ch;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.ad-hero-panel {
    position: relative;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--border-gold);
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    box-shadow: var(--shadow), var(--shadow-gold);
    overflow: hidden;
}

.panel-glow {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 214, 117, 0.25), transparent 70%);
}

.ad-hero-panel .panel-title {
    position: relative;
    margin: 0 0 18px;
    font-size: 1.2rem;
}

.stat-list {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.stat-list li {
    display: grid;
    grid-template-columns: 78px 1fr;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.stat-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-list strong {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1;
    color: var(--gold-light);
}

.stat-list span {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Contact cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.contact-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card .icon-badge {
    grid-row: 1 / 3;
}

a.contact-card:hover,
a.contact-card:focus-visible {
    color: var(--text);
    text-decoration: none;
    transform: translateY(-3px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.card-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.card-value {
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Section headings */
.section-head {
    margin: 64px 0 24px;
    text-align: center;
}

.section-head h2 {
    justify-content: center;
    margin: 12px 0 8px;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
}

.section-sub {
    max-width: 60ch;
    margin: 0 auto;
    color: var(--text-dim);
}

/* Packages */
.package-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 22px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.package-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.package-card.is-featured {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(150deg, var(--gold-light), transparent 45%, var(--gold-deep)) border-box;
    box-shadow: var(--shadow-gold);
}

.ribbon {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #0a0908;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

:root[data-theme="light"] .ribbon {
    color: #fff;
}

.package-card h3 {
    margin: 16px 0 8px;
    font-size: 1.15rem;
}

.package-card > p {
    margin: 0 0 14px;
    font-size: 0.92rem;
    color: var(--text-dim);
}

.check-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 8px;
    font-size: 0.88rem;
}

.check-list li {
    position: relative;
    padding-left: 24px;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.package-link {
    margin-top: auto;
    font-weight: 700;
    font-size: 0.92rem;
}

/* Audience chips */
.audience-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px dashed var(--border-gold);
}

.audience-title {
    font-weight: 700;
    color: var(--gold-light);
    margin-right: 4px;
}

.chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.86rem;
    color: var(--text-dim);
}

/* Enquiry form */
.enquiry-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 22px;
    margin-top: 64px;
    scroll-margin-top: 90px;
}

.enquiry-card {
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-gold);
    background: linear-gradient(170deg, var(--surface-2), var(--surface) 40%);
    box-shadow: var(--shadow);
}

.enquiry-card h2 {
    margin: 12px 0 22px;
}

.type-picker {
    border: none;
    margin: 0 0 20px;
    padding: 0;
    min-width: 0;
}

.type-picker legend,
.field > span {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dim);
}

.req {
    color: var(--gold);
}

.type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.type-option {
    position: relative;
    cursor: pointer;
}

.type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-option span {
    display: flex;
    align-items: center;
    min-height: 52px;
    height: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.type-option:hover span {
    border-color: var(--border-gold);
}

.type-option input:checked + span {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-light);
    box-shadow: inset 0 0 0 1px var(--gold);
}

.type-option input:focus-visible + span {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

.field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
    width: 100%;
}

.enquiry-form input[type="tel"],
.enquiry-form textarea {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    min-height: 46px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.enquiry-form textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.5;
}

.enquiry-form [aria-invalid="true"] {
    border-color: var(--error);
}

.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--error);
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 22px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 1rem;
}

.form-foot .fine {
    flex: 1 1 220px;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-faint);
}

.form-success,
.form-alert {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: var(--radius-sm);
}

.form-success {
    border: 1px solid rgba(95, 191, 130, 0.45);
    background: rgba(95, 191, 130, 0.1);
}

.form-success .icon-badge {
    color: var(--ok);
    border-color: rgba(95, 191, 130, 0.45);
    background: rgba(95, 191, 130, 0.12);
}

.form-success p {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.form-alert {
    border: 1px solid rgba(226, 104, 95, 0.45);
    background: rgba(226, 104, 95, 0.1);
    color: var(--text);
    font-weight: 600;
}

/* Enquiry sidebar */
.enquiry-side {
    display: grid;
    gap: 16px;
    align-content: start;
}

.side-card {
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.side-card h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.side-card-muted {
    background: var(--bg-alt);
}

.side-card-muted p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 48px;
    min-height: 34px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 800;
    color: #0a0908;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

:root[data-theme="light"] .steps li::before {
    color: #fff;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 38px;
    bottom: -16px;
    width: 2px;
    background: linear-gradient(var(--border-gold), transparent);
}

.steps strong {
    display: block;
}

.steps span {
    font-size: 0.88rem;
    color: var(--text-dim);
}

/* Support grid */
.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.help-item {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.help-item h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.help-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 980px) {
    .package-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ad-hero-grid,
    .enquiry-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .ad-hero {
        padding-bottom: 28px;
    }

    .help-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .type-options {
        grid-template-columns: 1fr 1fr;
    }

    .enquiry-card {
        padding: 22px 18px;
    }

    .section-head {
        margin-top: 48px;
    }
}

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

    .cta-row .btn {
        flex: 1 1 100%;
    }

    .ad-hero-panel {
        padding: 22px;
    }

    .stat-list li {
        grid-template-columns: 64px 1fr;
    }
}

/* Compact single-row header on phones */
@media (max-width: 760px) {
    .site-header .wrap {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .site-header .brand {
        min-width: 0;
        margin-right: auto;
        font-size: 1rem;
        gap: 8px;
    }

    .site-header .brand-mark {
        width: 22px;
        height: 22px;
    }

    .lang-switch a {
        min-width: 28px;
        padding: 4px 6px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        min-height: 34px;
    }
}

@media (max-width: 400px) {
    .site-header .brand {
        font-size: 0.9rem;
        white-space: normal;
        line-height: 1.15;
    }
}

/* Contact details: hours / company / social row and footer contact list */
.contact-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 26px;
    margin-top: 18px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.meta-item svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-links {
    display: inline-flex;
    gap: 8px;
}

.social-link {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-gold);
    background: var(--surface);
    color: var(--gold-light);
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.social-link:hover,
.social-link:focus-visible {
    transform: translateY(-2px);
    background: var(--gold);
    color: #0a0908;
    text-decoration: none;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.footer-contact {
    list-style: none;
    margin: 14px 0 14px;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.site-footer .social-links {
    margin-top: 2px;
}

.footer-contact li {
    margin: 0;
}

.contact-card .card-value {
    font-size: 0.95rem;
    overflow-wrap: break-word;
}

.contact-card .icon-badge {
    grid-row: 1 / span 3;
}

.card-note {
    grid-column: 2;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-faint);
}
