/* ═══════════════════════════════════════════════════════════
   KNOTY DNA v2 — shared design language
   Used by: Website v3, Pitch v6, Template v2, DNA showcase
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Core palette */
  --Y:#FFB800; --YL:#FFF8DC; --YP:#FFFAE8; --YD:#CC8F00; --YS:#FFC833;
  --R:#E8321C; --RL:#FFEDEB; --RP:#FFF5F3; --RD:#A8200F;
  --G:#34C759; --GL:#E8FAF0;
  --B:#2563EB; --BL:#EBF4FF;
  --K:#1A1710;
  --on-y:#1A1710; /* ink on gold — never switches with the dark theme */
  --CR:#FAF5E8;  --CR2:#F5EFDC;
  --T2:#6B6560;  --T3:#9E9B97;  --BD:#E8E2D0;
  --line:#1A1710;

  /* Type */
  --FD:'Space Grotesk', system-ui, sans-serif;
  --FB:'Plus Jakarta Sans', system-ui, sans-serif;

  /* Geometry */
  --r-card: 28px;
  --r-card-sm: 18px;
  --r-pill: 100px;
  --shadow-offset: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ─────────────────────────── PAPER (graph-grid background) */
.paper {
  background-color: var(--CR);
  background-image:
    linear-gradient(rgba(26,23,16,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,23,16,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.paper--dense {
  background-size: 28px 28px;
}
.paper--cream2 {
  background-color: var(--CR2);
}

/* ─────────────────────────── WORD HIGHLIGHTS
   Rule: solid fill = anchor word (yellow=positive, red=problem)
         marker  = body-text emphasis
*/
.fill-y, .fill-r, .fill-k {
  display: inline-block;
  padding: 0 .18em;
  border-radius: 6px;
  line-height: inherit;
  white-space: nowrap;
}
.fill-y { background: var(--Y); color: var(--on-y); }
.fill-r { background: var(--R); color: #fff; }
.fill-k { background: var(--K); color: #fff; }

.word-y { color: var(--Y); }
.word-r { color: var(--R); }

/* Highlighter-marker (use for body text emphasis, NOT in big titles) */
.mark-y {
  position: relative; display: inline-block; white-space: nowrap;
}
.mark-y::after {
  content:''; position:absolute; left:-2px; right:-2px; bottom:3px;
  height:.55em; background:var(--Y); opacity:.55; z-index:-1; border-radius:3px;
}

/* ─────────────────────────── KNOT-CARD (shadow-base card)
   The signature container: white card sits offset above a solid color block.
   Use [data-shadow="red"|"yellow"|"black"|"none"].
*/
.knot-card {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-card);
}
.knot-card > .knot-card__inner {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 30px;
}
.knot-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  transform: translate(var(--shadow-offset), var(--shadow-offset));
  z-index: 1;
  display: none;
}
.knot-card[data-shadow="red"]::before    { display:block; background: var(--R); }
.knot-card[data-shadow="yellow"]::before { display:block; background: var(--Y); }
.knot-card[data-shadow="black"]::before  { display:block; background: var(--K); }

/* solid punch-line card (no shadow, fully filled) */
.knot-card--solid > .knot-card__inner {
  background: var(--Y);
  border-color: var(--K);
  color: var(--on-y);
}
.knot-card--solid-r > .knot-card__inner {
  background: var(--R);
  border-color: var(--K);
  color: #fff;
}
.knot-card--solid-k > .knot-card__inner {
  background: var(--K);
  border-color: var(--K);
  color: #fff;
}

/* compact variant */
.knot-card--sm { --r-card: var(--r-card-sm); --shadow-offset: 6px; }
.knot-card--sm > .knot-card__inner { padding: 18px 20px; }

/* heading pill: a knot-card that wraps a short headline */
.knot-pill-head {
  display: inline-block;
}
.knot-pill-head > .knot-card__inner {
  padding: 22px 36px;
  border-radius: var(--r-pill);
}
.knot-pill-head { --r-card: var(--r-pill); }

/* result pill at card footer */
.knot-result {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--RL); color: var(--R);
  border-radius: var(--r-pill);
  font-family: var(--FD); font-weight: 700; font-size: 14px;
}
.knot-result--y { background: var(--YL); color: var(--YD); }
.knot-result--k { background: var(--K); color: #fff; }

/* ─────────────────────────── TYPE SCALE */
.t-hero    { font-family:var(--FD); font-weight:800; font-size:clamp(48px,7vw,108px); line-height:.95;  letter-spacing:-3px; color:var(--K); }
.t-section { font-family:var(--FD); font-weight:800; font-size:clamp(38px,5vw,72px); line-height:1.02; letter-spacing:-2px; color:var(--K); }
.t-sub     { font-family:var(--FD); font-weight:700; font-size:clamp(28px,3.5vw,48px); line-height:1.08; letter-spacing:-1.3px; color:var(--K); }
.h3        { font-family:var(--FD); font-weight:700; font-size:24px; line-height:1.25; color:var(--K); }
.h4        { font-family:var(--FD); font-weight:700; font-size:18px; line-height:1.3;  color:var(--K); }
.lead      { font-family:var(--FB); font-size:20px; line-height:1.55; color:var(--T2); }
.body      { font-family:var(--FB); font-size:17px; line-height:1.6;  color:var(--T2); }
.eyebrow   { font-family:var(--FD); font-size:13px; font-weight:700; letter-spacing:2.5px; text-transform:uppercase; color:var(--YD);
             display:inline-flex; align-items:center; gap:10px; }
.eyebrow::before { content:''; width:32px; height:3px; background:var(--Y); border-radius:100px; }

.cy{color:var(--YD)} .cr{color:var(--R)} .cg{color:#1A7A38} .ck{color:var(--K)}

/* ─────────────────────────── BUTTONS */
.btn {
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 26px;
  border-radius: var(--r-pill);
  font-family: var(--FD); font-weight:600; font-size:16px; line-height:1;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
}
.btn-y { background: var(--Y); color: var(--on-y); border-color: var(--K); box-shadow: 0 6px 0 -1px var(--K); }
.btn-y:hover { transform: translate(-2px,-2px); box-shadow: 0 10px 0 -1px var(--K); }
.btn-k { background: var(--K); color:#fff; }
.btn-k:hover { transform: translateY(-2px); }
.btn-r { background: var(--R); color:#fff; border-color: var(--K); box-shadow: 0 6px 0 -1px var(--K); }
.btn-r:hover { transform: translate(-2px,-2px); box-shadow: 0 10px 0 -1px var(--K); }
.btn-ghost { background:#fff; color:var(--K); border-color: var(--K); }
.btn-ghost:hover { background:var(--CR); }

/* ─────────────────────────── BADGE & CHIPS */
.badge {
  display:inline-flex; align-items:center; gap:10px;
  background:#fff; border:1.5px solid var(--K);
  border-radius:var(--r-pill); padding:8px 16px;
  font-family:var(--FD); font-weight:600; font-size:13px; color:var(--K);
  letter-spacing:.3px;
}
.badge .dot { width:8px; height:8px; background:var(--G); border-radius:50%; animation:pulse 1.8s infinite; }
@keyframes pulse { 0%,100% {opacity:1} 50% {opacity:.45} }

/* ─────────────────────────── ICON BOX */
.ibox { width:48px; height:48px; border-radius:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.ibox-y { background:var(--YL); color:var(--YD); }
.ibox-r { background:var(--RL); color:var(--R); }
.ibox-g { background:var(--GL); color:#1A7A38; }
.ibox-b { background:var(--BL); color:var(--B); }
.ibox-k { background:var(--K); color:#fff; }

/* ─────────────────────────── DECORATIONS */
.divbar { width:48px; height:5px; border-radius:100px; background:var(--Y); }

/* ─────────────────────────── TRI-COLOR BRAND CIRCLE
   Three 120° arc bodies (butt linecap, meet flush at boundaries) +
   three short overlay "caps" with round linecap, each extending ~15°
   CW past its arc's CW boundary into the next arc's territory.
   Result: continuous circle with all three rounded ends visible and
   pointing CW (yellow caps onto black at top, black caps onto red
   at 4 o'clock, red caps onto yellow at 8 o'clock). Transparent center.
*/
.tri-circle {
  --tri-size: 56px;
  width: var(--tri-size);
  height: var(--tri-size);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  /* Default: thin stroke (8) — primary use is brand mark / avatar
     Cap stubs at stroke 9 to fully cover anti-aliased body edges underneath. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke-width='8'><path stroke='%231A1710' stroke-linecap='butt' d='M 50 4 A 46 46 0 0 1 89.84 73'/><path stroke='%23E8321C' stroke-linecap='butt' d='M 89.84 73 A 46 46 0 0 1 10.16 73'/><path stroke='%23FFB800' stroke-linecap='butt' d='M 10.16 73 A 46 46 0 0 1 50 4'/><path stroke='%23FFB800' stroke-linecap='round' d='M 47.59 4.06 A 46 46 0 0 1 61.91 5.57'/><path stroke='%231A1710' stroke-linecap='round' d='M 90.99 70.87 A 46 46 0 0 1 82.53 82.53'/><path stroke='%23E8321C' stroke-linecap='round' d='M 11.40 75.05 A 46 46 0 0 1 5.57 61.91'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.tri-circle > * { font-family: var(--FD); font-weight: 800; }

/* Variant: bold stroke (12) — decorative use only, caps 13 for clean coverage */
.tri-circle--bold {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke-width='12'><path stroke='%231A1710' stroke-linecap='butt' d='M 50 6 A 44 44 0 0 1 88.11 72'/><path stroke='%23E8321C' stroke-linecap='butt' d='M 88.11 72 A 44 44 0 0 1 11.89 72'/><path stroke='%23FFB800' stroke-linecap='butt' d='M 11.89 72 A 44 44 0 0 1 50 6'/><path stroke='%23FFB800' stroke-linecap='round' d='M 47.69 6.06 A 44 44 0 0 1 61.39 7.49'/><path stroke='%231A1710' stroke-linecap='round' d='M 89.20 69.97 A 44 44 0 0 1 81.11 81.11'/><path stroke='%23E8321C' stroke-linecap='round' d='M 13.08 73.97 A 44 44 0 0 1 7.49 61.39'/></g></svg>");
}

/* Spinning variant (decorative only) */
@keyframes tri-spin { to { transform: rotate(1turn); } }
.tri-circle--spin { animation: tri-spin 24s linear infinite; }
.tri-circle--spin > * { animation: tri-spin 24s linear infinite reverse; display: inline-block; }

/* ─────────────────────────── TRI-FRAME (signature large ring)
   Inner content well fills the FULL container circle (radius 50%).
   The SVG ring is drawn ON TOP via ::after overlay — its strokes cover
   the outer ~4.6% of the inner well, so there is no visible gap
   between the colored ring and the paper-grid inside it.
*/
.tri-frame {
  --frame-size: 480px;
  width: var(--frame-size);
  height: var(--frame-size);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.tri-frame__inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--CR);
  background-image:
    linear-gradient(rgba(26,23,16,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,23,16,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tri-frame--cream2 .tri-frame__inner { background-color: var(--CR2); }
.tri-frame--white  .tri-frame__inner { background-color: #fff; }
.tri-frame--dark   .tri-frame__inner {
  background-color: var(--K);
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
}
.tri-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke-width='4.583'><path stroke='%231A1710' stroke-linecap='butt' d='M 50 2.29 A 47.71 47.71 0 0 1 91.32 73.86'/><path stroke='%23E8321C' stroke-linecap='butt' d='M 91.32 73.86 A 47.71 47.71 0 0 1 8.68 73.86'/><path stroke='%23FFB800' stroke-linecap='butt' d='M 8.68 73.86 A 47.71 47.71 0 0 1 50 2.29'/><path stroke='%23FFB800' stroke-linecap='round' d='M 47.50 2.36 A 47.71 47.71 0 0 1 62.35 3.92'/><path stroke='%231A1710' stroke-linecap='round' d='M 92.52 71.66 A 47.71 47.71 0 0 1 83.74 83.74'/><path stroke='%23E8321C' stroke-linecap='round' d='M 9.98 75.98 A 47.71 47.71 0 0 1 3.92 62.35'/></g></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.tri-frame--slim::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke-width='3'><path stroke='%231A1710' stroke-linecap='butt' d='M 50 1.5 A 48.5 48.5 0 0 1 92.0 74.25'/><path stroke='%23E8321C' stroke-linecap='butt' d='M 92.0 74.25 A 48.5 48.5 0 0 1 8.0 74.25'/><path stroke='%23FFB800' stroke-linecap='butt' d='M 8.0 74.25 A 48.5 48.5 0 0 1 50 1.5'/><path stroke='%23FFB800' stroke-linecap='round' d='M 47.46 1.55 A 48.5 48.5 0 0 1 62.55 3.16'/><path stroke='%231A1710' stroke-linecap='round' d='M 92.66 72.10 A 48.5 48.5 0 0 1 84.30 84.30'/><path stroke='%23E8321C' stroke-linecap='round' d='M 7.34 72.10 A 48.5 48.5 0 0 1 3.16 62.55'/></g></svg>");
}

/* Tri-circle on dark backgrounds: cream inner fill so the ring colours
   read clearly against the dark parent. */
.tri-circle--on-dark {
  border-radius: 50%;
  background-color: var(--CR);
  box-shadow: 0 0 8px 0 rgba(255,255,255,.7);
}

/* Tri-circle on yellow backgrounds: same cream fill so arcs don't merge
   into the yellow parent. */
.tri-circle--on-yellow {
  border-radius: 50%;
  background-color: var(--CR);
  box-shadow: 0 0 8px 0 rgba(26,23,16,.55);
}

/* Tri-frame on yellow / dark backgrounds — pure blur at ring edge. */
.tri-frame--on-yellow { border-radius: 50%; box-shadow: 0 0 10px 0 rgba(26,23,16,.50); }
.tri-frame--on-dark   { border-radius: 50%; box-shadow: 0 0 10px 0 rgba(255,255,255,.65); }

