/* ==========================================================================
   P & M Solutions — Stage 1 stylesheet
   Implemented to match PM-Tech-Solutions-Design-System.html (the visual source
   of truth). Tokens, palette, typography (Geist / Geist Mono), glassmorphism,
   buttons, cards, inputs and badges are reproduced from that artifact.
   The design-system HTML itself is preserved unchanged.
   ========================================================================== */

:root {
  --color-bg:            #000000;
  --color-surface:       #0A0A0A;
  --color-surface-2:     #0c0c0c;
  --color-heading:       #ffffff;
  --color-body:          #a1a1aa;
  --color-muted:         #71717a;
  --color-accent:        #0ea5e9;
  --color-accent-400:    #38bdf8;
  --color-accent-300:    #7dd3fc;
  --color-accent-200:    #bae6fd;
  --color-indigo:        #818cf8;
  --color-success:       #10b981;

  --glass-panel:         rgba(255,255,255,0.03);
  --glass-nav:           rgba(0,0,0,0.5);
  --color-border:        rgba(255,255,255,0.08);
  --color-border-soft:   rgba(255,255,255,0.05);

  --bg-section-alt:      rgba(6,6,6,0.88);

  --font-heading:        'Geist', system-ui, sans-serif;
  --font-body:           'Geist', system-ui, sans-serif;
  --font-mono:           'Geist Mono', 'SF Mono', monospace;

  --fs-h1: 67px; --fs-h2: 48px; --fs-h3: 32px; --fs-h4: 24px;
  --fs-h5: 20px; --fs-h6: 18px; --fs-body: 16px;
  --lh-h1: 1.02; --lh-body: 1.7;

  --section-padding-y: 112px;
  --container-max:     1200px;
  --container-gutter:  24px;

  /* Shared square-grid system per design-system spec: 56px cell, .04 alpha,
     masked to top band only. Full token matches DS hero-grid exactly. */
  --grid-size:         56px;


  --radius-btn: 12px; --radius-card: 16px; --radius-panel: 12px;
  --radius-input: 10px; --radius-pill: 999px;

  --glow-md: 0 0 30px rgba(14,165,233,0.35);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.6);
  --transition-base: all 0.3s cubic-bezier(.16,1,.3,1);
  --ds-nav-h: 56px;
}

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

html { scroll-behavior: smooth; background: var(--color-bg); }

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-body);
  background: var(--color-bg);
  padding-top: var(--ds-nav-h);
  -webkit-font-smoothing: antialiased;
}

body > *:not(.site-grid) { position: relative; z-index: 1; }
/* DS hero-grid reproduced as a fixed ambient layer.
   Alpha .04 and the radial mask match the design-system source exactly so
   the grid is present only in the viewport's top band and fades to nothing
   below — calm on inner pages, intentional in the hero. */
.site-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
}

::selection { background: rgba(14,165,233,0.3); }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0 0 1rem; }

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

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--color-accent); color: #000; padding: 10px 16px;
  border-radius: 0 0 var(--radius-btn) 0;
}
.skip-link:focus { left: 0; }

/* Layout ------------------------------------------------------------------ */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-gutter); }
.section { position: relative; padding: var(--section-padding-y) 0; }
.section--alt { background: var(--bg-section-alt); }

/* Shared grid layer is rendered once in the base layout for every route. */
.section--head, .section--head-quiet { background: transparent; }
.section__eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--color-accent-300); margin-bottom: 14px;
}
.section__lead { max-width: 720px; color: var(--color-body); }
.stack > * + * { margin-top: 1rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Navbar ------------------------------------------------------------------ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--ds-nav-h);
  background: var(--glass-nav);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-soft);
}
.nav__inner {
  max-width: var(--container-max); margin: 0 auto; height: 100%;
  padding: 0 var(--container-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
/* Brand lockup: DS-specified mark (gradient square) + text.
   The PNG asset has large opaque black margins that shift the visible
   logo edge away from the container rail. The semantic lockup below
   has zero internal offsets — its visible left edge is exactly the
   rail left edge. Matches design-system .brand-lockup/.brand-mark/.brand-name. */
.nav__brand {
  display: inline-flex;
  align-items: center;
  width: 120px;
  height: 100%;
  overflow: visible;
  flex-shrink: 0;
}
/* The source logo is a 1774×887 RGB canvas with black margins. At the
   deterministic display size below, its visible artwork begins at 27×29px.
   The crop window starts exactly on the shared rail, so the artwork—not the
   source canvas—is what aligns with the navigation content. */
.nav__brand-crop {
  position: relative;
  display: block;
  width: 120px;
  height: 32px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}
.nav__brand-logo {
  position: absolute;
  display: block;
  max-width: none;
  width: 174px;
  height: 87px;
  left: -27px;
  top: -29px;
}
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: rgba(255,255,255,0.6); font-size: 14px; font-weight: 500; transition: var(--transition-base); }
.nav__links a:hover { color: #fff; }
.nav__toggle { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

/* Buttons ----------------------------------------------------------------- */
.btn-primary, .btn-glass, .btn-white {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: var(--radius-btn);
  cursor: pointer; transition: var(--transition-base); border: 1px solid transparent;
}
.btn-primary { background: var(--color-accent); color: #000; border-color: var(--color-accent); box-shadow: var(--glow-md); }
.btn-primary:hover { background: var(--color-accent-400); border-color: var(--color-accent-400); transform: translateY(-1px); }
.btn-primary[disabled], .btn-primary.is-disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-glass { background: var(--glass-panel); color: rgba(255,255,255,0.85); backdrop-filter: blur(12px); border-color: var(--color-border); }
.btn-glass:hover { background: rgba(255,255,255,0.06); }
.btn-white { background: #fff; color: #000; border-color: #fff; }
.btn-white:hover { background: rgba(255,255,255,0.9); }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
/* Depth fields: cyan upper-right + indigo lower-left, behind .hero__inner (z 2).
   Applied only to .hero, which lives exclusively in the home fragment. */
.hero--home::before {
  content: ''; position: absolute; top: -80px; right: 8%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(14,165,233,0.18) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 1;
}
.hero--home::after {
  content: ''; position: absolute; bottom: -120px; left: -60px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(129,140,248,0.14) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 1;
}
.hero__inner { position: relative; z-index: 2; max-width: 780px; }
.hero__signal {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-accent-300);
  margin: 0 0 18px; opacity: 0.85;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-panel); border: 1px solid var(--color-border);
  backdrop-filter: blur(12px); border-radius: var(--radius-pill);
  padding: 6px 14px; margin-bottom: 26px; font-size: 12px; color: rgba(255,255,255,0.7);
}
.hero__badge .tag {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: rgba(14,165,233,0.2); color: var(--color-accent-300);
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.hero__title { margin-bottom: 22px; }
.hero__subtitle { font-size: 18px; color: rgba(255,255,255,0.6); max-width: 640px; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards ------------------------------------------------------------------- */
.glass-panel {
  background: var(--glass-panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
}
.feature-card {
  background: var(--glass-panel); backdrop-filter: blur(12px);
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 26px; transition: var(--transition-base);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(14,165,233,0.3); }
.feature-card__icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.2);
  margin-bottom: 20px; color: var(--color-accent-300);
}
.feature-card__title { font-size: 18px; font-weight: 500; color: #fff; margin-bottom: 8px; }
.feature-card__text { font-size: 14px; line-height: 1.6; color: var(--color-body); margin: 0; }

/* Empty state (products, pending content) --------------------------------- */
.empty-state {
  border: 1px dashed var(--color-border); border-radius: var(--radius-card);
  padding: 40px; text-align: center; color: var(--color-muted);
  background: var(--glass-panel);
  max-width: 780px;
  margin-top: 32px;
}

/* Badges ------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: var(--radius-pill); }
.badge--accent { background: rgba(14,165,233,0.15); color: var(--color-accent-300); border: 1px solid rgba(14,165,233,0.25); }
.badge--success { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.badge--neutral { background: rgba(255,255,255,0.06); color: var(--color-body); border: 1px solid var(--color-border); }

/* Forms ------------------------------------------------------------------- */
.form { max-width: 760px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form__group--full { grid-column: 1 / -1; }
.form__fieldset { border: 0; margin: 0 0 8px; padding: 0; }
.form__legend {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--color-accent-300); padding: 0; margin-bottom: 18px;
}
.input-label { font-size: 13px; font-weight: 500; color: #fff; }
.input-label .req { color: var(--color-accent-400); margin-left: 2px; }
.input-el {
  width: 100%; padding: 11px 14px; font-family: var(--font-body); font-size: 14px; color: #fff;
  background: rgba(255,255,255,0.02); border: 1px solid var(--color-border);
  border-radius: var(--radius-input); outline: none; transition: var(--transition-base); appearance: none;
}
.input-el::placeholder { color: var(--color-muted); }
.input-el:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
.input-el--error { border-color: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,0.12); }
.input-el:disabled { color: var(--color-muted); cursor: not-allowed; opacity: .6; }
textarea.input-el { resize: vertical; min-height: 120px; }
select.input-el {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}
.input-hint { font-size: 12px; color: var(--color-muted); margin: 0; }
.input-hint--error { color: #fb7185; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--color-body); }
.form__consent input { margin-top: 3px; }
.form__actions { margin-top: 8px; }

/* Alerts ------------------------------------------------------------------ */
.alert { border-radius: var(--radius-panel); padding: 14px 16px; font-size: 14px; margin-bottom: 22px; }
.alert--error { background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.3); color: #fda4af; }
.alert__list { margin: 8px 0 0; padding-left: 18px; }

/* Success panel ----------------------------------------------------------- */
.success { max-width: 640px; margin: 0 auto; text-align: center; }
.success__icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 24px; background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25);
  color: #34d399; font-size: 28px;
}

/* Footer ------------------------------------------------------------------ */
.footer { border-top: 1px solid var(--color-border-soft); padding: 40px 0; color: var(--color-muted); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --fs-h1: 44px; --fs-h2: 34px; --section-padding-y: 72px; }
  .grid-3, .grid-2, .form__grid { grid-template-columns: 1fr; }
  .nav__links {
    display: none; position: absolute; top: var(--ds-nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: #000;
    border-bottom: 1px solid var(--color-border);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 4px var(--container-gutter); }
  .nav__links a { display: block; padding: 10px 0; }
  .nav__toggle { display: block; }
}
