/* =========================================================================
   MM Recruitment Ltd - Portal design tokens & shared chrome
   Independent brand identity - deliberately NOT sharing tokens/styles
   with the Laurus Recruitment codebase this portal was forked from,
   matching this ecosystem's own convention of independent brands per
   project.

   The :root block below is copied from the sibling mm-recruitment-website
   repo's assets/css/style.css (the marketing site's own design system -
   see that repo's docs/DESIGN-SYSTEM.md), so this portal's header,
   footer and form chrome visually match the public site. Keep the two
   in sync by hand if the marketing site's palette/type changes - there
   is no shared build step between the two repos.

   Palette (as supplied in the brief - do not adjust without approval):
     Warm ivory     #FAF7F1
     Rich gold      #B18A43
     Light champagne#E9D7B4
     Charcoal       #26231F
     White          #FFFFFF

   Typography: Fraunces (display serif) for headings/wordmark, Inter
   (humanist sans) for body text and UI. Both loaded from Google Fonts -
   see the <link> tags in every page's <head>.
   ========================================================================= */

:root {
  --ivory: #FAF7F1;
  --gold: #B18A43;
  /* A deliberately darker shade than the approved #B18A43 for TEXT on
     light backgrounds only (links, small labels) - #B18A43 itself only
     measures ~3.2:1 against white/ivory, below WCAG AA's 4.5:1 for
     normal text. #8a6b2c measures ~4.65-5:1 against ivory/white while
     staying visibly the same gold family. --gold itself is unchanged
     and still used for backgrounds, borders, buttons and large/
     decorative elements, where this contrast rule doesn't apply. */
  --gold-dark: #8a6b2c;
  --champagne: #E9D7B4;
  --charcoal: #26231F;
  --white: #FFFFFF;

  --text: var(--charcoal);
  --text-muted: rgba(38, 35, 31, 0.66);
  --hairline: rgba(38, 35, 31, 0.12);
  --surface: var(--white);
  --surface-warm: var(--champagne);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 20px 60px -30px rgba(38, 35, 31, 0.35);
  --container-width: 1180px;

  /* -----------------------------------------------------------------
     Role-mapped aliases for portal.css / los-recruitment.css / legal.css
     (carried over unmodified from the forked codebase). Those files
     were written against Laurus Recruitment's navy/gold palette; rather
     than rewrite every rule, each old variable name is aliased here to
     the MM token that plays the same ROLE (not the same hex) - primary
     dark ink -> charcoal, gold accent -> gold, light neutral panel bg,
     etc. See each file's own header comment for how it's layered on
     top of this file.
     ----------------------------------------------------------------- */
  --navy: var(--charcoal);
  --navy-deep: #1a1712;
  --navy-soft: #332e26;
  --gold-soft: var(--champagne);
  --hairline-dark: rgba(255, 255, 255, 0.14);
  --light: #F1ECE0;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--charcoal);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }
a { color: var(--gold-dark); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 640px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 14px;
}

.section {
  padding: clamp(56px, 8vw, 110px) 0;
}
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

/* -------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.button.primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 14px 30px -14px rgba(177, 138, 67, 0.65);
}
.button.primary:hover { background: var(--gold-dark); transform: translateY(-1px); }
.button.secondary {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}
.button.secondary:hover { background: var(--charcoal); color: var(--white); }
.button.disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.button.disabled:hover, .button[aria-disabled="true"]:hover { transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------------------------------------------------------
   Header / navigation - matches mm-recruitment-website's own
   header markup exactly (see that repo's index.html <header
   class="site-header">), so a visitor moving between the marketing
   site and this portal sees the same chrome.
   ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

/* Reserved slot for the approved gold angel-and-daisy mark, supplied
   separately - NEVER filled with an invented substitute. Zero-size
   until assets/images/mm-recruitment-logo.svg (or .png) exists; see
   the mm-recruitment-website repo's docs/DESIGN-SYSTEM.md "Logo"
   section for the exact swap instructions. Deliberately not a
   monogram/icon placeholder either - no substitute should be
   invented, so this stays empty rather than approximating the real
   mark. */
.logo-mark {
  display: inline-block;
  width: 0;
  height: 44px;
  overflow: hidden;
}
.logo-mark img { height: 44px; width: auto; display: block; }

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--charcoal);
}
.wordmark .accent { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--gold); color: var(--gold-dark); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--charcoal); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------
   Footer - matches mm-recruitment-website's own footer chrome,
   including the "Powered by LOS" line (LOS is the shared underlying
   technology brand across Laurus Group businesses, not something
   rebranded away - see that repo's footer for the same line).
   ------------------------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-grid a { color: rgba(255,255,255,0.75); text-decoration: none; display: block; margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--champagne); }
.footer-brand .wordmark { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
.powered-by-los {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.55);
}
.powered-by-los .los-mark { color: var(--champagne); font-weight: 600; }

/* -------------------------------------------------------------------
   Placeholder/TBC convention - matches mm-recruitment-website's own
   .tbc treatment for facts not yet supplied (contact details, company
   registration number, logo, legal text).
   ------------------------------------------------------------------- */
.tbc {
  background: rgba(177, 138, 67, 0.16);
  color: var(--gold-dark);
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.92em;
}

/* -------------------------------------------------------------------
   Demo banner - shown site-wide until this portal is genuinely
   connected to a live, tested Supabase project. Never remove this
   without confirming registration/sign-in actually work end-to-end.
   ------------------------------------------------------------------- */
.demo-banner {
  background: var(--champagne);
  color: var(--charcoal);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
}
.demo-banner strong { color: var(--gold-dark); }

/* -------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------- */
.text-muted { color: var(--text-muted); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* -------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */
@media (max-width: 720px) {
  .nav-links, .nav-cta .button { display: none; }
  .nav-toggle { display: flex; }
  #site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px 26px;
    border-bottom: 1px solid var(--hairline);
    gap: 16px;
    z-index: 30;
  }
  #site-nav.is-open .nav-cta { display: flex; flex-direction: column; align-items: stretch; }
  #site-nav.is-open .nav-cta .button { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
