/* Bridge: Web Awesome Core reads Semmozhi's own tokens (tokens.css). Web Awesome supplies the components and
   layout; every colour, font and shape decision stays ours. Load AFTER tokens.css and webawesome.css.
   No raw colours in this file. Restrained: flat surfaces, small radii, thin lines, no gradients, no top-edge glow. */
:root {
  /* surfaces and text */
  --wa-color-surface-default: var(--bg);
  --wa-color-surface-raised:  var(--surface);
  --wa-color-surface-lowered: var(--bg-alt);
  --wa-color-surface-border:  var(--edge);
  --wa-color-text-normal: var(--text);
  --wa-color-text-quiet:  var(--text-muted);
  --wa-color-text-link:   var(--accent-text);
  --wa-color-focus:       var(--focus-ring);

  /* brand role = our accent / button colours */
  --wa-color-brand-fill-loud:   var(--button-bg);
  --wa-color-brand-fill-normal: color-mix(in srgb, var(--button-bg) 16%, var(--bg));
  --wa-color-brand-fill-quiet:  color-mix(in srgb, var(--button-bg) 8%, var(--bg));
  --wa-color-brand-border-loud: var(--button-bg);
  --wa-color-brand-border-normal: color-mix(in srgb, var(--button-bg) 45%, var(--bg));
  --wa-color-brand-on-loud:   var(--button-text);
  --wa-color-brand-on-normal: var(--accent-text);
  --wa-color-brand-on-quiet:  var(--accent-text);

  /* neutral role (callouts, tags, quiet fills) = our own surfaces */
  --wa-color-neutral-fill-quiet:    var(--bg-alt);
  --wa-color-neutral-fill-normal:   var(--bg-alt);
  --wa-color-neutral-border-quiet:  var(--edge);
  --wa-color-neutral-border-normal: var(--edge);
  --wa-color-neutral-on-quiet:  var(--text);
  --wa-color-neutral-on-normal: var(--text);

  /* warning role (the old .warn box) = the thread colour, softened */
  --wa-color-warning-fill-quiet:    color-mix(in srgb, var(--thread) 16%, var(--bg));
  --wa-color-warning-fill-normal:   color-mix(in srgb, var(--thread) 22%, var(--bg));
  --wa-color-warning-border-quiet:  color-mix(in srgb, var(--thread) 70%, var(--bg));
  --wa-color-warning-border-normal: color-mix(in srgb, var(--thread) 70%, var(--bg));
  --wa-color-warning-on-quiet:  var(--text);
  --wa-color-warning-on-normal: var(--text);

  /* type: Latin and Tamil both come from our stacks */
  --wa-font-family-body:     var(--font-body);
  --wa-font-family-heading:  var(--font-display);
  --wa-font-family-longform: var(--font-body);

  /* restrained shape */
  --wa-border-radius-scale: .5;
  --wa-border-width-scale: 1;
  --wa-shadow-offset-x-scale: 0;
  --wa-shadow-offset-y-scale: 0;
  --wa-shadow-blur-scale: 0;
}
/* Tamil keeps its own floor: at least 18px, line height at least 1.75 (design system rule 3) */
:lang(ta) { font-family: var(--font-tamil); }
/* Cards: the same chrome as the old .card (surface, 1px edge, small radius, soft rest shadow) */
wa-card { --spacing: var(--space-4); --border-radius: var(--radius-2); --border-color: var(--edge); }
wa-card::part(base) { box-shadow: var(--shadow-rest); }
wa-card h3 { margin: 0 0 var(--space-1); }
wa-card p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
/* Stretched link: a wa-card with .link-card is clickable as a whole through its title link */
wa-card.link-card { position: relative; }
wa-card.link-card a { color: var(--text); text-decoration: underline 1px transparent; text-underline-offset: .2em; }
wa-card.link-card a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-2); }
wa-card.link-card:hover::part(base) { box-shadow: var(--shadow-lift); border-color: var(--accent); }
wa-card.link-card:hover a { text-decoration-color: currentColor; }
wa-card .glyph { display: block; margin-bottom: var(--space-2); font: 400 2rem var(--font-brahmi); color: var(--accent-text); }

/* Buttons: UI font, same weight as the old .btn */
wa-button::part(base) { font-family: var(--font-ui); font-weight: 600; }
wa-callout { font-size: var(--text-sm); }
wa-tag::part(base) { font-family: var(--font-ui); }
wa-breadcrumb.crumbs { --wa-color-text-link: var(--accent-text); }
