/*
Theme Name: Lumsi
Theme URI: https://lumsi.io
Author: Lumsi
Author URI: https://lumsi.io
Description: Lumsi brand child theme. Extends Twenty Twenty-Four with the canonical Lumsi design system (palette, typography, spacing, components) plus block patterns and block style variations so every new page is on-brand by default. See README in the theme folder for architecture notes.
Template: twentytwentyfour
Version: 1.1.5
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: Proprietary
Text Domain: lumsi
*/

/* ============================================================
   LUMSI BRAND SYSTEM
   ------------------------------------------------------------
   Component CSS layer. Design tokens live in theme.json so they
   show up in the block-editor pickers. The lm-* component
   classes below are referenced by block patterns and may be
   applied to any block via the editor's Additional CSS Class
   field.

   Tokens repeated here as :root vars for cases where theme.json
   tokens aren't directly accessible (third-party plugins,
   transition states, hand-authored blocks).
   ============================================================ */

:root {
  /* --- Palette (canonical, also in theme.json) --- */
  --navy:     #06142B;
  --navy-2:   #0c1d3a;
  --cloud:    #EBEFF7;
  --blue:     #008CFF;
  --blue-soft:#6ec0ff;
  --smoke:    #D3D6E0;
  --steel:    #BCBFCC;
  --space:    #9DA2B3;
  --graphite: #6E7180;
  --arsenic:  #40424D;
  --white:    #FFFFFF;

  /* --- Layout --- */
  --lm-maxw: 1180px;
  --lm-pad-x: clamp(22px, 5vw, 64px);
  --lm-section-y: clamp(72px, 9vw, 128px);
  --lm-radius: 4px;
  --lm-ease: cubic-bezier(.22,.61,.36,1);

  /* --- Type scale --- */
  --lm-display: clamp(44px, 7vw, 92px);
  --lm-h1:      clamp(38px, 5.2vw, 68px);
  --lm-h2:      clamp(28px, 3.6vw, 46px);
  --lm-h3:      clamp(20px, 2vw, 26px);
  --lm-lede:    clamp(18px, 1.9vw, 23px);
  --lm-body:    17px;
}

/* ============================================================
   FONT FACE LOADING
   ------------------------------------------------------------
   Poppins + JetBrains Mono via Google Fonts CDN, loaded with
   font-display: swap so headings appear in fallback first then
   swap (no FOIT). Preload of the critical 600-weight is in
   functions.php (wp_head priority 1) so the swap happens fast.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   ELEMENT RESETS — anchored to .lm-page or body
   ============================================================ */

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--cloud);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

/* Force-override TT4's default heading rules — this is the fix
   for Designer issue #24 (heading typeface wrong / oversized /
   loosely tracked). The body cascade above won't reach headings
   that TT4 styles via theme.json elements.*.typography, so we
   set them here too as a belt-and-braces measure. */
h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-post-title {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif !important;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ============================================================
   LAYOUT
   ============================================================ */

.lm-wrap { max-width: var(--lm-maxw); margin: 0 auto; padding-inline: var(--lm-pad-x); }
.lm-section { padding-block: var(--lm-section-y); }

/* ============================================================
   SURFACES — apply to <section> or wp:group blocks
   ============================================================ */

.lm-navy  { background: var(--navy);   color: var(--cloud); }
.lm-navy2 { background: var(--navy-2); color: var(--cloud); }
.lm-cloud { background: var(--cloud);  color: var(--navy);  }
.lm-navy .lm-sub, .lm-navy2 .lm-sub { color: var(--steel); }
.lm-cloud .lm-sub { color: var(--graphite); }

/* ============================================================
   MARK
   ============================================================ */

.lm-mark { display: inline-block; color: var(--blue); }
.lm-mark.spin { animation: lm-spin 36s linear infinite; }
@keyframes lm-spin { to { transform: rotate(360deg); } }

/* ============================================================
   KICKER / EYEBROW
   ============================================================ */

.lm-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--graphite);
}
.lm-navy .lm-kicker, .lm-navy2 .lm-kicker { color: var(--space); }
.lm-kicker .b { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }

/* ============================================================
   TYPE COMPONENTS
   ============================================================ */

.lm-display { font-size: var(--lm-display); font-weight: 600; line-height: 0.99; letter-spacing: -0.032em; text-wrap: balance; }
.lm-h1 { font-size: var(--lm-h1); font-weight: 600; line-height: 1.02; letter-spacing: -0.028em; text-wrap: balance; }
.lm-h2 { font-size: var(--lm-h2); font-weight: 600; line-height: 1.06; letter-spacing: -0.022em; text-wrap: balance; max-width: 20ch; }
.lm-h3 { font-size: var(--lm-h3); font-weight: 600; line-height: 1.16; letter-spacing: -0.015em; }
.lm-lede { font-size: var(--lm-lede); font-weight: 400; line-height: 1.42; letter-spacing: -0.01em; max-width: 56ch; }
.lm-body { font-size: var(--lm-body); line-height: 1.6; max-width: 64ch; }
.lm-body + .lm-body { margin-top: 18px; }
.lm-accent { color: var(--blue); }

/* ============================================================
   BUTTONS
   ============================================================ */

.lm-btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.lm-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: inherit; font-size: 16px; font-weight: 500; letter-spacing: -0.005em;
  padding: 14px 24px; border-radius: var(--lm-radius); border: 1px solid transparent;
  cursor: pointer; transition: all .25s var(--lm-ease); white-space: nowrap;
  text-decoration: none;
}
.lm-btn:hover { text-decoration: none; }
.lm-btn .arr { transition: transform .25s var(--lm-ease); }
.lm-btn:hover .arr { transform: translateX(3px); }
.lm-btn--primary { background: var(--blue); color: #fff; }
.lm-btn--primary:hover { background: #0a7ee6; box-shadow: 0 10px 28px -10px rgba(0,140,255,.6); color: #fff; }
.lm-btn--ghost { background: transparent; color: var(--navy); border-color: var(--smoke); }
.lm-btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.lm-navy .lm-btn--ghost, .lm-navy2 .lm-btn--ghost { color: var(--cloud); border-color: var(--arsenic); }
.lm-navy .lm-btn--ghost:hover, .lm-navy2 .lm-btn--ghost:hover { border-color: var(--steel); color: var(--cloud); }

/* Apply the brand button style to native WordPress wp-block-button
   when a block has class is-style-lm-primary or is-style-lm-ghost.
   These style variations are registered in functions.php. */
.wp-block-button.is-style-lm-primary .wp-block-button__link {
  background: var(--blue) !important; color: #fff !important;
  border-radius: var(--lm-radius) !important; padding: 14px 24px !important;
  font-weight: 500 !important; letter-spacing: -0.005em !important;
  transition: all .25s var(--lm-ease);
}
.wp-block-button.is-style-lm-primary .wp-block-button__link:hover {
  background: #0a7ee6 !important; box-shadow: 0 10px 28px -10px rgba(0,140,255,.6);
}
.wp-block-button.is-style-lm-ghost .wp-block-button__link {
  background: transparent !important; color: var(--navy) !important;
  border: 1px solid var(--smoke) !important; border-radius: var(--lm-radius) !important;
  padding: 14px 24px !important; font-weight: 500 !important; letter-spacing: -0.005em !important;
  transition: all .25s var(--lm-ease);
}
.has-base-background-color .wp-block-button.is-style-lm-ghost .wp-block-button__link,
.has-navy-background-color .wp-block-button.is-style-lm-ghost .wp-block-button__link,
.has-navy-2-background-color .wp-block-button.is-style-lm-ghost .wp-block-button__link {
  color: var(--cloud) !important; border-color: var(--arsenic) !important;
}
.wp-block-button.is-style-lm-ghost .wp-block-button__link:hover {
  border-color: var(--navy) !important;
}

/* ============================================================
   META STRIP (price / duration / delivered-by / best-for)
   ============================================================ */

.lm-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--arsenic); border: 1px solid var(--arsenic); border-radius: var(--lm-radius); overflow: hidden; }
.lm-meta .cell { background: var(--navy); padding: 22px 24px; }
.lm-cloud .lm-meta { background: var(--smoke); border-color: var(--smoke); }
.lm-cloud .lm-meta .cell { background: var(--white); }
.lm-meta .k { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--space); font-weight: 500; }
.lm-cloud .lm-meta .k { color: var(--graphite); }
.lm-meta .v { font-size: 18px; font-weight: 600; margin-top: 8px; letter-spacing: -0.01em; }
.lm-meta .v small { font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: 13px; color: var(--space); display: block; margin-top: 3px; letter-spacing: 0; }

/* ============================================================
   CARDS
   ============================================================ */

.lm-card-grid { display: grid; gap: 22px; }
.lm-card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.lm-card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.lm-card {
  background: var(--white); border: 1px solid var(--smoke); border-radius: var(--lm-radius);
  padding: clamp(26px,2.4vw,36px); display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s var(--lm-ease), box-shadow .25s;
}
.lm-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 22px 50px -28px rgba(6,20,43,.35); }
.lm-navy .lm-card, .lm-navy2 .lm-card { background: var(--navy-2); border-color: var(--arsenic); }
.lm-card .lm-tag { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.lm-card h3 { font-size: var(--lm-h3); font-weight: 600; line-height: 1.14; letter-spacing: -0.015em; }
.lm-card p { font-size: 16.5px; color: var(--graphite); line-height: 1.5; margin-top: 13px; }
.lm-navy .lm-card p, .lm-navy2 .lm-card p { color: var(--steel); }

/* ============================================================
   PILL / AVAILABILITY BADGE
   ============================================================ */

.lm-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: rgba(0,140,255,.12); color: var(--navy); white-space: nowrap; }
.lm-navy .lm-pill, .lm-navy2 .lm-pill { background: rgba(0,140,255,.2); color: var(--blue-soft); }

/* ============================================================
   AVAILABILITY BADGE (Phase 2 / coming-soon offers) — round 2
   ------------------------------------------------------------
   Mono pill with a leading blue dot. e.g. "◷ Available from Q3 2026".
   Auto-adapts on light/dark surfaces. Used on Phase 2 service /
   product / vertical cards and headers.
   ============================================================ */

.lm-avail { display: inline-flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; letter-spacing: 0; color: var(--graphite); padding: 5px 12px; border: 1px solid var(--smoke); border-radius: 999px; white-space: nowrap; }
.lm-navy .lm-avail, .lm-navy2 .lm-avail { color: var(--space); border-color: var(--arsenic); }
.lm-avail::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; opacity: .9; }

/* ============================================================
   NOTICE (in-build-out banner) — round 2
   ------------------------------------------------------------
   Blue left-rule block with a mono .lbl label and a paragraph.
   Used for Phase 2 service intros, the Insights "publishing from
   Q3 2026" state, the Contact "booking system in setup" note, and
   the Services-hub Phase 2 explainer.
   ============================================================ */

.lm-notice { border-left: 2px solid var(--blue); padding: 18px 22px; background: rgba(0,140,255,.06); border-radius: 0 var(--lm-radius) var(--lm-radius) 0; }
.lm-navy .lm-notice, .lm-navy2 .lm-notice { background: rgba(0,140,255,.1); }
.lm-notice .lbl { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; letter-spacing: .04em; color: var(--blue); display: block; margin-bottom: 8px; }
.lm-notice p { font-size: 16px; line-height: 1.55; color: var(--graphite); max-width: 70ch; }
.lm-navy .lm-notice p, .lm-navy2 .lm-notice p { color: var(--steel); }

/* ============================================================
   BLUE-DOT LIST
   ============================================================ */

.lm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.lm-list li { font-size: 16.5px; line-height: 1.45; padding-left: 22px; position: relative; color: var(--arsenic); }
.lm-navy .lm-list li, .lm-navy2 .lm-list li { color: var(--steel); }
.lm-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.lm-list li b, .lm-list li strong { color: var(--navy); font-weight: 600; }
.lm-navy .lm-list li b, .lm-navy .lm-list li strong, .lm-navy2 .lm-list li b, .lm-navy2 .lm-list li strong { color: var(--cloud); }

/* Native wp:list block can adopt this via is-style-lm-list */
.wp-block-list.is-style-lm-list { list-style: none; padding-left: 0; }
.wp-block-list.is-style-lm-list li { padding-left: 22px; position: relative; }
.wp-block-list.is-style-lm-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

/* ============================================================
   INCLUDED / EXCLUDED TWO-COL
   ============================================================ */

.lm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lm-cols .col h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: 18px; }
.lm-cols .in h4 { color: var(--blue); }
.lm-cols .out h4 { color: var(--graphite); }
.lm-cols .out .lm-list li::before { background: var(--space); }

/* ============================================================
   IMAGE PLACEHOLDER (moody slot)
   ============================================================ */

.lm-ph {
  position: relative; border-radius: var(--lm-radius); overflow: hidden; background: var(--navy-2);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 14px, rgba(255,255,255,0) 14px 28px);
  display: flex; align-items: flex-end; padding: 18px; border: 1px solid var(--arsenic);
}
.lm-ph .lbl { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--space); letter-spacing: .02em; }

/* ============================================================
   PERSON (architect / vertical lead)
   ============================================================ */

.lm-person { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.lm-person .lm-ph { aspect-ratio: 4/5; }
.lm-person h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.lm-person .role { font-size: 15px; color: var(--blue); font-weight: 500; margin-top: 4px; }
.lm-person .cred { font-size: 15.5px; color: var(--graphite); line-height: 1.5; margin-top: 12px; max-width: 52ch; }
.lm-navy .lm-person .cred, .lm-navy2 .lm-person .cred { color: var(--steel); }

/* ============================================================
   LOGO LOCKUP
   ------------------------------------------------------------
   Round-2 canonical pattern — the wordlockup SVG carries the
   .lm-lockup class directly (Designer markup):

     <a href="/" aria-label="Lumsi.io home">
       <svg class="lm-lockup on-dark" viewBox="0 0 1141.5 244.14">
         <use href="#lm-wordlockup"/>
       </svg>
     </a>

   The wordmark inherits currentColor (navy on light, cloud on
   dark via .on-dark). The blue mark inside is hard-coded #008CFF
   in the symbol def, so it stays brand-blue on any surface.

   Legacy text-plus-mark pattern is also supported (when .lm-lockup
   is an <a> wrapping a <svg.lm-mark-svg> + text node).
   ============================================================ */

/* SVG wordlockup variant (round-2 canonical) — sets the SVG box. */
svg.lm-lockup {
  display: block;
  height: 26px;
  width: auto;
  color: var(--navy);
}
svg.lm-lockup.on-dark { color: var(--cloud); }

/* Legacy anchor variant — flex row of <svg.lm-mark-svg> + text node. */
a.lm-lockup {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--navy); text-decoration: none;
  font-weight: 600; font-size: 18px; letter-spacing: -0.01em;
}
a.lm-lockup.on-dark { color: var(--cloud); }
a.lm-lockup:hover { text-decoration: none; }
a.lm-lockup .lm-mark-svg { width: 28px; height: 28px; flex: none; }

/* ============================================================
   HEADER
   ============================================================ */

.lm-header { position: sticky; top: 0; z-index: 50; background: rgba(6,20,43,.82); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.lm-header.scrolled { border-color: var(--arsenic); }
.lm-nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.lm-nav-links { display: flex; align-items: center; gap: 30px; }
.lm-nav-links a { font-size: 15.5px; font-weight: 450; color: var(--steel); transition: color .2s; }
.lm-nav-links a:hover { color: var(--cloud); }
.lm-nav .lm-btn { padding: 11px 20px; font-size: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */

.lm-footer { background: var(--navy); color: var(--steel); border-top: 1px solid var(--arsenic); }
.lm-foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-block: clamp(54px,6vw,78px) 34px; }
.lm-footer p { font-size: 15px; color: var(--space); line-height: 1.55; max-width: 32ch; margin-top: 18px; }
.lm-footer h4 { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--space); font-weight: 500; margin-bottom: 18px; }
.lm-footer .col a { display: block; font-size: 15.5px; color: var(--steel); margin-bottom: 12px; transition: color .2s; }
.lm-footer .col a:hover { color: var(--blue); }
.lm-foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-block: 26px; border-top: 1px solid var(--arsenic); font-size: 13.5px; color: var(--space); }
.lm-foot-bottom .legal { display: flex; gap: 22px; flex-wrap: wrap; }

/* ============================================================
   HERO HELPERS
   ============================================================ */

.lm-hero { position: relative; overflow: hidden; }
.lm-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 82% 6%, rgba(0,140,255,.15), transparent 60%); pointer-events: none; }
.lm-hero .lm-watermark { position: absolute; right: -6%; bottom: -18%; width: min(46vw, 560px); color: var(--blue); opacity: .05; pointer-events: none; }
.lm-hero-inner { position: relative; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; max-width: 64ch; }
.lm-hero-inner .lm-btn-row { margin-top: 14px; }

/* ============================================================
   REVEAL (optional motion; safe to drop)
   ============================================================ */

.lm-reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--lm-ease), transform .7s var(--lm-ease); }
.lm-reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 920px) {
  .lm-card-grid.cols-2, .lm-card-grid.cols-3 { grid-template-columns: 1fr; }
  .lm-meta { grid-template-columns: 1fr 1fr; }
  .lm-cols { grid-template-columns: 1fr; gap: 36px; }
  .lm-person { grid-template-columns: 1fr; gap: 22px; }
  .lm-person .lm-ph { max-width: 200px; }
  .lm-foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .lm-nav-links { display: none; }
}
@media (max-width: 540px) {
  .lm-meta { grid-template-columns: 1fr; }
  .lm-foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lm-reveal { opacity: 1; transform: none; transition: none; }
  .lm-mark.spin { animation: none; }
}
