/* ==========================================================================
   1. Design System & CSS Variables (Gentle & Organic Light Mode)
   ========================================================================== */
:root {
	/* Gentle & Organic Light Mode Palette */
	--bg-light: #fbfaf7;      /* Warm off-white / light ivory */
	--bg-card: #ffffff;        /* Pure white for contrast against warm bg */
	--bg-card-hover: #ffffff;
	--border-light: rgba(46, 48, 51, 0.07);
	--border-light-hover: rgba(46, 48, 51, 0.15);
	
	--text-primary: #2d3033;   /* Soft charcoal instead of harsh black */
	--text-secondary: #5e6268; /* Slate gray */
	--text-muted: #8b9098;
	
	/* Earth & Pastel Accents */
	--accent-sage: #7a9a82;    /* Gentle Sage Green */
	--accent-dusty: #7599b4;   /* Soft Dusty Blue */
	--accent-terracotta: #c9856f; /* Warm Terracotta */
	--accent-clay: #d6ad85;    /* Warm Ocher */
	
	/* Gentle Gradients */
	--grad-primary: linear-gradient(135deg, var(--accent-dusty) 0%, var(--accent-sage) 100%);
	--grad-warm: linear-gradient(135deg, var(--accent-terracotta) 0%, var(--accent-clay) 100%);
	--grad-badge: rgba(122, 154, 130, 0.08);
	
	--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
	--font-display: 'Space Grotesk', var(--font-primary);
}

/* ==========================================================================
   2. Reset & Core Page Layout
   ========================================================================== */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	background-color: var(--bg-light);
}

body {
	font-family: var(--font-primary);
	color: var(--text-primary);
	background-color: var(--bg-light);
	line-height: 1.6;
	overflow-x: hidden;
	position: relative;
	min-height: 100vh;
}

/* Background soft decorative orbs */
.glow-orb {
	position: absolute;
	width: 600px;
	height: 600px;
	border-radius: 50%;
	filter: blur(160px);
	z-index: -1;
	opacity: 0.25;
	pointer-events: none;
}

.orb-1 {
	top: -150px;
	right: -100px;
	background: radial-gradient(circle, #e2ebd9 0%, transparent 70%);
}

.orb-2 {
	top: 70vh;
	left: -250px;
	background: radial-gradient(circle, #d9e4eb 0%, transparent 70%);
}

.app-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ==========================================================================
   3. Glassmorphic Header (Light version)
   ========================================================================== */
.glass-header {
	position: sticky;
	top: 20px;
	width: 100%;
	z-index: 1000;
	background: rgba(251, 250, 247, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--border-light);
	border-radius: 16px;
	margin-top: 20px;
	box-shadow: 0 8px 30px rgba(46, 48, 51, 0.04);
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 30px;
}

.app-logo {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.4rem;
	letter-spacing: -0.5px;
	display: flex;
	align-items: center;
	color: var(--text-primary);
}

.logo-accent {
	background: var(--grad-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-size: 1.8rem;
	margin-right: 4px;
}

.app-nav ul {
	display: flex;
	list-style: none;
	gap: 30px;
}

.app-nav ul li a {
	color: var(--text-secondary);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.3s, transform 0.3s;
	display: inline-block;
}

.app-nav ul li a:hover,
.app-nav ul li a.active {
	color: var(--text-primary);
	font-weight: 600;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero-section {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 80px 0;
	gap: 40px;
	min-height: 80vh;
}

.hero-content {
	flex: 1;
	max-width: 580px;
}

.badge {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 2px;
	background: var(--grad-badge);
	border: 1px solid rgba(122, 154, 130, 0.15);
	padding: 6px 16px;
	border-radius: 100px;
	margin-bottom: 24px;
	color: var(--accent-sage);
}

.hero-title {
	font-family: var(--font-display);
	font-size: 3.5rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -1px;
	margin-bottom: 24px;
	color: var(--text-primary);
}

.gradient-text {
	background: var(--grad-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-description {
	color: var(--text-secondary);
	font-size: 1.1rem;
	line-height: 1.7;
	margin-bottom: 40px;
}

.hero-buttons {
	display: flex;
	gap: 20px;
}

/* Button styles */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
}

.btn-primary {
	background: var(--grad-primary);
	color: white;
	box-shadow: 0 4px 15px rgba(117, 153, 180, 0.25);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(117, 153, 180, 0.4);
}

.btn-secondary {
	background: var(--bg-card);
	color: var(--text-primary);
	border: 1px solid var(--border-light);
	box-shadow: 0 4px 12px rgba(46, 48, 51, 0.02);
}

.btn-secondary:hover {
	background: #faf9f6;
	border-color: rgba(46, 48, 51, 0.15);
	transform: translateY(-2px);
}

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

.visual-wrapper {
	position: relative;
	width: 100%;
	max-width: 450px;
	z-index: 1;
}

.hero-img {
	width: 100%;
	height: auto;
	border-radius: 24px;
	box-shadow: 0 15px 40px rgba(46, 48, 51, 0.08);
	border: 1px solid var(--border-light);
	transform: perspective(1000px) rotateY(-3deg) rotateX(3deg);
	transition: transform 0.5s;
}

.visual-wrapper:hover .hero-img {
	transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.visual-backdrop {
	position: absolute;
	top: 10%;
	left: 10%;
	width: 80%;
	height: 80%;
	background: var(--grad-primary);
	filter: blur(70px);
	z-index: -1;
	opacity: 0.12;
}

/* ==========================================================================
   5. Apps Section
   ========================================================================== */
.apps-section {
	padding: 80px 0;
	border-top: 1px solid var(--border-light);
}

.section-header {
	text-align: center;
	margin-bottom: 60px;
}

.section-title {
	font-family: var(--font-display);
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 16px;
}

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

/* Filter container */
.filter-container {
	display: inline-flex;
	background: rgba(46, 48, 51, 0.02);
	border: 1px solid var(--border-light);
	padding: 6px;
	border-radius: 12px;
}

.filter-btn {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	padding: 10px 22px;
	border-radius: 8px;
	font-weight: 500;
	font-size: 0.95rem;
	cursor: pointer;
	transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
	color: var(--text-primary);
	background: #ffffff;
	box-shadow: 0 4px 10px rgba(46, 48, 51, 0.04);
}

/* Apps Grid */
.apps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

/* App Card (Light Soft Shadow) */
.app-card {
	position: relative;
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: 20px;
	padding: 30px;
	display: flex;
	flex-direction: column;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 10px 30px rgba(46, 48, 51, 0.03), 0 1px 3px rgba(46, 48, 51, 0.02);
	overflow: hidden;
}

/* Card hover glow (Soft reflection instead of neon flash) */
.card-glow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(120px circle at var(--x, 0px) var(--y, 0px), rgba(117, 153, 180, 0.08) 0%, transparent 80%);
	z-index: 1;
	opacity: 0;
	transition: opacity 0.5s;
	pointer-events: none;
}

.app-card:hover {
	transform: translateY(-6px);
	border-color: var(--border-light-hover);
	box-shadow: 0 20px 40px rgba(46, 48, 51, 0.07);
}

.app-card:hover .card-glow {
	opacity: 1;
}

.app-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	z-index: 2;
}

.app-icon {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	box-shadow: 0 4px 10px rgba(46, 48, 51, 0.05);
}

.icon-dev {
	background: var(--grad-primary);
}

.icon-business {
	background: linear-gradient(135deg, var(--accent-sage) 0%, #a3c4bc 100%);
}

.icon-utility {
	background: var(--grad-warm);
}

.card-category-tag {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text-secondary);
	background: rgba(46, 48, 51, 0.03);
	padding: 4px 12px;
	border-radius: 100px;
	border: 1px solid var(--border-light);
}

.app-name {
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--text-primary);
	z-index: 2;
}

.app-desc-short {
	color: var(--text-secondary);
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 24px;
	flex-grow: 1;
	z-index: 2;
}

.app-tech-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 30px;
	z-index: 2;
}

.app-tech-tags span {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--text-secondary);
	border: 1px solid rgba(46, 48, 51, 0.05);
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(46, 48, 51, 0.02);
}

.app-card-actions {
	display: flex;
	gap: 12px;
	width: 100%;
	z-index: 2;
}

.btn-card {
	flex: 1;
	padding: 10px 16px;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
	text-decoration: none;
}

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

.btn-card-primary:hover {
	background: var(--text-primary);
	color: #ffffff;
	border-color: var(--text-primary);
	box-shadow: 0 4px 10px rgba(46, 48, 51, 0.1);
}

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

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

/* ==========================================================================
   6. Info Section (PWA definition)
   ========================================================================== */
.info-section {
	padding: 80px 0;
	border-top: 1px solid var(--border-light);
}

.info-card {
	background: radial-gradient(ellipse at top right, rgba(117, 153, 180, 0.05), transparent), var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: 24px;
	padding: 60px;
	box-shadow: 0 15px 40px rgba(46, 48, 51, 0.03);
}

.info-tag {
	font-family: var(--font-display);
	color: var(--accent-dusty);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 2px;
	margin-bottom: 16px;
	display: block;
}

.info-title {
	font-family: var(--font-display);
	font-size: 2.2rem;
	margin-bottom: 24px;
}

.info-text {
	color: var(--text-secondary);
	font-size: 1.1rem;
	line-height: 1.7;
	margin-bottom: 40px;
	max-width: 800px;
}

.feature-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.feature-item {
	display: flex;
	gap: 16px;
}

.feature-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(122, 154, 130, 0.1);
	color: var(--accent-sage);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	flex-shrink: 0;
	font-size: 0.85rem;
}

.feature-item div {
	font-size: 0.95rem;
	color: var(--text-secondary);
}

.feature-item div strong {
	color: var(--text-primary);
	display: block;
	margin-bottom: 4px;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.app-footer {
	padding: 40px 0;
	border-top: 1px solid var(--border-light);
	text-align: center;
	color: var(--text-muted);
	font-size: 0.85rem;
}

/* ==========================================================================
   8. PWA Install Modal (Pop-up Guide)
   ========================================================================== */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(46, 48, 51, 0.4);
	backdrop-filter: blur(8px);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}

.modal-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.modal-window {
	background: #ffffff;
	border: 1px solid var(--border-light-hover);
	border-radius: 20px;
	padding: 40px;
	width: 90%;
	max-width: 550px;
	box-shadow: 0 25px 60px rgba(46, 48, 51, 0.12);
	position: relative;
	transform: scale(0.9);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-window {
	transform: scale(1);
}

.modal-close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: transparent;
	border: none;
	color: var(--text-muted);
	font-size: 1.8rem;
	cursor: pointer;
	line-height: 1;
	transition: color 0.3s;
}

.modal-close-btn:hover {
	color: var(--text-primary);
}

.modal-title {
	font-family: var(--font-display);
	font-size: 1.6rem;
	margin-bottom: 8px;
}

.modal-subtitle {
	color: var(--text-secondary);
	font-size: 0.95rem;
	margin-bottom: 24px;
}

.modal-subtitle span {
	color: var(--accent-dusty);
	font-weight: 600;
}

/* Tabs */
.tab-container {
	display: flex;
	border-bottom: 1px solid var(--border-light);
	margin-bottom: 24px;
}

.tab-btn {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	padding: 10px 20px;
	font-weight: 500;
	cursor: pointer;
	position: relative;
	transition: color 0.3s;
	font-size: 0.95rem;
}

.tab-btn.active {
	color: var(--text-primary);
}

.tab-btn.active::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--grad-primary);
}

/* Tab contents */
.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.step-list {
	padding-left: 20px;
	color: var(--text-secondary);
}

.step-list li {
	margin-bottom: 16px;
	font-size: 0.95rem;
	line-height: 1.6;
}

.step-list li strong {
	color: var(--text-primary);
}

.ios-icon-share {
	background: var(--accent-dusty);
	color: white;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.8rem;
}

.android-dots {
	font-weight: bold;
	color: var(--text-primary);
}

.pc-install-icon {
	border: 1px solid var(--text-secondary);
	padding: 0 4px;
	border-radius: 4px;
	font-size: 0.8rem;
}

.modal-footer {
	margin-top: 30px;
	display: flex;
	justify-content: flex-end;
}

/* ==========================================================================
   9. Responsive Styles
   ========================================================================== */

/* タブレットサイズ (768px以下) */
@media screen and (max-width: 768px) {
	.hero-section {
		flex-direction: column-reverse;
		padding: 40px 0;
		text-align: center;
	}

	.hero-content {
		max-width: 100%;
	}

	.hero-title {
		font-size: 2.6rem;
	}

	.hero-buttons {
		justify-content: center;
	}

	.hero-visual {
		width: 100%;
		max-width: 320px;
	}

	.apps-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.feature-list {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.info-card {
		padding: 40px 30px;
	}
}

/* スマートフォンサイズ (430px以下 - ユーザー指示に基づく) */
@media screen and (max-width: 430px) {
	/* ヘッダーの縦並び化と自動拡張 (はみ出し対策) */
	.glass-header {
		position: static;
		margin-top: 10px;
		top: 0;
	}

	.header-inner {
		flex-direction: column;
		padding: 20px 15px;
	}

	.app-logo {
		margin-bottom: 16px;
	}

	.app-nav ul {
		gap: 15px;
	}

	.app-nav ul li a {
		font-size: 0.85rem;
	}

	/* ヒーローセクション */
	.hero-title {
		font-size: 2.1rem;
	}

	.hero-description {
		font-size: 0.95rem;
		margin-bottom: 30px;
	}

	.hero-buttons {
		flex-direction: column;
		width: 100%;
		gap: 12px;
	}

	.btn {
		width: 100%;
	}

	/* アプリグリッドの1列化 */
	.apps-grid {
		grid-template-columns: 1fr;
	}

	.app-card {
		padding: 24px;
	}

	.info-title {
		font-size: 1.7rem;
	}

	.info-text {
		font-size: 0.95rem;
	}

	.modal-window {
		padding: 30px 20px;
	}
}
