/*
 * TravelNet design tokens for the business portal (Phase 3, session B1).
 * Source: the TravelNet design system (colors_and_type.css) plus the approved B2B prototype,
 * which wins where the two differ (page #0b1218, cards #101c25, 12 px button radius).
 *
 * Scope: tokens are global variables, but Montserrat and the base text styles apply only inside
 * a `.tn` element (the sidebar, page headers, the new Phase 3 pages). Existing inner pages keep
 * their own styles (WEB_APP_RESTRUCTURE.md §7).
 */

@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-Light.ttf") format("truetype");    font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-Regular.ttf") format("truetype");  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-Medium.ttf") format("truetype");   font-weight: 500; font-style: normal; font-display: swap; }
/* The export has no Bold file: 600–700 both use SemiBold instead of a synthesized bold. */
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  /* Brand surfaces */
  --tn-ink: #0a0a0a;
  --tn-ink-deep: #0a141a;          /* sidebar */
  --tn-ink-tint: #142834;
  --tn-paper: #ffffff;
  --tn-page: #0b1218;              /* prototype page background */
  --tn-card: #101c25;              /* prototype card surface */
  --tn-card-inset: #0b1218;        /* chip / inset surface on a card */
  --tn-widget: #0f1f2a;            /* sidebar challenge widget */

  /* Accents */
  --tn-sky: #5BC1EA;
  --tn-sky-strong: #40B1EC;
  --tn-sky-soft: #75CDF1;
  --tn-mustard: #C9BC4B;
  --tn-amber: #EDA642;
  --tn-amber-strong: #F7A21E;
  --tn-teal: #3EB2A5;
  --tn-teal-deep: #1F6F71;
  --tn-coral: #E16055;
  --tn-rose: #EB2525;
  --tn-leaf: #3CA33C;

  /* Neutrals */
  --tn-fg-1: #ffffff;
  --tn-fg-2: rgba(255,255,255,0.6);
  --tn-fg-3: rgba(255,255,255,0.4);
  --tn-fg-4: rgba(255,255,255,0.2);
  --tn-line: rgba(255,255,255,0.1);
  --tn-line-strong: rgba(255,255,255,0.2);
  --tn-line-soft: rgba(255,255,255,0.08);
  --tn-stroke-dark: #3C3C3B;
  --tn-mute: #ABABAB;
  --tn-mute-2: #696A6A;
  --tn-chip: #D9D9D9;
  --tn-on-paper-1: #0a0a0a;
  --tn-on-paper-2: rgba(10,10,10,0.6);

  /* Type */
  --tn-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tn-font-display: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;

  --tn-h1-size: 45px;       --tn-h1-lh: 1;        --tn-h1-weight: 700; --tn-h1-track: -0.006em;
  --tn-h2-size: 33px;       --tn-h2-lh: 1;        --tn-h2-weight: 700; --tn-h2-track: 0;
  --tn-h3-size: 25px;       --tn-h3-lh: 1.05;     --tn-h3-weight: 600; --tn-h3-track: 0;
  --tn-h4-size: 20px;       --tn-h4-lh: 1.2;      --tn-h4-weight: 600;
  --tn-h5-size: 16px;       --tn-h5-lh: 1.25;     --tn-h5-weight: 600;
  --tn-body-size: 15px;     --tn-body-lh: 1.45;   --tn-body-weight: 400;
  --tn-body-sm-size: 14px;  --tn-body-sm-lh: 1.4; --tn-body-sm-weight: 400;
  --tn-caption-size: 12px;  --tn-caption-lh: 1.3; --tn-caption-weight: 500;
  --tn-overline-size: 10px; --tn-overline-lh: 1;  --tn-overline-weight: 500; --tn-overline-track: 0.12em;
  --tn-page-title-size: 30px;     /* prototype page H1 */

  /* Radii / spacing */
  --tn-r-xs: 6px;
  --tn-r-sm: 12px;
  --tn-r-md: 18px;
  --tn-r-lg: 25px;
  --tn-r-xl: 35px;
  --tn-r-card: 22px;              /* prototype card radius */
  --tn-r-pill: 999px;

  --tn-space-1: 4px;
  --tn-space-2: 8px;
  --tn-space-3: 12px;
  --tn-space-4: 16px;
  --tn-space-5: 24px;
  --tn-space-6: 32px;
  --tn-space-7: 48px;
  --tn-space-8: 64px;

  /* Effects */
  --tn-shadow-card: 0 0 20px rgba(91,193,234,0.35);
  --tn-shadow-pop: 0 12px 40px rgba(0,0,0,0.5);
  --tn-blur-sheet: blur(40px);
  --tn-blur-glass: blur(10.5px);
}

/* Scope: everything inside .tn uses Montserrat. */
.tn {
  font-family: var(--tn-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page body for the new Phase 3 pages (prototype main: padding 28 40 72, max-width 1200, gap 24). */
.tn-page {
  color: var(--tn-fg-1);
  background: var(--tn-page);
  min-height: 100vh;
  padding: 28px 40px 72px;
}
.tn-page__inner {
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (max-width: 768px) {
  .tn-page { padding: 72px 16px 48px; }
}

/* Type roles */
.tn-h1 { font-family: var(--tn-font-display); font-size: var(--tn-h1-size); line-height: var(--tn-h1-lh); font-weight: var(--tn-h1-weight); letter-spacing: var(--tn-h1-track); }
.tn-h2 { font-family: var(--tn-font-display); font-size: var(--tn-h2-size); line-height: var(--tn-h2-lh); font-weight: var(--tn-h2-weight); letter-spacing: var(--tn-h2-track); }
.tn-h3 { font-family: var(--tn-font); font-size: var(--tn-h3-size); line-height: var(--tn-h3-lh); font-weight: var(--tn-h3-weight); }
.tn-h4 { font-family: var(--tn-font); font-size: var(--tn-h4-size); line-height: var(--tn-h4-lh); font-weight: var(--tn-h4-weight); }
.tn-h5 { font-family: var(--tn-font); font-size: var(--tn-h5-size); line-height: var(--tn-h5-lh); font-weight: var(--tn-h5-weight); }
.tn-body { font-family: var(--tn-font); font-size: var(--tn-body-size); line-height: var(--tn-body-lh); font-weight: var(--tn-body-weight); }
.tn-body-sm { font-family: var(--tn-font); font-size: var(--tn-body-sm-size); line-height: var(--tn-body-sm-lh); font-weight: var(--tn-body-sm-weight); }
.tn-caption { font-family: var(--tn-font); font-size: var(--tn-caption-size); line-height: var(--tn-caption-lh); font-weight: var(--tn-caption-weight); color: var(--tn-fg-2); }
.tn-overline { font-family: var(--tn-font); font-size: var(--tn-overline-size); line-height: var(--tn-overline-lh); font-weight: var(--tn-overline-weight); letter-spacing: var(--tn-overline-track); text-transform: uppercase; color: var(--tn-fg-2); }

/* Eyebrow above a page title: "CONNECT · MY INCENTIVES" */
.tn-eyebrow {
  font-family: var(--tn-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* Page header: eyebrow / H1 / sub-line, optional right slot */
.tn-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--tn-font);
  color: var(--tn-fg-1);
}
.tn-page-header__titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tn-page-header__title { margin: 0; font-size: var(--tn-page-title-size); line-height: 1.15; font-weight: 700; color: var(--tn-fg-1); }
.tn-page-header__sub { margin: 0; max-width: 640px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.68); }
.tn-page-header__right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Buttons (prototype: radius 12, padding 13 22) */
.tn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--tn-font); font-weight: 600; font-size: 14px; line-height: 1.2;
  border-radius: var(--tn-r-sm); padding: 13px 22px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.1s ease;
  color: var(--tn-fg-1);
}
.tn-btn:hover { filter: brightness(1.08); color: var(--tn-fg-1); }
.tn-btn:active { transform: scale(0.98); }
.tn-btn--primary { background: var(--tn-leaf); }
.tn-btn--accent  { background: var(--tn-mustard); color: #fff; }
.tn-btn--warn    { background: var(--tn-amber); }
.tn-btn--ghost   { background: rgba(255,255,255,0.08); color: var(--tn-fg-1); }
.tn-btn--danger  { background: var(--tn-rose); }
.tn-btn[disabled], .tn-btn--disabled {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.12);
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* Text link with arrow ("Go to Offers →") */
.tn-link { font-family: var(--tn-font); font-size: 14px; font-weight: 600; color: var(--tn-sky); text-decoration: none; }
.tn-link:hover { color: var(--tn-sky-soft); }

/* Card */
.tn-card {
  background: var(--tn-card);
  border: 1px solid var(--tn-line-soft);
  border-radius: var(--tn-r-card);
  color: var(--tn-fg-1);
}

/* Pill: "SOON" (nav) and "COMING SOON" (pages) */
.tn-pill {
  display: inline-flex; align-items: center;
  font-family: var(--tn-font);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--tn-r-pill);
  padding: 5px 12px;
  width: fit-content;
}
.tn-pill--sm {
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.16);
  padding: 2px 7px;
}

/* Progress bar (4 px track, sky fill; set the fill width inline) */
.tn-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.tn-bar__fill { height: 100%; border-radius: 2px; background: var(--tn-sky); }

@keyframes tnfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tn-fade { animation: tnfade .3s ease-out; }
