/* ==========================================================================
   _base.css
   Global resets, element styles, and Strata typography.
   Implements base layer against Luma's DOM contract.
   ========================================================================== */

/* Google Fonts CDN — Cinzel (brand), Playfair Display (headings), Raleway (UI/body) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Raleway:wght@300;400;500;600;700&display=swap');


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

html {
    font-size: var(--font-size, 16px);
    -webkit-text-size-adjust: 100%;
}

/* Page shell */
body {
    background: var(--color-bg, #F5F0E8);
    font-family: var(--font-sans, 'Outfit', system-ui, -apple-system, sans-serif);
    font-size: var(--text-base, 0.875rem);
    font-weight: var(--font-weight-normal, 400);
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--color-text, #1C1612);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Page containers */
.page-wrapper,
.page-main {
    background: var(--color-bg, #F5F0E8);
}

/* Selection highlight */
::selection {
    background: var(--gold-light, #D4A85C);
    color: var(--obsidian, #1C1612);
}

::-moz-selection {
    background: var(--gold-light, #D4A85C);
    color: var(--obsidian, #1C1612);
}

/* Heading scale — Strata typography (Playfair Display for h1–h3) */
h1, h2, h3 {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text, #1C1612);
    margin-top: 0;
    margin-bottom: var(--sp-3, 0.75rem);
}

h1 {
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: -0.005em;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.2;
}

h4, h5, h6 {
    font-family: var(--font-sans, 'Outfit', system-ui, sans-serif);
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text, #1C1612);
    margin-top: 0;
    margin-bottom: var(--sp-2, 0.5rem);
}

h4 {
    font-size: 1.375rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
    font-weight: var(--font-weight-medium, 500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted, #7A6A52);
}

/* Paragraphs and body text */
p {
    margin-top: 0;
    margin-bottom: var(--sp-4, 1rem);
    line-height: 1.65;
}

/* Links */
a {
    color: var(--color-link, #B8893A);
    text-decoration: none;
    transition: color var(--motion-duration-fast, 0.15s) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.5, 1));
}

a:hover {
    color: var(--color-link-hover, #8B6220);
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--ring, #B8893A);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Brand mark — Cinzel with wide tracking */
.brand,
.logo,
.page-header .header-logo {
    font-family: var(--font-family-brand, 'Cinzel', 'Times New Roman', serif);
    letter-spacing: 0.12em;
}

/* Product item name word break */
.product-item-name {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Lists */
ul, ol {
    margin-top: 0;
    margin-bottom: var(--sp-4, 1rem);
    padding-left: var(--sp-5, 1.25rem);
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: var(--sp-1, 0.25rem);
}

/* Immediate headings reset (Magento uses a .page-title wrapper) */
.page-title-wrapper h1 {
    font-size: 2rem;
    margin-bottom: var(--sp-2, 0.5rem);
}

/* Strong and emphasis */
strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Figure (for product media) */
figure {
    margin: 0;
}

figcaption {
    font-size: var(--text-sm, 0.8125rem);
    color: var(--color-text-muted, #7A6A52);
    margin-top: var(--sp-2, 0.5rem);
    text-align: center;
}

/* Horizontal rule — gold divider */
hr {
    border: none;
    border-top: 1px solid var(--border, rgba(28, 22, 18, 0.1));
    margin: var(--sp-6, 1.5rem) 0;
}

hr.gold-divider {
    border-top-color: var(--gold, #B8893A);
    opacity: 0.4;
}

/* Table defaults (Magento pages use .table) */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base, 0.875rem);
}

th {
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border, rgba(28, 22, 18, 0.1));
    padding: var(--sp-2, 0.5rem) var(--sp-3, 0.75rem);
}

td {
    padding: var(--sp-2, 0.5rem) var(--sp-3, 0.75rem);
    border-bottom: 1px solid var(--border, rgba(28, 22, 18, 0.1));
}

/* Blockquote */
blockquote {
    margin: var(--sp-4, 1rem) 0;
    padding: var(--sp-3, 0.75rem) var(--sp-4, 1rem);
    border-left: 3px solid var(--gold, #B8893A);
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-style: italic;
    color: var(--color-text-muted, #7A6A52);
    background: var(--card, #FDFAF4);
    border-radius: 0 var(--radius-sm, 0.5rem) var(--radius-sm, 0.5rem) 0;
}

/* Code */
code, kbd, samp, pre {
    font-family: var(--font-mono, ui-monospace, 'SF Mono', 'Fira Code', monospace);
    font-size: 0.9em;
}

code {
    background: rgba(28, 22, 18, 0.06);
    padding: 0.125em 0.4em;
    border-radius: 4px;
}

pre {
    background: var(--card, #FDFAF4);
    border: 1px solid var(--border, rgba(28, 22, 18, 0.1));
    padding: var(--sp-4, 1rem);
    border-radius: var(--radius-md, 0.75rem);
    overflow-x: auto;
}

/* Fieldset/legend (Magento forms) */
fieldset {
    border: 1px solid var(--border, rgba(28, 22, 18, 0.1));
    border-radius: var(--radius-md, 0.75rem);
    padding: var(--sp-4, 1rem);
    margin-bottom: var(--sp-4, 1rem);
}

legend {
    font-weight: 600;
    font-family: var(--font-sans, 'Outfit', system-ui, sans-serif);
    padding: 0 var(--sp-2, 0.5rem);
    color: var(--color-text, #1C1612);
}

/* Label */
label {
    font-family: var(--font-sans, 'Outfit', system-ui, sans-serif);
    font-size: var(--text-sm, 0.8125rem);
    font-weight: var(--font-weight-medium, 500);
    line-height: 1.5;
    color: var(--color-text, #1C1612);
    margin-bottom: var(--sp-1, 0.25rem);
    display: inline-block;
}

/* Subheadings utility */
.subhead {
    font-family: var(--font-sans, 'Outfit', system-ui, sans-serif);
    font-size: var(--text-sm, 0.8125rem);
    font-weight: var(--font-weight-medium, 500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold, #B8893A);
    margin-bottom: var(--sp-2, 0.5rem);
    display: block;
}

/* Button base (non-action classes) */
button {
    font-family: var(--font-sans, 'Outfit', system-ui, sans-serif);
    cursor: pointer;
}

button:disabled,
button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive type scaling */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.375rem;
    }
    h4 {
        font-size: 1.25rem;
    }
    .page-title-wrapper h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }
    .page-title-wrapper h1 {
        font-size: 1.5rem;
    }
}
