/* ============================================
   NEMURIA - Main Stylesheet
   Brand: Deep Navy / Amber Gold / Moonlight White
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --deep-navy: #0D1B2A;
  --navy-light: #1B2D45;
  --navy-mid: #142236;
  --amber-gold: #D4A84B;
  --amber-light: #E8C77B;
  --amber-dark: #B8912F;
  --moonlight: #F5F0E8;
  --moonlight-dim: #C8C2B8;
  --moonlight-muted: #9A958C;

  /* Semantic Colors */
  --bg-primary: var(--deep-navy);
  --bg-secondary: var(--navy-light);
  --bg-card: var(--navy-mid);
  --text-primary: var(--moonlight);
  --text-secondary: var(--moonlight-dim);
  --text-muted: var(--moonlight-muted);
  --accent: var(--amber-gold);
  --accent-hover: var(--amber-light);

  /* Typography */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body-ja: 'Noto Sans JP', sans-serif;
  --font-body-en: 'Inter', sans-serif;
  --font-body: var(--font-body-en), var(--font-body-ja);

  /* Spacing */
  --section-padding: 80px 0;
  --container-width: 1120px;
  --container-padding: 0 20px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1em;
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-title .subtitle {
  font-family: var(--font-body-en);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
  background-color: rgba(13, 27, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

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

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 3px;
}

.site-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-body-en);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(212, 168, 75, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-body-en);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(212, 168, 75, 0.3);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

/* --- Sections --- */
.section {
  padding: var(--section-padding);
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 0 auto 48px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--deep-navy);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--deep-navy);
  box-shadow: 0 4px 20px rgba(212, 168, 75, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background-color: rgba(212, 168, 75, 0.1);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1rem;
}

/* --- Cards --- */
.card {
  background-color: var(--bg-card);
  border: 1px solid rgba(245, 240, 232, 0.06);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

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

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* --- Blog Article Typography --- */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 120px;
}

.article-content h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta .tag {
  display: inline-block;
  background-color: rgba(212, 168, 75, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.article-content h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 240, 232, 0.1);
}

.article-content h3 {
  font-size: 1.3rem;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content p {
  margin-bottom: 1.5em;
  line-height: 2;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 0.5em;
  color: var(--text-secondary);
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background-color: rgba(212, 168, 75, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content blockquote p {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0;
}

/* --- Blog List --- */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(245, 240, 232, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-card-thumb {
  width: 100%;
  height: 180px;
  background-color: var(--navy-light);
  object-fit: cover;
}

.blog-card-body {
  padding: 24px;
}

.blog-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.blog-card-body h3 a {
  color: var(--text-primary);
}

.blog-card-body h3 a:hover {
  color: var(--accent);
}

.blog-card-body .date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Kit (ConvertKit) Email Form --- */
.kit-form-wrapper {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.kit-form-wrapper h3 {
  margin-bottom: 8px;
}

.kit-form-wrapper p {
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.kit-form-wrapper form {
  display: flex;
  gap: 12px;
}

.kit-form-wrapper input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background-color: var(--navy-light);
  border: 1px solid rgba(245, 240, 232, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.kit-form-wrapper input[type="email"]::placeholder {
  color: var(--text-muted);
}

.kit-form-wrapper input[type="email"]:focus {
  border-color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--navy-mid);
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  padding: 60px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.footer-brand .site-logo {
  margin-bottom: 16px;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-nav h4 {
  font-family: var(--font-body-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* --- Responsive: Mobile First --- */

/* Tablet (768px+) */
@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.4rem; }

  .hero h1 {
    font-size: 3.5rem;
  }

  :root {
    --section-padding: 100px 0;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }

  .hero h1 {
    font-size: 4rem;
  }

  :root {
    --container-padding: 0 40px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transition: right var(--transition-base);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: 80vh;
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .kit-form-wrapper form {
    flex-direction: column;
  }

  .blog-list {
    grid-template-columns: 1fr;
  }

  .article-content {
    padding-top: 80px;
  }

  .article-content h1 {
    font-size: 1.6rem;
  }
}

/* --- Legal Pages --- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 20px 80px;
}

.legal-page h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-page p,
.legal-page li {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.legal-page li {
  margin-bottom: 0.5em;
}
