/* ----------------------------------------------------
   APPLE-STYLE GLOBAL TYPOGRAPHY + VARIABLES
---------------------------------------------------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, system-ui,
               "SF Pro Text", "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "New York", "Times New Roman", Georgia, "Times", serif;

  --font-size-body: 16px;
  --font-size-small: 13px;
  --font-size-h1: clamp(32px, 4vw, 56px);
  --font-size-h2: clamp(24px, 3vw, 40px);
  --font-size-h3: clamp(20px, 2.4vw, 28px);

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
}

/* Base Apple-like typography */
html { font-size: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  color: #1d1d1f;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Apple headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 0.4em;
  color: #1d1d1f;
}

h1 { font-size: var(--font-size-h1); line-height: 1.05; }
h2 { font-size: var(--font-size-h2); line-height: 1.1; }
h3 { font-size: var(--font-size-h3); line-height: 1.15; }

p { margin: 0 0 0.8em; }

.small, small { 
  font-size: var(--font-size-small); 
  color: #6e6e73;
}

a { color: #06c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Utility Apple marketing classes */
.eyebrow {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e6e73;
}

.headline {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
}

.subheadline {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-regular);
}

.body-copy {
  font-size: var(--font-size-body);
}

/* Optional serif reading area */
.reading-area {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
}

/* Apple-style dark mode */
@media (prefers-color-scheme: dark) {
  body { background: #000; color: #f5f5f7; }
  h1, h2, h3, h4, h5, h6 { color: #f5f5f7; }
  .small, .eyebrow { color: #a1a1a6; }
  a { color: #2997ff; }
}

/* ----------------------------------------------------
   GLOBAL RESET & IMAGE HANDLING
---------------------------------------------------- */
img { display: block; max-width: 100%; }

.container {
  max-width: 1024px;
  margin: 0 auto;
  background-image: url("Tile.jpg");
  background-repeat: repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----------------------------------------------------
   NAVBAR
---------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(to bottom, #9c7c51, #7e6341);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.navbar-brand {
  font-weight: var(--font-weight-semibold);
}

.navbar-brand .cn {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

/* Desktop nav links */
.nav-links-desktop {
  display: none;
  gap: 14px;
}

.nav-links-desktop a {
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
}

.nav-links-desktop a.active {
  background: #fff;
  color: #5e4325;
}

/* ----------------------------------------------------
   HAMBURGER BUTTON
---------------------------------------------------- */
.nav-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.nav-toggle-lines {
  width: 24px;
  height: 18px;
  position: relative;
}

.nav-toggle-lines span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-toggle-lines span:nth-child(1) { top: 0; }
.nav-toggle-lines span:nth-child(2) { top: 8px; }
.nav-toggle-lines span:nth-child(3) { top: 16px; }

.nav-toggle.open span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* ----------------------------------------------------
   MOBILE MENU
---------------------------------------------------- */
.nav-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease-out;
  padding-top: 90px;
  z-index: 150;
}

.nav-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-menu ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 80%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-menu li a {
  display: block;
  padding: 16px;
  text-align: center;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
}

/* Desktop breakpoint */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav-menu { display: none; }
  .nav-links-desktop { display: flex; }
}

/* ----------------------------------------------------
   SECTION ANIMATIONS
---------------------------------------------------- */
.section {
  scroll-margin-top: 80px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------
   ASK SECTION (Our Fully Rebuilt Section 2)
---------------------------------------------------- */
.ask-section {
  position: relative;
  padding: 40px 20px;
  overflow: hidden;
  background: #ffffff;
}

/* Desktop praying hands */
.hands-bg-desktop {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.ask-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
}

/* Mobile text block */
.ask-text-block {
  position: relative;
  z-index: 3;
  text-align: left;
}

/* Mobile praying-hands (behind text only) */
.ask-text-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("hands.png");
  background-repeat: no-repeat;
  background-size: 80%;
  background-position: center 140px;
  opacity: 0.07;
  z-index: -1;
}

.ask-title { font-size: var(--font-size-h2); }
.ask-subtitle { font-size: var(--font-size-h3); margin-top: 1.8rem; }

/* Phone mockup */
.ask-phone-block {
  display: flex;
  justify-content: center;
}

.phone-wrapper {
  position: relative;
  width: 270px;
}

.phone-frame {
  position: relative;
  width: 100%;
}

.phone-outline { width: 100%; z-index: 2; }

/* Screenshot inside frame */
.phone-screen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

/* Shadow */
.phone-shadow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 110%;
  pointer-events: none;
  z-index: 0;
}

/* Desktop layout */
@media (min-width: 720px) {

  .ask-section { padding: 70px 20px; }

  .hands-bg-desktop {
    display: block;
  }

  .ask-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .ask-text-block {
    width: 50%;
    text-align: left;
  }

  .ask-text-block::before {
    display: none;
  }

  .ask-phone-block {
    width: 50%;
    display: flex;
    justify-content: center;
  }

  .phone-wrapper {
    width: 320px;
  }
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.footer {
  text-align: center;
  padding: 40px 0;
  color: #6e6e73;
}
/* -------------------------------
   APPLE.COM PERFECT TYPOGRAPHY
   tuned for Chinese (SF Pro TC)
---------------------------------- */

/* Title (Section Header) — e.g. 多功能輸入界面 */
.apple-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 0.7em;
}

/* Subtitle (H3) — e.g. 重力求籤 */
.apple-subtitle {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.22;
  margin-top: 2.2rem;
  margin-bottom: 0.35em;
  letter-spacing: -0.01em;
}

/* Body text (Apple light grey marketing text) */
.apple-body.cn {
  font-size: 17px;
  line-height: 1.55;
  color: #6e6e73;        /* identical to Apple body text */
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 1.3em;
  max-width: 44em;       /* Apple’s max measure for Chinese text */
}

/* For mobile: soften measure + spacing */
@media (max-width: 720px) {
  .apple-body.cn {
    font-size: 16.5px;
    line-height: 1.58;
    margin-bottom: 1.2em;
    padding-right: 4px;
  }
  .apple-title {
    margin-bottom: 0.55em;
  }
}

.full-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ----------------------------------------------------
   SECTION 3 解籤 – 3-iPhone layout (Option A)
---------------------------------------------------- */
.section-tell {
  padding: 60px 20px;
  text-align: left;
  background: #ffffff;
  position: relative;
  z-index: 2;
}

.section-action-prayer {
  padding: 60px 20px;
  text-align: left;
  background: #ffffff;
  position: relative;
  z-index: 2;
}

/* Layout grid */
.tell-grid {
  display: flex;
  flex-direction: column;
  gap: 70px;
  margin-top: 40px;
}

/* Desktop = 3 columns */
@media (min-width: 900px) {
  .tell-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 30px;
  }
}

.tell-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: left;
}

/* iPhone wrapper */
.tell-phone-wrapper {
  width: 260px;
  position: relative;
  margin: 0 auto 20px;
}

@media (min-width: 900px) {
  .tell-phone-wrapper {
    width: 290px;
  }
}

.tell-phone-outline {
  width: 100%;
  z-index: 3;
  position: relative;
}

/* screenshot */
.tell-phone-screen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 2;
}

/* shadow */
.tell-phone-shadow {
  position: absolute;
  width: 110%;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

/* captions */
.tell-caption {
  font-size: 20px;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #1d1d1f;
}

.tell-description {
  max-width: 22em;
  margin: 0 auto;
}

/* ----------------------------------------------------
   SECTION 5 — 人性化的對稱設計 (from 5.jpg)
---------------------------------------------------- */

.design-section {
  padding: 60px 20px 50px;
  text-align: center;
}

/* Shared paragraph under all phones */
.design-body {
  max-width: 40em;
  margin: 30px auto 0;
}

/* MOBILE CAROUSEL ------------------------------ */
.design-carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory;
  gap: 30px;
  padding: 20px 10px 10px;
  margin-top: 30px;
}

.design-carousel::-webkit-scrollbar {
  display: none;
}

.design-slide {
  flex: 0 0 85%;
  scroll-snap-align: center;
}

/* PHONE MOCKUP ------------------------------ */
.design-phone {
  position: relative;
  width: 260px;
  margin: 0 auto;
}

.design-hand {
  width: 100%;
  margin-top: -50px;
  margin-bottom: -50px;
  display: block;
}

.design-screen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;  /* sits behind the outline */
}

/* ---------------------------------------------
   CLASSIC CIRCLE DOTS (MOBILE ONLY)
--------------------------------------------- */

.design-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.design-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #c8c8c8;   /* light grey */
  opacity: 0.6;
  transition: 0.25s ease;
}

.design-dot.active {
  background-color: #444;       /* dark grey for active */
  opacity: 1;
}

/* Desktop hides dots */
@media (min-width: 720px) {
  .design-dots {
    display: none;
  }
}


/* DESKTOP GRID ------------------------------ */
.design-desktop {
  display: none;
}

@media (min-width: 720px) {

  .design-carousel {
    display: none;
  }

  .design-desktop {
    display: flex;
    justify-content: center;
    align-items: flex-end;     /* <— KEY: bottom align all phones */
    gap: 40px;
    margin-top: 40px;
  }

  .design-card {
    width: 30%;
    display: flex;
    justify-content: center;
    align-items: flex-end;     /* phone inside also bottom aligned */
  }

  .design-phone {
    width: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-end;     /* image bottom baseline alignment */
    position: relative;
  }

  .design-hand {
    width: 100%;
    display: block;
  }
}

/* ----------------------------------------------------
   SECTION 4 — 分享功能 (replacing 4.jpg)
---------------------------------------------------- */

.section-share {
  position: relative;
  padding: 60px 20px 80px;
  text-align: center;
  overflow: hidden;
  background: #ffffff;
}

/* Background heads */
.share-heads-bg {
  position: absolute;
  inset: 0;
  width: 140%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.8;
  pointer-events: none;
  z-index: 3;
}

/* Spotlight circle */
.share-spotlight-wrapper {
  width: 260px;
  margin: 30px auto 40px;
  position: relative;
  z-index: 2;
}

.share-spotlight {
  width: 100%;
  display: block;
}

/* Paragraph block */
.share-text {
  position: relative;
  z-index: 2;
  max-width: 40em;
  margin: 0 auto 40px;
  text-align: left;
}

.share-text p {
  margin-bottom: 1.6em;
}

/* Social icons bar */
.share-icons {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.share-icons img {
  width: 260px;
  max-width: 85%;
  margin: 0 auto;
  display: block;
}

/* Desktop adjustments */
@media (min-width: 900px) {

  .section-share {
    padding: 90px 20px 100px;
  }

  .share-spotlight-wrapper {
    width: 330px;
    margin-top: 40px;
    margin-bottom: 60px;
  }

  .share-icons img {
    width: 360px;
  }

  .share-heads-bg {
    opacity: 0.18;
    width: 120%;
  }
}

.navbar-brand .cn {
  font-size: 15px;
  font-weight: 600;
  color: #ffe9b0;         /* soft gold */
  text-shadow: 0 0 2px rgba(0,0,0,0.4);
  letter-spacing: 0.3px;
  display: inline-block;
}

.container-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* -----------------------------
   行動指引 SECTION LAYOUT
------------------------------ */
.ag-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 20px;
}

/* Left text */
.ag-text {
  flex: 1;
}

/* Right phone */
.ag-phone {
  display: flex;
  justify-content: center;
}

.ag-phone-wrapper {
  position: relative;
  width: 260px;
}

/* iPhone 5s frame image */
.ag-phone-outline {
  width: 100%;
  z-index: 3;
  position: relative;
}

/* SCREENSHOT inside 5s frame */
.ag-phone-screen {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;                 /* ← tuned for 5s */
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 2;
}

/* Shadow under phone */
.ag-phone-shadow {
  position: absolute;
  width: 110%;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

/* Desktop layout */
@media (min-width: 900px) {
  .ag-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 70px 20px;
  }

  .ag-text { width: 50%; }
  .ag-phone { width: 50%; }

  .ag-phone-wrapper { width: 300px; }
}

/* ===== Hero: 簽示主視覺 ===== */

.hero-wts {
  position: relative;
  height: 78vh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Background image — clean, unfiltered */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/WTSComics-Hero.png");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Content */
.hero-content {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;

  margin-top: clamp(96px, 18vh, 180px);
  text-align: center;

  padding: 1.5rem;
  color: #ffffff;
  max-width: 90%;
}

/* App icon */
.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 1.4rem;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Headline */
.hero-title {
  color: #ffffff;
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35); /* subtle readability aid */
}

/* Tagline */
.hero-tagline {
  color: #ffffff;
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  letter-spacing: 0.08em;
  opacity: 0.95;
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Desktop refinement */
@media (min-width: 1024px) {
  .hero-wts {
    position: relative;
    padding-top: clamp(72px, 10vh, 120px);
    padding-bottom: clamp(72px, 10vh, 120px);
  }

  .hero-icon {
    width: 110px;
    height: 110px;
  }
}
