/* ==========================================================================
   Define, Inc. — definesignal.ai holding-company landing page
   Built on the Define Design System (tokens verbatim from project/tokens.css).
   All selectors are prefixed .dsg- so nothing here can collide with the
   existing public/styles.css. Load this file AFTER styles.css so the page
   inherits the self-hosted @font-face declarations and wins on body rules.
   No inline style anywhere — CSP style-src 'self' clean.
   ========================================================================== */

/* --- Tokens (subset actually used, copied from the design system) --------- */
:root {
  --brand-magenta: #e5468a;
  --brand-violet: #7c6cf0;
  --brand-coral: #ff6a4d;
  --brand-core: #ffffff;
  --brand-plum: #2f1b33;
  --plum-900: #1b1020;
  --plum-800: #2f1b33;
  --plum-700: #3e2a44;
  --on-plum: #f6eff8;
  --on-plum-muted: #b7adbe;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-pill: 999px;
  --duration: 200ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --lh-normal: 1.5;
  --lh-relaxed: 1.6;
  --tracking-tight: -0.02em;
  --tracking-eyebrow: 0.26em;

  --font-display: 'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --ring-focus: 0 0 0 3px rgba(124, 108, 240, 0.55);

  /* page-local */
  --rule: rgba(246, 239, 248, 0.13);
  --rule-strong: rgba(246, 239, 248, 0.42);
  --frame-inset: 28px;
}

/* --- Page ---------------------------------------------------------------- */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

body.dsg-body {
  margin: 0;
  background-color: var(--plum-900);
  color: var(--on-plum);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dsg-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--frame-inset);
  overflow: hidden;
  isolation: isolate;
}

/* Colour as an accent, not a wash: two wide, soft radials, no blur filter. */
.dsg-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(
      62% 52% at 88% 6%,
      rgba(229, 70, 138, 0.30) 0%,
      rgba(229, 70, 138, 0.10) 42%,
      rgba(229, 70, 138, 0) 72%
    ),
    radial-gradient(
      54% 48% at 4% 96%,
      rgba(124, 108, 240, 0.22) 0%,
      rgba(124, 108, 240, 0.07) 46%,
      rgba(124, 108, 240, 0) 74%
    ),
    radial-gradient(
      40% 34% at 74% 88%,
      rgba(255, 106, 77, 0.12) 0%,
      rgba(255, 106, 77, 0) 70%
    );
  pointer-events: none;
}

/* The mark, oversized and near-silent, cropped by the frame. */
.dsg-ghost {
  position: absolute;
  z-index: -1;
  right: -246px;
  bottom: -290px;
  width: 700px;
  height: 700px;
  opacity: 0.05;
  pointer-events: none;
}

/* The hairline plate. */
.dsg-frame {
  position: relative;
  min-height: calc(100vh - (var(--frame-inset) * 2));
  min-height: calc(100svh - (var(--frame-inset) * 2));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
}

.dsg-rail {
  padding-left: clamp(24px, 5.6vw, 76px);
  padding-right: clamp(24px, 5.6vw, 76px);
}

/* --- Masthead ------------------------------------------------------------ */
.dsg-masthead {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--rule);
}

.dsg-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dsg-mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
}

.dsg-wordmark {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: 19px;
  letter-spacing: var(--tracking-tight);
  color: var(--on-plum);
}
.dsg-dot {
  color: var(--brand-magenta);
}

.dsg-masthead-nav {
  margin-left: auto;
}

.dsg-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-plum-muted);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.dsg-nav-link:hover,
.dsg-nav-link:focus-visible {
  color: var(--on-plum);
}
.dsg-nav-link .dsg-caret {
  display: block;
  width: 10px;
  height: 10px;
  flex: none;
  transition: transform var(--duration) var(--ease);
}
.dsg-nav-link:hover .dsg-caret {
  transform: translate(2px, -2px);
}

/* --- Statement ----------------------------------------------------------- */
.dsg-statement {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.dsg-inner {
  max-width: 41rem;
}

.dsg-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: var(--fw-regular);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.13;
  letter-spacing: -0.014em;
  color: var(--on-plum);
  text-wrap: balance;
}

.dsg-divider {
  width: 52px;
  height: 1px;
  margin: var(--space-10) 0 0;
  border: 0;
  background-color: var(--brand-magenta);
}

.dsg-sub {
  margin: var(--space-8) 0 0;
  max-width: 32rem;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--on-plum-muted);
  text-wrap: balance;
}

.dsg-cta-row {
  margin-top: var(--space-12);
}

.dsg-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: var(--on-plum);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}
.dsg-cta:hover,
.dsg-cta:focus-visible {
  background-color: var(--brand-core);
  border-color: var(--brand-core);
  color: var(--plum-900);
}
.dsg-arrow {
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform var(--duration) var(--ease);
}
.dsg-cta:hover .dsg-arrow {
  transform: translateX(3px);
}

/* --- Colophon ------------------------------------------------------------ */
.dsg-colophon {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  border-top: 1px solid var(--rule);
}

.dsg-colophon p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-plum-muted);
}

.dsg-seal {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.dsg-seal span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.dsg-seal span:nth-child(1) {
  background-color: var(--brand-magenta);
}
.dsg-seal span:nth-child(2) {
  background-color: var(--brand-violet);
}
.dsg-seal span:nth-child(3) {
  background-color: var(--brand-coral);
}

/* --- Focus --------------------------------------------------------------- */
.dsg-nav-link:focus-visible,
.dsg-cta:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-pill);
}

/* --- Mobile (CSS media query, not a JS width hook) ------------------------ */
@media (max-width: 760px) {
  :root {
    --frame-inset: 14px;
  }
  .dsg-rail {
    padding-left: 22px;
    padding-right: 22px;
  }
  .dsg-masthead {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }
  .dsg-statement {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  .dsg-headline {
    font-size: clamp(31px, 8.4vw, 42px);
    line-height: 1.16;
  }
  .dsg-divider {
    margin-top: var(--space-8);
  }
  .dsg-sub {
    margin-top: var(--space-6);
    font-size: 16px;
  }
  .dsg-cta-row {
    margin-top: var(--space-10);
  }
  .dsg-ghost {
    right: -210px;
    bottom: -250px;
    width: 500px;
    height: 500px;
    opacity: 0.045;
  }
  .dsg-nav-link {
    font-size: 10px;
    letter-spacing: 0.16em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dsg-cta,
  .dsg-arrow,
  .dsg-caret,
  .dsg-nav-link {
    transition: none;
  }
  .dsg-cta:hover .dsg-arrow,
  .dsg-nav-link:hover .dsg-caret {
    transform: none;
  }
}
