/*
 * Ping2Dine design tokens and shared components.
 *
 * Created 6 Oct 2026 for the new homepage (design by Ben). The new sign-up, sign-in and delivery-hub
 * pages load this same file, so there is ONE source for colours, radii, buttons, cards and the header.
 *
 * Rules for this file:
 * - The legacy variable names (--bg, --surface, --surface2, --border, --accent, --text, --muted, ...)
 *   stay on purpose: public/i18n.js injects the CSS of the language menu and reads them on every page.
 * - Everything new is prefixed p2d- so it can never collide with the class names of the older pages.
 * - Dark theme only, like the rest of the site.
 * - No amounts, no copy and no page layout in here: tokens and small building blocks only.
 */

:root {
  /* colours (same values as the older pages) */
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2331;
  --border: #2a3444;
  --accent: #25d366;
  --accent2: #1a9c4a;
  --accent-dim: #25d36615;
  --text: #e6edf3;
  --muted: #8b949e;
  --muted2: #a3adb8;
  --red: #f87171;
  --blue: #58a6ff;
  --gold: #f5a623;

  /* new in the redesign */
  --p2d-accent-ink: #04210f;   /* dark text on a green button */
  --p2d-tag-bg: #12331f;       /* dark green behind the FOOD / STORE / HUB tags and the step numbers */
  --p2d-text-soft: #c4ccd6;    /* secondary text that must stay easy to read on a card */
  --p2d-radius-card: 24px;
  --p2d-radius-card-small: 18px;
  --p2d-radius-control: 10px;
  --p2d-radius-tag: 14px;
  --p2d-font-head: 'Raleway', sans-serif;
  --p2d-font-body: 'Nunito', sans-serif;
  --p2d-focus: 0 0 0 3px rgba(37, 211, 102, .45);
  --p2d-page-gutter: clamp(16px, 5vw, 80px);
}

/* ── page frame ──────────────────────────────────────────────────────────────── */
.p2d-container {
  width: 100%;
  max-width: calc(1440px + 2 * var(--p2d-page-gutter));
  margin: 0 auto;
  padding-left: var(--p2d-page-gutter);
  padding-right: var(--p2d-page-gutter);
}

/* ── header ──────────────────────────────────────────────────────────────────── */
.p2d-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 10;
}
.p2d-header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
@media (min-width: 720px) {
  .p2d-header-in { min-height: 82px; }
}
.p2d-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--p2d-font-head);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .p2d-logo { gap: 14px; font-size: 34px; }
}
.p2d-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--p2d-accent-ink);
  font-family: var(--p2d-font-head);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -.2px;
  flex-shrink: 0;
}
@media (min-width: 720px) {
  .p2d-logo-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 15px; }
}
.p2d-logo-two { color: var(--accent); }
.p2d-header-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p2d-header-link {
  color: var(--muted2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .p2d-header-link { font-size: 16px; }
}
.p2d-header-link:hover { color: var(--text); }

/* ── building blocks ─────────────────────────────────────────────────────────── */
.p2d-eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .p2d-eyebrow { font-size: 15px; }
}
.p2d-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--p2d-radius-card);
}
.p2d-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border-radius: var(--p2d-radius-tag);
  background: var(--p2d-tag-bg);
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.p2d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--p2d-radius-control);
  font-family: var(--p2d-font-body);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.p2d-btn--block { display: flex; width: 100%; }
.p2d-btn--primary {
  background: var(--accent);
  color: var(--p2d-accent-ink);
}
.p2d-btn--primary:hover { filter: brightness(1.08); }
.p2d-btn-arrow { flex-shrink: 0; font-weight: 700; }

/* keyboard focus: always visible, never removed */
.p2d-btn:focus-visible,
.p2d-header-link:focus-visible,
.p2d-logo:focus-visible,
.p2d-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: var(--p2d-focus);
}
.p2d-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.p2d-link:hover { filter: brightness(1.15); }
