/* -----------------------------------------------------
   PREMIUM SAAS TEMPLATE — TailwindUI-inspired styles
   Complete stylesheet for all pages, forms & components
------------------------------------------------------ */

/* -------------------------
    THEME VARIABLES
------------------------- */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --muted: #64748b;
  --text: #0f172a;

  --accent: #6366f1;
  --accent-600: #4f46e5;

  --border: #e2e8f0;
  --ring: rgba(99,102,241,0.25);
  --shadow-lg: 0 20px 50px rgba(2,6,23,0.06);

  --radius: 14px;
  --container: 1180px;
}

body.dark {
  --bg: #0f172a;
  --panel: #1e293b;
  --muted: #94a3b8;
  --text: #e2e8f0;

  --accent: #8b91ff;
  --accent-600: #6366f1;

  --border: #334155;
  --ring: rgba(139,145,255,0.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

/* -------------------------
    BASE
------------------------- */
html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

.container {
  width: calc(100% - 40px);
  max-width: var(--container);
  margin: 0 auto;
}

/* -------------------------
    NAVIGATION
------------------------- */
.nav {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
}
body.dark .nav {
  background: rgba(15,23,42,0.6);
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  opacity: 0.85;
}
.nav a:hover {
  opacity: 1;
}

.nav .nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--text);
  opacity: 0.9;
}
.theme-toggle:hover {
  opacity: 1;
}

/* -------------------------
    HERO (WITH IMAGE)
------------------------- */
.hero {
  margin: 40px auto;
  max-width: var(--container);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background-size: cover;
  background-position: center;
}

.hero-inner {
  padding: 80px 40px;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.1));
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  margin: 0 0 12px;
}
.hero p {
  margin: 0;
  font-size: 1.15rem;
  opacity: 0.9;
}

/* -------------------------
    CONTENT BLOCKS
------------------------- */
.content-block {
  max-width: 820px;
  margin: 60px auto;
  padding: 0 20px;
}

/* -------------------------
    CARDS & FEATURES
------------------------- */
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: 0.2s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(2,6,23,0.08);
}

.features {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 40px;
}

/* -------------------------
    BUTTONS
------------------------- */
.btn,
.primary-btn {
  display: inline-flex;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn,
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  color: white;
  box-shadow: 0 12px 30px rgba(79,70,229,0.15);
}

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

/* -------------------------
    FORM STYLING (PREMIUM)
------------------------- */
.form-card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  margin: 50px auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.label {
  font-weight: 600;
  font-size: 0.95rem;
}

.input,
textarea {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  transition: all 0.2s ease;
}

.input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
  transform: translateY(-1px);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* honeypot */
.honeypot {
  position: absolute !important;
  height: 0;
  width: 0;
  left: -9999px;
  overflow: hidden;
}

/* -------------------------
    ERROR / SUCCESS MESSAGES
------------------------- */
.msg {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 600;
}

.msg.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.msg.success {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid #bbf7d0;
}

.field.error .input,
.field.error textarea {
  border-color: #ef4444;
  background: rgba(255,0,0,0.02);
}

/* -------------------------
    MODAL (SUCCESS POPUP)
------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 900;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--panel);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: calc(100% - 60px);
  max-width: 480px;
  text-align: center;
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.modal p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* -------------------------
    COMPONENT PREVIEW GRID
------------------------- */
.component-preview {
  display: grid;
  gap: 24px;
}
@media (min-width: 900px) {
  .component-preview {
    grid-template-columns: 1fr 1fr;
  }
}

/* -------------------------
    FOOTER
------------------------- */
.footer {
  padding: 40px 20px;
  text-align: center;
  margin-top: 80px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--panel);
}

/* -------------------------
    RESPONSIVE FIXES
------------------------- */
@media (max-width: 700px) {
  .hero-inner {
    padding: 60px 20px;
  }
  .hero h1 {
    font-size: 2rem;
  }
}
