/* Invoicing "coming soon" page.
   Colours come from the app's real tokens (packages/invoicing_core/lib/theme/app_tokens.dart):
   the Purple theme (AppTokens.light / .dark) and Neutrals.light / .dark. Every colour is a token on :root,
   redefined for dark mode. */

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #FFFFFF;          /* Neutrals.bg */
  --surf: #F5F4F8;        /* Neutrals.surf */
  --line: #ECE9F1;        /* Neutrals.line */
  --ink: #16121C;         /* Neutrals.ink */
  --mute: #5E5868;        /* Neutrals.mute */
  --brand: #7A12D4;       /* purple p: pill fill */
  --on-brand: #FFFFFF;    /* AppTokens.onBrand: text on the pill */
  --soft: #F3ECFC;        /* purple pl: tinted shapes and icon wells */
  --on-soft: #5B0FA0;     /* purple pd: icons on the tint */
  --accent: #7A12D4;      /* purple link: focus ring */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121016;
    --surf: #1F1C24;
    --line: #2E2A35;
    --ink: #F3F1F6;
    --mute: #B0A9BA;
    --brand: #7A12D4;     /* dark mode keeps the brand primary, with white text */
    --on-brand: #FFFFFF;
    --soft: #2B1942;
    --on-soft: #D9BCFA;
    --accent: #C197F7;
  }
}

/* ---- layout ---- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  isolation: isolate;
}

/* Soft tinted shapes behind the hero: the tint fades out to the page background. */
.page::before,
.page::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--soft) 55%, transparent);
  pointer-events: none;
}

.page::before {
  width: min(60rem, 170vw);
  aspect-ratio: 1;
  top: -20rem;
  left: 50%;
  transform: translateX(-50%);
}

.page::after {
  width: 22rem;
  aspect-ratio: 1;
  top: 24rem;
  right: -11rem;
  opacity: 0.7;
}

.wrap {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---- top bar ---- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 22%;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surf);
}

.lang button {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font: 600 0.875rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--on-soft);
}

/* ---- hero ---- */

.hero {
  max-width: 46rem;
  margin-inline: auto;
  padding-block: 56px 48px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.4rem + 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 34rem;
  margin: 24px auto 0;
  color: var(--mute);
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  text-wrap: pretty;
}

/* ---- features ---- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0 0 64px;
  list-style: none;
}

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surf);
}

.icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--on-soft);
}

.icon-well svg { width: 24px; height: 24px; }

.feature h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--mute);
  font-size: 0.9375rem;
}

/* ---- footer ---- */

.foot {
  width: calc(100% - 32px);
  max-width: 64rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.875rem;
  text-align: center;
}

.foot a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---- focus ---- */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---- motion ---- */

.reveal {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

/* ---- wider screens ---- */

@media (min-width: 48rem) {
  .wrap { padding-inline: 32px; }
  .foot { width: calc(100% - 64px); max-width: 60rem; }
  .hero { padding-block: 88px 72px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 96px; }
  .foot { flex-direction: row; justify-content: space-between; text-align: left; }
}
