/* ── Design Tokens ──────────────────────────────────────── */
:root {
  --accyo-dark:      #063180;
  --accyo-light:     #A9BCD0;
  --accyo-orange:    #FF690C;
  --bg:              #F4F1EC;
  --card-bg:         #FFFEF9;
  --text:            #0D1B2A;
  --text-muted:      #5A6A7A;
  --border:          #063180;
  --shadow-size:     6px;
  --shadow:          var(--shadow-size) var(--shadow-size) 0 var(--border);
  --radius:          10px;
  --font:            'Space Grotesk', sans-serif;
}

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

/* ── Body / Background grid ─────────────────────────────── */
body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(6, 49, 128, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 49, 128, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  background: var(--accyo-dark);
  border-bottom: 3px solid var(--accyo-orange);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.logo-img {
  height: 26px;
  width: auto;
}
.logo-tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  border-left: 2px solid var(--accyo-orange);
  padding-left: 0.75rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.env-badge {
  background: rgba(169, 188, 208, 0.18);
  border: 1px solid var(--accyo-light);
  color: var(--accyo-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  font-family: var(--font);
}
.lang-switcher {
  display: flex;
  gap: 0.3rem;
}
.lang-btn {
  background: transparent;
  border: 1px solid rgba(169,188,208,0.4);
  color: var(--accyo-light);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.05em;
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--accyo-orange);
  border-color: var(--accyo-orange);
  color: #fff;
}

/* ── Main layout ────────────────────────────────────────── */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* ── Section header ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-label {
  background: var(--accyo-light);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
}
.section-label.admin {
  background: var(--accyo-light);
}
.section-divider {
  flex: 1;
  height: 2px;
  background: var(--border);
  opacity: 0.15;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accyo-dark);
  margin-bottom: 0.25rem;
}
.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── App grid ───────────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

/* ── App card ───────────────────────────────────────────── */
.app-card {
  background: var(--card-bg);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: box-shadow .1s ease, transform .1s ease;
  position: relative;
  overflow: hidden;
}
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accyo-light);
}
.app-card.admin-card::before {
  background: var(--accyo-light);
}

.app-card:hover {
  box-shadow: 8px 8px 0 var(--border);
  transform: translate(-2px, -2px);
}

/* ── App icon ───────────────────────────────────────────── */
.app-icon {
  width: 52px;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 3px 3px 0 var(--border);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.app-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accyo-dark);
  line-height: 1.2;
}
.app-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(169,188,208,0.25);
  border: 1px solid rgba(169,188,208,0.5);
  padding: 2px 7px;
  border-radius: 3px;
  margin-top: 3px;
  display: inline-block;
}
.app-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* ── CTA Button ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  border: 2.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  background: var(--accyo-light);
  color: #fff;
  box-shadow: 4px 4px 0 var(--border);
  transition: box-shadow .08s ease, transform .08s ease;
  user-select: none;
  letter-spacing: 0.02em;
  width: 100%;
}
.btn:hover {
  box-shadow: 5px 5px 0 var(--border);
  transform: translate(-1px, -1px);
}
.btn:active {
  box-shadow: 1px 1px 0 var(--border);
  transform: translate(3px, 3px);
}

.btn.btn-secondary {
  background: var(--card-bg);
  color: var(--accyo-dark);
}
.btn.btn-secondary:hover {
  background: var(--accyo-light);
}

/* ── Affine special ────────────────────────────────────── */
.desktop-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accyo-dark);
  background: var(--accyo-light);
  border: 1.5px solid var(--accyo-dark);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 2px solid rgba(6,49,128,0.1);
}
footer strong {
  color: var(--accyo-dark);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 1.5rem 1rem 3rem; }
  .app-grid { grid-template-columns: 1fr; }
  .header-right { gap: 0.6rem; }
  .env-badge { display: none; }
}
