/* ═══════════════════════════════════════════════
   DARMINE CAPITAL — SHARED STYLES
   Extracted from index, research, dashboard, careers
   ═══════════════════════════════════════════════ */

/* ── CUSTOM PROPERTIES ── */
:root {
  --bg: #0a0c10;
  --bg-raised: #0f1218;
  --bg-card: #111318;
  --bg-card-hover: #15171f;
  --border: #1a1d27;
  --border-accent: #252836;
  --text-primary: #e2e4e9;
  --text-secondary: #7a8199;
  --text-muted: #454d64;
  --accent: #c9a44e;
  --accent-dim: rgba(201, 164, 78, 0.10);
  --accent-glow: rgba(201, 164, 78, 0.04);
  --red: #ef4444;
  --green: #22c55e;
  --serif: 'DM Serif Display', Georgia, serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sans: 'Outfit', -apple-system, sans-serif;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(100, 140, 220, 0.3); color: #fff; }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── BG CANVAS ── */
.bg-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-canvas canvas { width: 100%; height: 100%; display: block; }

/* ── PARTICLE NETWORK (full-screen) ── */
.particles-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.particles-bg canvas { width: 100%; height: 100%; display: block; }

/* ── SKIP LINK ── */
.skip-link {
  position: fixed; left: 0; top: 0; z-index: 1000;
  padding: 12px 20px; background: var(--bg); color: var(--accent);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 1px; text-decoration: none; border: 1px solid var(--accent);
  transform: translateY(-100%); transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ── DISCLAIMER BAR ── */
.disclaimer-bar {
  background: #0c0e14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 48px;
  font-size: 10px;
  line-height: 1.4;
  color: #6b7280;
  opacity: 0.7;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: 0.5px;
}

/* ── NAV ── */
nav {
  position: fixed; top: 26px; left: 0; right: 0; z-index: 100;
  padding: 0 48px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(10, 12, 16, 0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }

.nav-mark {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.nav-mark img { height: 28px; width: auto; display: block; }
.nav-mark span {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--text-primary); letter-spacing: 1px;
}

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  color: var(--text-muted); text-decoration: none;
  letter-spacing: 1.5px; text-transform: uppercase;
  transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--accent); transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }

.nav-links a.nav-cta {
  padding: 10px 18px; border: 1px solid var(--accent);
  color: var(--accent); border-radius: 2px;
  transition: color 0.2s, background 0.2s, box-shadow 0.3s ease;
}
.nav-links a.nav-cta::after { display: none; }
.nav-links a.nav-cta:hover {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 0 20px rgba(201, 164, 78, 0.25);
}
.nav-links a.nav-cta.active {
  background: var(--accent); color: var(--bg);
}

.nav-toggle {
  display: none; width: 44px; height: 44px; margin: 0 -8px 0 0;
  padding: 0; background: transparent; border: none;
  cursor: pointer; color: var(--text-primary); position: relative; border-radius: 2px;
}
.nav-toggle::before, .nav-toggle::after, .nav-toggle span {
  content: ''; position: absolute; left: 12px; width: 20px; height: 2px;
  background: currentColor; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle::before { top: 14px; }
.nav-toggle span { top: 21px; }
.nav-toggle::after { top: 28px; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

/* ── SECTION HEADERS ── */
.section-header { margin-bottom: 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.section-label {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.section-label::before { content: ''; width: 16px; height: 1px; background: var(--accent); }

.section-title {
  font-family: var(--serif); font-size: clamp(32px, 4vw, 48px);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; text-align: center;
}

.section-subtitle {
  font-size: 16px; color: var(--text-secondary); margin-top: 10px;
  max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.8; text-align: center;
}

/* ── BUTTONS ── */
.btn-accent {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase; padding: 13px 24px;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); cursor: pointer; border-radius: 2px;
  position: relative; overflow: hidden; text-decoration: none; display: inline-block;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-accent:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-accent::after { display: none; }
.btn-accent:hover:not(:disabled) {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 4px 20px rgba(201, 164, 78, 0.25);
}
.btn-accent:focus-visible { outline-offset: 3px; }

/* ── NEWSLETTER ── */
.newsletter-block {
  max-width: 560px; margin: 0 auto; padding: 40px 36px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--border-accent); border-radius: 2px; text-align: center;
}
.newsletter-block:hover { border-color: var(--border-accent); border-left-color: var(--border-accent); }
.newsletter-block .newsletter-title {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.01em;
}
.newsletter-block .newsletter-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 0; padding-bottom: 24px; font-family: var(--sans);
  max-width: 320px; margin-left: auto; margin-right: auto;
  border-bottom: 1px solid var(--border);
}
.newsletter-block .newsletter-form { padding-top: 24px; }
.newsletter-form {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
}
.newsletter-form input {
  font-family: var(--mono); font-size: 13px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: 2px; width: 200px;
  outline: none; transition: border-color 0.2s;
}
.newsletter-form input[name="email"] { width: 240px; }
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--text-secondary); }
.newsletter-form input:focus-visible { outline: 2px solid var(--text-secondary); outline-offset: 0; border-color: var(--text-secondary); }
.newsletter-form .form-error { flex-basis: 100%; font-size: 13px; color: var(--red); margin-top: 4px; font-family: var(--mono); }
.newsletter-form .form-success.visible {
  flex-basis: 100%; margin-top: 8px; font-family: var(--mono); font-size: 13px; color: var(--text-secondary);
}

/* ── FORM STATES ── */
.form-error {
  font-family: var(--mono); font-size: 13px; color: var(--red);
  margin-top: 16px; text-align: center;
}
.form-success {
  display: none; padding: 24px; background: var(--accent-dim);
  border: 1px solid var(--accent); border-radius: 2px;
  color: var(--text-primary); font-family: var(--mono); font-size: 14px;
  line-height: 1.6; text-align: center;
}
.form-success.visible { display: block; }
.form-loading .btn-accent { opacity: 0.7; pointer-events: none; }
.form-loading .btn-accent::after {
  content: ''; display: inline-block; width: 14px; height: 14px;
  margin-left: 8px; border: 2px solid currentColor;
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.6s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CONTACT POPUP ── */
#contact-popup-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px;
}
#contact-popup-backdrop[data-open="true"] { display: flex; }
#contact-popup-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 24px 32px; max-width: 360px; width: 100%; position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
#contact-popup-box .contact-popup-label {
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px;
}
#contact-popup-box .contact-popup-email {
  font-family: var(--mono); font-size: 15px; color: var(--accent); word-break: break-all;
}
#contact-popup-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  padding: 0; background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; border-radius: 2px; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, background 0.2s;
}
#contact-popup-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }
#contact-popup-close::before, #contact-popup-close::after {
  content: ''; position: absolute; width: 14px; height: 2px; background: currentColor;
}
#contact-popup-close::before { transform: rotate(45deg); }
#contact-popup-close::after { transform: rotate(-45deg); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border); max-width: 960px; margin: 0 auto;
  padding: 24px 48px; display: flex; flex-direction: column; align-items: center;
  gap: 20px; text-align: center;
}
.footer-top {
  display: flex; justify-content: center; align-items: center;
  gap: 48px; flex-wrap: wrap; width: 100%;
}
.footer-left { font-family: var(--mono); font-size: 13px; color: var(--text-secondary); letter-spacing: 0.5px; }
.footer-right { display: flex; gap: 24px; }
.footer-right a {
  font-family: var(--mono); font-size: 13px; color: var(--text-secondary);
  text-decoration: none; letter-spacing: 0.5px; transition: color 0.2s;
}
.footer-right a:hover { color: var(--text-primary); }
.footer-legal {
  font-family: var(--mono); font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.3px; line-height: 1.7; max-width: 720px;
  padding-top: 16px; border-top: 1px solid var(--border);
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.no-js .fade-in { opacity: 1; transform: none; }

/* ── RESPONSIVE: SHARED ── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 64px; right: 0;
    width: min(280px, 100vw); height: calc(100vh - 64px);
    background: var(--bg-raised); border-left: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 24px; gap: 0;
    transform: translateX(100%); transition: transform 0.25s ease;
    overflow-y: auto; z-index: 101;
  }
  .nav-links[data-open="true"] { transform: translateX(0); }
  .nav-links a { display: block; padding: 16px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-backdrop {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
    z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  }
  .nav-backdrop[data-visible="true"] { opacity: 1; pointer-events: auto; }
  nav { padding-top: env(safe-area-inset-top); }
  footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
  .nav-backdrop { display: none; }
  .nav-links {
    position: static; width: auto; height: auto;
    flex-direction: row; padding: 0; background: transparent;
    border: none; transform: none;
  }
  .nav-links a { padding: 0; border-bottom: none; font-size: 11px; }
}

@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 10px; }
  footer { flex-direction: column; gap: 16px; text-align: center; padding: 24px; }
  .btn-accent { min-height: 44px; }
  a, button { -webkit-tap-highlight-color: rgba(201, 164, 78, 0.1); }
}

@media (max-width: 480px) {
  footer { padding: 20px 16px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  nav { padding: 0 16px; }
}

@media (max-width: 600px) {
  .nav-mark span { display: none; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; max-width: 280px; }
  .newsletter-block { padding: 32px 24px; }
}
