@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
:root {
    --dark: #000;
    --light: #f9f4eb;
    --light2: #f0ece5;
    --accent-1: #e5d9f6;
    --accent-2: #ffd2f3;
    --accent-3: #fcdca6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "DM-Sans";
}
h1 {
    font-size: 1.5rem;
    font-weight: 500;
}
p{
    font-size: 1.1rem;
    font-weight: 500;
}
span {
    text-transform: uppercase;
    font-family: "DM Mono";
    font-weight: 500;
    font-size: 0.75rem; 
}
nav {
  position: fixed;
  width: 100vw;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.logo span,
.menu-btn span {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
}
.logo span {
  background-color: var(--dark);
  color: var(--light);
}
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.login-link {
  font-family: "DM Mono";
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--accent-2);
  color: var(--dark);
  text-decoration: none;
  transition: all 0.4s ease;
  display: inline-block;
}
.login-link:hover {
  background-color: var(--accent-1);
  transform: scale(1.05);
}
.menu-btn span {
  background-color: var(--light2);
  color: var(--dark);
}
section {
  position: relative;
    height: 100svh;
    width: 100vw;
    padding: 2rem;
    overflow: hidden;
}
.hero {
background-color: var(--light);
color: var(--dark);
}
.about, 
.outro{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--dark);
  color: var(--light);
}
.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35%;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.hero-cards .card {
 flex: 1;
 position: relative;
  padding: 0.75rem;
  border-radius: 0.5rem;
  flex-direction: column;
  display: flex;
  aspect-ratio: 5/7;
  justify-content: space-between;
}
.card-title {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.hero-cards .card span {
 font-size: 0.7rem;
}
.hero-cards .card#hero-card-1 {
  background-color: var(--accent-1);
  transform-origin: top right;
  z-index: 2;
}
.hero-cards .card#hero-card-2 {
  background-color: var(--accent-2);
  z-index: 1;
}
.hero-cards .card#hero-card-3 {
  background-color: var(--accent-3);
  transform-origin: top left;
  z-index: 0;
}
.services {
padding: 8rem 2rem;
}
.services-handler {
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(400%);
  will-change: transform;
}
.cards {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  display: flex;
  justify-content: center;
  z-index: -1;
  background-color: var(--light);
}
.cards-container {
  position: relative;
  width: 75%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}
.cards-container .card {
  flex: 1;
  position: relative;
  aspect-ratio: 5/7;
  perspective: 1000px;
}
.cards-container .card .card-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: floating 2s infinite ease-in-out;
}
@keyframes floating {
  0% {
    transform: translate(-50%, -50%) rotateY(0deg);
  }
  50% {
    transform: translate(-50%, -50%) rotateY(180deg);
  }
  100% {
    transform: translate(-50%, -50%) rotateY(360deg);
  }
}
#card-1 .card-wrapper {
  animation-delay: 0s;
}
#card-2 .card-wrapper {
  animation-delay: 0.25s;
}
#card-3 .card-wrapper {
  animation-delay: 0.5s;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  backface-visibility: hidden;
  overflow: hidden;
}
.flip-card-front {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
#card-1 .flip-card-front {
  background-color: var(--accent-1);
}
#card-2 .flip-card-front {
  background-color: var(--accent-2);
}
#card-3 .flip-card-front {
  background-color: var(--accent-3);
}
.flip-card-back {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background-color: #fff;
  transform: rotateY(180deg);
}
.card-copy {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-copy p {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  background-color: var(--light2);
  border-radius: 0.25rem;
}
#card-1 {
  transform:translateX(-100%) translateY(-100%) rotate(-5deg) scale(0.25);
  z-index: 2;
}
#card-2 {
  transform:translateX(0) translateY(-100%) rotate(0deg) scale(0.25);
  z-index: 1;
}
#card-3 {
  transform:translateX(-100%) translateY(-100%) rotate(5deg) scale(0.2);
  z-index: 0;
}
.cards-container .card {
opacity: 0;
}

/* ---- Avatar & menu styles (moved from index.html) ---- */
.logo{display:flex;align-items:center;gap:12px}
.avatar-wrap{display:inline-flex;position:relative;margin-left:12px;align-items:center}
.avatar-circle{
  width:44px;height:44px;border-radius:50%;
  background:linear-gradient(135deg,#4FDCFF 0%,#4FB8FF 100%);
  color:#ffffff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;cursor:pointer;
  font-size:16px;line-height:1;box-shadow:0 6px 18px rgba(79,220,255,0.18);border:2px solid rgba(255,255,255,0.18);
  touch-action:manipulation;user-select:none
}
.avatar-circle:active{transform:translateY(1px)}

.avatar-menu{position:absolute;right:0;top:56px;background:#ffffff;border:1px solid rgba(2,6,23,0.06);box-shadow:0 10px 30px rgba(2,6,23,0.08);border-radius:10px;min-width:200px;padding:6px;display:none;z-index:60}
.avatar-menu.open{display:block}
.avatar-menu a, .avatar-menu button{display:block;padding:10px 12px;color:#04203A;text-decoration:none;border:0;background:transparent;width:100%;text-align:left;border-radius:8px;font-size:14px}
.avatar-menu a:hover, .avatar-menu button:hover{background:rgba(2,6,23,0.04)}
.avatar-menu .menu-icon{width:16px;height:16px;vertical-align:middle;margin-right:8px;fill:currentColor;opacity:0.85}

/* Change password modal (simple) */
.cp-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:80}
.cp-modal.open{display:flex}
.cp-modal__backdrop{position:absolute;inset:0;background:rgba(2,6,23,0.6)}
.cp-modal__dialog{position:relative;background:#fff;padding:18px;border-radius:12px;box-shadow:0 10px 30px rgba(2,6,23,0.3);width:360px;max-width:92%;z-index:81}
.cp-modal__dialog h3{margin:0 0 8px}
.cp-row{margin-bottom:10px}
.cp-row input{width:100%;padding:8px;border-radius:8px;border:1px solid #ddd}
.cp-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
.cp-msg{margin-top:6px;height:18px;color:#f36}

/* 响应式：窄屏时调整头像与菜单为更大触控区域 */
@media (max-width: 600px) {
  .avatar-circle{width:40px;height:40px;font-size:14px}
  .avatar-menu{right:8px;top:54px;min-width:160px}
}

/* 超窄屏（下拉底部样式） */
@media (max-width: 420px) {
  .avatar-menu{position:fixed;left:12px;right:12px;bottom:20px;top:auto;border-radius:12px;padding:8px}
}

/* avatar image inside header circle */
.avatar-circle img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
