/* Halo Memories site. Palette = app "柔白 / 柔黑" themes; motion = HaloMotion curves.
   One background colour for the whole page: sections are separated by space and hairlines only. */
:root {
  color-scheme: light dark;
  --bg: #f3f3f1;
  --card: #fafaf8;
  --ink: #111113;
  --muted: #5f6368;
  --faint: #9a9da1;
  --line: rgba(17, 17, 19, .1);
  --glass: rgba(243, 243, 241, .78);
  --button-bg: #111113;
  --button-ink: #fafaf8;
  --glow: rgba(17, 17, 19, .06);
  --shadow: 0 24px 60px rgba(17, 17, 19, .12);

  /* HaloMotion.press / .enter / .move: timingCurve(0.23, 1, 0.32, 1) */
  --ease: cubic-bezier(.23, 1, .32, 1);
  --press: .14s;
  --enter: .26s;
  --move: .36s;
  /* Spring(duration: 0.72, bounce: 0.22), same as the organize intro deck */
  --spring: linear(0, .021, .076, .152, .24, .333, .426, .515, .598, .674, .74, .798, .847, .889, .922, .95, .971, .987, .999, 1.008, 1.014, 1.018, 1.019, 1.02, 1.02, 1.018, 1.017, 1.015, 1.013, 1.011, 1.01, 1.008, 1.007, 1.005, 1.004, 1.003, 1.002, 1.002, 1.001, 1.001, 1);
  --spring-time: 1.1s;

  --gutter: clamp(16px, 5vw, 72px);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151517;
    --card: #1c1c1e;
    --ink: #f5f5f3;
    --muted: #b8babd;
    --faint: #75777b;
    --line: rgba(255, 255, 255, .1);
    --glass: rgba(21, 21, 23, .78);
    --button-bg: #f5f5f3;
    --button-ink: #111113;
    --glow: rgba(255, 255, 255, .07);
    --shadow: 0 30px 80px rgba(0, 0, 0, .5);
  }
}

@supports not (transition-timing-function: linear(0, 1)) {
  :root { --spring: cubic-bezier(.34, 1.4, .5, 1); --spring-time: .8s; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--muted); outline-offset: 4px; border-radius: 8px; }

.wrap { width: min(1120px, 100% - var(--gutter) * 2); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  border-bottom: 1px solid transparent;
  transition: background var(--move) var(--ease), border-color var(--move) var(--ease);
}
.site-header.is-scrolled {
  background: var(--glass);
  border-color: var(--line);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 560; text-decoration: none; transition: color var(--enter) var(--ease); }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  min-width: 44px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--enter) var(--ease), transform var(--press) var(--ease);
}
.lang-toggle:hover { color: var(--ink); }
.lang-toggle:active { transform: scale(.94); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  transition: transform var(--press) var(--ease), opacity var(--enter) var(--ease);
}
.button svg { width: 18px; height: 18px; fill: currentColor; }
.button:hover { opacity: .86; }
.button:active { transform: scale(.96); }
.button.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.text-link { font-weight: 650; text-decoration: none; }
.text-link::after { content: " →"; transition: margin var(--enter) var(--ease); }
.text-link:hover::after { margin-left: 4px; }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 0; text-align: center; }
.hero-icon { width: 88px; height: 88px; margin: 0 auto 28px; border-radius: 20px; box-shadow: var(--shadow); }
.hero h1 {
  margin: 0 auto 20px;
  font-size: clamp(34px, 9vw, 112px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}
.hero h1 .dim { color: var(--faint); }
.hero .lead { max-width: 32em; margin: 0 auto; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.hero .button { margin-top: 32px; }
.rise { animation: rise .9s var(--ease) calc(var(--i, 0) * .08s) both; }
.hero-icon.rise { animation: pop var(--spring-time) var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }

/* Deck: three phones spring out from a stack, like the app's organize intro.
   The soft light behind them fades out well inside the box, so there are no edges. */
.deck {
  position: relative;
  height: clamp(420px, 62vw, 740px);
  margin-top: 56px;
  background: radial-gradient(ellipse 45% 45% at 50% 60%, var(--glow), transparent 70%);
}
.deck img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(200px, 28vw, 350px);
  translate: -50% 0;
  filter: drop-shadow(var(--shadow));
  transition: transform var(--spring-time) var(--spring), opacity .5s var(--ease);
}
.deck .front { z-index: 3; transform: translateY(24px) scale(.96); opacity: 0; }
.deck .side { z-index: 2; width: clamp(170px, 23vw, 290px); }
.deck .left { translate: calc(-50% - var(--s, 0) * 7vw) calc(var(--s, 0) * -40px); }
.deck .right { translate: calc(-50% + var(--s, 0) * 7vw) calc(var(--s, 0) * -40px); }
.deck .front { scale: calc(1 + var(--s, 0) * .05); }
.deck .left { transform: translate(-8%, -4%) rotate(-3deg) scale(.9); }
.deck .right { transform: translate(8%, -4%) rotate(3deg) scale(.9); }
.deck.is-open .front { transform: none; opacity: 1; }
.deck.is-open .left { transform: translate(-92%, -9%) rotate(-7deg); transition-delay: .06s; }
.deck.is-open .right { transform: translate(92%, -9%) rotate(7deg); transition-delay: .1s; }
.deck::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: auto -50vw 0;
  height: 35%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

/* ---------- Statement ---------- */
.statement { padding: clamp(88px, 14vw, 180px) 0; }
.statement p {
  max-width: 15em;
  margin: 0;
  font-size: clamp(32px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.statement .word { color: var(--faint); opacity: .4; transition: color var(--move) var(--ease), opacity var(--move) var(--ease); }
.statement .word.is-lit { color: var(--ink); opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.section-title { margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }
.section-lead { margin: 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 19px); line-height: 1.65; }

/* ---------- Feature rows ---------- */
.features { display: grid; gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(32px, 5vw, 64px);
  border-radius: 32px;
  background: var(--card);
}
.features > .feature:nth-child(even) .feature-media { order: -1; }
.feature h3 { margin: 0; font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; }
.feature p { margin: 16px 0 0; max-width: 24em; color: var(--muted); font-size: 18px; line-height: 1.65; }
.feature-media img {
  width: min(100%, 420px);
  margin: 0 auto;
  filter: drop-shadow(var(--shadow));
  translate: 0 var(--py, 0);
  transform: translateY(60px) scale(.94) rotate(-1.5deg);
  opacity: 0;
  transition: transform var(--spring-time) var(--spring) .12s, opacity .6s var(--ease) .12s;
}
.feature.is-in .feature-media img { transform: none; opacity: 1; }
.no-js .feature-media img { transform: none; opacity: 1; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pair .feature { grid-template-columns: 1fr; align-content: start; padding-bottom: 0; overflow: hidden; }
.pair .feature-media img { width: min(100%, 400px); margin-bottom: -8%; }

/* Smaller points: plain text columns divided by hairlines. */
.points { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 6vw, 72px); }
.point { position: relative; padding: 32px 28px 0 0; }
.point + .point { padding-left: 28px; border-left: 1px solid var(--line); }
.point .sym { margin-bottom: 18px; }
.point h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.point p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ---------- Privacy ---------- */
.promises { margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none; }
.promises li {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: start;
  padding: 30px 0;
}
.promises li:last-child { border-bottom: 1px solid var(--line); }
.promises li > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 64px; }
.promises .sym { margin-top: 2px; }
.promises strong { font-size: clamp(22px, 2.6vw, 30px); font-weight: 750; letter-spacing: -.02em; }
.promises span { color: var(--muted); font-size: 17px; line-height: 1.65; }
.privacy .text-link { display: inline-block; margin-top: 28px; }

/* Hairline that draws itself from the left when its row reveals. */
.promises li::before, .point::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease) var(--delay, 0s);
}
.promises li.is-in::before, .point.is-in::before { transform: none; }

/* SF Symbols-style line icons; strokes draw in like a pen. */
.sym {
  display: block;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sym > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.sym > *:nth-child(2) { transition-delay: .12s; }
.sym > *:nth-child(3) { transition-delay: .24s; }
.sym > *:nth-child(4) { transition-delay: .36s; }
.is-in .sym > * { stroke-dashoffset: 0; }
.no-js .sym > * { stroke-dashoffset: 0; }

/* ---------- Closing ---------- */
.cta { padding: clamp(96px, 13vw, 168px) 0 clamp(72px, 9vw, 112px); text-align: center; }
.cta-icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 32px;
  border-radius: 25px;
  box-shadow: var(--shadow);
  transform: scale(.7) rotate(-8deg);
  transition: transform var(--spring-time) var(--spring);
}
.cta .is-in .cta-icon { transform: none; animation: float 6s ease-in-out 1.2s infinite; }
@keyframes float { 50% { translate: 0 -8px; } }
.cta h2 { margin: 0 auto; font-size: clamp(36px, 5.6vw, 72px); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }
.cta p { margin: 18px auto 32px; color: var(--muted); font-size: 18px; }

.support { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.support h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.support p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.support a { align-self: center; font-size: 17px; font-weight: 650; text-decoration: none; }
.support a:hover { text-decoration: underline; text-underline-offset: 5px; }
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 24px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}
.legal nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--ink); }

/* ---------- Document pages (privacy) ---------- */
.doc { padding: 132px 0 80px; }
.doc .wrap { width: min(760px, 100% - var(--gutter) * 2); }
.doc h1 { margin: 0; font-size: clamp(40px, 7vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.doc .updated { margin: 16px 0 48px; color: var(--faint); font-size: 14px; }
.doc section { padding: 28px 0; border-top: 1px solid var(--line); }
.doc h2 { margin: 0 0 12px; font-size: 21px; font-weight: 750; }
.doc p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .section-head, .feature, .pair, .promises li > div { grid-template-columns: 1fr; }
  .features > .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media img { width: min(100%, 340px); }
  .points { grid-template-columns: 1fr; }
  .point, .point + .point { padding: 28px 0; border-left: 0; }
  .point:last-child { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hero { padding-top: 112px; }
  .hero-icon { width: 72px; height: 72px; border-radius: 16px; }
  .deck { margin-top: 40px; }
  .deck.is-open .left { transform: translate(-70%, -6%) rotate(-6deg); }
  .deck.is-open .right { transform: translate(70%, -6%) rotate(6deg); }
  .header-actions .button.small { display: none; }
  .feature { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .deck img, .statement .word, .feature-media img, .sym > *, .cta-icon, .promises li::before, .point::before { transition: none; }
  .rise, .hero-icon.rise, .cta .is-in .cta-icon { animation: none; }
  .feature-media img, .cta-icon, .promises li::before, .point::before { transform: none; opacity: 1; translate: none; }
  .sym > * { stroke-dashoffset: 0; }
  .deck img { translate: -50% 0; scale: none; }
  .reveal { opacity: 1; transform: none; }
  .statement .word { color: var(--ink); opacity: 1; }
}
