/* ==========================================================================
   Airople Flagship Brand Site — Design Tokens (Apple Pure White × Ghost Fibers)
   Iconic Apple.com pure white (#FFFFFF) & light gray (#F5F5F7) studio ground
   floating cleanly over light-mode emerald WebGL2 Ghost Fibers.
   Accessibility: 17px Apple body, WCAG AAA/AA+ contrast, >=48px touch targets,
   CSS Logical Properties for automatic RTL support (ar, ur, fa).
   ========================================================================== */

:root {
  /* Apple.com signature pure white & frosted gallery surfaces */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-card-hover: rgba(255, 255, 255, 0.94);

  /* Apple.com ink scale */
  --ink: #1d1d1f;
  --ink-soft: #333336;
  --muted: #6e6e73;
  --subtle: #86868b;
  --ink-on-dark: #f5f5f7;
  --muted-on-dark: #a1a1a6;

  /* Official Airople Brand Sprout Green (PANTONE 364 C) + Apple Link Blue */
  --brand: #407630;
  --brand-deep: #305b24;
  --brand-hover: #4a8a37;
  --brand-on-dark: #6cd652;
  --brand-wash: rgba(64, 118, 48, 0.09);
  --link: #0066cc;
  --link-on-dark: #2997ff;

  /* Crisp hairlines & featherlight studio shadows */
  --stroke: rgba(0, 0, 0, 0.08);
  --stroke-strong: rgba(0, 0, 0, 0.16);
  --stroke-brand: rgba(64, 118, 48, 0.24);
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.045);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 28px 68px rgba(0, 0, 0, 0.12);

  /* Apple system AHA/ACC reference dots */
  --status-normal: #248a3d;
  --status-elevated: #b25000;
  --status-stage1: #d95f18;
  --status-stage2: #d70015;

  /* Apple SF Pro Display / Text stack + global CJK/RTL fallbacks */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Layout metrics */
  --max-w: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--ink);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.54;
  letter-spacing: -0.02em;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[lang^="zh"] body,
html[lang="ja"] body,
html[lang="ko"] body {
  letter-spacing: 0;
  line-height: 1.7;
}

html[dir="rtl"] body {
  letter-spacing: 0;
  line-height: 1.72;
}

main { flex: 1; position: relative; z-index: 1; }
img, svg, picture { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

.num, .bp-num { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; inset-block-start: -100px; inset-inline-start: 16px; z-index: 200;
  background: var(--brand); color: #ffffff; padding: 10px 18px;
  border-radius: var(--radius-pill); font-weight: 600;
  transition: inset-block-start 0.2s var(--ease-apple);
}
.skip-link:focus { inset-block-start: 16px; }

/* ---------- Scroll Reveal Choreography ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s var(--ease-out) var(--delay, 0s),
    transform 0.92s var(--ease-out) var(--delay, 0s),
    filter 0.85s var(--ease-out) var(--delay, 0s),
    clip-path 1.05s var(--ease-out) var(--delay, 0s);
}
[data-reveal="blur"] {
  transform: translateY(26px);
  filter: blur(7px);
}
[data-reveal="scale"] {
  transform: translateY(42px) scale(0.95);
}
[data-reveal="left"] {
  transform: translateX(-36px);
}
[data-reveal="right"] {
  transform: translateX(36px);
}
html[dir="rtl"] [data-reveal="left"] { transform: translateX(36px); }
html[dir="rtl"] [data-reveal="right"] { transform: translateX(-36px); }

/* Editorial curtain reveal for lifestyle photography (unveils smoothly + gentle zoom settle) */
[data-reveal="curtain"] {
  transform: translateY(24px) scale(0.98);
  clip-path: inset(12% 0 12% 0 round var(--radius-lg));
}
[data-reveal="curtain"] img {
  transform: scale(1.12);
  transition: transform 1.15s var(--ease-out) var(--delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
  clip-path: inset(0 0 0 0 round var(--radius-lg));
}
[data-reveal="curtain"].is-visible img {
  transform: scale(1);
}

.shot [data-reveal],
.shot * {
  opacity: 1 !important; transform: none !important; filter: none !important;
  clip-path: none !important; animation: none !important; transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
