/* 拾信 · Mailspace — landing */
:root {
  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-soft: #EFF6FF;
  --blue-ring: rgba(37, 99, 235, 0.18);
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --text: #20242C;
  --muted: #64748B;
  --border: #E5E7EB;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 4px 12px rgba(16, 24, 40, 0.06), 0 24px 48px rgba(16, 24, 40, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, p { margin: 0; }

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 245, 247, 0.85);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.92);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.brand:hover { color: inherit; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-en {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-cta { display: none; }

@media (min-width: 768px) {
  .nav-cta { display: inline-flex; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--blue-hover);
  color: #fff;
}
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: #F8FAFC;
  color: var(--text);
  border-color: #CBD5E1;
}
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(0,0,0,0.04); }

/* —— Hero —— */
.hero {
  padding: 48px 0 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 20% auto -10%;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(37,99,235,0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 0.9fr 1.35fr; gap: 40px; }
  .hero { padding: 64px 0 48px; }
}
@media (min-width: 1200px) {
  .hero-grid { grid-template-columns: 0.85fr 1.5fr; gap: 48px; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin-bottom: 16px;
}
.hero-lead {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--muted);
  max-width: 36em;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.hero-note {
  font-size: 13px;
  color: var(--muted);
}
.hero-note strong { color: var(--text); font-weight: 600; }

.hero-visual {
  position: relative;
  perspective: 1000px;
}
.tilt {
  perspective: 1100px;
}
.tilt-inner {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
  border-radius: 18px;
}
.tilt.is-tilting .tilt-inner {
  transition: transform 0.06s ease-out, box-shadow 0.06s ease-out;
}
.shot-frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 0;
  cursor: zoom-in;
  position: relative;
}
.shot-frame img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
}
.shot-frame.dark {
  background: #0F1218;
  border-color: #1F2430;
}
.shot-caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.shot-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.shot-hint kbd {
  font: inherit;
  font-size: 11px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  isolation: isolate;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 18, 24, 0.72);
  backdrop-filter: blur(8px);
}
/* showModal() places the dialog above all document stacking contexts. */
.lightbox::backdrop { background: transparent; }
.lightbox[hidden] { display: none !important; }
.lightbox.is-open:not([hidden]) { display: flex; }
.lightbox-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(100%, 1480px);
  max-height: 100%;
  margin: 0;
}
.lightbox-dialog img {
  min-height: 0;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  background: #0F1218;
}
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.lightbox-close:hover { background: var(--blue-soft); color: var(--blue); }
.lightbox-caption {
  margin-top: 12px;
  flex-shrink: 0;
  text-align: center;
  color: #E5E7EB;
  font-size: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .tilt-inner { transition: none !important; transform: none !important; box-shadow: none !important; }
}

/* —— Sections —— */
section { padding: 72px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head.center {
  text-align: center;
  margin-inline: auto;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.section-head p {
  color: var(--muted);
  font-size: 16px;
}

/* —— Feature grid —— */
.features {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-card:nth-child(4),
  .feature-card:nth-child(5) { grid-column: span 1; }
  .feature-grid { max-width: 100%; }
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.feature-card:hover {
  border-color: #BFDBFE;
  box-shadow: 0 0 0 3px var(--blue-ring);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* —— Showcase: stacked on small screens, alternating columns on desktop —— */
.showcase { padding: 80px 0; overflow: visible; }
/* Leave room at the viewport edges for the scaled, tilted screenshots. */
.showcase > .container { width: min(100% - clamp(40px, 7vw, 64px), 1320px); }
.showcase-block {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 72px;
  overflow: visible;
}
.showcase-block:hover,
.showcase-block:focus-within { z-index: 1; }
.showcase-block:last-child { margin-bottom: 0; }
.showcase-copy {
  min-width: 0;
  max-width: 720px;
}
.showcase-media {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  perspective: 1200px;
  overflow: visible;
}
.showcase-media .tilt { perspective: 1800px; }
.showcase-media .tilt-inner {
  transition: transform 0.18s ease-out, scale 0.24s ease-out, box-shadow 0.24s ease-out;
}
/* Separate scale from the pointer-driven rotation so neither overwrites the other. */
.showcase-media .tilt.is-tilting .tilt-inner {
  scale: 1.04;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.18);
  transition: transform 0.06s ease-out, scale 0.24s ease-out, box-shadow 0.24s ease-out;
}
.showcase-media .tilt-inner,
.showcase-media .shot-frame {
  width: 100%;
}
@media (min-width: 900px) {
  .showcase-block {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
    margin-bottom: 96px;
  }
  .showcase-block.reverse {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  }
  .showcase-block.reverse .showcase-copy { order: 2; }
  .showcase-block.reverse .showcase-media { order: 1; }
  .showcase-copy h3 { max-width: 18em; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-media .tilt-inner { scale: none !important; }
}
.showcase-copy h3 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
}
.showcase-copy p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 16px;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.checklist svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--blue);
  margin-top: 2px;
}

/* —— Audience —— */
.audience { background: var(--card); border-block: 1px solid var(--border); }
.audience-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .audience-grid { grid-template-columns: repeat(3, 1fr); }
}
.audience-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--bg);
}
.audience-card .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.audience-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.audience-card p {
  font-size: 14px;
  color: var(--muted);
}

/* —— Privacy —— */
.privacy-panel {
  display: grid;
  gap: 24px;
  background: linear-gradient(145deg, #0F172A 0%, #1E293B 100%);
  color: #E2E8F0;
  border-radius: 24px;
  padding: 40px 28px;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 800px) {
  .privacy-panel {
    grid-template-columns: 1.1fr 1fr;
    padding: 48px 48px;
    align-items: center;
  }
}
.privacy-panel h2 {
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.privacy-panel .lead {
  color: #94A3B8;
  font-size: 15px;
  margin-bottom: 8px;
}
.privacy-points {
  display: grid;
  gap: 14px;
}
.privacy-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
}
.privacy-point strong {
  display: block;
  color: #fff;
  font-size: 15px;
  margin-bottom: 4px;
}
.privacy-point span {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.5;
}
.privacy-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.25);
  color: #93C5FD;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.privacy-icon svg { width: 18px; height: 18px; }

/* —— CTA —— */
.cta {
  text-align: center;
  padding: 88px 0;
}
.cta h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta p {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 16px;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 14px;
}
.cta-note { font-size: 13px; color: var(--muted); }

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}
.footer-brand .brand-mark { width: 20px; height: 20px; }

/* —— Utility —— */
.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;
}
