/* =============================================
TWICHELL'S TIPI - BASE STYLES
Modern CSS Reset & Essential Defaults
============================================= */

/* ----- CSS CUSTOM PROPERTIES (Theme) ----- */

:root {
    /* Colors */
    --color-primary: #1a1a1a;
    --color-secondary: #c9a961;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-text-light: rgba(255, 255, 255, 0.8);
    --color-border: #e0e0e0;
    --color-background: #ffffff;
    --color-background-alt: #f8f9fa;
    
    /* Typography */
    --font-family-base: 'arno-pro-display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-weight-base: 300;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3.5rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    
    /* Border radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 9999px;
    
    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 1000;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1100;
}

/* ----- MODERN CSS RESET ----- */   

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

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}    

/* Remove default margin and padding */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
    margin: 0;
    padding: 0;
}    

/* Remove list styles on ul, ol elements */
ul,
ol {
    list-style: none;
}    

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.6;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-base);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}    

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
label {
    line-height: 1.2;
}    

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
    font-weight: 400;
    margin-bottom: 0.5rem;
}  


p {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}  

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}    

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}    

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}    

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}    

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}    

/* Remove all animations, transitions and smooth scroll for reduced motion */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }    
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }    
}    

/* ----- TYPOGRAPHY ----- */

h1 {
    font-size: var(--font-size-3xl);
    letter-spacing: 0.02em;
}

h2 {
    font-size: var(--font-size-2xl);
    letter-spacing: 0.02em;
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

h5 {
    font-size: var(--font-size-base);
}

h6 {
    font-size: var(--font-size-sm);
}

p {
    margin-bottom: var(--spacing-md);
}

p:last-child {
    margin-bottom: 0;
}

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

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

/* ----- BUTTONS ----- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-xs);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

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

.btn-outline-dark {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

/* ----- FORM ELEMENTS ----- */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

/* ----- UTILITIES ----- */

.sr-only {
    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: 2px;
}

/* ----- BLAZOR SPECIFIC ----- */

.blazor-error-boundary {
    background: #b32121;
    padding: var(--spacing-md);
    color: white;
}

.blazor-error-boundary::after {
    content: 'An error has occurred.';
}

#blazor-error-ui {
    display: none;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.text-component.pretty-center {
	text-align: center;
}

.text-component.pretty-center p {
	max-width: 72ch;
	margin-left: auto;
	margin-right: auto;
}