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

:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-primary: #3a6b5e;
  --color-primary-light: #4a8b7a;
  --color-primary-dark: #2a5148;
  --color-accent: #c9a84c;
  --color-border: #e8e4de;
  --color-hero-overlay: rgba(30, 50, 44, 0.55);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-light);
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 0.01em;
}

.nav-brand:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3a6b5e 0%, #2a5148 40%, #1e3228 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 139, 122, 0.2) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  color: #fff;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

/* ===== Main Content ===== */
.main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
}

.section {
  margin-bottom: 3.5rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}

.welcome p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 640px;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.25s, transform 0.25s;
  color: var(--color-text);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--color-text);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
}

.card-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
}

/* ===== Password Gate ===== */
.password-gate {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 3rem;
}

.password-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.password-box h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.password-box .subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.password-box .lock-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.password-form input[type="password"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.password-form input[type="password"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(58, 107, 94, 0.12);
}

.password-form button {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.password-form button:hover {
  background: var(--color-primary-light);
}

.password-form button:active {
  transform: scale(0.98);
}

.password-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.password-error.visible {
  display: block;
}

/* Protected content (hidden until unlocked) */
.protected-content {
  display: none;
  padding-top: 5rem;
}

.protected-content.unlocked {
  display: block;
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, #3a6b5e 0%, #2a5148 100%);
  padding: 6rem 1.5rem 2.5rem;
  text-align: center;
  color: #fff;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
}

.page-header p {
  font-weight: 300;
  opacity: 0.8;
  margin-top: 0.3rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===== 404 Page ===== */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.not-found h1 {
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--color-primary);
  line-height: 1;
}

.not-found h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-text);
  margin: 0.5rem 0 1rem;
}

.not-found p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.not-found a.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.not-found a.btn:hover {
  background: var(--color-primary-light);
  color: #fff;
}

/* ===== Utilities ===== */
.content-area {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.content-area h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  margin: 2rem 0 0.75rem;
}

.content-area h2:first-child {
  margin-top: 0;
}

.content-area p,
.content-area ul,
.content-area ol {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.content-area ul,
.content-area ol {
  padding-left: 1.5rem;
}

.content-area li {
  margin-bottom: 0.4rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .nav-inner {
    padding: 0.75rem 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero-content {
    padding: 5rem 1rem 3rem;
  }

  .main {
    padding: 2rem 1rem 3rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .password-box {
    padding: 2rem 1.5rem;
  }
}
