/* ============================================================
   Hanabe Photo Manager — 绯夜蔷薇 dark theme (matches app UI)
   ============================================================ */

:root {
  --bg:        #171013;
  --bg-soft:   #1d1418;
  --bg-sunk:   #221a1f;
  --line:      #32262c;
  --line-soft: #2a1f25;
  --ink:       #f2e9ec;
  --ink-2:     #b9a9b0;
  --ink-3:     #7f6f76;
  --accent:    #d86383;
  --accent-hi: #ec7d9b;
  --accent-deep:#b34a68;
  --accent-wash:#2e1d24;
  --gold:      #b8874f;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --wrap: 1080px;
  --nav-h: 60px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }

code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--accent-hi);
}

::selection { background: rgba(216,99,131,.32); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a2c33; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4a3942; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(23,16,19,.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}

.nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(23,16,19,.92);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15.5px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(140deg, var(--accent), #b34a68 55%, #7c3f58);
  flex: none;
  box-shadow: 0 0 12px rgba(216,99,131,.4);
}

.brand-light { color: var(--ink-3); font-weight: 500; }

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color .18s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transition: right .22s var(--ease);
}

.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 20px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .25s var(--ease);
  white-space: nowrap;
  will-change: transform;
}

.btn:active { transform: translateY(1px) scale(.985); }

.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn-lg { padding: 13px 28px; font-size: 15.5px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(216,99,131,.5);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -8px rgba(216,99,131,.65);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink-3);
  background: var(--bg-sunk);
  transform: translateY(-1px);
}

.btn-sub { opacity: .8; font-weight: 400; }

.btn.is-disabled {
  pointer-events: none;
  opacity: .45;
  box-shadow: none;
}

/* ---------------- Hero ---------------- */

.hero { padding: 76px 0 8px; }
.hero-inner { text-align: center; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin-bottom: 20px;
  animation: fadeDown .6s var(--ease) both;
}

.hero h1 {
  font-size: clamp(34px, 5.6vw, 58px);
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin-bottom: 22px;
  animation: fadeUp .7s var(--ease) .06s both;
}

.lede {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.75;
  animation: fadeUp .7s var(--ease) .12s both;
}

.hero-actions {
  margin: 34px 0 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp .7s var(--ease) .18s both;
}

.hero-meta {
  font-size: 13.5px;
  color: var(--ink-3);
  animation: fadeUp .7s var(--ease) .24s both;
}

.hero-shot {
  margin-top: 56px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 40px 80px -30px rgba(0,0,0,.75),
              0 0 0 1px rgba(216,99,131,.06);
  background: var(--bg-soft);
  animation: shotIn .9s var(--ease) .3s both;
  transform-origin: center 60%;
}

.hero-shot img { width: 100%; transition: transform .6s var(--ease); }
.hero-shot:hover img { transform: scale(1.008); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes shotIn {
  from { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------------- Sections ---------------- */

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }

.section-head { margin-bottom: 44px; max-width: 640px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.section-head p { color: var(--ink-2); }

.os-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 999px;
  color: var(--accent-hi);
  background: var(--accent-wash);
  border: 1px solid rgba(216,99,131,.35);
  vertical-align: 2px;
}

/* ---------------- Feature cards ---------------- */

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 22px 26px;
  transition: border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease), background .25s var(--ease);
  will-change: transform;
}

.card:hover {
  border-color: rgba(216,99,131,.45);
  background: #241920;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -18px rgba(0,0,0,.8), 0 0 0 1px rgba(216,99,131,.12);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent-hi);
  margin-bottom: 16px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.card:hover .icon {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 16px rgba(216,99,131,.3);
}

.icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { font-size: 16.5px; margin-bottom: 8px; }
.card p { font-size: 14.2px; color: var(--ink-2); line-height: 1.7; }

/* ---------------- Gallery ---------------- */

.shots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.shot {
  margin: 0;
  grid-column: span 2;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--bg-sunk);
  cursor: zoom-in;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              border-color .28s var(--ease);
  will-change: transform;
}

.shot:hover {
  transform: translateY(-4px) scale(1.008);
  border-color: rgba(216,99,131,.4);
  box-shadow: 0 20px 44px -20px rgba(0,0,0,.85);
}

.shot-wide { grid-column: span 3; }

.shot img {
  width: 100%;
  transition: transform .5s var(--ease), filter .3s var(--ease);
  transform-origin: center center;
}

.shot:hover img { transform: scale(1.02); }

.shot figcaption {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
  transition: color .2s var(--ease);
}

.shot:hover figcaption { color: var(--ink-2); }

/* ---------------- Download ---------------- */

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

.dl-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  background: var(--bg-sunk);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}

.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.85);
}

.dl-card.is-main {
  border-color: rgba(216,99,131,.45);
  background: linear-gradient(180deg, var(--accent-wash), var(--bg-sunk) 62%);
}

.dl-top { display: flex; align-items: center; gap: 10px; }
.dl-card h3 { font-size: 18px; }

.tag {
  font-size: 11.5px;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-weight: 500;
}

.dl-desc { font-size: 14.2px; color: var(--ink-2); flex: 1; }

.dl-facts {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.dl-facts b { color: var(--ink); font-weight: 500; }

.hash {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 13px;
  font-size: 12px;
  color: var(--ink-3);
}

.hash code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 11.5px;
  color: var(--ink-3);
}

.copy {
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
  transition: border-color .18s var(--ease), color .18s var(--ease),
              background .18s var(--ease), transform .15s var(--ease);
}
.copy:hover { border-color: var(--accent); color: var(--accent-hi); }
.copy:active { transform: scale(.94); }

.dl-hint {
  margin-top: 18px;
  font-size: 13.5px;
  color: #d8a05a;
  background: #2b2013;
  border: 1px solid #4a3a20;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.notes {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.notes h3 { font-size: 16px; margin-bottom: 14px; }

.notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.notes li {
  position: relative;
  padding-left: 18px;
  font-size: 14.4px;
  color: var(--ink-2);
  line-height: 1.7;
}

.notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .7;
}

.notes-foot { margin-top: 18px; font-size: 13px; color: var(--ink-3); }

/* ---------------- Privacy ---------------- */

.privacy {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 40px;
  align-items: start;
}

.privacy-text h2 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.privacy-text p { color: var(--ink-2); max-width: 520px; }

.ticks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28em;
  width: 15px;
  height: 8px;
  border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg) translateY(1px);
}

.privacy-card {
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.privacy-card h3 { font-size: 15.5px; margin-bottom: 16px; }
.privacy-card dl { margin: 0; }
.privacy-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.privacy-card dl > div:first-child { border-top: 0; padding-top: 0; }
.privacy-card dt { color: var(--ink-3); }
.privacy-card dd { margin: 0; text-align: right; }

/* ---------------- FAQ ---------------- */

.faq-wrap { max-width: 780px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 34px 18px 0;
  font-size: 15.5px;
  font-weight: 500;
  position: relative;
  transition: color .18s var(--ease), padding-left .22s var(--ease);
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .25s var(--ease), border-color .2s var(--ease);
}

.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq summary:hover { color: var(--accent-hi); padding-left: 6px; }
.faq details[open] summary { color: var(--accent-hi); }

.faq p {
  padding: 0 34px 20px 0;
  margin-top: -4px;
  font-size: 14.4px;
  color: var(--ink-2);
  line-height: 1.75;
  animation: fadeUp .3s var(--ease);
}

/* ---------------- Support ---------------- */

.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.support h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 10px; letter-spacing: -0.02em; }
.support p { color: var(--ink-2); margin-bottom: 20px; }

.qr { margin: 0; text-align: center; }
.qr img {
  width: 168px;
  height: 168px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  object-fit: cover;
}
.qr figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

/* ---------------- Footer ---------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
}
.footer-inner { text-align: center; }
.footer-brand { font-weight: 600; margin-bottom: 8px; }
.footer-note { font-size: 13px; color: var(--ink-3); }

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12,8,10,.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fade .22s var(--ease);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1500px, 100%);
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  animation: zoomIn .3s var(--ease);
  transform-origin: center center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.lightbox-close:hover { background: rgba(216,99,131,.3); transform: rotate(90deg); }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: scale(1) } }

/* ---------------- Reveal on scroll ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(3px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), filter .55s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-shot, .eyebrow, .hero h1, .lede, .hero-actions, .hero-meta,
  .lightbox img, .faq p {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .privacy { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .section { padding: 68px 0; }
  .hero { padding-top: 52px; }
  .grid-4 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot-wide { grid-column: span 1; }
  .dl-grid { grid-template-columns: 1fr; }
  .support { flex-direction: column; align-items: flex-start; }
  .hero-shot { margin-top: 40px; border-radius: var(--radius); }
}

/* ---------------- 下载源切换 ---------------- */

.mirror-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-sunk);
}

.mirror-label {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.mirror-opts { display: flex; flex-wrap: wrap; gap: 8px; }

.mirror-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease),
              background .18s var(--ease);
}

.mirror-btn:hover { border-color: rgba(216,99,131,.4); color: var(--ink); }

.mirror-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--ink);
}

.mirror-region { font-size: 11px; color: var(--ink-3); }
.mirror-btn.is-active .mirror-region { color: var(--accent-hi); }

.mirror-note {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .mirror-bar { padding: 12px 13px; }
  .mirror-label { flex: 1 1 100%; }
}
