/* ===================================================
   CSS Custom Properties — Dark Space Theme
   =================================================== */
:root {
  --bg-start:    #0d0d2b;
  --bg-end:      #1a0a3e;
  --accent:      #c9a84c;
  --accent-hover:#e2c06a;
  --text:        #f0eff8;
  --text-muted:  rgba(240, 239, 248, 0.7);
  --card:        rgba(255, 255, 255, 0.06);
  --border:      rgba(255, 255, 255, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
  min-height: 100vh;
  color: var(--text);
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  position: relative;
  overflow-x: hidden;
}

/* Star twinkling background animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.5) 1px, transparent 1px),
    radial-gradient(circle, rgba(201,168,76,0.6) 1px, transparent 1px);
  background-size: 200px 200px, 350px 350px, 280px 280px;
  background-position: 10px 10px, 80px 120px, 160px 60px;
  animation: twinkle 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

@keyframes twinkle {
  0%   { opacity: 0.3; transform: scale(1); }
  50%  { opacity: 0.5; transform: scale(1.02); }
  100% { opacity: 0.25; transform: scale(0.99); }
}

/* ===================================================
   Layout
   =================================================== */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===================================================
   Typography
   =================================================== */
h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--text);
}

p {
  color: var(--text-muted);
  line-height: 1.8;
}

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

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

/* ===================================================
   Star Badge
   =================================================== */
.star-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

/* ===================================================
   Section Titles
   =================================================== */
.section-title {
  text-align: center;
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  margin-bottom: 32px;
  color: var(--text);
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===================================================
   Hero
   =================================================== */
.hero {
  padding: 80px 0 72px;
  text-align: center;
  position: relative;
}

.hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 16px auto 32px;
  line-height: 1.8;
}

.hero-sub strong {
  color: var(--text);
}

/* ===================================================
   Buttons
   =================================================== */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #000;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: rgba(201, 168, 76, 0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===================================================
   Benefits Section
   =================================================== */
.benefits {
  padding: 64px 0;
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

@media (min-width: 780px) {
  .benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.benefit-card:hover {
  border-color: rgba(201, 168, 76, 0.4);
  transform: translateY(-3px);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

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

/* ===================================================
   How It Works Section
   =================================================== */
.how {
  padding: 64px 0;
  background: rgba(255,255,255,0.02);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===================================================
   Testimonials Section
   =================================================== */
.testimonials {
  padding: 64px 0;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 12px;
  left: 18px;
  font-size: 3rem;
  color: rgba(201, 168, 76, 0.25);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
  padding-top: 18px;
}

.testimonial-author {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

/* ===================================================
   Form Section
   =================================================== */
.form-section {
  padding: 72px 0;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 480px) {
  .form-card {
    padding: 32px 20px;
  }
}

.form-card h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text);
}

.form-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-group .label-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.required-mark {
  color: #ff6b6b;
  margin-left: 4px;
  font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a84c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Field error state */
.field-error input,
.field-error select,
.field-error textarea {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.field-error-msg {
  display: block;
  font-size: 0.8rem;
  color: #ff8080;
  margin-top: 5px;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  border-radius: 3px;
}

.checkbox-group label {
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-group a {
  color: var(--accent);
}

/* Form submit button */
.form-submit-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 16px;
  margin-top: 8px;
}

/* Form message / feedback */
#formMessage {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.93rem;
  text-align: center;
}

#formMessage.success {
  background: rgba(72, 199, 142, 0.15);
  border: 1px solid rgba(72, 199, 142, 0.4);
  color: #48c78e;
}

#formMessage.error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ff8080;
}

.hidden {
  display: none !important;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(0, 0, 0, 0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ===================================================
   Footer
   =================================================== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer a {
  color: var(--accent);
  font-size: 0.82rem;
}

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

/* ===================================================
   Thanks / Premium page specific
   =================================================== */
.thanks-hero {
  padding: 100px 0 80px;
  text-align: center;
}

.thanks-hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  color: var(--accent);
  margin-bottom: 20px;
}

.thanks-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 16px;
}

.thanks-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-top: 36px;
}

.thanks-links a {
  display: inline-block;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--accent);
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.thanks-links a:hover {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--accent);
  text-decoration: none;
}

/* Premium page */
.premium-hero {
  padding: 80px 0 60px;
  text-align: center;
}

.premium-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}

.price-tag {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  margin: 16px 0;
}

.price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.features-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  margin: 32px 0;
  text-align: left;
}

.features-list h2 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-item .check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.disclaimer {
  font-size: 0.78rem;
  color: rgba(240, 239, 248, 0.45);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 24px;
  line-height: 1.6;
}

/* ===================================================
   Privacy page
   =================================================== */
.privacy-section {
  padding: 64px 0;
}

.privacy-section h1 {
  font-size: 1.6rem;
  margin-bottom: 32px;
  color: var(--accent);
}

.privacy-section h2 {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 28px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.privacy-section p {
  font-size: 0.93rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

/* ===================================================
   Responsive tweaks
   =================================================== */
@media (max-width: 480px) {
  .hero {
    padding: 60px 0 52px;
  }

  .benefits,
  .how,
  .testimonials,
  .form-section {
    padding: 48px 0;
  }

  .steps {
    gap: 20px;
  }
}
