/* シフトカレンダー 公式サイト スタイルシート */

/* ========================================
   CSS Variables
======================================== */
:root {
  --primary-color: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #818CF8;
  --secondary-color: #10B981;
  --accent-color: #F59E0B;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-dark: #111827;
  --bg-tertiary: #F3F4F6;
  --border-color: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --header-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #FFFFFF;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary-color: #818CF8;
  --primary-dark: #6366F1;
  --primary-light: #A5B4FC;
  --secondary-color: #34D399;
  --accent-color: #FBBF24;
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-light: #9CA3AF;
  --bg-primary: #111827;
  --bg-secondary: #1F2937;
  --bg-dark: #030712;
  --bg-tertiary: #374151;
  --border-color: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --header-bg: rgba(17, 24, 39, 0.95);
  --card-bg: #1F2937;
}

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  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; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }
}

/* ========================================
   Layout
======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.section {
  padding: 4rem 0;
}

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

/* ========================================
   Header
======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

/* Logo Card Style */
/* Logo Card Style */
.logo-card {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md); /* Increased shadow */
  overflow: hidden;
}

[data-theme="dark"] .logo-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  box-shadow: none; /* No shadow in dark mode usually, or keep low */
}

.logo-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Theme-based logo switching */
.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

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

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-header-actions {
    display: none;
  }
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
}

.mobile-menu a:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  padding-top: 120px;
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 140px;
    padding-bottom: 6rem;
  }
}

.hero-content {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

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

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}

@media (min-width: 768px) {
  .hero-subtitle {
    margin-left: 0;
    margin-right: auto;
  }
}

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

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }
}

.store-badge {
  height: 48px;
  width: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.hero-image {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  max-width: 280px;
  width: 100%;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ========================================
   Features Section
======================================== */
.features {
  background: var(--bg-primary);
}

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

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.feature-title {
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ========================================
   Pricing Section
======================================== */
.pricing {
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

.pricing-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border: 2px solid var(--primary-color);
}

.pricing-card.featured::before {
  content: 'おすすめ';
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
}

.pricing-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.pricing-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-features {
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.pricing-features li::before {
  content: '✓';
  color: var(--secondary-color);
  font-weight: 700;
}

.pricing-features li.disabled {
  opacity: 0.5;
}

.pricing-features li.disabled::before {
  content: '×';
  color: var(--text-light);
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

/* ========================================
   CTA Section
======================================== */
.cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}

.cta h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.cta .btn-primary:hover {
  background: var(--bg-secondary);
}

/* ========================================
   Footer
======================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-section h4 {
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-light);
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
}

/* ========================================
   Legal Pages (Terms, Privacy, FAQ, etc.)
======================================== */
.legal-page {
  padding-top: 100px;
  min-height: 100vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .legal-content {
    padding: 3rem 2rem;
  }
}

.legal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
  margin-bottom: 0.5rem;
}

.legal-date {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.legal-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.legal-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.legal-body p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal-body ul, .legal-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  list-style: disc;
}

.legal-body ol li {
  list-style: decimal;
}

/* ========================================
   FAQ Page
======================================== */
.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.faq-category-btn {
  padding: 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-category-btn:hover,
.faq-category-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

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

.faq-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.faq-question:hover {
  background: rgba(0, 0, 0, 0.03);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   WebView Mode (for mobile app)
======================================== */
body.webview-mode .header,
body.webview-mode .footer,
body.webview-mode .cta {
  display: none;
}

body.webview-mode .legal-page {
  padding-top: 0;
}

body.webview-mode .legal-content {
  padding-top: 1rem;
}

/* ========================================
   Utilities
======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }

@media (max-width: 767px) {
  .hide-mobile { display: none; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none; }
}

/* ========================================
   Theme Toggle Button
======================================== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.theme-toggle .icon-sun {
  display: block;
  color: var(--accent-color);
}

.theme-toggle .icon-moon {
  display: none;
  color: var(--primary-light);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* Dark Mode Additional Styles */
[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer {
  background: var(--bg-dark);
}

[data-theme="dark"] .store-badge {
  filter: brightness(0.9);
}

/* Smooth theme transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header,
.mobile-menu,
.feature-card,
.pricing-card,
.faq-item,
.btn,
.theme-toggle {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
