/* =========================================
   Josolyne.cc — Global Design System
   Wedding Theme: Navy / Gold / White / Ivory
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Outfit:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'American Lemon';
  src: url('../assets/american_lemon/American Lemon.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----- Custom Properties ----- */
:root {
  /* Core Palette */
  --navy:        #060e1c;
  --navy-light:  #0c1a35;
  --navy-mid:    #122550;
  --gold:        #d4652a;
  --gold-light:  #e8844a;
  --gold-dim:    #b55420;
  --white:       #ffffff;
  --ivory:       #faf6ee;
  --ivory-dark:  #f0e8d8;

  /* Functional */
  --bg-primary:     var(--navy);
  --bg-secondary:   var(--navy-light);
  --bg-card:        rgba(19, 36, 68, 0.7);
  --bg-glass:       rgba(19, 36, 68, 0.45);
  --text-primary:   var(--ivory);
  --text-secondary: rgba(250, 246, 238, 0.7);
  --text-muted:     rgba(250, 246, 238, 0.45);
  --accent:         var(--gold);
  --accent-light:   var(--gold-light);
  --accent-glow:    rgba(212, 101, 42, 0.25);
  --border-subtle:  rgba(212, 101, 42, 0.15);
  --border-glass:   rgba(250, 246, 238, 0.08);

  /* Feedback */
  --success:  #4ade80;
  --error:    #f87171;
  --warning:  #fbbf24;
  --info:     #60a5fa;

  /* Typography */
  --font-display: 'American Lemon', cursive;
  --font-script:  'American Lemon', cursive;
  --font-body:    'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

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

  /* Layout */
  --max-width:    1200px;
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-full:  9999px;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);
  --duration:  0.35s;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ivory);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}
a:hover { color: var(--accent-light); }

img {
  max-width: 100%;
  display: block;
}

/* ----- Utilities ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header .accent-line {
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: var(--space-md) auto;
}

.section-header p {
  margin: 0 auto;
  font-size: 1.1rem;
}

.text-center { text-align: center; }
.text-gold {
  color: var(--gold);
}
.text-italic { font-style: italic; }

/* ----- Glass Card ----- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--duration) var(--ease-out),
              box-shadow 0.5s var(--ease-out);
}

.glass-card:hover {
  border-color: rgba(212, 101, 42, 0.2);
  box-shadow: 0 0 40px rgba(212, 101, 42, 0.06);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 12px rgba(212, 101, 42, 0.3);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: rgba(212, 101, 42, 0.1);
  transform: translateY(-2px);
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-sm {
  padding: 0.55rem 1.3rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ----- Form Inputs ----- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ivory);
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

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

/* ----- Navigation ----- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: background var(--duration) var(--ease-out),
              padding var(--duration) var(--ease-out),
              backdrop-filter var(--duration) var(--ease-out);
}

.site-nav.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-sm) 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-brand span {
  color: var(--gold);
  font-family: var(--font-script);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width var(--duration) var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ivory);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ----- Toasts / Notifications ----- */
.toast-container {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ivory);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.4s var(--ease-out);
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }

.toast.fade-out {
  animation: toast-out 0.3s var(--ease-in) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ----- Status Badges ----- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
}

.badge-pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-approved {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-rejected {
  background: rgba(248, 113, 113, 0.15);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* ----- Modal / Lightbox ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-out);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* ----- Loading Spinner ----- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ----- Empty State ----- */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.4;
}

.empty-state h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.empty-state p {
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ----- Page Wrapper ----- */
.page-content {
  min-height: 100vh;
  padding-top: 80px;
}

/* ----- Scroll animations ----- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.site-footer .heart {
  color: var(--gold);
}

/* ----- Grain Texture Overlay ----- */
.grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(30px);
    transition: right 0.4s var(--ease-out);
    gap: var(--space-xl);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .glass-card {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }

  h1 { font-size: 2.2rem; }
}
