/* Genesis Daylight — the default light theme. Cool porcelain ground, ink type, one ember accent,
 * and a faint dawn glow along the top edge. Every value here is a token so a client variant
 * (ThemeVariantBuilder) can override the palette and fonts without touching anything else. */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --theme-font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --theme-font-heading: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Ground: porcelain with a slight blue bias, warmed only where first light hits the top. */
  --theme-has-bg-image: 1;
  --theme-bg-image:
    radial-gradient(70% 34% at 50% -6%, rgba(245, 150, 92, 0.16) 0%, rgba(245, 150, 92, 0) 70%),
    radial-gradient(45% 28% at 92% -4%, rgba(120, 112, 220, 0.08) 0%, rgba(120, 112, 220, 0) 70%),
    linear-gradient(180deg, #f7f8fa 0%, #f3f4f7 100%);
  --theme-bg-position: center top;
  --theme-bg-size: cover;
  --theme-bg-transform: none;
  --theme-bg-overlay: transparent;
  --theme-body-bg: #f4f5f8;

  /* Ink. Muted and label both clear WCAG AA on white and on the ground. */
  --theme-text-primary: #12131c;
  --theme-text-muted: #545867;
  --theme-text-label: #5f6372;
  --theme-section-label: #b23c0c;

  /* Cards are real white sheets on the porcelain, lifted by a hairline and a soft shadow. */
  --theme-card-bg: #ffffff;
  --theme-card-bg-hover: #f9f9fb;
  --theme-card-border: rgba(18, 19, 28, 0.09);
  --theme-card-icon-bg: rgba(194, 65, 12, 0.08);
  --theme-card-icon-border: rgba(194, 65, 12, 0.2);
  --theme-card-shadow: rgba(18, 19, 28, 0.06);

  --theme-divider: rgba(18, 19, 28, 0.08);
  --theme-backdrop: none;

  /* One accent: ember, 5.2:1 on white. Buttons that advance stay ink; the accent marks the way. */
  --theme-accent: #c2410c;
  --theme-accent-ink: #ffffff;
  --theme-btn-color: #c2410c;
  --theme-btn-border: rgba(18, 19, 28, 0.16);
  --theme-btn-color-hover: #9a330a;
  --theme-btn-border-hover: rgba(18, 19, 28, 0.34);

  --theme-env-badge-bg: #ffffff;
  --theme-env-badge-border: rgba(18, 19, 28, 0.1);

  --theme-link-color: #b23c0c;
  --theme-link-border: rgba(194, 65, 12, 0.3);
  --theme-link-color-hover: #8a2e08;
  --theme-link-border-hover: rgba(194, 65, 12, 0.6);

  --theme-go-color: #c2410c;

  --theme-danger: #c0362c;
  --theme-warning: #9a5b00;
  --theme-success: #1d7a4b;
  --theme-info: #2a62c9;
  --theme-violet: #6a4fd1;

  --theme-preview-bg: #ffffff;
  --theme-preview-check: #eef0f3;

  /* Admin shell */
  --theme-sidebar-bg: #fbfbfc;
  --theme-sidebar-border: rgba(18, 19, 28, 0.08);
  --theme-menu-bg: #ffffff;
  --theme-menu-border: rgba(18, 19, 28, 0.1);
  --theme-menu-hover: #f1f2f5;
  --theme-menu-shadow: rgba(18, 19, 28, 0.12);
  --theme-control-bg: #ffffff;
  --theme-control-border: rgba(18, 19, 28, 0.14);
  --theme-control-hover: #eceef2;
  --theme-nav-text: #474b59;
  --theme-nav-text-active: #12131c;
  --theme-nav-hover: #f0f1f4;
  --theme-input-bg: #ffffff;
  --theme-primary-bg: #12131c;
  --theme-primary-bg-hover: #2b2d3b;
  --theme-toast-bg: rgba(255, 255, 255, 0.97);
  --theme-toast-border: rgba(18, 19, 28, 0.12);
  --theme-focus: #c2410c;
}

body {
  font-family: var(--theme-font-body);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--theme-font-heading);
  text-wrap: balance;
}
h1, h2 { font-weight: 700; letter-spacing: -0.022em; line-height: 1.12; }
h3, h4 { font-weight: 600; letter-spacing: -0.01em; }

/* Emphasis inside a heading is lit in ember. */
h1 em, h2 em {
  font-style: normal;
  color: var(--theme-accent);
}

::selection {
  background: rgba(194, 65, 12, 0.16);
  color: var(--theme-text-primary);
}

/* Tokens v2: opaque surfaces and the focus ring. */
:root {
  --theme-surface-1: var(--theme-body-bg);
  --theme-surface-2: #ffffff;
  --theme-surface-3: #eceef2;
  --theme-focus-ring: 2px solid var(--theme-accent);
}
