/*
 * MettaFlow public site - hand-written styles (no Tailwind, no build step).
 *
 *   site.css     tokens, base rules and the pieces every page shares (buttons, eyebrow, header, footer)
 *   landing.css  the landing page's sections
 *
 * Tokens and rules come from docs/designs/MettaFlow_Landing_Page/style_spec.md: two grounds (paper
 * and ink), one accent, and the accent FILL marks a place where a person acts. Change a token there too.
 * Breakpoint: 1100 - below it the header's links fold into a sheet.
 */

/* ---- Fonts: Plus Jakarta Sans and Noto Sans Myanmar, self-hosted -------------------------------
   The files and unicode ranges are the ones Google Fonts serves for these two families (both
   variable, both SIL OFL). Each is one file per script, so a page only fetches the scripts it shows;
   App.razor preloads the Latin one. Hosting them here keeps a slow third party out of first paint. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../font/plus-jakarta-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../font/plus-jakarta-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../font/plus-jakarta-sans-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../font/plus-jakarta-sans-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Noto Sans Myanmar'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../font/noto-sans-myanmar-myanmar.woff2') format('woff2'); unicode-range: U+1000-109F, U+200C-200D, U+25CC, U+A92E, U+A9E0-A9FE, U+AA60-AA7F, U+116D0-116E3; }
@font-face { font-family: 'Noto Sans Myanmar'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../font/noto-sans-myanmar-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans Myanmar'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../font/noto-sans-myanmar-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- Tokens ------------------------------------------------------------------------------- */
:root {
  /* type */
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --my: 'Noto Sans Myanmar', 'Plus Jakarta Sans', sans-serif;

  /* neutrals */
  --ink: #1A1310;          /* dark ground, primary text on light */
  --paper: #FFF8F5;        /* light ground */
  --card: #FFFFFF;         /* card / window surface */
  --body: #35313A;         /* long-form body text on light */
  --muted: #6E6762;        /* secondary text on light */
  --muted-dark: #B4ACA7;   /* secondary text on dark */
  --line: rgba(32, 29, 34, .10);
  --line-strong: rgba(32, 29, 34, .24);
  --line-dark: rgba(255, 248, 245, .16);

  /* brand */
  --accent: #FF3B00;        /* fills, rails, dots, large type only */
  --accent-deep: #D93400;   /* accent TEXT on light; primary button fill */
  --accent-soft: #FDEEE9;   /* tinted callouts, icon tiles, tags */
  --accent-on-dark: #FFB59E;/* accent text on ink */

  /* semantic (confidence / status) */
  --ok-bg: #DDF3EA;   --ok-ink: #0F6E4E;
  --warn-bg: #FBEBD0; --warn-ink: #7A4B00;
  --red: #D64545;

  /* elevation (product windows only) */
  --shadow-light: 0 24px 60px rgba(16, 20, 31, .12);
  --shadow-dark: 0 30px 70px rgba(0, 0, 0, .40);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- Base --------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
input[type=range] { accent-color: var(--accent-deep); }
h1:focus { outline: none; }
/* landing.js shows and hides with the attribute, and many of those elements are flex or grid. */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.mf-container { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 100px); }
.mf-wide { max-width: 1680px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 32px); }
.mf-mono { font-family: var(--mono); }
.mf-my { font-family: var(--my); }
.mf-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Buttons ------------------------------------------------------------------------------ */
.mf-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: var(--btn-h, 48px); padding: 0 var(--btn-px, 24px); border: 0; border-radius: 999px;
  font-weight: 600; font-size: var(--btn-fs, 16px); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms;
}
.mf-btn:active { transform: translateY(1px); }
.mf-btn:disabled { opacity: .4; pointer-events: none; }

.mf-btn--primary { background: var(--accent-deep); color: #fff; }
.mf-btn--primary:hover { background: var(--ink); color: #fff; }
/* The two ink buttons trade places on hover, so both carry the same outline. */
.mf-btn--ink, .mf-btn--outline { border: 1.5px solid var(--ink); }
.mf-btn--ink { background: var(--ink); color: var(--paper); }
.mf-btn--ink:hover { background: transparent; color: var(--ink); }
.mf-btn--outline { --btn-px: 22px; background: transparent; color: var(--ink); }
.mf-btn--outline:hover { background: var(--ink); color: var(--paper); }
.mf-btn--on-card { background: var(--card); }

/* On an ink ground a hover turns to paper instead. */
.mf-btn--on-ink.mf-btn--primary:hover { background: var(--paper); color: var(--ink); }
.mf-btn--on-ink.mf-btn--outline { --btn-px: 24px; border-color: var(--paper); color: var(--paper); }
.mf-btn--on-ink.mf-btn--outline:hover { background: var(--paper); color: var(--ink); }

.mf-btn--sm { --btn-h: 44px; --btn-px: 18px; --btn-fs: 14px; }
.mf-btn--lg { --btn-h: 52px; }

/* A link that is really a button: underlined accent text with a full-height hit area. */
.mf-linkbtn {
  min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent-deep);
  font-weight: 600; font-size: 16px; white-space: nowrap; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.mf-linkbtn:hover { color: var(--ink); }
.mf-linkbtn--on-ink { color: var(--accent-on-dark); font-size: 15px; }
.mf-linkbtn--on-ink:hover { color: var(--paper); }

/* ---- Eyebrow, person mark ----------------------------------------------------------------- */
.mf-eyebrow {
  display: inline-flex; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--muted);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.mf-eyebrow--on-ink { border-color: var(--line-dark); color: var(--muted-dark); }
.mf-eyebrow-row { display: flex; align-items: center; gap: 12px; }
.mf-face {
  width: 46px; height: 46px; display: block; flex: none;
  transform: rotate(var(--tilt, -8deg)); transition: transform 420ms cubic-bezier(.34, 1.56, .64, 1);
}
.mf-face:hover { transform: rotate(calc(var(--tilt, -8deg) * -1)) scale(1.12); }

.mf-person {
  width: var(--size, 32px); height: var(--size, 32px); border-radius: 50%; background: var(--accent); flex: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: calc(var(--size, 32px) * .18); gap: calc(var(--size, 32px) * .05);
}
.mf-person > span:first-child { width: 21%; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.mf-person > span:last-child { width: 42%; height: 21%; border-radius: 99px 99px 4px 4px; background: #fff; }

/* ---- Announcement bar + header ------------------------------------------------------------ */
.mf-announce {
  min-height: 40px; padding: 10px 20px; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1.4; text-align: center; text-wrap: pretty;
}
.mf-announce strong { font-weight: 700; }
.mf-announce a { color: var(--accent-on-dark); font-weight: 600; }
.mf-announce a:hover { color: var(--paper); }

.mf-header {
  position: sticky; top: 0; z-index: 50; background: var(--paper);
  border-bottom: 1px solid transparent; transition: border-color 180ms var(--ease);
}
.mf-header.is-scrolled { border-bottom-color: var(--line); }
.mf-header__bar { height: 72px; display: flex; align-items: center; gap: 32px; }
.mf-header__logo { display: flex; align-items: center; flex: none; }
.mf-header__logo img { height: 30px; width: auto; display: block; }
.mf-header__nav { display: flex; gap: 28px; flex: 1; }
.mf-header__nav a, .mf-header__signin { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.mf-header__nav a:hover, .mf-header__signin:hover { color: var(--accent-deep); }
.mf-header__cta-short, .mf-header__burger { display: none; }
.mf-header__burger {
  width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.mf-header__burger span { width: 16px; height: 2px; background: var(--ink); border-radius: 2px; }
.mf-header__sheet {
  background: var(--paper); border-top: 1px solid var(--line); padding: 12px clamp(20px, 5vw, 100px) 20px;
  display: flex; flex-direction: column;
}
.mf-header__sheet a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mf-header__sheet a:last-child { border-bottom: 0; }

@media (max-width: 1099px) {
  .mf-header__nav { visibility: hidden; }
  .mf-header__nav a, .mf-header__signin, .mf-header__cta-long { display: none; }
  .mf-header__cta-short { display: inline; }
  .mf-header__burger { display: flex; }
}
@media (min-width: 1100px) {
  .mf-header__sheet { display: none; }
}

/* ---- Footer ------------------------------------------------------------------------------- */
.mf-footer { background: var(--ink); color: var(--muted-dark); padding: 56px 0 40px; }
.mf-footer__inner { display: flex; flex-direction: column; gap: 32px; }
.mf-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.mf-logo-plate { background: #fff; border-radius: 12px; padding: 8px 16px; display: inline-flex; }
.mf-logo-plate img { height: 32px; width: auto; display: block; }
.mf-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.mf-footer__nav a { color: var(--accent-on-dark); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.mf-footer__nav a:hover { color: var(--paper); }
.mf-footer__base { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* ---- Plain message pages (not found, error) ----------------------------------------------- */
.mf-message { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding-top: 64px; padding-bottom: 64px; }
.mf-message h1 { margin: 0; font-size: clamp(32px, 4.2vw, 60px); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
.mf-message p { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.5; color: var(--body); }
