:root {
  --ink-950: #102033;
  --ink-800: #28435e;
  --ink-700: #40607f;
  --sand-50: #f6f0e6;
  --sand-100: #ede1cf;
  --sand-200: #dcc2a3;
  --copper-500: #a85b3a;
  --copper-600: #8e4526;
  --teal-500: #2f7c85;
  --card: rgba(255, 251, 245, 0.86);
  --card-strong: rgba(255, 248, 238, 0.94);
  --border: rgba(16, 32, 51, 0.12);
  --shadow: 0 28px 64px rgba(16, 32, 51, 0.14);
  --font-ui: "Sarabun", "Noto Sans Thai", "Segoe UI", sans-serif;
  --font-display: "Segoe UI Semibold", "Trebuchet MS", "Sarabun", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-950);
  font: 16px/1.55 var(--font-ui);
  background:
    radial-gradient(circle at top left, rgba(47, 124, 133, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(168, 91, 58, 0.24), transparent 34%),
    linear-gradient(180deg, #fbf7f1 0%, #f0e4d5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.page-shell--login {
  display: grid;
  gap: 24px;
  padding-top: 56px;
}

.hero-card,
.pillar-card,
.section-card,
.apps-panel,
.topbar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -100px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(168, 91, 58, 0.22), transparent 70%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-700);
}

.eyebrow::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal-500), var(--copper-500));
}

h1,
h2,
strong {
  font-family: var(--font-display);
}

h1 {
  margin: 14px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.hero-copy {
  max-width: 62ch;
  font-size: 1.05rem;
  color: var(--ink-800);
}

.hero-actions,
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff8f1;
  background: linear-gradient(135deg, var(--ink-950), var(--teal-500));
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.18);
}

.button--secondary {
  color: var(--ink-950);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(220, 194, 163, 0.65));
  border-color: rgba(16, 32, 51, 0.12);
}

.button--ghost {
  color: var(--ink-950);
  background: transparent;
  border-color: rgba(16, 32, 51, 0.18);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.metric {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(16, 32, 51, 0.08);
}

.metric__value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
}

.metric__label {
  display: block;
  color: var(--ink-700);
}

.pillar-grid,
.section-grid,
.apps-grid {
  display: grid;
  gap: 18px;
}

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

.pillar-card,
.section-card {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 28px 30px;
}

.section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.apps-panel {
  margin-top: 22px;
  padding: 28px;
  background: var(--card-strong);
}

.apps-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.apps-panel__header p {
  max-width: 34ch;
  color: var(--ink-700);
}

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

.app-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(16, 32, 51, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(240, 228, 213, 0.78)),
    linear-gradient(135deg, rgba(47, 124, 133, 0.08), rgba(168, 91, 58, 0.12));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 124, 133, 0.35);
  box-shadow: 0 20px 38px rgba(16, 32, 51, 0.14);
}

.app-card__category {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-600);
}

.app-card strong {
  font-size: 1.35rem;
}

.app-card p {
  color: var(--ink-800);
}

.app-card__url {
  margin-top: auto;
  color: var(--ink-700);
  font-size: 0.9rem;
  word-break: break-word;
}

.reveal {
  animation: reveal-up 420ms ease both;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .pillar-grid,
  .section-grid,
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .apps-panel__header {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding: 20px 0 32px;
  }

  .hero-card,
  .apps-panel,
  .pillar-card,
  .section-card,
  .topbar {
    border-radius: 22px;
  }

  .hero-card,
  .apps-panel,
  .topbar,
  .pillar-card,
  .section-card {
    padding: 20px;
  }

  .metric-row,
  .pillar-grid,
  .section-grid,
  .apps-grid {
    grid-template-columns: 1fr;
  }
}
