/* Laitest reusable graphic elements
   Pair with site.css — brand, icons, ornaments, plates, chips */

/* ── Icons (mask → currentColor, theme-aware) ── */
.icon {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-sm { width: 0.9em; height: 0.9em; }
.icon-md { width: 1.25em; height: 1.25em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-xl { width: 2.25em; height: 2.25em; }

.icon-security { --icon: url("/assets/icons/security.svg"); }
.icon-trends   { --icon: url("/assets/icons/trends.svg"); }
.icon-signal   { --icon: url("/assets/icons/signal.svg"); }
.icon-journal  { --icon: url("/assets/icons/journal.svg"); }
.icon-spark    { --icon: url("/assets/icons/spark.svg"); }
.icon-copy     { --icon: url("/assets/icons/copy.svg"); }
.icon-arrow    { --icon: url("/assets/icons/arrow-out.svg"); }
.icon-calendar { --icon: url("/assets/icons/calendar.svg"); }
.icon-feed     { --icon: url("/assets/icons/feed.svg"); }

/* ── Brand mark (image or CSS) ── */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo img.mark,
.brand-logo .mark-img {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 7px;
  display: block;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent);
}
.brand-logo .word {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand-logo .tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Ornament divider ── */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem auto;
  max-width: 16rem;
  color: var(--muted);
  opacity: 0.85;
}
.ornament-divider img,
.ornament-divider svg {
  width: 100%;
  height: 16px;
  color: inherit;
}
.ornament-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.ornament-divider .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  background: color-mix(in srgb, var(--warm) 35%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 80%, transparent);
  flex-shrink: 0;
}

/* ── Radar glyph plate ── */
.radar-glyph {
  width: 5.5rem;
  height: 5.5rem;
  color: var(--accent);
  opacity: 0.9;
  flex-shrink: 0;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("/assets/ornaments/radar-rings.svg") center / contain no-repeat;
  mask: url("/assets/ornaments/radar-rings.svg") center / contain no-repeat;
}
/* If an <img> is nested, hide it (mask paints the glyph) */
.radar-glyph img,
.radar-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  pointer-events: none;
}

/* ── Hero graphic plate ── */
.hero-plate {
  position: relative;
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-plate {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 2.5rem;
  }
  .hero-plate .hero-copy { min-width: 0; }
}
.hero-visual {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 11;
  background: var(--bg-elev);
  min-height: 180px;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual .wash-light { display: block; }
.hero-visual .wash-dark { display: none; }
html[data-theme="dark"] .hero-visual .wash-light,
html[data-theme="darkest"] .hero-visual .wash-light { display: none; }
html[data-theme="dark"] .hero-visual .wash-dark,
html[data-theme="darkest"] .hero-visual .wash-dark { display: block; }
.hero-visual .float-mark {
  position: absolute;
  right: 10%;
  bottom: 12%;
  width: clamp(4.5rem, 28%, 7rem);
  height: auto;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, #fff 25%, transparent);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  transform: rotate(-6deg);
}
.hero-visual .caption {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5f0e6;
  background: color-mix(in srgb, #1a1712 55%, transparent);
  backdrop-filter: blur(8px);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #fff 12%, transparent);
}
@media (max-width: 899px) {
  .hero-visual { max-width: 28rem; }
}

/* ── Feature chip / icon tile ── */
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem 0.42rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 550;
  text-decoration: none;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}
.feature-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.feature-chip .icon {
  color: var(--accent);
  width: 1rem;
  height: 1rem;
}

/* ── Icon card (nav / CTA tiles) ── */
.icon-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s var(--ease);
}
.icon-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
  color: inherit;
}
.icon-card .icon-bubble {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.icon-card .icon-bubble .icon {
  width: 1.25rem;
  height: 1.25rem;
}
.icon-card h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}
.icon-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Stat with glyph ── */
.stat-glyph {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.stat-glyph .icon {
  color: var(--warm);
  opacity: 0.85;
}

/* ── Pattern fills ── */
.pattern-dots {
  background-color: transparent;
  background-image: url("/assets/patterns/dots.svg");
  background-size: 18px 18px;
  color: color-mix(in srgb, var(--ink) 12%, transparent);
}
.pattern-ledger {
  background-image: url("/assets/patterns/ledger-lines.svg");
  background-size: 40px 24px;
  color: color-mix(in srgb, var(--ink) 8%, transparent);
}

/* ── Ledger frame (decorative corner card) ── */
.ledger-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
  overflow: hidden;
}
.ledger-frame::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  width: 2rem;
  height: 2rem;
  background-color: color-mix(in srgb, var(--muted) 55%, transparent);
  -webkit-mask: url("/assets/ornaments/ledger-corner.svg") center / contain no-repeat;
  mask: url("/assets/ornaments/ledger-corner.svg") center / contain no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.ledger-frame > * { position: relative; }

/* ── Emblem medallion ── */
.emblem {
  width: clamp(5rem, 18vw, 7.5rem);
  aspect-ratio: 1;
  border-radius: 22%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}

/* ── Section head with icon ── */
.section-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 2rem 0 0.4rem;
}
.section-head .icon {
  color: var(--accent);
  width: 1.35rem;
  height: 1.35rem;
}
.section-head h2 {
  font-family: var(--font);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
}

/* ── Empty / empty-state plate ── */
.empty-plate {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  color: var(--muted);
}
.empty-plate .radar-glyph {
  margin: 0 auto 1rem;
  opacity: 0.5;
}
.empty-plate p { margin: 0; font-size: 0.92rem; }

/* ── Footer brand row ── */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.footer-brand img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 7px;
}
.footer-brand .name {
  font-family: var(--font);
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: 1.05rem;
}
.footer-brand .footer-tag {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font);
}

/* Brand story plate */
.brand-story {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 800px) {
  .brand-story {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}
.brand-story .plate {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.brand-story .plate img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.brand-story .marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.brand-story .marks img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  box-shadow: var(--shadow);
}
.brand-story h2 {
  font-family: var(--font);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.brand-story p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
  max-width: 36rem;
}

/* ── Design kit showcase (optional /design page) ── */
.kit-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  padding: 1rem 0 2rem;
}
.kit-swatch {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elev);
}
.kit-swatch .chip {
  height: 3.25rem;
}
.kit-swatch .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
}
.kit-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.5rem 0 1.5rem;
}
.kit-icons .sample {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.kit-icons .sample .icon {
  width: 1.35rem;
  height: 1.35rem;
}
