/* ======================================
   DS Client Portal Theme — Global Styles
   Shared across all page templates.
   ====================================== */

/* ======================================
   RESET & FOUNDATIONS
   ====================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-ink: #0a0a0a;
  --color-ink-soft: #555550;
  --color-ink-muted: #91918a;
  --color-border: #e5e5e0;
  --color-border-light: #f0f0eb;
  --color-accent: #b87a1a;
  --color-accent-soft: #fdf6ea;
  --color-green: #1a7a3a;
  --color-green-soft: #eaf6ee;
  --color-blue: #1a5ab8;
  --color-blue-soft: #eaf0fb;
  --color-red: #b83a1a;
  --color-red-soft: #fbedea;
  --color-purple: #7a1ab8;
  --color-purple-soft: #f3eafb;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(10,10,10,0.04), 0 1px 2px rgba(10,10,10,0.03);
  --shadow-md: 0 4px 16px rgba(10,10,10,0.06), 0 1px 4px rgba(10,10,10,0.04);
  --shadow-lg: 0 12px 40px rgba(10,10,10,0.08), 0 2px 8px rgba(10,10,10,0.04);
  --max-w: 1120px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ======================================
   LAYOUT
   ====================================== */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }

/* ======================================
   BUTTONS
   ====================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 60px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-bg);
}
.btn-primary:hover { background: #222; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  box-shadow: inset 0 0 0 1.5px var(--color-border);
}
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--color-ink); }

.btn-arrow::after { content: '\2192'; transition: transform 0.2s ease; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ======================================
   NAVIGATION
   ====================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  background: rgba(250,250,248,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo-mark {
  width: 22px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
}
.nav-logo-mark svg { width: 22px; height: 23px; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; font-weight: 400; color: var(--color-ink-soft); text-decoration: none; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--color-ink); text-decoration: none; }

.nav-cta .btn { padding: 10px 24px; font-size: 14px; }

.nav-mobile { display: none; width: 32px; height: 32px; align-items: center; justify-content: center; }
.nav-mobile svg { width: 20px; height: 20px; }

/* Mobile menu open state */
.nav-links.open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(250,250,248,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px 32px;
  gap: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

/* ======================================
   BACK TO TOP
   ====================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #222; transform: translateY(-2px); }
.back-to-top svg { width: 18px; height: 18px; }

/* ======================================
   FOOTER
   ====================================== */
.footer {
  padding: 48px 0;
  text-align: center;
  font-size: 14px;
  color: var(--color-ink-muted);
}
.footer a { color: var(--color-ink-soft); text-decoration: none; transition: color 0.2s ease; }
.footer a:hover { color: var(--color-ink); text-decoration: none; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 16px; }

/* ======================================
   ANIMATIONS
   ====================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.anim.visible { opacity: 1; transform: translateY(0); }
.anim-d1 { transition-delay: 0.08s; }
.anim-d2 { transition-delay: 0.16s; }
.anim-d3 { transition-delay: 0.24s; }
.anim-d4 { transition-delay: 0.32s; }
.anim-d5 { transition-delay: 0.4s; }
.anim-d6 { transition-delay: 0.48s; }
.anim-d7 { transition-delay: 0.56s; }
.anim-d8 { transition-delay: 0.64s; }

/* ======================================
   RESPONSIVE — SHARED
   ====================================== */
@media (max-width: 900px) {
  .nav-logo-text { display: none; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-mobile { display: flex; }
  .nav-links.open ~ .nav-cta { display: none; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
}

/* WordPress admin bar fix */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
