/* Pet Soul mock · 乔布斯 + 苹果 + 喜茶 · 减法 */
@import url('motion.css');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #fafafa;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #86868b;
  --ink-4: #c7c7cc;
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.12);
  --alert: #ff3b30;
  --radius: 8px;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.45;
}

.app {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:disabled {
  background: var(--ink-4);
  cursor: default;
}

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active:not(:disabled) {
  opacity: 0.88;
}

.btn-ghost:active {
  background: var(--bg-2);
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 400;
}

.disclaimer {
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
  padding: 0 24px 16px;
}

/* index gallery */
.gallery-body {
  background: var(--bg-2);
  min-height: 100vh;
  padding: 48px 24px 80px;
}

.gallery-header {
  max-width: 960px;
  margin: 0 auto 40px;
}

.gallery-header h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
}

.gallery-header p {
  font-size: 13px;
  color: var(--ink-3);
  max-width: 480px;
  line-height: 1.5;
}

.gallery-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.gallery-label span {
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 8px;
}

.phone-frame {
  width: 100%;
  aspect-ratio: 375 / 812;
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--bg);
}

.phone-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.gallery-link {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  align-self: flex-start;
}

.gallery-link:hover {
  color: var(--ink);
}

/* overlay sheet */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  padding-bottom: calc(28px + var(--safe-bottom));
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 28px 22px 22px;
  transform: translateY(12px);
  transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.overlay.is-open .sheet {
  transform: translateY(0);
}

/* intent picker */
.intent-picker {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 300px;
  margin: 8px auto 0;
}

.intent-opt { border-top: 1px solid var(--line); text-align: left; }
.intent-opt:last-child { border-bottom: 1px solid var(--line); }

.intent-opt button {
  width: 100%;
  padding: 16px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.intent-opt button.selected {
  color: var(--ink);
  font-weight: 500;
}

.intent-opt .mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.intent-opt button.selected .mark {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--bg);
}

/* entry flow steps */
.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  width: 100%;
  max-width: 280px;
}

.flow-step {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

.flow-step::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--line-strong);
  margin-bottom: 8px;
  border-radius: 1px;
}

.flow-step.is-active { color: var(--ink-2); }
.flow-step.is-active::before { background: var(--ink); }

.page-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
}

.field-input:focus {
  outline: none;
  border-color: var(--ink);
}
