/* ============================================================
   ResumeAI Pro — Geometric Balance Design System
   Pure CSS for Shared Hosting & App Views
   ============================================================ */

:root {
  --font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-surface-3: #e2e8f0;
  
  --color-primary: #0c4e54;
  --color-primary-hover: #08363a;
  --color-primary-soft: rgba(12, 78, 84, 0.08);
  --color-primary-border: rgba(12, 78, 84, 0.2);
  --color-accent-soft: rgba(12, 78, 84, 0.12);

  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;

  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  --color-divider: #e2e8f0;

  --color-success: #16a34a;
  --color-success-soft: rgba(22, 163, 74, 0.1);
  --color-warning: #d97706;
  --color-error: #dc2626;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-a4: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --transition: 0.15s ease;
}

[data-theme="dark"] {
  --color-bg: #0b0f19;
  --color-surface: #111827;
  --color-surface-2: #1e293b;
  --color-surface-3: #0f172a;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border: #1e293b;
  --color-border-subtle: #0f172a;
  --color-divider: #1e293b;
  --color-primary: #14b8a6;
  --color-primary-hover: #0d9488;
  --color-primary-soft: rgba(20, 184, 166, 0.15);
  --color-accent-soft: rgba(20, 184, 166, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Structural Components */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.96);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  width: 100%;
  gap: 1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text-main);
}

.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.theme-toggle {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text-main);
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  background: var(--color-surface-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(12, 78, 84, 0.2);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 16px rgba(12, 78, 84, 0.3);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-slate-800);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .btn-secondary {
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-slate-300);
}

.btn-dark {
  background: var(--color-slate-900);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-slate-800);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--color-surface-2);
  color: var(--color-text-main);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-remove {
  background: none;
  border: none;
  color: var(--color-error);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: background 0.15s ease;
}

.btn-remove:hover {
  background: rgba(220, 38, 38, 0.1);
}

.btn-ai-mini {
  background: var(--color-accent-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.btn-ai-mini:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Forms & Inputs */
label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-slate-700);
  margin-bottom: 0.35rem;
}

[data-theme="dark"] label {
  color: var(--color-slate-300);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text-main);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input[type="file"] {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

/* Cards & Layout */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.repeatable-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.repeatable-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
}

/* Modals */
.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
}

.modal-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Utilities */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .glass {
  background: rgba(17, 24, 39, 0.85);
}

.muted {
  color: var(--color-text-muted);
}

.full {
  width: 100%;
}

.mt-4 {
  margin-top: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3rem;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-text {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

/* Sections & Headings */
.section {
  padding: 4rem 0;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h1,
.section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.narrow {
  max-width: 860px;
}

.text-center {
  text-align: center;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Feature Cards */
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Template Gallery Cards */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.template-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}

.template-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.template-preview-frame {
  padding: 1.25rem;
  position: relative;
  min-height: 140px;
}

.template-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.template-chip.free {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.template-chip.pro {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

/* Notices & Alerts */
.plan-notice {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--color-border);
  line-height: 1.5;
}

.pro-notice {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-border);
  color: var(--color-primary);
}

.free-notice {
  background: var(--color-surface-2);
  border-color: var(--color-border);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--color-error);
}

.alert-success {
  background: var(--color-success-soft);
  border: 1px solid rgba(22, 163, 74, 0.2);
  color: var(--color-success);
}

/* Footer Components */
.site-footer,
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
  margin-top: 4rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* Utility Helpers */
.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}