/* ============================================
   BUKSTUDIO - Main Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-bg-primary: #FDF8E4;
  --color-bg-secondary: #FFFDF9;
  --color-text-primary: #342c2c;
  --color-text-secondary: #6B5B55;
  --color-accent-primary: #a03f52;
  --color-accent-primary-hover: #8b3040;
  --color-accent-secondary: #F27A3A;
  --color-accent-secondary-hover: #d96828;
  --color-border: #E0D5C7;
  --color-error: #D64545;
  --color-success: #F27A3A;
  --color-warning: #E5A84B;
  --color-white: #FFFFFF;
  --color-black: #1A1A1A;

  /* Typography */
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Raleway', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(61, 44, 41, 0.05);
  --shadow-md: 0 4px 6px rgba(61, 44, 41, 0.07);
  --shadow-lg: 0 10px 15px rgba(61, 44, 41, 0.1);
  --shadow-xl: 0 20px 25px rgba(61, 44, 41, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-tooltip: 600;

  /* Container */
  --container-max: 1280px;
  --container-padding: var(--space-4);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

p {
  margin-bottom: var(--space-4);
}

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

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

.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;
}

/* --- Typography --- */
.heading-1 {
  font-size: var(--text-3xl);
  font-weight: 700;
}

.heading-2 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

.heading-3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

.heading-4 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-accent {
  color: var(--color-accent-primary);
}

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

/* --- Layout --- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

.section {
  padding: var(--space-12) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* --- Responsive Breakpoints --- */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-6);
  }

  .heading-1 {
    font-size: var(--text-4xl);
  }

  .heading-2 {
    font-size: var(--text-3xl);
  }

  .section-title {
    font-size: var(--text-4xl);
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-8);
  }

  .heading-1 {
    font-size: var(--text-5xl);
  }

  .section {
    padding: var(--space-16) 0;
  }
}

/* Mobile grid adjustments */
@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-1-mobile {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
