/* Rare Sea Glass - Global Styles */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 0.375rem 0.375rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
:root {
  --color-primary: #154799;
  --color-primary-light: #1e5bb8;
  --color-secondary: #0077B6;
  --color-accent: #C6B747;
  --color-bg: #fafbfc;
  --color-surface: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #556575;
  --color-border: #e2e8f0;
  --max-width: 1200px;
  --content-width: 800px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: #cbd5e0;
  padding: 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  height: 32px;
  width: 32px;
  max-height: 32px;
  max-width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-nav a { color: #cbd5e0; text-decoration: none; padding: 0.5rem 0.5rem; min-height: 44px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: white; }

.footer-legal-row {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}
.footer-legal-row a { color: #9cadb8; text-decoration: none; padding: 0.5rem 0.25rem; display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal-row a:hover { color: #cbd5e0; }

/* Content */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.card-body p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Blog post styles */
.post-meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 { margin: 2rem 0 1rem; color: var(--color-primary); }
.post-content h3 { margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1rem; }
.post-content img { max-width: 100%; border-radius: var(--radius); margin: 1.5rem 0; }
.post-content ul, .post-content ol { margin: 1rem 0; padding-left: 2rem; }

/* Archive badge */
.archive-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section headers */
.section-header {
  padding: 3rem 2rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header h1 {
  font-size: 2.2rem;
  color: var(--color-primary);
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0.75rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

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

  .site-header {
    position: sticky;
  }

  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem; }
  .footer-container { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
  .card-grid { grid-template-columns: 1fr; }
}
