*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

:root {
  --bg: #f5f4f2;
  --bg-dark: #1a1a1a;
  --ink: #1a1a1a;
  --muted: #4a4a4a;
  --ghost: #6b6b6b;
  --rule: #c8c4be;
  --accent: #b5956a;
  --accent-dark: #8a6a3a;
}

body {
  background: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 24px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ── Top bar ── */
.top-meta {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: #5a6069;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  opacity: 0;
  animation: fadeup 0.5s ease 0s forwards;
}

.top-rule {
  width: 100%;
  max-width: 360px;
  height: 1px;
  min-height: 1px;
  flex-shrink: 0;
  background: var(--rule);
  margin: 8px auto 16px;
  opacity: 0;
  animation: fadeup 0.5s ease 0.05s forwards;
}

/* ── Centers the form vertically in remaining space ── */
.main-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
}

/* ── Shared layout ── */
.wrap {
  width: 100%;
  max-width: 360px;
}

.section-label {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: #5a6069;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 8px;
}

.section-label--right {
  text-align: right;
}

.section-label--delayed {
  opacity: 0;
  animation: fadeup 0.5s ease 0.22s forwards;
}

/* ── Avatar ── */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;

  opacity: 0;
  animation: fadeup 0.5s ease 0.18s forwards;
}

.avatar {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.frame-img {
  display: block;
  height: 80px;
  flex: 1;
  min-width: 0;
  object-fit: contain;
  object-position: left center;
}

/* ── Kit embed block ── */
.kit-block {
  background: var(--bg-dark);
  padding: 24px 24px 20px;
  margin-bottom: 4px;
  opacity: 0;
  animation: fadeup 0.5s ease 0.25s forwards;
}

.kit-title {
  font-family: 'Fira Sans', sans-serif;
  font-size: clamp(12px, 4vw, 17px);
  font-weight: 400;
  color: #f5f2ee;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.kit-title span {
  color: #d4aa7a;
}

.kit-desc {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #9a9a9a;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.kit-desc--left { text-align: left; }

.kit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kit-form input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid #4a4a4a;
  color: #f5f2ee;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.kit-form input[type="email"]::placeholder {
  color: #6b6b6b;
}

.kit-form input[type="email"]:focus {
  border-color: var(--accent);
}

.kit-form button {
  width: 100%;
  padding: 11px 14px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.kit-form button:hover { opacity: 0.85; }

.kit-note {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #9a9a9a;
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.kit-note--right { text-align: right; }

.success-msg {
  display: none;
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: #d4aa7a;
  text-align: center;
  padding: 12px 0 4px;
  letter-spacing: 0.05em;
}

/* ── Quote ── */
.quote-img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
}

.quote-img--outside {
  max-width: 360px;
  margin: 0;
  flex-shrink: 0;
}

/* ── Gallery carousel ── */
.gallery-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 210px;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeup 0.5s ease 0.42s forwards;
}

.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: none;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.gallery-btn:hover { opacity: 1; }

.gallery-btn img {
  width: 32px;
  height: auto;
  display: block;
}

.gallery-btn--prev { left: 8px; }
.gallery-btn--next { right: 8px; }
.gallery-btn--next img { transform: scaleX(-1); }

.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.gallery-dot {
  width: 5px;
  height: 5px;
  background: rgba(245,242,238,0.45);
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-dot--active { background: #5a6069; }

/* ── Bio ── */
.bio-wrap {
  width: 100%;
  padding: 16px 0 12px;
}

.bio-wrap .section-label {
  margin-bottom: 2px;
}

.bio-text {
  font-family: 'Fira Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
}

/* ── Socials ── */
.socials-wrap {
  padding: 0 0 20px;
  margin-top: -8px;
  width: 100%;
  max-width: 360px;
  opacity: 0;
  animation: fadeup 0.5s ease 0.5s forwards;
}

.socials {
  display: flex;
  gap: 8px;
  justify-content: center;
}

a.social-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 14px 6px;
  background: transparent;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ghost);
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: border-color 0.2s, color 0.2s;
}

a.social-btn svg {
  color: #5a6069;
  transition: color 0.2s;
}

a.social-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

a.social-btn:hover svg {
  color: var(--accent);
}

/* ── Animations ── */
@keyframes fadeup {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
