/* ==========================================================================
   Frasso Studio — Main Stylesheet & Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Sora:wght@300;400;500;600&display=swap');

:root {
  /* Architectural Color Palette */
  --wool: #f6f2eb;
  --linen: #e8e2d9;
  --slate: #302620;
  --walnut: #6b5a48;
  --oak: #948270;
  --sand: #dfd9cf;
  --flax: #bfae99;
  --lichen: #8c826b;

  --color-bg: var(--wool);
  --color-text: var(--slate);
  --color-text-sub: var(--walnut);
  --color-text-caption: var(--oak);
  --color-border: rgba(48, 38, 32, 0.12);
  --color-border-subtle: rgba(48, 38, 32, 0.07);
  --hairline-on-dark: rgba(255, 255, 255, 0.12);
  --seam-on-dark: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-accent: 'Inter', sans-serif;

  --leading-tight: 1.15;
  --leading-body: 1.6;

  /* Animation & Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-quick: 0.15s;
  --duration-fast: 0.25s;
  --duration-mid: 0.5s;
  --duration-slow: 0.85s;

  /* Spacing & Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Z-Index Hierarchy */
  --z-base: 1;
  --z-sticky: 10;
  --z-nav: 90;
  --z-drawer: 95;
  --z-overlay: 100;
  --z-preloader: 200;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--leading-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  position: relative;
}

/* Global Container Utility */
.container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(24px, 5vw, 60px);
  padding-right: clamp(24px, 5vw, 60px);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  background: var(--slate);
  color: var(--wool);
  padding: 12px 20px;
  z-index: 9999;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 24px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p {
  font-weight: 300;
  line-height: var(--leading-body);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}

img, picture, video {
  max-width: 100%;
  display: block;
}

/* Preloader & Page Transition */
.site-preloader {
  position: fixed;
  inset: 0;
  background-color: var(--wool);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-preloader);
  opacity: 1;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
  pointer-events: none;
}
.site-preloader.dismissed {
  opacity: 0;
  visibility: hidden;
}
.preloader-mark {
  color: var(--slate);
  animation: preloaderPulse 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}
@keyframes preloaderPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* Global Scroll Reveal & Entrance Elements */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  will-change: opacity, transform;
}
.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
