/* Logo section — built around the authentic brand split master.
   Three marks in the family: the arrow emblem, the NR lockup, and
   the full Nexus ReGen wordmark. All geometry lifted directly from
   the official SVGs. */

function LogoTile({ bg, label, border, children, format = 'SVG' }) {
  return (
    <div style={{ borderRadius: 12, overflow: 'hidden', border: `1px solid ${border || 'var(--border-secondary)'}` }}>
      <div style={{
        background: bg,
        height: 200,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        padding: 28,
      }}>
        {children}
      </div>
      <div style={{
        padding: '10px 14px', fontSize: 12, color: 'var(--text-tertiary)',
        background: 'var(--bg-primary)', borderTop: `1px solid ${border || 'var(--border-tertiary)'}`,
        display: 'flex', justifyContent: 'space-between', alignItems: 'center',
      }}>
        <span style={{ fontWeight: 500, color: 'var(--text-secondary)' }}>{label}</span>
        <span style={{ fontFamily: 'var(--font-mono)', fontSize: 11 }}>{format}</span>
      </div>
    </div>
  );
}

function DoDontCard({ type, bg, note, children }) {
  const isDo = type === 'do';
  return (
    <div style={{ borderRadius: 12, overflow: 'hidden', border: '1px solid var(--border-secondary)' }}>
      <div style={{
        background: bg || '#fff',
        height: 160, position: 'relative',
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        padding: 24,
      }}>
        {children}
        <div style={{
          position: 'absolute', top: 10, left: 10,
          padding: '3px 8px', borderRadius: 6,
          fontSize: 11, fontWeight: 700, letterSpacing: '.06em',
          background: isDo ? '#ECFDF3' : '#FEF3F2',
          color:      isDo ? '#067647' : '#B42318',
          border:     `1px solid ${isDo ? '#ABEFC6' : '#FECDCA'}`,
        }}>{isDo ? 'DO' : "DON'T"}</div>
      </div>
      {note && (
        <div style={{ padding: '12px 16px', fontSize: 13, color: 'var(--text-tertiary)', lineHeight: 1.5,
          background: 'var(--bg-primary)', borderTop: '1px solid var(--border-tertiary)' }}>
          {note}
        </div>
      )}
    </div>
  );
}

/* Primary full-colour lockup (Nexus ReGen) rendered inline from the
   authoritative nr-logo-main.svg. Arrow + NR in yellow, NEXUS / REGEN
   word stack in white, all on navy. bg/arrow/word controlled via props
   so we can output the different approved colourways. */
function FullLockup({ height = 80, bg = 'var(--brand-700)', mark = 'var(--accent-400)', word = '#fff', rounded = false, style }) {
  const aspect = 815 / 215;
  return (
    <svg height={height} width={height * aspect} viewBox="0 0 815 215" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ display: 'block', borderRadius: rounded ? 12 : 0, ...style }}>
      {bg && <rect width="815" height="215" fill={bg} />}
      {/* emblem */}
      <path fill={mark} d="M394.478 132.165C413.196 123.133 424.871 107.725 424.871 85.042V84.6058C424.871 68.7485 420.24 57.5227 410.784 48.0545C399.982 37.2649 382.803 30.4396 355.284 30.4396H279.988V98.2692L225.334 30.4396H177.121H125.636H23V81.9244H89.2387L23 148.15L41.2051 166.355L59.4101 184.56L125.649 118.322V184.56H228.208V113.446L285.453 184.56H331.511V140.53H342.519L371.577 184.56H430.362L394.465 132.165H394.478ZM172.72 81.9244V180.16H130.049V107.699L122.531 115.217L59.4101 178.338L44.3226 163.251L29.2351 148.163L92.3563 85.042L99.8743 77.5239H27.4005V34.8402H172.707V81.9116L172.72 81.9244ZM373.553 88.7882C373.553 98.2564 366.061 103.76 353.744 103.76H331.511V73.5981H353.975C366.086 73.5981 373.566 78.4348 373.566 88.352V88.801L373.553 88.7882Z" />
      {/* text */}
      <path fill={word} d="M723.901 112.471H742.542L772.204 150.575V112.471H791.974V184.56H774.578L743.684 145.02V184.56H723.914V112.471H723.901Z" />
      <path fill={word} d="M658.099 112.471H716.075V129.355H677.869V140.376H712.47V156.13H677.869V167.561H716.588V184.548H658.099V112.459V112.471Z" />
      <path fill={word} d="M583.059 148.715V148.522C583.059 128.329 598.903 112.484 620.29 112.484C632.568 112.484 640.984 116.154 648.412 122.491L637.122 136.155C632.068 131.895 627.423 129.625 620.393 129.625C610.488 129.625 602.675 137.938 602.675 148.535V148.728C602.675 160.018 610.501 168.036 621.483 168.036C626.23 168.036 629.797 167.048 632.568 165.162V156.746H619.007V142.685H650.786V173.771C643.358 180.006 633.453 184.56 620.688 184.56C599.006 184.56 583.059 169.807 583.059 148.715Z" />
      <path fill={word} d="M517.256 112.471H575.233V129.355H537.027V140.376H571.628V156.13H537.027V167.561H575.746V184.548H517.256V112.459V112.471Z" />
      <path fill={word} d="M440.228 112.471H476.484C488.313 112.471 496.306 115.358 501.463 120.195C505.954 124.416 508.25 130.073 508.25 136.976V137.181C508.25 148.304 502.118 155.617 492.47 159.427L510.765 184.548H486.337L470.891 162.712H461.474V184.548H440.228V112.459V112.471ZM475.612 147.073C482.732 147.073 487.004 143.775 487.004 138.528V138.323C487.004 132.562 482.514 129.676 475.496 129.676H461.474V147.085H475.599L475.612 147.073Z" />
      <path fill={word} d="M731.175 91.0205L741.927 78.1782C748.996 83.7462 756.552 86.5302 764.519 86.5302C769.792 86.5302 772.576 84.8367 772.576 81.7576V81.5523C772.576 78.563 770.28 77.1775 760.735 74.7912C746.006 71.4042 734.473 67.3244 734.473 53.0067V52.8014C734.473 39.7667 744.723 30.5038 761.44 30.5038C773.384 30.5038 782.532 33.6855 790.101 39.7538L780.454 53.3916C774.09 48.7088 767.213 46.5278 760.953 46.5278C756.283 46.5278 753.986 48.3111 753.986 51.0053V51.2106C753.986 54.2896 756.373 55.8805 766.123 57.9717C782.044 61.4485 792 66.6316 792 79.6664V79.8717C792 94.0996 780.749 102.567 763.839 102.567C751.408 102.567 739.964 98.6797 731.201 91.0205H731.175Z" />
      <path fill={word} d="M659.048 70.2111V30.4781H678.87V69.8005C678.87 80.0128 683.924 84.8624 691.917 84.8624C699.91 84.8624 705.055 80.3079 705.055 70.3009V30.4781H724.876V69.7107C724.876 92.4574 711.829 102.567 691.712 102.567C671.595 102.567 659.061 92.4574 659.061 70.2111H659.048Z" />
      <path fill={word} d="M651.748 30.4781L628.847 65.5924L652.736 102.554H630.541L617.198 80.7184L603.753 102.554H582.045L605.934 65.9004L583.046 30.4781H605.241L617.493 50.7616L630.041 30.4781H651.748Z" />
      <path fill={word} d="M517.256 30.4781H575.233V47.3617H537.027V58.3823H571.628V74.1369H537.027V85.568H575.746V102.554H517.256V30.4781Z" />
      <path fill={word} d="M440.228 30.4781H458.869L488.531 68.5817V30.4781H508.301V102.567H490.905L460.011 63.0266V102.567H440.241V30.4781H440.228Z" />
    </svg>
  );
}
window.FullLockup = FullLockup;

function S_Logo() {
  return (
    <Section
      id="logo"
      eyebrow="01 · Logo"
      title="Our marks."
      intro="Three marks carry Nexus ReGen: the arrow emblem, the NR lockup, and the full wordmark. Each has a job — and a surface it belongs on."
    >

      {/* Brand architecture — hero */}
      <Block title="The family" note="One mark, three appearances.">
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(260px, 1fr))', gap: 16 }}>

          <Card pad={0} style={{ overflow: 'hidden' }}>
            <div style={{
              background: 'var(--brand-700)', height: 220,
              display: 'flex', alignItems: 'center', justifyContent: 'center',
            }}>
              <ArrowMark size={130} fill="var(--accent-400)" />
            </div>
            <div style={{ padding: 20 }}>
              <div style={{ fontSize: 11, fontWeight: 700, letterSpacing: '.12em',
                textTransform: 'uppercase', color: 'var(--brand-500)' }}>01 · Emblem</div>
              <div style={{ fontSize: 18, fontWeight: 600, marginTop: 6, letterSpacing: '-0.01em' }}>The arrow</div>
              <div style={{ fontSize: 13, color: 'var(--text-tertiary)', marginTop: 6, lineHeight: 1.55 }}>
                Our primary graphic asset. Use wherever the brand is established — favicons,
                app icons, social avatars, loading states, pattern work.
              </div>
            </div>
          </Card>

          <Card pad={0} style={{ overflow: 'hidden' }}>
            <div style={{
              background: 'var(--brand-700)', height: 220,
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              padding: 28,
            }}>
              <NRMark height={100} fill="var(--accent-400)" />
            </div>
            <div style={{ padding: 20 }}>
              <div style={{ fontSize: 11, fontWeight: 700, letterSpacing: '.12em',
                textTransform: 'uppercase', color: 'var(--brand-500)' }}>02 · NR lockup</div>
              <div style={{ fontSize: 18, fontWeight: 600, marginTop: 6, letterSpacing: '-0.01em' }}>The short form</div>
              <div style={{ fontSize: 13, color: 'var(--text-tertiary)', marginTop: 6, lineHeight: 1.55 }}>
                Arrow + NR monogram. Used at small scales or where the full wordmark is
                too heavy — partner tiles, chrome, event signage, merch.
              </div>
            </div>
          </Card>

          <Card pad={0} style={{ overflow: 'hidden' }}>
            <div style={{
              background: 'var(--brand-700)', height: 220,
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              padding: 28,
            }}>
              <FullLockup height={110} bg="transparent" />
            </div>
            <div style={{ padding: 20 }}>
              <div style={{ fontSize: 11, fontWeight: 700, letterSpacing: '.12em',
                textTransform: 'uppercase', color: 'var(--brand-500)' }}>03 · Primary lockup</div>
              <div style={{ fontSize: 18, fontWeight: 600, marginTop: 6, letterSpacing: '-0.01em' }}>The wordmark</div>
              <div style={{ fontSize: 13, color: 'var(--text-tertiary)', marginTop: 6, lineHeight: 1.55 }}>
                Emblem + NR + "NEXUS / REGEN". The default on first impression — web
                header, pitch deck title, press, signatures, PDFs.
              </div>
            </div>
          </Card>
        </div>
      </Block>

      {/* Anatomy / split master */}
      <Block title="Anatomy" note="Pulled apart from the Split Master.">
        <Card pad={0} style={{ overflow: 'hidden' }}>
          <div style={{
            background: 'var(--brand-700)',
            padding: '56px 40px',
            display: 'grid',
            gridTemplateColumns: '1fr 1fr',
            alignItems: 'center',
            gap: 40,
            color: '#fff',
            position: 'relative',
          }}>
            {/* background grid */}
            <div style={{
              position: 'absolute', inset: 0, opacity: .08, pointerEvents: 'none',
              backgroundImage: 'linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px)',
              backgroundSize: '32px 32px',
            }} />

            <div style={{ position: 'relative', display: 'flex', justifyContent: 'center', alignItems: 'center', gap: 20 }}>
              <div style={{ textAlign: 'center' }}>
                <ArrowMark size={140} fill="var(--accent-400)" />
                <div style={{ marginTop: 16, fontSize: 11, fontFamily: 'var(--font-mono)',
                  color: 'rgba(255,255,255,.6)', letterSpacing: '.08em', textTransform: 'uppercase' }}>
                  Emblem
                </div>
              </div>
              <div style={{ fontSize: 28, color: 'rgba(255,255,255,.4)', fontWeight: 300 }}>+</div>
              <div style={{ textAlign: 'center' }}>
                <svg height={140} width={140 * (200.83/120.13)} viewBox="127.925 9.935 200.83 120.13" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ display: 'block' }}>
                  <path d="M300.785 89.2251C315.375 82.1851 324.475 70.1751 324.475 52.4951V52.1551C324.475 39.7951 320.865 31.0451 313.495 23.6651C305.075 15.2551 291.685 9.93506 270.235 9.93506H211.545V62.8051L168.945 9.93506H127.935L127.925 50.0551L127.935 50.0651L127.925 130.065H171.185V74.6351L215.805 130.065H251.705V95.7451H260.285L282.935 130.065H328.755L300.775 89.2251H300.785ZM269.035 67.0851C278.635 67.0851 284.475 62.7951 284.475 55.4151L284.485 55.4251V55.0751C284.485 47.3451 278.655 43.5751 269.215 43.5751H251.705V67.0851H269.035Z" fill="var(--accent-400)" fillRule="evenodd" clipRule="evenodd" />
                </svg>
                <div style={{ marginTop: 16, fontSize: 11, fontFamily: 'var(--font-mono)',
                  color: 'rgba(255,255,255,.6)', letterSpacing: '.08em', textTransform: 'uppercase' }}>
                  NR monogram
                </div>
              </div>
            </div>

            <div style={{ fontSize: 14, lineHeight: 1.6, color: 'rgba(255,255,255,.78)' }}>
              <div style={{ fontSize: 22, color: '#fff', fontWeight: 600, marginBottom: 16, letterSpacing: '-0.01em' }}>
                One glyph, one story.
              </div>
              <p style={{ margin: 0, marginBottom: 12 }}>
                The outer <b style={{ color: '#fff' }}>L-bracket</b> is a site boundary —
                where the material comes from. The inner <b style={{ color: '#fff' }}>chevron</b> cuts
                up and to the right through that boundary: material moving out, moving up,
                moving on to its next useful life.
              </p>
              <p style={{ margin: 0, marginBottom: 20 }}>
                The <b style={{ color: '#fff' }}>NR monogram</b> sits to the right as a logotype —
                a custom draw of "N" and "R" with the same chunky stroke as the arrow.
              </p>
              <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16,
                paddingTop: 20, borderTop: '1px solid rgba(255,255,255,.12)' }}>
                {[
                  ['Arrow ratio',    '1 : 1 square'],
                  ['Arrow angle',    '45° upper-right'],
                  ['Clear space',    '1 × stroke (X)'],
                  ['Min emblem',     '24 px · 10 mm'],
                  ['Corner joins',   'Square miter'],
                  ['Inter-mark gap', '0.5 × emblem'],
                ].map(([k, v]) => (
                  <div key={k}>
                    <div style={{ fontSize: 10, fontWeight: 700, letterSpacing: '.1em', color: 'rgba(255,255,255,.5)', textTransform: 'uppercase' }}>{k}</div>
                    <div style={{ fontSize: 14, marginTop: 4, color: '#fff', fontWeight: 500 }}>{v}</div>
                  </div>
                ))}
              </div>
            </div>
          </div>
        </Card>
      </Block>

      {/* Clear space */}
      <Block title="Clear space" note="Always 1× stroke of air on every side.">
        <Card pad={0}>
          <div style={{
            background: 'var(--bg-secondary)',
            padding: '60px 40px',
            display: 'flex', justifyContent: 'center', alignItems: 'center',
          }}>
            <div style={{ position: 'relative', padding: 28 }}>
              <div style={{
                position: 'absolute', inset: 0,
                border: '1.5px dashed var(--brand-500)', opacity: .55,
              }} />
              <div style={{ position: 'absolute', top: -20, left: '50%', transform: 'translateX(-50%)',
                fontSize: 11, fontWeight: 700, color: 'var(--brand-500)', fontFamily: 'var(--font-mono)' }}>
                X
              </div>
              <div style={{ position: 'absolute', bottom: -20, left: '50%', transform: 'translateX(-50%)',
                fontSize: 11, fontWeight: 700, color: 'var(--brand-500)', fontFamily: 'var(--font-mono)' }}>
                X
              </div>
              <div style={{ position: 'absolute', left: -20, top: '50%', transform: 'translateY(-50%)',
                fontSize: 11, fontWeight: 700, color: 'var(--brand-500)', fontFamily: 'var(--font-mono)' }}>
                X
              </div>
              <div style={{ position: 'absolute', right: -20, top: '50%', transform: 'translateY(-50%)',
                fontSize: 11, fontWeight: 700, color: 'var(--brand-500)', fontFamily: 'var(--font-mono)' }}>
                X
              </div>
              <FullLockup height={120} bg="var(--brand-700)" rounded />
            </div>
          </div>
        </Card>
      </Block>

      {/* Emblem colour variants */}
      <Block title="Emblem variants" note="One glyph, six approved colourways.">
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))', gap: 12 }}>
          <LogoTile label="Yellow on navy" bg="var(--brand-700)" border="var(--brand-800)">
            <ArrowMark size={120} fill="var(--accent-400)" />
          </LogoTile>
          <LogoTile label="Navy on yellow" bg="var(--accent-400)" border="var(--accent-500)">
            <ArrowMark size={120} fill="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Navy on white" bg="#fff">
            <ArrowMark size={120} fill="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Yellow on white" bg="#fff">
            <ArrowMark size={120} fill="var(--accent-400)" />
          </LogoTile>
          <LogoTile label="Boxed · app icon" bg="var(--neutral-50)">
            <ArrowMark size={140} fill="var(--accent-400)" boxed radius={22} padding={16} />
          </LogoTile>
          <LogoTile label="White on black" bg="#0F1120" border="#24263a">
            <ArrowMark size={120} fill="#fff" />
          </LogoTile>
        </div>
      </Block>

      {/* NR lockup variants */}
      <Block title="NR lockup variants">
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(260px, 1fr))', gap: 12 }}>
          <LogoTile label="Yellow on navy" bg="var(--brand-700)" border="var(--brand-800)">
            <NRMark height={64} fill="var(--accent-400)" />
          </LogoTile>
          <LogoTile label="Navy on yellow" bg="var(--accent-400)" border="var(--accent-500)">
            <NRMark height={64} fill="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Navy on white" bg="#fff">
            <NRMark height={64} fill="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Reversed · white" bg="#0F1120" border="#24263a">
            <NRMark height={64} fill="#fff" />
          </LogoTile>
        </div>
      </Block>

      {/* Full lockup variants */}
      <Block title="Primary wordmark variants">
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))', gap: 12 }}>
          <LogoTile label="Full colour · navy" bg="var(--brand-700)" border="var(--brand-800)">
            <FullLockup height={90} bg="transparent" />
          </LogoTile>
          <LogoTile label="Full colour · navy rounded" bg="var(--brand-700)" border="var(--brand-800)">
            <FullLockup height={90} bg="var(--brand-700)" rounded />
          </LogoTile>
          <LogoTile label="Navy mark · white bg" bg="#fff">
            <FullLockup height={90} bg="transparent" mark="var(--brand-700)" word="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Mono · all navy" bg="var(--bg-secondary)">
            <FullLockup height={90} bg="transparent" mark="var(--brand-700)" word="var(--brand-700)" />
          </LogoTile>
          <LogoTile label="Mono · reversed" bg="#0F1120" border="#24263a">
            <FullLockup height={90} bg="transparent" mark="#fff" word="#fff" />
          </LogoTile>
          <LogoTile label="Accent — promo" bg="var(--accent-400)" border="var(--accent-500)">
            <FullLockup height={90} bg="transparent" mark="var(--brand-700)" word="var(--brand-700)" />
          </LogoTile>
        </div>
      </Block>

      {/* Clearspace — measured exclusion zone around the mark */}
      <Block title="Clearspace" note="Always pair the emblem with whitespace. Don't crowd the mark.">
        <Card pad={0}>
          <div style={{
            display: 'grid',
            gridTemplateColumns: '1fr 1fr',
            gap: 0,
            alignItems: 'stretch',
          }}>
            {/* Diagram side */}
            <div style={{
              background: 'var(--brand-50)',
              padding: 28,
              minHeight: 320,
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              borderRight: '1px solid var(--border-tertiary)',
              position: 'relative',
            }}>
              {/* clearspace = 0.5 × emblem-height. Emblem 88px → X = 44px */}
              <div style={{ position: 'relative' }}>
                {/* dotted clearspace boundary */}
                <div style={{
                  position: 'absolute',
                  top: -44, left: -44, right: -44, bottom: -44,
                  border: '1.5px dashed var(--brand-500)',
                  borderRadius: 4,
                  opacity: .7,
                  pointerEvents: 'none',
                }} />
                {/* solid emblem-edge guides (subtle) */}
                <div style={{
                  position: 'absolute', inset: 0,
                  border: '1px solid var(--brand-300)',
                  opacity: .5,
                  pointerEvents: 'none',
                }} />
                {/* X labels on each side, between emblem edge and dashed boundary */}
                <div style={{
                  position: 'absolute', top: -32, left: '50%', transform: 'translateX(-50%)',
                  fontSize: 11, fontWeight: 700, fontFamily: 'var(--font-mono)',
                  color: 'var(--brand-600)', background: 'var(--brand-50)', padding: '0 6px',
                }}>X</div>
                <div style={{
                  position: 'absolute', bottom: -32, left: '50%', transform: 'translateX(-50%)',
                  fontSize: 11, fontWeight: 700, fontFamily: 'var(--font-mono)',
                  color: 'var(--brand-600)', background: 'var(--brand-50)', padding: '0 6px',
                }}>X</div>
                <div style={{
                  position: 'absolute', left: -32, top: '50%', transform: 'translateY(-50%)',
                  fontSize: 11, fontWeight: 700, fontFamily: 'var(--font-mono)',
                  color: 'var(--brand-600)', background: 'var(--brand-50)', padding: '0 6px',
                }}>X</div>
                <div style={{
                  position: 'absolute', right: -32, top: '50%', transform: 'translateY(-50%)',
                  fontSize: 11, fontWeight: 700, fontFamily: 'var(--font-mono)',
                  color: 'var(--brand-600)', background: 'var(--brand-50)', padding: '0 6px',
                }}>X</div>
                {/* tick marks indicating the height that defines X */}
                <svg
                  style={{ position: 'absolute', top: 0, left: -64, height: '100%', width: 18, overflow: 'visible' }}
                  viewBox="0 0 18 88" preserveAspectRatio="none"
                >
                  <line x1="9" y1="0" x2="9" y2="88" stroke="var(--brand-500)" strokeWidth="1" />
                  <line x1="3" y1="0" x2="15" y2="0" stroke="var(--brand-500)" strokeWidth="1" />
                  <line x1="3" y1="88" x2="15" y2="88" stroke="var(--brand-500)" strokeWidth="1" />
                </svg>
                <div style={{
                  position: 'absolute', left: -94, top: '50%', transform: 'translateY(-50%) rotate(-90deg)',
                  fontSize: 10, fontWeight: 700, fontFamily: 'var(--font-mono)', letterSpacing: '.08em',
                  color: 'var(--brand-600)', textTransform: 'uppercase', whiteSpace: 'nowrap',
                }}>2X · emblem height</div>
                <ArrowMark size={88} fill="var(--brand-700)" />
              </div>
            </div>

            {/* Rules side */}
            <div style={{ padding: 28, display: 'flex', flexDirection: 'column', gap: 16, justifyContent: 'center' }}>
              <div style={{
                fontSize: 11, fontWeight: 700, letterSpacing: '.12em', textTransform: 'uppercase',
                color: 'var(--brand-500)',
              }}>X = ½ × emblem-height</div>
              <div style={{ fontSize: 16, fontWeight: 600, lineHeight: 1.4, letterSpacing: '-0.01em' }}>
                The mark needs room to breathe.
              </div>
              <ul style={{
                listStyle: 'none', margin: 0, padding: 0,
                display: 'flex', flexDirection: 'column', gap: 12,
              }}>
                {[
                  'Minimum clearspace = 0.5 × the emblem height on every edge',
                  'Inside this clearspace: no other graphics, type, or photographic content',
                  'Increase clearspace generously when the mark sits near a page edge or content with high visual weight',
                  'This rule applies to all logo variants (emblem, NR lockup, full wordmark)',
                ].map((line, i) => (
                  <li key={i} style={{
                    display: 'flex', gap: 12, fontSize: 13, lineHeight: 1.55,
                    color: 'var(--text-secondary)',
                  }}>
                    <span style={{
                      flexShrink: 0, marginTop: 7,
                      width: 6, height: 6, borderRadius: 999,
                      background: 'var(--brand-500)',
                    }} />
                    <span>{line}</span>
                  </li>
                ))}
              </ul>
            </div>
          </div>
        </Card>
      </Block>

      {/* Minimum size — smallest acceptable rendering of the mark */}
      <Block title="Minimum size" note="If the mark is smaller than this, switch to the favicon emblem.">
        <Card pad={0}>
          <div style={{
            background: 'var(--brand-50)',
            padding: 28,
            display: 'flex',
            alignItems: 'flex-end',
            justifyContent: 'center',
            gap: 56,
            flexWrap: 'wrap',
            borderBottom: '1px solid var(--border-tertiary)',
          }}>
            {[
              { px: 16, label: '16 px', sub: 'Use the thick-stroke favicon variant below this' },
              { px: 24, label: '24 px', sub: 'Web minimum · standard emblem' },
              { px: 30, label: '8 mm',  sub: 'Print minimum (~30 px on screen)' },
            ].map((row) => (
              <div key={row.label} style={{
                display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12,
                maxWidth: 200,
              }}>
                <div style={{
                  height: 56, display: 'flex', alignItems: 'flex-end', justifyContent: 'center',
                }}>
                  <ArrowMark size={row.px} fill="var(--brand-700)" />
                </div>
                <div style={{
                  fontSize: 16, fontWeight: 600, fontFamily: 'var(--font-mono)',
                  color: 'var(--text-primary)',
                }}>{row.label}</div>
                <div style={{
                  fontSize: 12, color: 'var(--text-tertiary)', lineHeight: 1.45,
                  textAlign: 'center',
                }}>{row.sub}</div>
              </div>
            ))}
          </div>
          <div style={{ padding: 28 }}>
            <pre style={{
              margin: 0,
              padding: 16,
              borderRadius: 12,
              background: 'var(--brand-950)',
              color: '#E8EAFB',
              fontFamily: 'var(--font-mono)',
              fontSize: 13, lineHeight: 1.7,
              overflowX: 'auto',
            }}>{`Web minimum:    24 px
Print minimum:  8 mm
Favicon (16px): use favicon-thick-yellow / favicon-thick-blue`}</pre>
          </div>
        </Card>
      </Block>

      {/* Do / Don't */}
      <Block title="Do & don't" note="Rules that keep the marks consistent across every surface.">
        <div style={{
          display: 'grid',
          gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))',
          gap: 16,
        }}>
          <DoDontCard type="do" bg="var(--brand-700)">
            <ArrowMark size={90} fill="var(--accent-400)" />
          </DoDontCard>
          <DoDontCard type="do" bg="var(--accent-400)">
            <ArrowMark size={90} fill="var(--brand-700)" />
          </DoDontCard>
          <DoDontCard type="do" bg="#fff">
            <FullLockup height={56} bg="transparent" mark="var(--brand-700)" word="var(--brand-700)" />
          </DoDontCard>
          <DoDontCard type="dont" bg="#A64AFF">
            <ArrowMark size={90} fill="var(--accent-400)" />
          </DoDontCard>
          <DoDontCard type="dont" bg="#fff">
            <div style={{ transform: 'rotate(14deg) scaleX(1.25)' }}>
              <ArrowMark size={90} fill="var(--brand-700)" />
            </div>
          </DoDontCard>
          <DoDontCard type="dont" bg="#fff">
            <ArrowMark size={90} fill="#FF6AC8" />
          </DoDontCard>
        </div>

        <div style={{ marginTop: 16, display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(260px, 1fr))', gap: 12 }}>
          {[
            { k: 'do',   t: 'Pair with navy or yellow',   d: 'The marks always sit on one of our two primary brand fields, or on white.' },
            { k: 'do',   t: 'Hold the clear-space rule',  d: '1× stroke of air on all four sides. More is welcome — less is not.' },
            { k: 'do',   t: 'Use the right mark',         d: 'Emblem for small surfaces, wordmark for first impressions.' },
            { k: 'dont', t: 'Never skew, tilt or stretch',d: 'The marks are always upright and at native proportions.' },
            { k: 'dont', t: 'Never recolour',             d: 'Only the approved fills — navy, yellow, white, black.' },
            { k: 'dont', t: 'Never rebuild the wordmark', d: 'Use the provided artwork. Do not set NEXUS REGEN yourself.' },
          ].map((r, i) => (
            <div key={i} style={{
              padding: '12px 16px', background: 'var(--bg-primary)',
              border: '1px solid var(--border-secondary)', borderRadius: 10,
              display: 'flex', gap: 12, alignItems: 'flex-start',
            }}>
              <div style={{
                width: 22, height: 22, borderRadius: 6, flexShrink: 0,
                background: r.k === 'do' ? '#ECFDF3' : '#FEF3F2',
                color:      r.k === 'do' ? '#067647' : '#B42318',
                border:     `1px solid ${r.k === 'do' ? '#ABEFC6' : '#FECDCA'}`,
                display: 'flex', alignItems: 'center', justifyContent: 'center',
                fontSize: 13, fontWeight: 700,
              }}>{r.k === 'do' ? '✓' : '×'}</div>
              <div>
                <div style={{ fontSize: 13, fontWeight: 600 }}>{r.t}</div>
                <div style={{ fontSize: 12, color: 'var(--text-tertiary)', marginTop: 2, lineHeight: 1.45 }}>{r.d}</div>
              </div>
            </div>
          ))}
        </div>
      </Block>

      {/* Min sizes */}
      <Block title="Minimum sizes">
        <Card pad={0}>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 0 }}>
            {[
              { label: 'Emblem',       minPx: 24,  minMm: 10, kind: 'emblem' },
              { label: 'NR lockup',    minPx: 80,  minMm: 20, kind: 'nr' },
              { label: 'Wordmark',     minPx: 160, minMm: 32, kind: 'word' },
            ].map((row, i, arr) => (
              <div key={row.label} style={{
                padding: 24,
                borderRight: i < arr.length - 1 ? '1px solid var(--border-tertiary)' : 'none',
                display: 'flex', flexDirection: 'column', gap: 16, minHeight: 220,
              }}>
                <div style={{ fontSize: 12, fontWeight: 600, color: 'var(--text-quaternary)',
                  letterSpacing: '.06em', textTransform: 'uppercase' }}>{row.label}</div>
                <div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'flex-start' }}>
                  {row.kind === 'emblem' && <ArrowMark size={36} fill="var(--brand-700)" />}
                  {row.kind === 'nr' && <NRMark height={40} fill="var(--brand-700)" />}
                  {row.kind === 'word' && <FullLockup height={36} bg="transparent" mark="var(--brand-700)" word="var(--brand-700)" />}
                </div>
                <div style={{ display: 'flex', gap: 24, paddingTop: 16, borderTop: '1px dashed var(--border-secondary)' }}>
                  <div>
                    <div style={{ fontSize: 11, color: 'var(--text-quaternary)', fontFamily: 'var(--font-mono)' }}>DIGITAL</div>
                    <div style={{ fontSize: 18, fontWeight: 600 }}>{row.minPx}px</div>
                  </div>
                  <div>
                    <div style={{ fontSize: 11, color: 'var(--text-quaternary)', fontFamily: 'var(--font-mono)' }}>PRINT</div>
                    <div style={{ fontSize: 18, fontWeight: 600 }}>{row.minMm}mm</div>
                  </div>
                </div>
              </div>
            ))}
          </div>
        </Card>
      </Block>
    </Section>
  );
}
window.S_Logo = S_Logo;
