/* ============================================================
   CVCORE — DESIGN SYSTEM
   main.css — shared variables, reset, nav, footer, utilities
   ============================================================ */

/* ─── FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg:           #09090B;
  --surface:      #111114;
  --surface2:     #18181C;
  --surface3:     #1E1E24;
  --border:       rgba(255, 255, 255, 0.07);
  --border2:      rgba(255, 255, 255, 0.12);
  --accent:       #C8FF47;
  --accent-dim:   rgba(200, 255, 71, 0.08);
  --accent-border:rgba(200, 255, 71, 0.18);
  --accent2:      #FF6B35;
  --accent2-dim:  rgba(255, 107, 53, 0.08);
  --accent2-border:rgba(255, 107, 53, 0.18);
  --violet:       #A78BFA;
  --violet-dim:   rgba(167, 139, 250, 0.08);
  --text:         #F2F2EE;
  --text-muted:   #A0A0AC;
  --text-faint:   #5A5A66;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'DM Sans', system-ui, sans-serif;
  --nav-h:        64px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:    0 24px 64px rgba(0, 0, 0, 0.6);
  --transition:   0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: var(--sans); }

/* ─── NOISE LAYER ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 { line-height: 1.1; }

.font-serif   { font-family: var(--serif); }
.font-sans    { font-family: var(--sans); }
.text-muted   { color: var(--text-muted); }
.text-faint   { color: var(--text-faint); }
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }

/* ─── LAYOUT ─── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nav-logo-mark svg {
  width: 15px; height: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

/* ─── MOBILE MENU ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(9,9,11,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 199;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
  flex-direction: column;
  gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
  display: block;
  transition: color var(--transition);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); }

/* ─── FOOTER ─── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1160px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.83rem;
  color: var(--text-faint);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.btn svg { flex-shrink: 0; }

/* Sizes */
.btn-sm  { padding: 0.5rem 1rem;   font-size: 0.8rem;  border-radius: var(--radius-sm); }
.btn-md  { padding: 0.65rem 1.3rem; font-size: 0.875rem; }
.btn-lg  { padding: 0.85rem 2rem;   font-size: 1rem;    border-radius: var(--radius); }
.btn-xl  { padding: 1rem 2.25rem;   font-size: 1.05rem; border-radius: var(--radius); }

/* Variants */
.btn-primary {
  background: var(--accent);
  color: #09090B;
}
.btn-primary:hover {
  background: #d4ff5a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200, 255, 71, 0.2);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface);
}

.btn-surface {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-surface:hover {
  background: var(--surface3);
  border-color: var(--border2);
}

.btn-danger {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.08);
}

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-icon:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface);
}

/* ─── FORM ELEMENTS ─── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 255, 71, 0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A5A66' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.form-row {
  display: grid;
  gap: 0.875rem;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ─── BADGES / TAGS ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-accent  { background: var(--accent-dim);  color: var(--accent);  border: 1px solid var(--accent-border); }
.badge-orange  { background: var(--accent2-dim); color: var(--accent2); border: 1px solid var(--accent2-border); }
.badge-violet  { background: var(--violet-dim);  color: var(--violet);  border: 1px solid rgba(167,139,250,.18); }
.badge-neutral { background: var(--surface2);    color: var(--text-muted); border: 1px solid var(--border); }

/* ─── CHIP / PILL ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.chip:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface);
}
.chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: 0.1rem;
  transition: opacity var(--transition);
}
.chip-remove:hover { opacity: 1; }

/* ─── DIVIDER ─── */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
}

/* ─── SECTION HEADER ─── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}
.eyebrow-line {
  width: 20px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 0.875rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
}

/* ─── CARD ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
.card:hover { background: var(--surface2); }
.card-hover:hover { border-color: var(--border2); }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.animate-fade-up { animation: fadeUp 0.6s ease both; }
.animate-fade-up-1 { animation: fadeUp 0.6s 0.1s ease both; }
.animate-fade-up-2 { animation: fadeUp 0.6s 0.2s ease both; }
.animate-fade-up-3 { animation: fadeUp 0.6s 0.3s ease both; }
.animate-fade-up-4 { animation: fadeUp 0.6s 0.4s ease both; }

/* ─── UTILITIES ─── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-xs { gap: 0.375rem; }
.gap-sm { gap: 0.625rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.gap-xl { gap: 2.5rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }

.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 2.5rem; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }

.relative { position: relative; }
.z-1      { z-index: 1; }

/* ─── TOAST ─── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: fadeUp 0.3s ease;
  max-width: 320px;
}
.toast.toast-success { border-color: rgba(200,255,71,.3); }
.toast.toast-error   { border-color: rgba(248,113,113,.3); }
.toast-icon { flex-shrink: 0; }

/* ─── MOBILE BREAKPOINTS ─── */
@media (max-width: 900px) {
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }
  .hide-mobile  { display: none !important; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hide-xs { display: none !important; }
}
