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

:root {
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  --color-bg: #000;
  --color-text: #f5f5f7;
  --color-text-muted: #86868b;
  --color-link: #2997ff;
  --color-link-hover: #0077ed;
  --hero-height: 650px;
  --nav-height: 44px;
  --apple-cdn: https://www.apple.com;
}

html { font-size: 17px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-system);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.47059;
  letter-spacing: -0.022em;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.nav-inner {
  max-width: 1008px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-logo:hover { text-decoration: none; opacity: 0.8; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--color-text); text-decoration: none; }

/* ── Main ── */
.main { width: 100%; overflow: hidden; }

.section { position: relative; width: 100%; }

/* ── Hero Tile (Apple section-hero pattern) ── */
.section-hero { background: #000; }

.tile-wrapper {
  position: relative;
  width: 100%;
  min-height: var(--hero-height);
  overflow: hidden;
  text-align: center;
}

.theme-dark {
  background: #000;
  color: var(--color-text);
}

.tile-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  text-indent: -9999px;
  overflow: hidden;
}

.tile-content {
  position: relative;
  z-index: 2;
  padding: 55px 22px 0;
  pointer-events: none;
}

.tile-content a { pointer-events: auto; }

.tile-copy-wrapper { margin-bottom: 14px; }

.tile-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  color: #bf4800;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.tile-headline {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 6px;
}

.tile-subheadline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  max-width: 600px;
  margin: 0 auto;
}

.tile-cta,
.tile-ctas {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

.cta-link,
.button {
  font-size: 1.05rem;
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.cta-link:hover,
.button:hover { color: var(--color-link-hover); text-decoration: underline; }

.cta-link::after,
.button::after {
  content: " ›";
  font-size: 1.1em;
}

.button-secondary {
  color: var(--color-link);
}

/* Apple tile-image-wrapper：產品圖置於底部 */
.tile-image-wrapper {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1008px;
  z-index: 1;
  pointer-events: none;
}

.tile-image-wrapper picture,
.tile-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ── Feature Grid ── */
.section-features {
  background: #000;
  padding: 12px 12px 60px;
}

.features-inner {
  max-width: 1008px;
  margin: 0 auto;
}

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

.feature-tile {
  position: relative;
  background: #1d1d1f;
  border-radius: 18px;
  min-height: 380px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.feature-tile:hover { transform: scale(1.01); }

.feature-tile .tile-link { border-radius: 18px; z-index: 3; }

.feature-tile .tile-content {
  padding: 36px 28px 0;
  text-align: left;
  pointer-events: none;
}

.feature-tile .tile-content a { pointer-events: auto; }

.feature-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 90%;
}

.feature-cta {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-size: 0.88rem;
  color: var(--color-link);
  z-index: 4;
  pointer-events: auto;
}

.feature-image-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  overflow: hidden;
  z-index: 1;
}

.feature-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* ── Articles Preview ── */
.section-articles {
  background: #f5f5f7;
  color: #1d1d1f;
  padding: 80px 22px;
}

.articles-inner {
  max-width: 1008px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 48px;
  color: #1d1d1f;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  list-style: none;
}

.article-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.article-card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8e8ed;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body { padding: 24px 28px 28px; }

.article-date {
  font-size: 0.75rem;
  color: #86868b;
  margin-bottom: 8px;
}

.article-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.article-excerpt {
  font-size: 0.88rem;
  color: #6e6e73;
  line-height: 1.5;
}

/* ── Footer ── */
.footer {
  background: #f5f5f7;
  border-top: 1px solid #d2d2d7;
  padding: 20px 22px;
  text-align: center;
  font-size: 0.75rem;
  color: #6e6e73;
}

/* ── Responsive ── */
@media (max-width: 734px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .article-list { grid-template-columns: 1fr; }
  .tile-cta, .tile-ctas { flex-direction: column; gap: 12px; }
  :root { --hero-height: 580px; }
}

/* ── Auth & Member Styles ── */
.user-greeting { font-size: 0.75rem; color: #f5f5f7; }
.btn-create {
  background: var(--color-link);
  color: #fff !important;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.btn-create:hover { opacity: 0.85; text-decoration: none !important; }
.btn-link-logout {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}
.btn-link-logout:hover { color: #ff453a; }

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 40px 22px;
  background: #000;
}
.auth-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.auth-card h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; color: #fff; text-align: center; }
.auth-subtitle { font-size: 0.88rem; color: var(--color-text-muted); text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: #e5e5ea; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--color-link); }
.auth-submit {
  width: 100%;
  padding: 12px;
  background: var(--color-link);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
}
.auth-submit:hover { background: var(--color-link-hover); }
.alert-error {
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid #ff453a;
  color: #ff453a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

