/* =============================================
   ARROWSMITH GROUP — Base Reset & Defaults v2.0
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&family=Syne:wght@400;500;600;700;800&display=swap');

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none;
}

/* ---- Custom Cursor ---- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    background: var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-expo),
        height 0.3s var(--ease-out-expo),
        background 0.3s var(--ease-out-expo),
        opacity 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cursor-ring-size);
    height: var(--cursor-ring-size);
    border: 1.5px solid rgba(197, 165, 90, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo),
        height 0.4s var(--ease-out-expo),
        border-color 0.3s ease,
        opacity 0.3s ease;
}

.cursor-dot.hovering {
    width: 60px;
    height: 60px;
    background: rgba(197, 165, 90, 0.15);
    mix-blend-mode: normal;
}

.cursor-ring.hovering {
    width: 80px;
    height: 80px;
    border-color: var(--color-gold);
    opacity: 0.6;
}

.cursor-dot.text-hover {
    width: 6px;
    height: 6px;
    background: var(--color-gold);
    mix-blend-mode: normal;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-light));
    z-index: 10000;
    transition: none;
}

/* ---- Noise / Film Grain Overlay ---- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.035;
    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: 200px 200px;
    /* animation: grain 0.5s steps(1) infinite; — disabled, causes visible flicker */
}

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

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

button {
    cursor: none;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--color-gold);
    color: var(--color-bg-primary);
}

/* Elegant scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-gold-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Focus styles */
:focus-visible {
    outline: 1px solid var(--color-gold);
    outline-offset: 4px;
}

/* Custom select styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-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' stroke='%23c5a55a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 20px;
    cursor: none;
}

select.form-input option {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    padding: 8px;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Touch devices — show normal cursor */
@media (hover: none) {

    body,
    a,
    button {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}