/* Poesial — global gateway. Tokens taken from the Poesial app's globals.css. */

@font-face {
  font-family: "Commit Mono";
  src: url("fonts/commit-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("fonts/commit-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: hsl(60 24% 96%);
  --surface: hsl(0 0% 100%);
  --surface-soft: hsl(70 19% 94%);
  --ink: hsl(120 6% 9%);
  --ink-soft: hsl(120 5% 31%);
  --ink-faint: hsl(111 3% 41%);
  --line: hsl(82 11% 86%);
  --line-soft: hsl(80 12% 91%);
  --line-strong: hsl(82 11% 48%);
  --accent: hsl(155 70% 54%);
  --accent-deep: hsl(158 61% 23%);
  --honey: hsl(40 82% 56%);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Commit Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(56px, 11vh, 112px) 20px 0;
}

/* ---- Masthead ---- */
.masthead { text-align: center; }

.masthead h1 { line-height: 0; }

.wordmark {
  display: inline-block;
  width: 168px;
  height: auto;
}

.masthead a.wordmark-link { display: inline-block; border-radius: 6px; }

.slogan {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---- Regions ---- */
.regions { margin-top: clamp(48px, 9vh, 88px); }

.region + .region { margin-top: 48px; }

.region__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.region__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* ---- Country card ---- */
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px 16px 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: 0 1px 2px hsl(120 10% 10% / 0.04), 0 10px 24px -14px hsl(120 10% 10% / 0.22);
}
.card:active { transform: translateY(0); }
.card:focus-visible { border-radius: 12px; }

.flag {
  position: relative;
  flex: none;
  width: 28px;
  height: 21px;
  border-radius: 3px;
  overflow: hidden;
}
.flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.flag::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px hsl(120 10% 10% / 0.1);
}

.card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.card__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: hsl(120 6% 12%);
  color: var(--surface);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  vertical-align: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.card__domain {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 220ms var(--ease), text-decoration-color 220ms var(--ease);
}
.card:hover .card__domain { color: var(--ink); text-decoration-color: hsl(111 3% 41% / 0.45); }

/* ---- Status ---- */
.status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  white-space: nowrap;
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.status--live { color: var(--accent-deep); }
.status--live .status__dot { background: var(--accent); box-shadow: 0 0 0 3px hsl(155 70% 54% / 0.2); }
.status--coming-soon .status__dot { background: var(--honey); }
.status--planned .status__dot { background: var(--line-strong); }
.status--future .status__dot { background: transparent; box-shadow: inset 0 0 0 1.25px var(--line-strong); }

@media (max-width: 379px) {
  .card { flex-wrap: wrap; row-gap: 10px; }
  .card__body { flex-basis: calc(100% - 42px); }
  .card .status { margin-left: 42px; }
}

/* ---- Holding page ---- */
.holding {
  margin: clamp(48px, 9vh, 88px) auto 0;
  max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.holding:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: 0 1px 2px hsl(120 10% 10% / 0.04), 0 10px 24px -14px hsl(120 10% 10% / 0.22);
}
.holding__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 32px;
  text-align: center;
  text-decoration: none;
  border-radius: 16px;
}
.holding__link:focus-visible { border-radius: 16px; }
.flag--large { width: 48px; height: 36px; border-radius: 4px; }
.holding__name {
  margin-top: 18px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.holding__domain {
  margin: 6px 0 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 220ms var(--ease), text-decoration-color 220ms var(--ease);
}
.holding__link:hover .holding__domain { color: var(--ink); text-decoration-color: hsl(111 3% 41% / 0.45); }
.back {
  display: table;
  margin: 28px auto 0;
  padding-block: 5px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: hsl(111 3% 41% / 0.45);
  text-underline-offset: 4px;
  transition: color 200ms var(--ease);
}
.back:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---- Footer ---- */
.footer {
  padding: 72px 20px 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---- Motion ---- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.masthead,
.holding { animation: rise-in 600ms var(--ease) both; }
.slogan { animation: rise-in 600ms 80ms var(--ease) both; }
.region__title { animation: rise-in 500ms 140ms var(--ease) both; }
.grid__item { animation: rise-in 500ms var(--ease) both; animation-delay: calc(180ms + var(--i, 0) * 45ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover,
  .holding:hover { transform: none; }
}
