/* ============================
   Credit Card LP - CSS Styles
   Warm Beige Color Scheme
   ============================ */

/* CSS Variables */
:root {
  --background: #f7f5f3;
  --foreground: #3d3a37;
  --card: #ffffff;
  --card-foreground: #3d3a37;
  --primary: #4a4540;
  --primary-foreground: #faf9f8;
  --secondary: #f0ece8;
  --secondary-foreground: #4a4540;
  --muted: #e8e4e0;
  --muted-foreground: #78736d;
  --accent: #16a34a;
  --accent-foreground: #ffffff;
  --border: #e0dcd8;
  --destructive: #ef4444;
  --radius: 0.75rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* Utility Classes */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-sm {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.text-balance {
  text-wrap: balance;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.header-logo svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
}

.header-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.header-nav a:hover {
  color: var(--foreground);
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

/* Hero Section */
.hero {
  padding: 5rem 0 7rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 7rem 0;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero-badge svg {
  width: 1rem;
  height: 1rem;
}

.hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-title .accent {
  color: var(--accent);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-cta:hover {
  text-decoration: underline;
}

.hero-cta svg {
  width: 1rem;
  height: 1rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* Anxiety Section */
.anxiety {
  padding: 4rem 0;
  background-color: var(--card);
}

.anxiety-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.anxiety-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
}

.anxiety-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.anxiety-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.anxiety-item {
  padding: 1.25rem;
  border-radius: var(--radius);
  background-color: var(--background);
  border: 1px solid var(--border);
}

.anxiety-worry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.anxiety-worry svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--destructive);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.anxiety-worry p {
  font-weight: 500;
}

.anxiety-answer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-left: 2rem;
}

.anxiety-answer svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.anxiety-answer p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Recommendation Section */
.recommendation {
  padding: 5rem 0;
}

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

.recommendation-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .recommendation-header h2 {
    font-size: 1.875rem;
  }
}

.recommendation-header p {
  color: var(--muted-foreground);
}

/* Main Card */
.main-card-wrapper {
  position: relative;
  margin-bottom: 4rem;
}

.main-card-badge {
  position: absolute;
  top: -1rem;
  left: 1.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.main-card-badge svg {
  width: 0.875rem;
  height: 0.875rem;
}

.main-card {
  display: block;
  padding: 2rem;
  border-radius: 1rem;
  background-color: var(--card);
  border: 2px solid var(--primary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.main-card:hover {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.main-card-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .main-card-inner {
    flex-direction: row;
    align-items: center;
  }
}

.card-image {
  width: 12rem;
  height: 7.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-image span {
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  padding: 0 1rem;
}

.card-image.emerald {
  background: linear-gradient(135deg, #34d399, #16a34a);
}

.card-image.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.card-image.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.main-card-content {
  flex: 1;
}

.main-card-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.main-card:hover .main-card-content h3 {
  color: var(--accent);
}

.card-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.card-stars svg {
  width: 1rem;
  height: 1rem;
  fill: #facc15;
  color: #facc15;
}

.card-stars span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-left: 0.5rem;
}

.main-card-content > p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-tag {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.card-tag.accent {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--accent);
}

.card-tag.secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.main-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #10b981; /* emerald-500 */
  transition: gap 0.2s ease;
}

.main-card:hover .main-card-link {
  gap: 0.75rem;
}

.main-card-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.main-card:hover .main-card-link svg {
  transform: translateX(4px);
}

/* Sub Cards */
.sub-cards-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sub-cards-header p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.sub-cards-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .sub-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sub-card {
  display: block;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.sub-card:hover {
  border-color: rgba(22, 163, 74, 0.5);
}

.sub-card .card-image {
  width: 8rem;
  height: 5rem;
  margin-bottom: 1rem;
}

.sub-card h4 {
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.sub-card:hover h4 {
  color: var(--accent);
}

.sub-card > p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.sub-card-link {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.sub-card-link svg {
  width: 0.875rem;
  height: 0.875rem;
  margin-left: 0.25rem;
}

/* Comparison Section */
.comparison {
  padding: 4rem 0;
  background-color: var(--card);
}

.comparison h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.comparison > .container > p {
  color: var(--muted-foreground);
  text-align: center;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.comparison-table-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.comparison-table td {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.comparison-table .card-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-table .card-name span:first-child {
  font-weight: 500;
  color: var(--foreground);
}

.comparison-table .recommended-badge {
  padding: 0.125rem 0.5rem;
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.75rem;
  border-radius: 9999px;
}

.comparison-table tr.recommended {
  background-color: rgba(22, 163, 74, 0.05);
}

.comparison-table .hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .comparison-table .hide-mobile {
    display: table-cell;
  }
}

.comparison-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1.5rem;
}

/* FAQ Section */
.faq {
  padding: 5rem 0;
}

.faq h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--card);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: rgba(240, 236, 232, 0.5);
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  background-color: var(--card);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-logo svg {
  width: 1rem;
  height: 1rem;
}

.footer-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  max-width: 28rem;
}

@media (min-width: 768px) {
  .footer-note {
    text-align: right;
  }
}

/* ============================
   Detail Page Styles
   ============================ */

.detail-page {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--foreground);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

/* Detail Hero */
.detail-hero {
  margin-bottom: 3rem;
}

.detail-hero .main-card-badge {
  position: static;
  margin-bottom: 1rem;
}

.detail-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .detail-hero-content {
    flex-direction: row;
    align-items: center;
  }
}

.detail-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .detail-hero h1 {
    font-size: 1.875rem;
  }
}

.detail-hero .tagline {
  color: var(--muted-foreground);
}

/* Features Section */
.features {
  margin-bottom: 3rem;
}

.features h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  padding: 1.25rem;
  border-radius: 0.75rem;
  background-color: var(--card);
  border: 1px solid var(--border);
}

.feature-item-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.feature-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.feature-item h3 {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* Caution Section */
.caution {
  margin-bottom: 3rem;
}

.caution h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.caution-box {
  padding: 1.25rem;
  border-radius: 0.75rem;
  background-color: rgba(240, 236, 232, 0.5);
  border: 1px solid var(--border);
}

.caution-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.caution-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #ca8a04;
  flex-shrink: 0;
}

.caution-header span {
  font-size: 0.875rem;
  font-weight: 500;
}

.caution-list {
  padding-left: 2rem;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.caution-list li {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* CTA Section */
.cta {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta > p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  border-radius: 0.75rem;
  transition: opacity 0.2s ease;
}

.cta-button:hover {
  opacity: 0.9;
}

.cta-button svg {
  width: 1rem;
  height: 1rem;
}

.cta-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.cta-note svg {
  width: 0.875rem;
  height: 0.875rem;
}
