*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #B8860B;
  --gold-light: rgba(184,134,11,0.1);
  --bg: #F7F5F0;
  --bg-card: #FFFFFF;
  --border: #E8E2D8;
  --text-primary: #1A1A1A;
  --text-muted: #9A9A9A;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 6px 20px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.13), 0 3px 10px rgba(0,0,0,0.07);
  --shadow-gold: 0 8px 32px rgba(184,134,11,0.14);
  --radius: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Background grid ── */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(184,134,11,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,134,11,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none; z-index: 0;
  animation: gridFadeIn 1.2s ease both;
}

@keyframes gridFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Wrapper ── */
.wrapper {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
}

/* ── Header ── */
header {
  padding: 4.5rem 0 2rem;
  text-align: center;
}

/* ── Logo ── */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100px; height: 100px; border-radius: 50%;
  border: 2px solid var(--gold); margin-bottom: 1.75rem;
  background: #ffffff;
  box-shadow: var(--shadow-gold);
  position: relative;
  animation: logoPop 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
  overflow: hidden;
}

.logo-mark::before {
  content: ''; position: absolute; inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(184,134,11,0.3);
  animation: spinRing 18s linear infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

@keyframes logoPop {
  from { opacity: 0; transform: scale(0.6) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.logo-mark img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.subtitle {
  font-size: 0.68rem; color: var(--gold);
  letter-spacing: 0.28em; text-transform: uppercase;
  margin-bottom: 0.65rem; font-weight: 500;
  animation: fadeUp 0.5s 0.2s ease both;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 900; color: var(--text-primary); line-height: 1.08;
  animation: fadeUp 0.55s 0.3s ease both;
}

h1 span { color: var(--gold); }

.divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.4rem auto; max-width: 280px;
  animation: fadeUp 0.5s 0.4s ease both;
}

.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-diamond {
  width: 6px; height: 6px; background: var(--gold);
  transform: rotate(45deg);
  animation: diamondSpin 0.6s 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes diamondSpin {
  from { transform: rotate(-180deg) scale(0); }
  to   { transform: rotate(45deg) scale(1); }
}

.header-desc {
  font-size: 0.88rem; color: var(--text-muted); font-weight: 300;
  max-width: 420px; margin: 0 auto; line-height: 1.8;
  animation: fadeUp 0.5s 0.45s ease both;
}

/* ── Section Label ── */
.section-label {
  display: flex; align-items: center; gap: 1.5rem; margin: 2.75rem 0 2rem;
  animation: fadeUp 0.5s 0.5s ease both;
}

.section-label::before, .section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
  transform-origin: left;
  animation: lineExpand 0.7s 0.6s ease both;
}
.section-label::after { transform-origin: right; }

@keyframes lineExpand {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.section-label span {
  font-size: 0.66rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-muted); font-weight: 500; white-space: nowrap;
}

/* ── Grid ── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  padding-bottom: 5rem;
}

/* ── Card ── */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem 1.6rem 1.5rem;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.32s ease, border-color 0.32s ease;
  overflow: hidden;
  opacity: 0;
}

.app-card::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(184,134,11,0.06) 60%, transparent 80%);
  transition: left 0.55s ease;
  pointer-events: none;
}

.app-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.app-card:not(.coming-soon):hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: rgba(184,134,11,0.3);
}

.app-card:not(.coming-soon):hover::before { left: 120%; }
.app-card:not(.coming-soon):hover::after  { opacity: 1; }

.app-card.visible { opacity: 1; }

.app-card.coming-soon {
  opacity: 0;
  pointer-events: none;
  background: #FAFAF7;
}
.app-card.coming-soon.visible { opacity: 0.5; }

/* ── Card Top ── */
.card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

/* ── Icon Circle ── */
.card-icon-circle {
  width: 58px; height: 58px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}

.app-card:not(.coming-soon):hover .card-icon-circle {
  transform: scale(1.12) rotate(-4deg);
}

.card-icon-circle svg {
  width: 28px; height: 28px;
  fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.icon-green  { background: #EAF6EC; border: 1px solid #C5E8CC; }
.icon-green svg  { stroke: #2D9D52; }
.icon-purple { background: #F0EBFC; border: 1px solid #D8C8F5; }
.icon-purple svg { stroke: #6042B0; }
.icon-blue   { background: #E8F3FD; border: 1px solid #C2DCFA; }
.icon-blue svg   { stroke: #2171C2; }
.icon-orange { background: #FEF1E6; border: 1px solid #FAD9BB; }
.icon-orange svg { stroke: #C96018; }
.icon-teal   { background: #E4F6F6; border: 1px solid #B7E6E6; }
.icon-teal svg   { stroke: #178888; }

/* ── Card Meta ── */
.card-meta { flex: 1; }

.card-number {
  display: block; font-size: 0.63rem; letter-spacing: 0.16em;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.3rem;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.25; margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.app-card:not(.coming-soon):hover .card-title { color: var(--gold); }

.card-desc {
  font-size: 0.79rem; color: var(--text-muted);
  line-height: 1.65; font-weight: 300;
}

/* ── Card Footer ── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
  margin-top: auto;
}

/* ── Status Badge ── */
.card-status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.05em;
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

.card-status.active { color: #2D9D52; }
.card-status.active .status-dot {
  background: #2D9D52;
  box-shadow: 0 0 0 3px rgba(45,157,82,0.18);
  animation: pulse 2s infinite;
}

.card-status.coming { color: var(--text-muted); }
.card-status.coming .status-dot { background: #ccc; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,157,82,0.18); }
  50%       { box-shadow: 0 0 0 7px rgba(45,157,82,0.05); }
}

/* ── Login Button ── */
.card-btn {
  display: inline-flex; align-items: center; gap: 0.42rem;
  padding: 0.5rem 1.1rem; border-radius: 9px;
  border: 1.5px solid var(--gold); background: transparent;
  color: var(--gold); font-size: 0.74rem; font-weight: 500;
  font-family: 'DM Sans', sans-serif; letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, transform 0.18s;
  cursor: pointer;
}

.app-card:not(.coming-soon):hover .card-btn {
  background: var(--gold); color: #fff;
  box-shadow: 0 4px 18px rgba(184,134,11,0.3);
  transform: translateX(2px);
}

.card-btn.disabled {
  border-color: var(--border); color: var(--text-muted); cursor: not-allowed;
}

.card-btn svg {
  width: 11px; height: 11px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.22s;
}

.app-card:not(.coming-soon):hover .card-btn svg { transform: translateX(4px); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border); padding: 2.25rem 0;
  text-align: center; color: var(--text-muted);
  font-size: 0.78rem; font-weight: 300; letter-spacing: 0.03em;
  animation: fadeUp 0.5s 1s ease both;
}

footer strong { color: var(--gold); font-weight: 500; }
.footer-sep { margin: 0 0.65rem; opacity: 0.4; }

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.app-card.visible {
  animation: cardReveal 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.app-card.coming-soon.visible {
  animation: cardReveal 0.5s cubic-bezier(0.22,1,0.36,1) both;
  opacity: 0.5 !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  h1 { font-size: 1.65rem; }
  .apps-grid { grid-template-columns: 1fr; gap: 1rem; }
  .card-top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .card-icon-circle { width: 50px; height: 50px; border-radius: 13px; }
  .card-icon-circle svg { width: 24px; height: 24px; }
  header { padding: 2.75rem 0 1.5rem; }
  .wrapper { padding: 0 1.25rem; }
}

@media (max-width: 380px) {
  .wrapper { padding: 0 1rem; }
  .card-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}