/* ==========================================================================
   DERMIS 365 PURE - GLOBAL DESIGN SYSTEM TOKENS & BASE STYLES
   Global base stylesheet: /css/global.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & ROOT VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Luxury Warm Gold & Rich Charcoal */
  --color-gold-primary: #CDAD7B;
  --color-gold-hover: #B89663;
  --color-gold-light: #F4ECE1;
  --color-gold-muted: rgba(205, 173, 123, 0.15);
  
  --color-charcoal-dark: #4E5B4C;
  --color-charcoal-card: #3F4C3E;
  --color-charcoal-border: #5F705E;
  
  --color-cream-bg: #FAF8F5;
  --color-surface-white: #FFFFFF;
  --color-surface-card: #FFFFFF;
  
  --color-text-dark: #1C1D1F;
  --color-text-body: #373A40;
  --color-text-muted: #4A4E57;
  --color-text-light: #F3F4F6;
  --color-text-light-muted: rgba(255, 255, 255, 0.88);
  
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #20BA5A;
  --color-border-light: #E8E5DF;
  --color-border-dark: rgba(255, 255, 255, 0.1);

  /* Surface 4: Award-Winning Grainy Warm Gold Atmosphere */
  --color-gold-bg: #F5EFE6;
  --bg-grainy-gold: radial-gradient(circle at 50% 0%, #FAF4EB 0%, #F3EBE0 60%, #EADECF 100%),
                    radial-gradient(circle at 100% 100%, rgba(205, 173, 123, 0.12) 0%, transparent 60%),
                    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  
  /* Typography Stacks */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spatial & Scale Systems */
  --container-max-width: 1280px;
  --header-height: 84px;
  --topbar-height: 40px;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  
  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-luxury: 0 20px 50px rgba(205, 173, 123, 0.12);
  --shadow-dark: 0 20px 40px rgba(0, 0, 0, 0.4);
  
  /* Motion & Physics */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-smooth);
  --transition-normal: 0.35s var(--ease-smooth);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-body);
  background-color: var(--color-surface-white);
  overflow-x: clip;
  position: relative;
  width: 100%;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-dark);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h4 { font-size: clamp(1.2rem, 1.6vw, 1.5rem); }

em {
  font-style: italic;
  color: var(--color-gold-primary);
  font-weight: 400;
}

.wrap {
  width: 90%;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.sup {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold-primary);
  margin-bottom: 12px;
}

.sec-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.sec-head p {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* Section Background Variations */
.sec-wh {
  padding: 100px 0;
  background-color: var(--color-surface-white);
}

.sec-bg {
  padding: 100px 0;
  background-color: var(--color-cream-bg);
}

.sec-dk {
  padding: 100px 0;
  background-color: var(--color-charcoal-dark);
  color: var(--color-text-light);
}

.sec-dk h2, .sec-dk h3, .sec-dk h4 {
  color: var(--color-text-light);
}

/* 4th Theme Background: 2027 Award-Winning Luxury Warm Gold & Champagne Atmosphere */
.sec-gd {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background-color: #F4EBE0;
  background-image: 
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(255, 255, 255, 0.95) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 85% 20%, rgba(205, 173, 123, 0.42) 0%, transparent 65%),
    radial-gradient(ellipse 70% 80% at 10% 80%, rgba(184, 150, 99, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 90% 90% at 50% 50%, #FAF0E3 0%, #EBDBC8 55%, #DFCAAF 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--color-text-dark);
}

.sec-gd::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 30%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(205, 173, 123, 0.08) 45%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: auraGlow 18s ease-in-out infinite alternate;
}

.sec-gd::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(205, 173, 123, 0.15) 0%, rgba(78, 91, 76, 0.05) 50%, transparent 75%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.sec-gd > .wrap,
.sec-gd > .container {
  position: relative;
  z-index: 1;
}

@keyframes auraGlow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-5%, 8%) scale(1.12);
    opacity: 0.95;
  }
}

/* --------------------------------------------------------------------------
   3. BUTTONS & INTERACTIVE ELEMENTS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-gold-primary, #CDAD7B);
  color: #1A1A1A;
  box-shadow: 0 8px 20px rgba(205, 173, 123, 0.25);
  border: none;
}

.btn-primary:hover {
  background: var(--color-gold-hover, #B89663);
  color: #1A1A1A;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(205, 173, 123, 0.35);
}

.btn-alt {
  background: var(--color-gold-primary);
  color: #1A1A1A;
  box-shadow: 0 8px 20px rgba(205, 173, 123, 0.25);
}

.btn-alt:hover {
  background: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(205, 173, 123, 0.35);
}

.btn-call {
  background: var(--color-surface-white);
  color: var(--color-text-dark);
  border: 1px solid var(--color-border-light);
}

.btn-call:hover {
  border-color: var(--color-gold-primary);
  color: var(--color-gold-primary);
  transform: translateY(-2px);
}

.btn-wa {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
}

.btn-wa:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.3);
}

/* Master Unified Hero Large Button Specs */
.btn-hero-lg,
.btn-alt.btn-hero-lg,
.btn-wa.btn-hero-lg {
  padding: 16px 36px !important;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  border-radius: var(--radius-pill, 9999px) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}
/* ==========================================================================
   DERMIS 365 PURE - LIVE ON-PAGE PARAMETER EDITING STYLES
   ========================================================================== */

body.dermis-live-editing [contenteditable="true"] {
  outline: 1px dashed rgba(205, 173, 123, 0.5) !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
  cursor: text !important;
}

body.dermis-live-editing [contenteditable="true"]:hover {
  outline: 2px dashed #cdad7b !important;
  background: rgba(205, 173, 123, 0.08) !important;
}

body.dermis-live-editing [contenteditable="true"]:focus {
  outline: 2px solid #4de39f !important;
  background: rgba(77, 227, 159, 0.1) !important;
  box-shadow: 0 0 12px rgba(77, 227, 159, 0.25) !important;
}

/* Image Hover Replace Badge */
.dermis-img-edit-wrapper {
  position: relative !important;
  display: inline-block !important;
}

.dermis-img-edit-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(18, 20, 22, 0.75) !important;
  backdrop-filter: blur(4px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
  cursor: pointer !important;
  z-index: 100 !important;
  border-radius: inherit !important;
}

.dermis-img-edit-wrapper:hover .dermis-img-edit-overlay {
  opacity: 1 !important;
}

.dermis-img-edit-btn {
  background: #2d7a59 !important;
  color: #fff !important;
  font-family: sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
  border: 1px solid #4de39f !important;
}

/* Floating Live Controls Bar */
#wp-admin-edit-bar {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 99999999 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: #18241f !important;
  border: 1px solid #2e473b !important;
  padding: 10px 18px !important;
  border-radius: 30px !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6) !important;
  font-family: sans-serif !important;
  font-size: 13px !important;
  color: #e0f2e9 !important;
  backdrop-filter: blur(10px) !important;
  transition: all 0.25s ease !important;
}

#wp-admin-edit-bar.active-edit-mode {
  background: #121815 !important;
  border-color: #4de39f !important;
  box-shadow: 0 16px 50px rgba(0,0,0,0.8) !important;
}

/* Live Image Gallery Modal */
.dermis-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  font-family: sans-serif !important;
}

.dermis-modal-card {
  width: 100% !important;
  max-width: 800px !important;
  max-height: 85vh !important;
  background: #181c1a !important;
  border: 1px solid #2e473b !important;
  border-radius: 16px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  color: #fff !important;
}

.dermis-modal-header {
  padding: 16px 20px !important;
  border-bottom: 1px solid #2e473b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.dermis-modal-header h3 {
  font-size: 16px !important;
  color: #fff !important;
  margin: 0 !important;
  font-weight: 700 !important;
}

.dermis-modal-close {
  background: transparent !important;
  border: none !important;
  color: #8e949e !important;
  font-size: 24px !important;
  cursor: pointer !important;
}

.dermis-modal-close:hover {
  color: #fff !important;
}

.dermis-upload-box {
  padding: 16px 20px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid #2e473b !important;
}

.dermis-dropzone {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 14px !important;
  border: 2px dashed rgba(77, 227, 159, 0.4) !important;
  border-radius: 10px !important;
  background: rgba(77, 227, 159, 0.05) !important;
  color: #e0f2e9 !important;
  font-size: 13px !important;
  cursor: pointer !important;
}

.dermis-dropzone:hover {
  background: rgba(77, 227, 159, 0.12) !important;
  border-color: #4de39f !important;
}

.dermis-img-grid {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 16px 20px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 14px !important;
}

.dermis-img-card {
  background: #202623 !important;
  border: 1px solid #2e473b !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.dermis-img-card:hover {
  border-color: #4de39f !important;
  transform: translateY(-2px) !important;
}

.dermis-img-card img {
  width: 100% !important;
  height: 100px !important;
  object-fit: cover !important;
  display: block !important;
}

.dermis-img-meta {
  padding: 6px 8px !important;
  font-size: 11px !important;
  color: #a3b8ad !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Accessible Screen Reader Only Utility Class */
.sr-only {
  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;
}
