/* ============================================
   STUDIO DA — Global Design System
   Premium Architecture Website 2026
   ============================================ */

/* --- Self-Hosted Fonts --- */

/* DM Serif Display — Regular (latin-ext) */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dm-serif-display-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* DM Serif Display — Regular (latin) */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dm-serif-display-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Serif Display — Italic (latin-ext) */
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dm-serif-display-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* DM Serif Display — Italic (latin) */
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dm-serif-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Weight 300 (latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Weight 300 (latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Weight 400 (latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Weight 400 (latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Weight 500 (latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Weight 500 (latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Weight 600 (latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Weight 600 (latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Weight 700 (latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — Weight 700 (latin) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

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

ul, ol {
  list-style: none;
}

/* --- Design Tokens --- */
:root {
  /* Colors — Warm Architectural Palette (Daniel Neumann Style) */
  --color-bg: #F7F5F2;
  --color-bg-alt: #EFEDE8;
  --color-bg-dark: #1A1A1A;
  --color-bg-darker: #141414;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #FFFFFF;

  --color-text: #1D1D1B;
  --color-text-secondary: #5C5854;
  --color-text-tertiary: #716B66;
  --color-text-on-dark: #FAFAF8;
  --color-text-on-dark-secondary: rgba(250,250,248,0.7);

  --color-accent: #B08968;
  --color-accent-hover: #C49B7C;
  --color-accent-light: rgba(176,137,104,0.10);
  --color-accent-glow: rgba(176,137,104,0.18);
  --color-gold: #B08968;

  --color-border: rgba(0,0,0,0.06);
  --color-border-strong: rgba(0,0,0,0.12);
  --color-border-on-dark: rgba(250,250,248,0.12);

  --color-success: #4A7C59;
  --color-error: #C45A5A;
  --color-overlay: rgba(0,0,0,0.55);
  --color-glass: rgba(255,255,255,0.82);
  --color-glass-dark: rgba(20,20,20,0.78);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-hero: clamp(3.2rem, 8vw, 7.5rem);
  --text-h1: clamp(2.5rem, 5vw, 4.5rem);
  --text-h2: clamp(1.8rem, 3.5vw, 3rem);
  --text-h3: clamp(1.3rem, 2vw, 1.75rem);
  --text-h4: clamp(1.1rem, 1.5vw, 1.35rem);
  --text-body: clamp(1rem, 1.1vw, 1.125rem);
  --text-body-lg: clamp(1.1rem, 1.3vw, 1.25rem);
  --text-small: 0.875rem;
  --text-caption: 0.8125rem;
  --text-overline: 0.75rem;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  --tracking-tight: -0.03em;
  --tracking-normal: -0.01em;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.15em;

  /* Spacing Scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  --space-6xl: 12rem;

  --section-pad: clamp(5rem, 10vh, 10rem);
  --container-max: 1320px;
  --container-narrow: 900px;
  --container-wide: 1600px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 40px var(--color-accent-glow);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.06);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);

  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;
  --duration-slowest: 1200ms;

  /* Z-index Scale */
  --z-base: 0;
  --z-above: 10;
  --z-nav: 100;
  --z-modal: 200;
  --z-cookie: 250;
  --z-toast: 300;
  --z-cursor: 400;
}

/* --- Base Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  letter-spacing: var(--tracking-normal);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-hero {
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h1, .text-h1 { font-size: var(--text-h1); }
h2, .text-h2 { font-size: var(--text-h2); }
h3, .text-h3 { font-size: var(--text-h3); }
h4, .text-h4 { font-size: var(--text-h4); font-family: var(--font-body); font-weight: 600; }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.overline {
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}

/* --- Layout Utilities --- */
.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);
}

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

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.section--dark p {
  color: var(--color-text-on-dark-secondary);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.grid {
  display: grid;
  gap: var(--gutter);
}

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

@media (max-width: 1024px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.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-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Scroll Reveal Animations --- */
.reveal,
.reveal--left,
.reveal--right,
.reveal--scale {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) translateZ(0);
  transition: opacity 650ms var(--ease-out),
              transform 650ms var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-30px) translateZ(0);
  transition: opacity 650ms var(--ease-out),
              transform 650ms var(--ease-out);
}

.reveal--left.visible {
  opacity: 1;
  transform: translateX(0) translateZ(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(30px) translateZ(0);
  transition: opacity 650ms var(--ease-out),
              transform 650ms var(--ease-out);
}

.reveal--right.visible {
  opacity: 1;
  transform: translateX(0) translateZ(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.96) translateZ(0);
  transition: opacity 650ms var(--ease-out),
              transform 650ms var(--ease-out);
}

.reveal--scale.visible {
  opacity: 1;
  transform: scale(1) translateZ(0);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--right, .reveal--scale {
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Page Transition --- */
.page-transition {
  opacity: 0;
  animation: pageIn 0.35s var(--ease-out) forwards;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Selection --- */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}

/* --- Scrollbar (subtle) --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Utility Classes --- */
.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-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-tertiary); }
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* --- Image Treatments --- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform var(--duration-slow) var(--ease-out);
}

.img-zoom:hover img {
  transform: scale(1.06);
}

/* --- Divider --- */
.divider {
  width: 48px;
  height: 1.5px;
  background: var(--color-accent);
  border: none;
  margin: var(--space-lg) 0;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Gradient Overlays --- */
.overlay-gradient-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(44,44,44,0.85), transparent);
  pointer-events: none;
}

.overlay-gradient-full::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,44,44,0.7), rgba(44,44,44,0.3));
  pointer-events: none;
}

/* --- Loading Shimmer --- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--color-bg-alt) 25%,
    var(--color-surface) 50%,
    var(--color-bg-alt) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* --- Smooth Counter --- */
.counter-value {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1;
  display: inline-block;
  min-width: 2ch;
}
