:root {
  --ink: #11120f;
  --ink-soft: #252720;
  --porcelain: #f2f0e8;
  --paper: #fffef8;
  --mist: #e9e8df;
  --muted: #72756b;
  --coral: #ff5b36;
  --coral-dark: #db3e1d;
  --acid: #dff56e;
  --sky: #bde9ff;
  --line: rgba(17, 18, 15, 0.14);
  --shadow: 0 24px 70px rgba(35, 31, 22, 0.11);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 18px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 2%, rgba(255, 91, 54, 0.18), transparent 24rem),
    radial-gradient(circle at 96% 22%, rgba(189, 233, 255, 0.7), transparent 30rem),
    linear-gradient(135deg, #f7f4eb 0%, #ecebe4 58%, #f4f2e9 100%);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(17, 18, 15, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 18, 15, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.page-bg::before,
.page-bg::after {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
}

.page-bg::before {
  top: 52%;
  left: -170px;
  background: var(--acid);
}

.page-bg::after {
  right: -150px;
  bottom: 7%;
  background: var(--coral);
  opacity: 0.45;
}

.app-shell {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 254, 248, 0.78);
  box-shadow: 0 12px 42px rgba(27, 25, 19, 0.09);
  backdrop-filter: blur(22px) saturate(160%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.language-switch,
.env-switch {
  display: grid;
  gap: 4px;
}

.language-switch label,
.env-switch label {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

select,
input,
textarea {
  font: inherit;
}

.language-switch select,
.env-switch select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#authState {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-left: 2px;
  padding: 0 13px;
  border-radius: 999px;
  color: #204919;
  background: rgba(223, 245, 110, 0.72);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.content {
  display: grid;
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.4vw, 34px);
  border: 1px solid rgba(17, 18, 15, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 254, 248, 0.9);
  box-shadow: var(--shadow);
  animation: reveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.content > :nth-child(2) {
  animation-delay: 80ms;
}

.content > :nth-child(3) {
  animation-delay: 140ms;
}

.content > :nth-child(4) {
  animation-delay: 200ms;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h2,
h3 {
  font-family: "Bodoni Moda", serif;
  font-weight: 600;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 15px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1;
}

h4 {
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: -0.025em;
}

.hero {
  display: grid;
  min-height: 500px;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  align-items: center;
  gap: 20px;
  padding: clamp(30px, 5vw, 74px);
  color: var(--paper);
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 91, 54, 0.22), transparent 28%),
    linear-gradient(145deg, #11120f, #1e211c 68%, #10110f);
}

.hero::before {
  position: absolute;
  right: -7%;
  bottom: -30%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  content: "";
  filter: blur(1px);
  opacity: 0.13;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  margin-bottom: 18px;
  color: var(--acid);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h2 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(52px, 7.5vw, 105px);
  line-height: 0.87;
}

.hero-copy > p:not(.hero-kicker) {
  max-width: 620px;
  margin: 7px 0;
  color: rgba(255, 254, 248, 0.68);
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  display: grid;
  width: min(100%, 430px);
  aspect-ratio: 1;
  justify-self: center;
  place-items: center;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.orbit::after {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 22px var(--acid);
  content: "";
}

.orbit-one {
  inset: 8%;
  animation: orbit-spin 16s linear infinite;
}

.orbit-two {
  inset: 23%;
  border-style: dashed;
  animation: orbit-spin 11s linear infinite reverse;
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-core {
  position: relative;
  display: grid;
  width: 43%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  box-shadow:
    0 0 0 20px rgba(255, 255, 255, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero-core span {
  font-family: "Bodoni Moda", serif;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.8;
}

.hero-core small {
  position: absolute;
  bottom: 20%;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.visual-chip {
  position: absolute;
  display: grid;
  min-width: 48px;
  min-height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(17, 18, 15, 0.75);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.chip-ai {
  top: 10%;
  right: 20%;
  color: var(--ink);
  background: var(--acid);
}

.chip-edu {
  bottom: 17%;
  left: 3%;
  background: var(--coral);
}

.chip-cert {
  right: 0;
  bottom: 28%;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 18, 15, 0.14);
}

.btn.secondary {
  color: var(--ink);
  background: transparent;
}

.hero .btn {
  border-color: var(--acid);
  color: var(--ink);
  background: var(--acid);
}

.hero .btn.secondary {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
}

.workspace {
  padding: clamp(24px, 3vw, 42px);
  background:
    radial-gradient(circle at 95% 5%, rgba(223, 245, 110, 0.42), transparent 23rem),
    rgba(255, 254, 248, 0.94);
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.workspace .eyebrow,
.role-panel .eyebrow {
  margin-bottom: 8px;
  color: var(--coral-dark);
}

.workspace-header h3 {
  margin-bottom: 8px;
  font-size: clamp(34px, 5vw, 64px);
}

.muted,
.subtle {
  color: var(--muted);
}

.role-badge {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin: 26px 0 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.role-tab,
.tab {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: 800 10px "Manrope", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.role-tab.active,
.tab.active {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.hidden,
.tab-panel.hidden {
  display: none !important;
}

.journey {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 16px;
}

.journey-step {
  display: grid;
  min-height: 114px;
  align-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.journey-step span {
  font-size: 9px;
  font-weight: 800;
}

.journey-step strong {
  font-size: 11px;
  line-height: 1.35;
}

.journey-step.complete {
  border-color: transparent;
  color: #31450b;
  background: var(--acid);
}

.journey-step.active {
  border-color: transparent;
  color: var(--paper);
  background: var(--coral);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
}

.role-panel,
.metric-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.77);
}

.role-panel {
  min-height: 230px;
}

.role-panel .btn {
  margin-top: 16px;
}

.progress-panel {
  color: var(--paper);
  background: var(--ink);
}

.progress-panel .eyebrow {
  color: var(--acid);
}

.progress-number {
  margin: 4px 0;
  font-family: "Bodoni Moda", serif;
  font-size: 58px;
  line-height: 1;
}

.progress-track {
  height: 6px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.progress-value {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--acid);
  animation: progress-glow 2s ease-in-out infinite alternate;
}

@keyframes progress-glow {
  to {
    box-shadow: 0 0 18px var(--acid);
  }
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.metric-card {
  display: grid;
  min-height: 110px;
  align-content: space-between;
}

.metric-card strong {
  font-family: "Bodoni Moda", serif;
  font-size: 40px;
  line-height: 1;
}

.metric-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.queue-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.ai-panel {
  background: var(--sky);
}

.split-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.split-grid > .card:first-child {
  color: var(--paper);
  background: var(--ink-soft);
}

.split-grid > .card:first-child pre {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
}

.panel > h3,
#groupDetailPanel > h3,
#gallery > h3,
#api > h3 {
  font-size: clamp(30px, 4vw, 48px);
}

label {
  display: block;
  margin: 15px 0 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input,
textarea,
#registerLanguage {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

input:focus,
textarea:focus,
#registerLanguage:focus {
  border-color: var(--coral);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 91, 54, 0.12);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

form .btn {
  margin-top: 18px;
}

.tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 16px;
}

.row > input,
.row > textarea {
  flex: 1 1 230px;
}

.list {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.group-item,
.post-item {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
}

.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.actions {
  margin: 0;
}

.post-author {
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-text {
  line-height: 1.6;
}

.status {
  min-height: 20px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
}

pre {
  overflow-x: auto;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--mist);
  font: 11px/1.7 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

#gallery {
  background:
    linear-gradient(130deg, rgba(223, 245, 110, 0.25), transparent 50%),
    var(--paper);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery figure:hover img {
  transform: scale(1.04);
}

.gallery figcaption {
  padding: 10px;
  color: var(--muted);
  font-size: 9px;
  word-break: break-word;
}

#api {
  color: var(--paper);
  background:
    radial-gradient(circle at 90% 10%, rgba(189, 233, 255, 0.22), transparent 30rem),
    var(--ink);
}

#api pre {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--acid);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1050px) {
  .hero {
    min-height: 600px;
    grid-template-columns: 1fr 310px;
  }

  .journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body {
    padding: 9px;
  }

  .topbar {
    position: relative;
    top: 0;
    display: grid;
    padding: 14px;
  }

  .header-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #authState {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .language-switch select,
  .env-switch select {
    width: 100%;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 34px 22px;
  }

  .hero h2 {
    font-size: clamp(50px, 16vw, 78px);
  }

  .hero-visual {
    width: min(85vw, 350px);
  }

  .workspace-header,
  .group-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .journey {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-grid,
  .metric-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > :first-child {
    grid-column: auto;
  }

  .card {
    border-radius: 21px;
  }
}

@media (max-width: 430px) {
  .brand p {
    display: none;
  }

  .hero-visual {
    width: 100%;
  }

  .journey {
    grid-template-columns: 1fr;
  }

  .journey-step {
    min-height: 76px;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Official Atache Academy mark */
.brand-mark {
  overflow: hidden;
  border-color: rgba(17, 18, 15, .16);
  background: #f5f8fb url("assets/atache-academy-logo.jpg") center / cover no-repeat;
  color: transparent;
  font-size: 0;
}

.hero-core {
  overflow: hidden;
  border-color: rgba(255, 255, 255, .22);
  background: #f5f8fb url("assets/atache-academy-logo.jpg") center / cover no-repeat;
  color: transparent;
}

.hero-core > * {
  opacity: 0;
}
