/* ==========================================================================
   Triples Theme - Main Stylesheet
   ========================================================================== */

/* @font-face: ABC Diatype
   ========================================================================== */
@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-thin-italic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-light-italic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-medium-italic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('../fonts/abc-diatype-bold-italic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* CSS Custom Properties
   ========================================================================== */
:root {
    /* Colors */
    --color-bg: #F8F5F1;
    --color-bg-alt: #F0ECE6;
    --color-text: #251E1A;
    --color-text-light: #6B6461;
    --color-accent: #251E1A;
    --color-border: #E5E2DD;
    --color-border-dark: #D1CEC9;
    --color-hover: #3D3530;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-error: #B44A4A;
    --color-success: #4A7B5A;
    --color-overlay: rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-primary: 'ABC Diatype', sans-serif;
    --font-heading: 'Amiri', serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 42px;
    --font-size-4xl: 56px;
    --line-height-tight: 1.2;
    --line-height-base: 1.6;
    --line-height-loose: 1.8;
    --letter-spacing-wide: 0.1em;
    --letter-spacing-wider: 0.15em;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    --spacing-2xl: 60px;
    --spacing-3xl: 80px;
    --spacing-4xl: 120px;

    /* Layout */
    --container-max: 95%;
    --container-padding: 24px;
    --header-height: 60px;
    --promo-bar-height: 32px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index */
    --z-header: 1000;
    --z-mega-menu: 1001;
    --z-mobile-menu: 2000;
    --z-cart-overlay: 9999;
    --z-cart-drawer: 10000;
    --z-cookie-banner: 9000;
    --z-newsletter-popup: 9500;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 300;
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

body.drawer-open,
body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-hover);
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border-radius: 0;
    -webkit-appearance: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: var(--line-height-tight);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

/* Layout
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.site-content {
    min-height: calc(100vh - var(--header-height));
}

/* Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background-color: var(--color-hover);
    border-color: var(--color-hover);
    color: var(--color-white);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-text);
}

.btn--secondary:hover {
    background-color: var(--color-text);
    color: var(--color-white);
}

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

.btn--underline {
    padding: 0;
    font-size: var(--font-size-base);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    border: none;
    border-bottom: 1px solid var(--color-text);
    display: inline;
    background: none;
    color: var(--color-text);
}

.btn--underline:hover {
    border-bottom-color: var(--color-hover);
    color: var(--color-hover);
}

/* Form Elements
   ========================================================================== */
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-text);
}

.form-input::placeholder {
    color: var(--color-text-light);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: 400;
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}

.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23251E1A' fill='none' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    border: 1px solid var(--color-border);
}

.form-select:focus {
    outline: none;
    border-color: var(--color-text);
}

/* Utility Classes
   ========================================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* Responsive
   ========================================================================== */
@media (max-width: 1199px) {
    :root {
        --container-padding: 20px;
    }
}

@media (max-width: 767px) {
    :root {
        --container-padding: 16px;
        --header-height: 56px;
    }

    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    h3 { font-size: var(--font-size-lg); }
}
