/* ══════════════════════════════════════════════════════════════
   LEM GLOBAL — core.css
   Tokens, reset, typography, layout primitives.

   The palette, type scale, radii and shadows below are taken from
   the HubPal product (hubpal/landing/landing.css) so the corporate
   site and the product read as one brand. HubPal is the source of
   truth: if a token changes there, change it here.
   ══════════════════════════════════════════════════════════════ */

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

body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }

img, svg, video, canvas { display: block; max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }

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

ul, ol { list-style: none; }

/* The `hidden` attribute only sets `display: none` in the UA sheet, so any
   author rule with a display of its own silently beats it — which is how the
   contact form's success and error messages ended up permanently on screen.
   Make the attribute win. */
[hidden] { display: none !important; }


/* ── TOKENS (HubPal corporate) ─────────────────────────────── */
:root {
  /* Navy — primary */
  --navy:        #0d3c6e;
  --navy-dark:   #082a52;
  --navy-deep:   #051a36;
  --navy-light:  #1a5598;

  /* Orange — accent */
  --orange:      #f07a1f;
  --orange-dark: #d96710;
  --orange-soft: #fde2cc;

  /* Lilac — tertiary */
  --lilac:       #6e3c9c;
  --lilac-light: #9166bf;
  --lilac-soft:  #ece3f7;

  /* Surfaces */
  --bg:          #f4f6fa;
  --surface:     #ffffff;
  --border:      #e3e8ef;

  /* Text */
  --text:        #1a2231;
  --text-soft:   #5a6478;
  --text-mute:   #8a93a6;

  /* Status */
  --ok:          #21a36b;
  --warn:        #d99800;
  --err:         #a32626;

  /* Shape */
  --radius:      12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow:      0 1px 2px rgba(13, 60, 110, 0.06), 0 4px 12px rgba(13, 60, 110, 0.06);
  --shadow-lg:   0 8px 24px rgba(13, 60, 110, 0.12);
  --shadow-xl:   0 20px 50px rgba(4, 18, 42, 0.28);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Menlo, Consolas, monospace;

  /* Rhythm */
  --header-h: 68px;
  --maxw:     1160px;
  --gutter:   24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Inter has no CJK coverage — mirror HubPal's Japanese stack. */
html[lang="ja"] {
  --font: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
          'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', sans-serif;
}


/* ── BASE ──────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;

  /* Reveal animations slide elements in from ±26px, which briefly puts them
     past the right edge and flashes a horizontal scrollbar. `clip` suppresses
     that without creating a scroll container — `hidden` here would break the
     sticky header. */
  overflow-x: clip;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


/* ── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.6px; }

h1 { font-size: clamp(32px, 4.2vw, 50px); letter-spacing: -1px; }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.2px; }

p { font-size: 16px; }

/* Small uppercase label above a heading. */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

/* On navy surfaces the plain orange is too dark to read. */
.eyebrow.light { color: #f6a05e; }

/* Animated brand gradient — HubPal's signature word treatment. */
.brand-gradient {
  background: linear-gradient(90deg, #6fa8ff 0%, var(--orange) 45%, var(--lilac-light) 90%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

.lead { font-size: 17px; color: var(--text-soft); max-width: 58ch; }

.muted { color: var(--text-soft); }
.small { font-size: 13.5px; }


/* ── LAYOUT ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(64px, 8vw, 96px) 0; }

/* Alternating page bands. */
.section-alt { background: var(--bg); }

.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: #fff;
}

.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #b6c6dc; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(38px, 5vw, 56px); }
.section-head p { margin-top: 14px; color: var(--text-soft); }
.section-dark .section-head p { color: #b6c6dc; }

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

/* Grid items default to min-width:auto, so a single wide child — a long
   unbreakable string, an SVG's intrinsic size — can push its track wider
   than the container and blow out the page. Reset it. */
.grid > *,
.split > * { min-width: 0; }

.split-reverse .split-copy { order: 1; }
.split-reverse .split-visual { order: 0; }

.center { text-align: center; }
.stack-v { display: flex; flex-direction: column; gap: 14px; }


/* ── ACCESSIBILITY ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--navy-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-dark :focus-visible { outline-color: #f6a05e; }

.sr-only {
  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;
  top: -100px;
  left: var(--gutter);
  z-index: 400;
  padding: 12px 22px;
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 14px; }

::selection { background: var(--orange-soft); color: var(--navy-deep); }


/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse .split-copy,
  .split-reverse .split-visual { order: 0; }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
}
