/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --bg:               #F2F2F7;
  --surface:          #FFFFFF;
  --text:             #1C1C1E;
  --text-2:           #636366;
  --text-3:           #AEAEB2;
  --border:           #E5E5EA;
  --shadow-sm:        0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:        0 10px 40px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --radius-icon:      22%;
  --ease:             cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font:             -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 180ms var(--ease);
  padding: 6px 0;
}

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

.back-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* =============================================
   HERO (home page)
   ============================================= */
.hero {
  padding: 80px 0 56px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =============================================
   SECTION TITLE
   ============================================= */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
}

/* =============================================
   APP GRID (home page)
   ============================================= */
.apps-section {
  padding-bottom: 100px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease);
  cursor: pointer;
}

.app-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.app-card-top {
  padding: 28px 28px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.app-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  background: var(--app-color, #888);
  user-select: none;
}

.app-card-info { flex: 1; }
.app-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.app-tagline {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.4;
}

.app-card-footer {
  padding: 0 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-ios     { background: #E0F0FF; color: #0066CC; }
.badge-macos   { background: #E3F5E5; color: #1A7A2A; }
.badge-soon    { background: #FFF3E0; color: #C75000; }

.app-card-arrow {
  font-size: 1rem;
  color: var(--text-3);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.app-card:hover .app-card-arrow {
  color: var(--text-2);
  transform: translateX(3px);
}

/* =============================================
   APP HERO (detail pages)
   ============================================= */
.app-hero {
  padding: 56px 0 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.app-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--app-tint, rgba(0,122,255,0.06)) 0%, transparent 60%);
  pointer-events: none;
}

.app-hero-inner {
  display: flex;
  gap: 36px;
  align-items: center;
  position: relative;
}

.app-hero-icon {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
  box-shadow: 0 6px 28px rgba(0,0,0,0.14);
  object-fit: cover;
}

.app-hero-icon-placeholder {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 6px 28px rgba(0,0,0,0.16);
  background: var(--app-color, #888);
  user-select: none;
}

.app-hero-body { flex: 1; }

.app-hero-name {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.app-hero-tagline {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-bottom: 16px;
}

.app-hero-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.app-hero-cat {
  font-size: 0.8rem;
  color: var(--text-3);
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 180ms var(--ease);
}

.btn-store:hover { opacity: 0.8; }

.btn-store-soon {
  background: #8E8E93;
  cursor: default;
  pointer-events: none;
}

/* =============================================
   APP ABOUT
   ============================================= */
.app-about {
  padding: 56px 0 48px;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-description h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.about-description p {
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.about-features {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.about-features h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.4;
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-color, #007AFF);
  flex-shrink: 0;
  margin-top: 5px;
}

/* =============================================
   APP LINKS GRID (detail page)
   ============================================= */
.app-links {
  padding: 0 0 80px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.link-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 22px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.link-card-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.link-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.link-card p {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
}

/* =============================================
   POLICY / LEGAL PAGES
   ============================================= */
.policy-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 36px;
}

.policy-header-inner {
  display: flex;
  gap: 16px;
  align-items: center;
}

.policy-icon {
  font-size: 2.2rem;
}

.policy-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.policy-header .app-link {
  font-size: 0.85rem;
  color: var(--text-2);
  text-decoration: none;
}

.policy-header .app-link:hover { text-decoration: underline; }

.policy-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 24px 100px;
}

.policy-notice {
  background: #FFF3E0;
  border: 1px solid #FFD599;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: #7D3900;
  margin-bottom: 36px;
  line-height: 1.5;
}

.last-updated {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.policy-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 10px;
}

.policy-body p,
.policy-body li {
  color: var(--text-2);
  line-height: 1.78;
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.policy-body ul,
.policy-body ol {
  padding-left: 22px;
  margin-bottom: 12px;
}

.policy-body a { color: #007AFF; }

.policy-body strong { color: var(--text); font-weight: 600; }

/* =============================================
   SUPPORT PAGE
   ============================================= */
.support-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 100px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.support-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 28px 32px;
  box-shadow: var(--shadow-sm);
}

.support-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-item {
  border-radius: 10px;
  overflow: hidden;
}

details summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 150ms;
  user-select: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--text-3);
  font-weight: 400;
  transition: transform 200ms var(--ease);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details summary:hover { background: var(--bg); }

.faq-answer {
  padding: 0 14px 14px 14px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea,
.form-group select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color 150ms, box-shadow 150ms;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #007AFF;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-note {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

.btn-submit {
  align-self: flex-start;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 180ms, transform 120ms;
}

.btn-submit:hover { opacity: 0.88; }
.btn-submit:active { transform: scale(0.98); }

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.contact-item-icon { font-size: 1.1rem; }

.contact-item a { color: #007AFF; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 760px) {
  .app-hero-inner { flex-direction: column; gap: 20px; text-align: center; }
  .app-hero-meta  { justify-content: center; }
  .app-hero-icon, .app-hero-icon-placeholder { width: 90px; height: 90px; }

  .about-inner    { grid-template-columns: 1fr; gap: 24px; }
  .links-grid     { grid-template-columns: 1fr; }
  .form-row       { grid-template-columns: 1fr; }
  .footer-inner   { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 500px) {
  .apps-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .app-card-top { padding: 18px 18px 12px; gap: 12px; }
  .app-card-footer { padding: 0 18px 16px; }
  .app-icon, .app-icon-placeholder { width: 52px; height: 52px; }
  .app-icon-placeholder { font-size: 1.3rem; }
  .app-name { font-size: 0.85rem; }
  .app-tagline { font-size: 0.72rem; }
  .hero { padding: 48px 0 36px; }
  .container { padding: 0 16px; }
  .links-grid { grid-template-columns: 1fr; }
}
