@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Noto+Sans+JP:wght@200;300;400&display=swap');

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

:root {
  --bg-void: #030305;
  --bg-deep: #080810;
  --bg-surface: #0c0c14;
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-whisper: rgba(255, 255, 255, 0.45);
  --accent: #c73e3e;
  --accent-glow: rgba(199, 62, 62, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --shimmer: rgba(255, 255, 255, 0.02);
}

/* Noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 200;
  color: var(--text-primary);
  background: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(199, 62, 62, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(40, 30, 60, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 50%, var(--bg-surface) 100%);
  background-attachment: fixed;
  line-height: 2;
  min-height: 100vh;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

/* Page load animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 32px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 1.2s ease-out;
}

/* ============================================
   HEADER
   ============================================ */
header {
  text-align: center;
  margin-bottom: 0;
  padding-bottom: 48px;
}

.app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 28px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 60px -20px rgba(0, 0, 0, 0.7);
  animation: fadeIn 1s ease-out 0.2s both;
}

h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  animation: fadeIn 1s ease-out 0.4s both;
}

.tagline {
  color: var(--text-whisper);
  font-size: 0.9rem;
  font-weight: 200;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  animation: fadeIn 1s ease-out 0.6s both;
}

/* ============================================
   SHINIGAMI HERO
   ============================================ */
.shinigami-hero {
  text-align: center;
  padding: 60px 0 80px;
  position: relative;
}

/* Ambient glow behind shinigami */
.shinigami-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
  animation: breatheGlow 8s ease-in-out infinite;
}

@keyframes breatheGlow {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

.shinigami-image {
  width: 300px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
  animation: float 7s ease-in-out infinite, fadeIn 1.5s ease-out 0.3s both;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(0.5deg); }
  50% { transform: translateY(-14px) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(-0.5deg); }
}

.shinigami-speech {
  margin-top: 48px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  position: relative;
  animation: fadeIn 1.2s ease-out 0.8s both;
}

/* Decorative line */
.shinigami-speech::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-whisper), transparent);
  margin: 0 auto 24px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  flex: 1;
}

section {
  margin-bottom: 72px;
  animation: fadeIn 1s ease-out both;
}

section:nth-child(1) { animation-delay: 0.9s; }
section:nth-child(2) { animation-delay: 1.0s; }
section:nth-child(3) { animation-delay: 1.1s; }

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 28px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h3 {
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 16px;
  color: var(--text-primary);
}

p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-weight: 200;
}

/* About section - poetic styling */
.about p {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  line-height: 2.2;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Features list */
ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  padding: 14px 0;
  padding-left: 32px;
  position: relative;
  color: var(--text-secondary);
  font-weight: 200;
  border-bottom: 1px solid var(--border);
}

ul li:last-child {
  border-bottom: none;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================
   APP PREVIEW SECTION
   ============================================ */
.app-preview {
  text-align: center;
  padding: 48px 0 72px;
  position: relative;
}

.app-preview h2 {
  margin-bottom: 40px;
}

.phone-frame {
  position: relative;
  display: inline-block;
  max-width: 280px;
  width: 100%;
}

.phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 32px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(199, 62, 62, 0.08);
  animation: fadeIn 1s ease-out 1.2s both;
}

/* ============================================
   MAIL SECTION
   ============================================ */
.mail-section {
  text-align: center;
  padding: 0 0 24px;
}

.mail-section-voice {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-whisper);
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}

/* Mail preview list */
.mail-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto 40px;
  text-align: left;
}

.mail-preview-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.015);
}

/* Envelope SVG icon */
.mail-preview-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.5;
}

.mail-preview-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Mail type label */
.mail-preview-type {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Description */
.mail-preview-subject {
  font-size: 0.8rem;
  font-weight: 200;
  color: var(--text-whisper);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* CTA badge */
.mail-samples-badge {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)),
    rgba(12, 12, 20, 0.55);
  box-shadow:
    0 18px 40px -26px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              color 0.4s ease;
}

.mail-samples-badge:hover {
  color: var(--accent);
  border-color: rgba(199, 62, 62, 0.3);
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px -24px rgba(199, 62, 62, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */
.download {
  text-align: center;
  padding: 64px 0;
  position: relative;
}

.download::before {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto 48px;
}

.app-store-badge {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  padding: 18px 48px;
  border: 1px solid rgba(199, 62, 62, 0.3);
  border-radius: 4px;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.app-store-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.app-store-badge:hover {
  border-color: rgba(199, 62, 62, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px rgba(199, 62, 62, 0.2);
}

.app-store-badge:hover::before {
  opacity: 1;
}

.note {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-whisper);
  letter-spacing: 0.1em;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  text-align: center;
  margin-top: auto;
}

footer nav {
  margin-bottom: 24px;
}

footer nav a {
  color: var(--text-whisper);
  text-decoration: none;
  margin: 0 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

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

.copyright {
  font-size: 0.7rem;
  color: var(--text-whisper);
  letter-spacing: 0.15em;
  opacity: 0.6;
}

/* ============================================
   SECONDARY PAGES (Privacy, Support, Terms)
   ============================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-whisper);
  text-decoration: none;
  margin-bottom: 48px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

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

.content,
.legal-content,
.contact-info {
  background: rgba(255, 255, 255, 0.01);
  padding: 40px;
  border-radius: 2px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.content h3,
.legal-content h3 {
  font-family: "Cormorant Garamond", serif;
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.content h3:first-child,
.legal-content h3:first-child {
  margin-top: 0;
}

.content p,
.legal-content p,
.content li,
.legal-content li {
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text-secondary);
  font-weight: 200;
}

.content p:last-child,
.legal-content p:last-child {
  margin-bottom: 0;
}

.content p:first-child:last-child {
  font-size: 0.95rem;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(199, 62, 62, 0.35);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.inline-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.contact-info a:hover {
  border-bottom-color: var(--accent);
}

.mail-sample-list {
  display: grid;
  gap: 24px;
}

.mail-sample-card {
  background: rgba(255, 255, 255, 0.01);
  padding: 32px;
  border-radius: 2px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.mail-sample-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.mail-sample-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.55;
}

.mail-sample-label,
.mail-sample-heading {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-whisper);
  margin-bottom: 0;
}

.mail-sample-card > .mail-sample-heading {
  margin-bottom: 12px;
}

.mail-sample-heading {
  margin-top: 24px;
}

.mail-sample-subject {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.mail-sample-body {
  margin: 0;
  padding: 28px;
  white-space: pre-wrap;
  background: rgba(3, 3, 5, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  color: var(--text-secondary);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.88rem;
  line-height: 2;
  overflow-x: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .container {
    padding: 60px 24px 48px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .app-icon {
    width: 72px;
    height: 72px;
  }

  .shinigami-hero {
    padding: 40px 0 60px;
  }

  .shinigami-image {
    width: 240px;
  }

  .shinigami-speech {
    font-size: 1.1rem;
    margin-top: 36px;
  }

  .shinigami-hero::before {
    width: 280px;
    height: 280px;
  }

  .about p {
    font-size: 1.05rem;
  }

  .phone-frame {
    max-width: 240px;
  }

  .phone-frame img {
    border-radius: 28px;
  }

  .app-store-badge {
    padding: 16px 36px;
    font-size: 0.9rem;
  }

  footer nav a {
    margin: 0 12px;
  }

  .content,
  .legal-content,
  .contact-info,
  .mail-sample-card {
    padding: 28px;
  }

  .mail-sample-body {
    padding: 22px;
    font-size: 0.84rem;
  }

  .mail-section-voice {
    font-size: 1.05rem;
  }

  .mail-preview-item {
    padding: 20px 22px;
    gap: 16px;
  }

  .mail-preview-icon {
    width: 30px;
    height: 30px;
  }

  .mail-samples-badge {
    padding: 12px 28px;
    font-size: 0.78rem;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 48px 20px 40px;
  }

  h1 {
    font-size: 1.4rem;
  }

  .shinigami-image {
    width: 200px;
  }

  .phone-frame {
    max-width: 200px;
  }

  .phone-frame img {
    border-radius: 24px;
  }

  footer nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  footer nav a {
    margin: 0;
  }

  .mail-preview-item {
    padding: 18px 16px;
    gap: 14px;
  }

  .mail-preview-icon {
    width: 26px;
    height: 26px;
  }

  .mail-preview-type {
    font-size: 0.88rem;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
