/* ===== Áine — GitHub Pages ===== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&display=swap');

/* --- Tokens --- */
:root {
  --color-bg: #FFFFFF;
  --color-surface: #F5F5F7;
  --color-text: #1D1D1F;
  --color-text-secondary: #6E6E73;
  --color-accent: #0071E3;
  --color-accent-hover: #0077ED;
  --color-border: #E8E8ED;
  --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans TC', 'Noto Sans JP', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans TC', 'Noto Sans JP', 'Segoe UI', sans-serif;
  --max-width: 980px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --radius: 16px;
  --radius-sm: 10px;
}

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

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

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

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

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

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

/* --- Animations --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.7s ease-out both;
}

.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
}

.nav-links a {
  color: var(--color-text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.nav-links .lang-sep {
  color: var(--color-border);
  user-select: none;
}

.nav-links .active {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-lg);
  line-height: 1.5;
}

/* App Store badge */
.app-store-status {
  display: inline-block;
  margin-bottom: var(--space-lg);
  transition: opacity 0.2s ease;
}

.app-store-status img {
  display: block;
  height: 50px;
  width: auto;
}

.app-store-status:hover,
.app-store-status:focus-visible {
  opacity: 0.8;
}

/* --- Screenshots --- */
.screenshots {
  padding: 0 var(--space-md) var(--space-xl);
}

.screenshots-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.screenshots-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: var(--space-md);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  align-items: start;
}

.screenshot-card {
  min-width: 0;
  max-width: 210px;
  margin: 0 auto;
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 1260 / 2736;
  object-fit: contain;
  border-radius: 28px;
  border: 1px solid rgba(29, 29, 31, 0.14);
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.screenshot-card figcaption {
  margin-top: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* --- Features --- */
.features {
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.features-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  color: #fff;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md);
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

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

/* --- Content Pages (Privacy / Support) --- */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.page-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
}

.page-content .page-date {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.page-content h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.page-content p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.page-content strong {
  color: var(--color-text);
  font-weight: 600;
}

/* FAQ details */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: var(--space-sm) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text);
  transition: color 0.2s;
}

.faq-item summary:hover { color: var(--color-accent); }

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--color-text-secondary);
  transition: transform 0.25s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-answer {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  padding-bottom: var(--space-sm);
}

/* Contact section */
.contact-section {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  text-align: center;
}

.contact-section h2 {
  margin-top: 0;
}

.contact-email {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .screenshots {
    padding: 0 var(--space-sm) var(--space-lg);
  }

  .screenshots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .screenshot-card {
    max-width: 260px;
    margin: 0 auto;
  }

  .screenshot-card img {
    border-radius: 24px;
  }

  .screenshot-card figcaption {
    font-size: 0.8rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .hero {
    padding: var(--space-xl) var(--space-sm) var(--space-lg);
  }

  .nav-links {
    gap: 6px;
    font-size: 0.78rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .screenshots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 430px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-card {
    max-width: 230px;
  }
}
