/*
 * public/css/style.css
 * Minimalist, Modern, Costa Rican Flag Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Costa Rican Flag Colors */
  --cr-blue: #002B7F;
  --cr-blue-light: #1A46A0;
  --cr-white: #FFFFFF;
  --cr-red: #CE1126;
  --cr-red-dark: #A90D1E;

  /* UI Colors */
  --bg-color: #FAFAFC;
  --surface: #FFFFFF;
  --text-main: #1A1A24;
  --text-muted: #6B7280;
  --border-light: rgba(0, 43, 127, 0.1);

  /* Effects */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 48px rgba(0, 43, 127, 0.08);
  --shadow-glow: 0 12px 32px rgba(206, 17, 38, 0.25);
  --glass-blur: blur(12px);

  --radius-lg: 24px;
  --radius-pill: 9999px;
  --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: 'Outfit', -apple-system, sans-serif;
  background-color: var(--bg-color);
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 43, 127, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(206, 17, 38, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Typography ── */
h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--cr-blue);
  margin-bottom: 1rem;
}

h1 span.red {
  color: var(--cr-red);
}

p.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ── */
.navbar {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 48px);
  max-width: 1000px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 10;
}

.hero-brand {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 2rem;
  text-decoration: none;
}

.hero-logo {
  width: 30vw;
  height: auto;
  display: block;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--cr-red);
  color: var(--cr-white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: var(--cr-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(206, 17, 38, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--cr-blue);
  border: 2px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--cr-blue);
  background-color: rgba(0, 43, 127, 0.05);
}

/* ── Hero Section ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
}

.hero-top-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-text {
  width: 100%;
}

.hero-bottom-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

/* ── Link Display Card ── */
.draft-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.draft-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.draft-link {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--cr-blue);
  background: rgba(0, 43, 127, 0.04);
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 43, 127, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
  padding: 16px;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay.hidden .modal-content {
  transform: translateY(20px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cr-blue);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

#map-container {
  width: 100%;
  height: 300px;
  background: #eaeaea;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.modal-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.modal-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 43, 127, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}

.modal-form textarea:focus {
  border-color: var(--cr-blue);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1024px) {
  .hero-top-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 64px;
    margin-bottom: 3rem;
  }

  .hero-brand {
    flex: 1;
    justify-content: flex-end;
    margin-bottom: 0;
  }

  .hero-text {
    flex: 1;
    text-align: left;
  }

  .hero-text p.subtitle {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-bottom-row {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .navbar {
    top: 16px;
    width: calc(100% - 32px);
    padding: 12px 16px;
  }

  .draft-card {
    padding: 24px;
  }

  .draft-link {
    padding: 12px 16px;
    font-size: 1.5rem;
  }

  .hero-logo {
    width: 75vw;
  }
}