/* Base Design System Variables */
:root {
  --primary: #0f172a;       /* Deep Slate / Dark Navy */
  --primary-light: #1e293b;
  --accent: #d97706;        /* Soft Warm Gold */
  --accent-light: #f59e0b;
  --accent-hover: #b45309;
  --background: #fdfbf7;    /* Warm White / Ivory */
  --card-bg: rgba(255, 255, 255, 0.8);
  --border: rgba(15, 23, 42, 0.08);
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.06);

  --font-serif: 'Shippori Mincho', serif;
  --font-sans: 'Outfit', 'Helvetica Neue', 'Arial', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--primary);
}

/* Header */
.main-header {
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-kanji {
  color: var(--primary);
  letter-spacing: 0.1em;
}

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

.logo-domain {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

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

.nav-btn {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.5rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.nav-btn:hover {
  background-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.05) 0%, rgba(253, 251, 247, 0) 70%);
}

.hero-bg-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(217, 119, 6, 0.15);
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-family: var(--font-serif);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

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

.btn-secondary:hover:not(.disabled) {
  background-color: rgba(15, 23, 42, 0.04);
  color: var(--text);
}

.btn-secondary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-light);
}

/* Diagnostic & Wizard Section */
.diagnostic-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, #fdfbf7, #faf7f2);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.badge-success {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
}

/* Wizard Card & Glassmorphism */
.wizard-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-xl);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Progress bar */
.progress-container {
  margin-bottom: 2.5rem;
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background-color: rgba(15, 23, 42, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar-fill {
  width: 20%;
  height: 100%;
  background-color: var(--accent);
  border-radius: 9999px;
  transition: var(--transition);
}

.steps-indicator {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--background);
  border: 2px solid rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-num.active {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--text-light);
}

.step-num.completed {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--text-light);
}

/* Steps Animation */
.wizard-step {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.wizard-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step-question {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 1.75rem;
  line-height: 1.4;
}

.sub-question-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.4);
  transition: var(--transition);
  position: relative;
}

.option-card input[type="radio"] {
  position: absolute;
  top: 1.5rem;
  right: 1.25rem;
  accent-color: var(--accent);
  width: 1.1rem;
  height: 1.1rem;
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 1.5rem;
}

.option-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.option-card:hover {
  border-color: rgba(217, 119, 6, 0.3);
  background-color: rgba(217, 119, 6, 0.02);
}

.option-card:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(217, 119, 6, 0.05);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Options Row for Chips */
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.option-chip {
  cursor: pointer;
}

.option-chip input {
  display: none;
}

.option-chip span {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.4);
  transition: var(--transition);
}

.option-chip:hover span {
  border-color: rgba(217, 119, 6, 0.3);
}

.option-chip input:checked + span {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--text-light);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* Spinner Loading */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.loading-state p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Results Section */
.results-container {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results-header h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  margin-top: 0.5rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.result-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.card-tag {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.result-a .card-tag { background-color: var(--primary-light); }
.result-b .card-tag { background-color: var(--accent); }
.result-c .card-tag { background-color: #0f766e; /* Sage teal color */ }

.result-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gift-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  min-height: 2.8rem;
}

.gift-price {
  font-family: var(--font-sans);
  color: var(--accent-hover);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.gift-detail-section {
  margin-bottom: 1.25rem;
}

.gift-detail-section h4 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.gift-reason {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.message-copy-box {
  background-color: #faf7f2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  position: relative;
}

.gift-message {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.5;
  padding-bottom: 1.8rem;
}

.copy-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.copy-btn:hover {
  background-color: var(--primary);
  color: white;
}

.gift-action {
  margin-top: auto;
  padding-top: 1rem;
}

.gift-action .btn {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.6rem;
}

.results-footer {
  text-align: center;
}

/* Articles Section */
.articles-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  background-color: #faf7f2;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background-color: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 119, 6, 0.4);
  box-shadow: var(--shadow-md);
}

.article-meta {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.article-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.read-more {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  transition: var(--transition);
}

.article-card:hover .read-more {
  color: var(--accent);
}

/* Modal Drawer (Slide-in) */
.modal-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeInOverlay 0.3s ease forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-content {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 100%;
  background-color: var(--background);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  padding: 3rem 2rem;
  overflow-y: auto;
  z-index: 210;
  transform: translateX(100%);
  animation: slideInDrawer 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInDrawer {
  to { transform: translateX(0); }
}

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.25rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.drawer-close:hover {
  color: var(--primary);
}

.drawer-body h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.drawer-text {
  font-size: 0.9rem;
  line-height: 1.7;
}

.intro-quote {
  border-left: 4px solid var(--accent);
  background-color: #faf7f2;
  padding: 1rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.drawer-text h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Data Table in Drawer */
.table-container {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background-color: var(--primary);
  color: white;
  font-weight: 700;
}

.article-highlight-box {
  background-color: rgba(217, 119, 6, 0.03);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.article-highlight-box h3 {
  color: var(--accent-hover);
  margin-top: 0;
}

.article-highlight-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-highlight-box li::before {
  content: '✦';
  color: var(--accent);
  margin-right: 0.5rem;
  font-weight: bold;
}

.drawer-cta-section {
  background: linear-gradient(to right bottom, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.drawer-cta-section h3 {
  color: white;
  margin-top: 0;
  font-size: 1.25rem;
}

.drawer-cta-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.drawer-cta-section .btn {
  background-color: var(--accent);
  color: white;
}

.drawer-cta-section .btn:hover {
  background-color: var(--accent-light);
}

/* Analytics Simulated Console */
.analytics-console {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.75rem;
  z-index: 1000;
  border-top: 2px solid #334155;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
}

.console-header {
  background-color: #1e293b;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #f8fafc;
}

.console-body {
  height: 120px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: var(--transition);
}

.console-body.collapsed {
  height: 0;
  padding: 0;
  overflow: hidden;
}

.console-explanation {
  color: #94a3b8;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed #334155;
  padding-bottom: 0.25rem;
}

.log-item {
  line-height: 1.4;
}

.log-item::before {
  content: '>';
  margin-right: 0.5rem;
  color: #a855f7;
}

.log-item.event {
  color: #34d399; /* Green color for tracking events */
}

.log-item.system {
  color: #94a3b8;
}

/* Footer */
.main-footer {
  background-color: var(--primary);
  color: var(--text-light);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.main-footer p {
  color: rgba(255, 255, 255, 0.5);
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* Form Textarea & Suggestion Chips */
.form-textarea {
  width: 100%;
  height: 120px;
  padding: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: var(--transition);
  margin-bottom: 1.25rem;
}

.form-textarea:focus {
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background-color: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.chip:hover {
  background-color: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.3);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.chip:active {
  transform: translateY(1px);
}
